Lines Matching refs:ps_profile_data

76 void init_profiler(profile_database_t *ps_profile_data)  in init_profiler()  argument
78 memset(ps_profile_data, 0, sizeof(*ps_profile_data)); in init_profiler()
113 void profile_start(profile_database_t *ps_profile_data) in profile_start() argument
115 ps_profile_data->u8_time_start = profile_sample_time(); in profile_start()
116 assert(0 == ps_profile_data->u1_sample_taken_flag); in profile_start()
117 ps_profile_data->u1_sample_taken_flag = 1; in profile_start()
132 void profile_sample_time_end(profile_database_t *ps_profile_data) in profile_sample_time_end() argument
134 ps_profile_data->u8_time_end = profile_sample_time(); in profile_sample_time_end()
135 assert(1 == ps_profile_data->u1_sample_taken_flag); in profile_sample_time_end()
136 ps_profile_data->u1_sample_taken_flag = 0; in profile_sample_time_end()
150 void profile_get_time_taken(profile_database_t *ps_profile_data) in profile_get_time_taken() argument
152 if(ps_profile_data->u8_time_end < ps_profile_data->u8_time_start) in profile_get_time_taken()
155 ps_profile_data->u8_cur_time = in profile_get_time_taken()
156 ((LWORD64)0xFFFFFFFF - ps_profile_data->u8_time_start) + ps_profile_data->u8_time_end; in profile_get_time_taken()
160 ps_profile_data->u8_cur_time = in profile_get_time_taken()
161 ps_profile_data->u8_time_end - ps_profile_data->u8_time_start; in profile_get_time_taken()
174 void profile_get_average(profile_database_t *ps_profile_data) in profile_get_average() argument
176 ps_profile_data->u8_total_time += ps_profile_data->u8_cur_time; in profile_get_average()
177 ps_profile_data->u4_num_profile_calls++; in profile_get_average()
179 ps_profile_data->u8_avg_time = in profile_get_average()
180 (ps_profile_data->u8_total_time / ps_profile_data->u4_num_profile_calls); in profile_get_average()
194 int profile_get_avg_time(profile_database_t *ps_profile_data) in profile_get_avg_time() argument
196 return (UWORD32)(ps_profile_data->u8_avg_time); in profile_get_avg_time()
208 void profile_get_peak(profile_database_t *ps_profile_data) in profile_get_peak() argument
210 if(ps_profile_data->u8_cur_time > ps_profile_data->u8_peak_time) in profile_get_peak()
212 ps_profile_data->u8_peak_time = ps_profile_data->u8_cur_time; in profile_get_peak()
226 int profile_get_peak_time(profile_database_t *ps_profile_data) in profile_get_peak_time() argument
228 return (UWORD32)(ps_profile_data->u8_peak_time); in profile_get_peak_time()
241 void profile_end(profile_database_t *ps_profile_data, char *msg) in profile_end() argument
249 (UWORD32)(ps_profile_data->u8_avg_time)); in profile_end()
253 (UWORD32)(ps_profile_data->u8_peak_time)); in profile_end()
260 (UWORD32)(ps_profile_data->u8_avg_time)); in profile_end()
264 (UWORD32)(ps_profile_data->u8_peak_time)); in profile_end()
278 void profile_stop(profile_database_t *ps_profile_data, char *msg) in profile_stop() argument
281 profile_sample_time_end(ps_profile_data); in profile_stop()
283 profile_get_time_taken(ps_profile_data); in profile_stop()
285 profile_get_average(ps_profile_data); in profile_stop()
287 profile_get_peak(ps_profile_data); in profile_stop()
291 printf("%s, fps: :%10.3f", msg, (DOUBLE)(1000000.0 / ps_profile_data->u8_avg_time)); in profile_stop()