Lines Matching refs:hist
62 struct timerlat_hist_cpu *hist; member
78 if (data->hist[cpu].irq) in timerlat_free_histogram()
79 free(data->hist[cpu].irq); in timerlat_free_histogram()
81 if (data->hist[cpu].thread) in timerlat_free_histogram()
82 free(data->hist[cpu].thread); in timerlat_free_histogram()
86 if (data->hist) in timerlat_free_histogram()
87 free(data->hist); in timerlat_free_histogram()
110 data->hist = calloc(1, sizeof(*data->hist) * nr_cpus); in timerlat_alloc_histogram()
111 if (!data->hist) in timerlat_alloc_histogram()
116 data->hist[cpu].irq = calloc(1, sizeof(*data->hist->irq) * (entries + 1)); in timerlat_alloc_histogram()
117 if (!data->hist[cpu].irq) in timerlat_alloc_histogram()
119 data->hist[cpu].thread = calloc(1, sizeof(*data->hist->thread) * (entries + 1)); in timerlat_alloc_histogram()
120 if (!data->hist[cpu].thread) in timerlat_alloc_histogram()
126 data->hist[cpu].min_irq = ~0; in timerlat_alloc_histogram()
127 data->hist[cpu].min_thread = ~0; in timerlat_alloc_histogram()
149 int *hist; in timerlat_hist_update() local
158 hist = data->hist[cpu].irq; in timerlat_hist_update()
159 data->hist[cpu].irq_count++; in timerlat_hist_update()
160 update_min(&data->hist[cpu].min_irq, &latency); in timerlat_hist_update()
161 update_sum(&data->hist[cpu].sum_irq, &latency); in timerlat_hist_update()
162 update_max(&data->hist[cpu].max_irq, &latency); in timerlat_hist_update()
164 hist = data->hist[cpu].thread; in timerlat_hist_update()
165 data->hist[cpu].thread_count++; in timerlat_hist_update()
166 update_min(&data->hist[cpu].min_thread, &latency); in timerlat_hist_update()
167 update_sum(&data->hist[cpu].sum_thread, &latency); in timerlat_hist_update()
168 update_max(&data->hist[cpu].max_thread, &latency); in timerlat_hist_update()
172 hist[bucket]++; in timerlat_hist_update()
174 hist[entries]++; in timerlat_hist_update()
228 if (!data->hist[cpu].irq_count && !data->hist[cpu].thread_count) in timerlat_hist_header()
264 if (!data->hist[cpu].irq_count && !data->hist[cpu].thread_count) in timerlat_print_summary()
269 data->hist[cpu].irq_count); in timerlat_print_summary()
273 data->hist[cpu].thread_count); in timerlat_print_summary()
284 if (!data->hist[cpu].irq_count && !data->hist[cpu].thread_count) in timerlat_print_summary()
289 data->hist[cpu].min_irq); in timerlat_print_summary()
293 data->hist[cpu].min_thread); in timerlat_print_summary()
304 if (!data->hist[cpu].irq_count && !data->hist[cpu].thread_count) in timerlat_print_summary()
308 if (data->hist[cpu].irq_count) in timerlat_print_summary()
310 data->hist[cpu].sum_irq / data->hist[cpu].irq_count); in timerlat_print_summary()
316 if (data->hist[cpu].thread_count) in timerlat_print_summary()
318 data->hist[cpu].sum_thread / data->hist[cpu].thread_count); in timerlat_print_summary()
332 if (!data->hist[cpu].irq_count && !data->hist[cpu].thread_count) in timerlat_print_summary()
337 data->hist[cpu].max_irq); in timerlat_print_summary()
341 data->hist[cpu].max_thread); in timerlat_print_summary()
372 if (!data->hist[cpu].irq_count && !data->hist[cpu].thread_count) in timerlat_print_stats()
376 total += data->hist[cpu].irq[bucket]; in timerlat_print_stats()
378 data->hist[cpu].irq[bucket]); in timerlat_print_stats()
382 total += data->hist[cpu].thread[bucket]; in timerlat_print_stats()
384 data->hist[cpu].thread[bucket]); in timerlat_print_stats()
406 if (!data->hist[cpu].irq_count && !data->hist[cpu].thread_count) in timerlat_print_stats()
411 data->hist[cpu].irq[data->entries]); in timerlat_print_stats()
415 data->hist[cpu].thread[data->entries]); in timerlat_print_stats()