6 #ifndef __MODULE_PROFILE_H__
7 #define __MODULE_PROFILE_H__
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);
16 #define PROFILE_FUNCTION_START(ID) dumpFunctionParams(ID);
17 #define PROFILE_FUNCTION_END(ID) PROFILE_FUNCTION_START(ID)
19 #define FLUSH_FUNCTION_PROFILE() flushProfile()
20 #define INIT_FUNCTION_PROFILE() initProfile()
21 #define CLOSE_FUNCTION_PROFILE() closeProfile()
24 #define PROFILE_FUNCTION_START(ID)
25 #define PROFILE_FUNCTION_END(ID)
27 #define FLUSH_FUNCTION_PROFILE()
28 #define INIT_FUNCTION_PROFILE()
29 #define CLOSE_FUNCTION_PROFILE()
33 #define PROFILE_ID_START() \
34 void profile_id_init(void) \
36 #define PROFILE_ID_END() }
37 #define PROFILE_ID(id_name, id_num) profiles[id_num].func_name = #id_name;
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;
49 PROFILE_ID(ImageStitch_CREATE_COMBINED_CLOUD, 2)
51 PROFILE_ID(ImageStitch_ACCUMULATE_COMBINED_CLOUD, 4)
52 PROFILE_ID(ImageStitch_TRANSFORM_COMBINED_CLOUD, 5)
54 PROFILE_ID(ImageStitch_CYLINDRICALPROJECT_IR, 7)
55 PROFILE_ID(ImageStitch_CYLINDRICALPROJECT_DEPTH, 8)
56 PROFILE_ID(CylindricalProjection_Initialize, 9)
57 PROFILE_ID(CylindricalProjection_LoadCloud, 10)
58 PROFILE_ID(CylindricalProjection_MakeImage, 11)
59 PROFILE_ID(CylindricalProjection_ShowImage, 12)
62 PROFILE_ID(StitchFramesCoreGPU_stitchFrames, 15)
65 PROFILE_ID(StitchFramesCoreGPU_postProcessStage1, 18)
66 PROFILE_ID(StitchFramesCoreGPU_postProcessStage2, 19)
69 PROFILE_ID(StitchFramesCoreCPU_stitchFrames, 22)
72 PROFILE_ID(StitchFramesCoreCPU_postProcessStage1, 25)
73 PROFILE_ID(StitchFramesCoreCPU_postProcessStage2, 26)