Lines Matching refs:hist
83 struct timerlat_hist_cpu *hist; member
99 if (data->hist[cpu].irq) in timerlat_free_histogram()
100 free(data->hist[cpu].irq); in timerlat_free_histogram()
102 if (data->hist[cpu].thread) in timerlat_free_histogram()
103 free(data->hist[cpu].thread); in timerlat_free_histogram()
105 if (data->hist[cpu].user) in timerlat_free_histogram()
106 free(data->hist[cpu].user); in timerlat_free_histogram()
111 if (data->hist) in timerlat_free_histogram()
112 free(data->hist); in timerlat_free_histogram()
135 data->hist = calloc(1, sizeof(*data->hist) * nr_cpus); in timerlat_alloc_histogram()
136 if (!data->hist) in timerlat_alloc_histogram()
141 data->hist[cpu].irq = calloc(1, sizeof(*data->hist->irq) * (entries + 1)); in timerlat_alloc_histogram()
142 if (!data->hist[cpu].irq) in timerlat_alloc_histogram()
145 data->hist[cpu].thread = calloc(1, sizeof(*data->hist->thread) * (entries + 1)); in timerlat_alloc_histogram()
146 if (!data->hist[cpu].thread) in timerlat_alloc_histogram()
149 data->hist[cpu].user = calloc(1, sizeof(*data->hist->user) * (entries + 1)); in timerlat_alloc_histogram()
150 if (!data->hist[cpu].user) in timerlat_alloc_histogram()
156 data->hist[cpu].min_irq = ~0; in timerlat_alloc_histogram()
157 data->hist[cpu].min_thread = ~0; in timerlat_alloc_histogram()
158 data->hist[cpu].min_user = ~0; in timerlat_alloc_histogram()
180 int *hist; in timerlat_hist_update() local
188 hist = data->hist[cpu].irq; in timerlat_hist_update()
189 data->hist[cpu].irq_count++; in timerlat_hist_update()
190 update_min(&data->hist[cpu].min_irq, &latency); in timerlat_hist_update()
191 update_sum(&data->hist[cpu].sum_irq, &latency); in timerlat_hist_update()
192 update_max(&data->hist[cpu].max_irq, &latency); in timerlat_hist_update()
194 hist = data->hist[cpu].thread; in timerlat_hist_update()
195 data->hist[cpu].thread_count++; in timerlat_hist_update()
196 update_min(&data->hist[cpu].min_thread, &latency); in timerlat_hist_update()
197 update_sum(&data->hist[cpu].sum_thread, &latency); in timerlat_hist_update()
198 update_max(&data->hist[cpu].max_thread, &latency); in timerlat_hist_update()
200 hist = data->hist[cpu].user; in timerlat_hist_update()
201 data->hist[cpu].user_count++; in timerlat_hist_update()
202 update_min(&data->hist[cpu].min_user, &latency); in timerlat_hist_update()
203 update_sum(&data->hist[cpu].sum_user, &latency); in timerlat_hist_update()
204 update_max(&data->hist[cpu].max_user, &latency); in timerlat_hist_update()
208 hist[bucket]++; in timerlat_hist_update()
210 hist[entries]++; in timerlat_hist_update()
264 if (!data->hist[cpu].irq_count && !data->hist[cpu].thread_count) in timerlat_hist_header()
303 if (!data->hist[cpu].irq_count && !data->hist[cpu].thread_count) in timerlat_print_summary()
308 data->hist[cpu].irq_count); in timerlat_print_summary()
312 data->hist[cpu].thread_count); in timerlat_print_summary()
316 data->hist[cpu].user_count); in timerlat_print_summary()
327 if (!data->hist[cpu].irq_count && !data->hist[cpu].thread_count) in timerlat_print_summary()
331 if (data->hist[cpu].irq_count) in timerlat_print_summary()
333 data->hist[cpu].min_irq); in timerlat_print_summary()
339 if (data->hist[cpu].thread_count) in timerlat_print_summary()
341 data->hist[cpu].min_thread); in timerlat_print_summary()
347 if (data->hist[cpu].user_count) in timerlat_print_summary()
349 data->hist[cpu].min_user); in timerlat_print_summary()
363 if (!data->hist[cpu].irq_count && !data->hist[cpu].thread_count) in timerlat_print_summary()
367 if (data->hist[cpu].irq_count) in timerlat_print_summary()
369 data->hist[cpu].sum_irq / data->hist[cpu].irq_count); in timerlat_print_summary()
375 if (data->hist[cpu].thread_count) in timerlat_print_summary()
377 data->hist[cpu].sum_thread / data->hist[cpu].thread_count); in timerlat_print_summary()
383 if (data->hist[cpu].user_count) in timerlat_print_summary()
385 data->hist[cpu].sum_user / data->hist[cpu].user_count); in timerlat_print_summary()
399 if (!data->hist[cpu].irq_count && !data->hist[cpu].thread_count) in timerlat_print_summary()
403 if (data->hist[cpu].irq_count) in timerlat_print_summary()
405 data->hist[cpu].max_irq); in timerlat_print_summary()
411 if (data->hist[cpu].thread_count) in timerlat_print_summary()
413 data->hist[cpu].max_thread); in timerlat_print_summary()
419 if (data->hist[cpu].user_count) in timerlat_print_summary()
421 data->hist[cpu].max_user); in timerlat_print_summary()
452 if (!data->hist[cpu].irq_count && !data->hist[cpu].thread_count) in timerlat_print_stats_all()
455 cpu_data = &data->hist[cpu]; in timerlat_print_stats_all()
582 if (!data->hist[cpu].irq_count && !data->hist[cpu].thread_count) in timerlat_print_stats()
586 total += data->hist[cpu].irq[bucket]; in timerlat_print_stats()
588 data->hist[cpu].irq[bucket]); in timerlat_print_stats()
592 total += data->hist[cpu].thread[bucket]; in timerlat_print_stats()
594 data->hist[cpu].thread[bucket]); in timerlat_print_stats()
598 total += data->hist[cpu].user[bucket]; in timerlat_print_stats()
600 data->hist[cpu].user[bucket]); in timerlat_print_stats()
622 if (!data->hist[cpu].irq_count && !data->hist[cpu].thread_count) in timerlat_print_stats()
627 data->hist[cpu].irq[data->entries]); in timerlat_print_stats()
631 data->hist[cpu].thread[data->entries]); in timerlat_print_stats()
635 data->hist[cpu].user[data->entries]); in timerlat_print_stats()