aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/Profiling.hpp
diff options
context:
space:
mode:
authorDerek Lamberti <derek.lamberti@arm.com>2019-08-07 17:01:57 +0100
committerDerek Lamberti <derek.lamberti@arm.com>2019-08-09 12:17:50 +0000
commit6b4dfc2df9271b2e9e0b9e0e0a78f715ddebf36e (patch)
tree7fe9cc2e8b023cb138e5e2af07feeec7c3857dc4 /src/armnn/Profiling.hpp
parent3d8a9eda15c7732c689a80ddde916d6e3373542c (diff)
downloadarmnn-6b4dfc2df9271b2e9e0b9e0e0a78f715ddebf36e.tar.gz
IVGCVSW-3603 *Json printer prints full profiling hierarchy
Change-Id: Ide5acbf993c2bcff5265b72fc979caa6f183bb22 Signed-off-by: Derek Lamberti <derek.lamberti@arm.com>
Diffstat (limited to 'src/armnn/Profiling.hpp')
-rw-r--r--src/armnn/Profiling.hpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/armnn/Profiling.hpp b/src/armnn/Profiling.hpp
index 0b2e46d46d..d52bbb0aec 100644
--- a/src/armnn/Profiling.hpp
+++ b/src/armnn/Profiling.hpp
@@ -158,9 +158,15 @@ private:
} // namespace armnn
+
+#include <boost/preprocessor.hpp>
+
+#define ARMNN_SCOPED_PROFILING_EVENT_WITH_INSTRUMENTS_UNIQUE_LOC(backendId, /*name,*/ ...) \
+ armnn::ScopedProfilingEvent BOOST_PP_CAT(e_,__LINE__)(backendId, /*name,*/ __VA_ARGS__);
+
// The event name must be known at compile time
#define ARMNN_SCOPED_PROFILING_EVENT_WITH_INSTRUMENTS(backendId, /*name,*/ ...) \
- armnn::ScopedProfilingEvent e_##__FILE__##__LINE__(backendId, /*name,*/ __VA_ARGS__);
+ ARMNN_SCOPED_PROFILING_EVENT_WITH_INSTRUMENTS_UNIQUE_LOC(backendId, /*name,*/ __VA_ARGS__);
#define ARMNN_SCOPED_PROFILING_EVENT(backendId, name) \
ARMNN_SCOPED_PROFILING_EVENT_WITH_INSTRUMENTS(backendId, name, armnn::WallClockTimer())