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;