Lines Matching refs:tool
172 timerlat_hist_update(struct osnoise_tool *tool, int cpu, in timerlat_hist_update() argument
176 struct timerlat_hist_params *params = tool->params; in timerlat_hist_update()
177 struct timerlat_hist_data *data = tool->data; in timerlat_hist_update()
222 struct osnoise_tool *tool; in timerlat_hist_handler() local
225 tool = container_of(trace, struct osnoise_tool, trace); in timerlat_hist_handler()
230 timerlat_hist_update(tool, cpu, context, latency); in timerlat_hist_handler()
238 static void timerlat_hist_header(struct osnoise_tool *tool) in timerlat_hist_header() argument
240 struct timerlat_hist_params *params = tool->params; in timerlat_hist_header()
241 struct timerlat_hist_data *data = tool->data; in timerlat_hist_header()
242 struct trace_seq *s = tool->trace.seq; in timerlat_hist_header()
249 get_duration(tool->start_time, duration, sizeof(duration)); in timerlat_hist_header()
562 timerlat_print_stats(struct timerlat_hist_params *params, struct osnoise_tool *tool) in timerlat_print_stats() argument
564 struct timerlat_hist_data *data = tool->data; in timerlat_print_stats()
565 struct trace_instance *trace = &tool->trace; in timerlat_print_stats()
569 timerlat_hist_header(tool); in timerlat_print_stats()
995 timerlat_hist_apply_config(struct osnoise_tool *tool, struct timerlat_hist_params *params) in timerlat_hist_apply_config() argument
1003 retval = osnoise_set_cpus(tool->context, params->cpus); in timerlat_hist_apply_config()
1014 retval = osnoise_set_stop_us(tool->context, params->stop_us); in timerlat_hist_apply_config()
1022 retval = osnoise_set_stop_total_us(tool->context, params->stop_total_us); in timerlat_hist_apply_config()
1030 retval = osnoise_set_timerlat_period_us(tool->context, params->timerlat_period_us); in timerlat_hist_apply_config()
1038 retval = osnoise_set_print_stack(tool->context, params->print_stack); in timerlat_hist_apply_config()
1080 retval = osnoise_set_workload(tool->context, 0); in timerlat_hist_apply_config()
1099 struct osnoise_tool *tool; in timerlat_init_hist() local
1104 tool = osnoise_init_tool("timerlat_hist"); in timerlat_init_hist()
1105 if (!tool) in timerlat_init_hist()
1108 tool->data = timerlat_alloc_histogram(nr_cpus, params->entries, params->bucket_size); in timerlat_init_hist()
1109 if (!tool->data) in timerlat_init_hist()
1112 tool->params = params; in timerlat_init_hist()
1114 tep_register_event_handler(tool->trace.tep, -1, "ftrace", "timerlat", in timerlat_init_hist()
1115 timerlat_hist_handler, tool); in timerlat_init_hist()
1117 return tool; in timerlat_init_hist()
1120 osnoise_destroy_tool(tool); in timerlat_init_hist()
1148 struct osnoise_tool *tool = NULL; in timerlat_hist_main() local
1160 tool = timerlat_init_hist(params); in timerlat_hist_main()
1161 if (!tool) { in timerlat_hist_main()
1166 retval = timerlat_hist_apply_config(tool, params); in timerlat_hist_main()
1172 trace = &tool->trace; in timerlat_hist_main()
1281 tool->start_time = time(NULL); in timerlat_hist_main()
1298 if (trace_is_off(&tool->trace, &record->trace)) in timerlat_hist_main()
1315 timerlat_print_stats(params, tool); in timerlat_hist_main()
1319 if (trace_is_off(&tool->trace, &record->trace)) { in timerlat_hist_main()
1338 timerlat_free_histogram(tool->data); in timerlat_hist_main()
1341 osnoise_destroy_tool(tool); in timerlat_hist_main()