Skip to content

Commit f69b48a

Browse files
committed
feat: add profiling header and setup for tracepoints
Switch profiler levels from enums to macros to preserve RAII. Justification: Handling the profiler level logic inside the ARM_COMPUTE_TRACE_EVENT macro will introduce a nested "if" scope which will break RAII. This behaviour will make the macro tracks the scope of the "if" statement introduced in the macro instead of tracking the scope of the fuction we want to track. Using macros keeps the implementation simpler. Partially Resolves: COMPMID-8330 Signed-off-by: Walid Ben Romdhane <[email protected]> Change-Id: Ic85c2b098d614335e172fcdbe4b18b2243d55fbe Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/14825 Benchmark: Arm Jenkins <[email protected]> Tested-by: Arm Jenkins <[email protected]> Comments-Addressed: Arm Jenkins <[email protected]> Reviewed-by: Gunes Bayir <[email protected]>
1 parent 8703443 commit f69b48a

File tree

1 file changed

+12
-15
lines changed

1 file changed

+12
-15
lines changed

src/common/utils/profile/acl_profile.h

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,20 @@
2626
#define ACL_SRC_COMMON_UTILS_PROFILE_ACL_PROFILE_H
2727

2828
// Define ACL profile categories
29-
#define PROF_CAT_NONE "NONE"
30-
#define PROF_CAT_CPU "CPU"
31-
#define PROF_CAT_NEON "NEON"
32-
#define PROF_CAT_SVE "SVE"
33-
#define PROF_CAT_SME "SME"
34-
#define PROF_CAT_GPU "GPU"
35-
#define PROF_CAT_MEMORY "MEMORY"
36-
#define PROF_CAT_RUNTIME "RUNTIME"
37-
#define PROF_CAT_SCHEDULER "SCHEDULER"
29+
#define ARM_COMPUTE_PROF_CAT_NONE "NONE"
30+
#define ARM_COMPUTE_PROF_CAT_CPU "CPU"
31+
#define ARM_COMPUTE_PROF_CAT_NEON "NEON"
32+
#define ARM_COMPUTE_PROF_CAT_SVE "SVE"
33+
#define ARM_COMPUTE_PROF_CAT_SME "SME"
34+
#define ARM_COMPUTE_PROF_CAT_GPU "GPU"
35+
#define ARM_COMPUTE_PROF_CAT_MEMORY "MEMORY"
36+
#define ARM_COMPUTE_PROF_CAT_RUNTIME "RUNTIME"
37+
#define ARM_COMPUTE_PROF_CAT_SCHEDULER "SCHEDULER"
3838

3939
// Define ACL profile levels
40-
enum class ProfileLevel
41-
{
42-
L0 = 0,
43-
L1 = 1,
44-
L2 = 2
45-
};
40+
#define ARM_COMPUTE_PROF_L0 0
41+
#define ARM_COMPUTE_PROF_L1 1
42+
#define ARM_COMPUTE_PROF_L2 2
4643

4744
#define ARM_COMPUTE_TRACE_EVENT(category, level, name) \
4845
(void)category; \

0 commit comments

Comments
 (0)