Lines Matching refs:tool
168 timerlat_hist_update(struct osnoise_tool *tool, int cpu, in timerlat_hist_update() argument
172 struct timerlat_hist_params *params = tool->params; in timerlat_hist_update()
173 struct timerlat_hist_data *data = tool->data; in timerlat_hist_update()
219 struct osnoise_tool *tool; in timerlat_hist_handler() local
222 tool = container_of(trace, struct osnoise_tool, trace); in timerlat_hist_handler()
227 timerlat_hist_update(tool, cpu, context, latency); in timerlat_hist_handler()
235 static void timerlat_hist_header(struct osnoise_tool *tool) in timerlat_hist_header() argument
237 struct timerlat_hist_params *params = tool->params; in timerlat_hist_header()
238 struct timerlat_hist_data *data = tool->data; in timerlat_hist_header()
239 struct trace_seq *s = tool->trace.seq; in timerlat_hist_header()
246 get_duration(tool->start_time, duration, sizeof(duration)); in timerlat_hist_header()
408 timerlat_print_stats(struct timerlat_hist_params *params, struct osnoise_tool *tool) in timerlat_print_stats() argument
410 struct timerlat_hist_data *data = tool->data; in timerlat_print_stats()
411 struct trace_instance *trace = &tool->trace; in timerlat_print_stats()
415 timerlat_hist_header(tool); in timerlat_print_stats()
808 timerlat_hist_apply_config(struct osnoise_tool *tool, struct timerlat_hist_params *params) in timerlat_hist_apply_config() argument
816 retval = osnoise_set_cpus(tool->context, params->cpus); in timerlat_hist_apply_config()
827 retval = osnoise_set_stop_us(tool->context, params->stop_us); in timerlat_hist_apply_config()
835 retval = osnoise_set_stop_total_us(tool->context, params->stop_total_us); in timerlat_hist_apply_config()
843 retval = osnoise_set_timerlat_period_us(tool->context, params->timerlat_period_us); in timerlat_hist_apply_config()
851 retval = osnoise_set_print_stack(tool->context, params->print_stack); in timerlat_hist_apply_config()
877 retval = osnoise_set_workload(tool->context, 0); in timerlat_hist_apply_config()
896 struct osnoise_tool *tool; in timerlat_init_hist() local
901 tool = osnoise_init_tool("timerlat_hist"); in timerlat_init_hist()
902 if (!tool) in timerlat_init_hist()
905 tool->data = timerlat_alloc_histogram(nr_cpus, params->entries, params->bucket_size); in timerlat_init_hist()
906 if (!tool->data) in timerlat_init_hist()
909 tool->params = params; in timerlat_init_hist()
911 tep_register_event_handler(tool->trace.tep, -1, "ftrace", "timerlat", in timerlat_init_hist()
912 timerlat_hist_handler, tool); in timerlat_init_hist()
914 return tool; in timerlat_init_hist()
917 osnoise_destroy_tool(tool); in timerlat_init_hist()
945 struct osnoise_tool *tool = NULL; in timerlat_hist_main() local
957 tool = timerlat_init_hist(params); in timerlat_hist_main()
958 if (!tool) { in timerlat_hist_main()
963 retval = timerlat_hist_apply_config(tool, params); in timerlat_hist_main()
969 trace = &tool->trace; in timerlat_hist_main()
1046 tool->start_time = time(NULL); in timerlat_hist_main()
1082 if (trace_is_off(&tool->trace, &record->trace)) in timerlat_hist_main()
1098 timerlat_print_stats(params, tool); in timerlat_hist_main()
1102 if (trace_is_off(&tool->trace, &record->trace)) { in timerlat_hist_main()
1121 timerlat_free_histogram(tool->data); in timerlat_hist_main()
1124 osnoise_destroy_tool(tool); in timerlat_hist_main()