module_profile.h
Go to the documentation of this file.
1 /******************************************************************************
2 Copyright (c), 2023 - Analog Devices Inc. All Rights Reserved.
3 This software is PROPRIETARY & CONFIDENTIAL to Analog Devices, Inc.
4 and its licensors.
5 ******************************************************************************/
6 #ifndef MODULE_PROFILE_H
7 #define MODULE_PROFILE_H
8 
9 #ifdef ENABLE_FUNCTION_PROFILING
10 extern volatile int* pprof_buff;
11 void dumpFunctionParams(int ID);
12 void initProfile(void);
13 void closeProfile(void);
14 void flushProfile(void);
15 
16 #define PROFILE_FUNCTION_START(ID) dumpFunctionParams(ID);
17 #define PROFILE_FUNCTION_END(ID) PROFILE_FUNCTION_START(ID)
18 
19 #define FLUSH_FUNCTION_PROFILE() flushProfile()
20 #define INIT_FUNCTION_PROFILE() initProfile()
21 #define CLOSE_FUNCTION_PROFILE() closeProfile()
22 
23 #else /* !ENABLE_FUNCTION_PROFILING */
24 #define PROFILE_FUNCTION_START(ID)
25 #define PROFILE_FUNCTION_END(ID)
26 
27 #define FLUSH_FUNCTION_PROFILE()
28 #define INIT_FUNCTION_PROFILE()
29 #define CLOSE_FUNCTION_PROFILE()
30 #endif /* !ENABLE_FUNCTION_PROFILING */
31 
32 #ifdef PARSE_FUNCTION
33 #define PROFILE_ID_START() \
34  void profile_id_init(void) \
35  {
36 #define PROFILE_ID_END() }
37 #define PROFILE_ID(id_name, id_num) profiles[id_num].func_name = #id_name;
38 #else
39 #define PROFILE_ID_START()
40 #define PROFILE_ID_END()
41 #define PROFILE_ID(id_name, id_num) static const int id_name = id_num;
42 #endif /* PARSE_FUNCTION */
43 
44 /* ID list */
45 
47 
48 PROFILE_ID(adtf31xx_readNextFrame, 0)
49 PROFILE_ID(publish_PointCloud, 1)
50 PROFILE_ID(adtf31xx_computePointCloud, 2)
51 PROFILE_ID(adtf31xx_abFrameCompression, 3)
52 PROFILE_ID(adtf31xx_depthFrameCompression, 4)
53 PROFILE_ID(Publish_CompressImg, 5)
54 PROFILE_ID(readInput_Thread, 6)
55 PROFILE_ID(processOutput_Thread, 7)
56 
58 
59 #endif /* MODULE_PROFILE_H */
PROFILE_ID
#define PROFILE_ID(id_name, id_num)
Definition: module_profile.h:41
PROFILE_ID_START
#define PROFILE_ID_START()
Definition: module_profile.h:39
PROFILE_ID_END
#define PROFILE_ID_END()
Definition: module_profile.h:40


adi_3dtof_adtf31xx
Author(s):
autogenerated on Sat May 17 2025 02:12:30