Lines Matching full: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()
218 struct osnoise_tool *tool; in timerlat_hist_handler() local
221 tool = container_of(trace, struct osnoise_tool, trace); in timerlat_hist_handler()
226 timerlat_hist_update(tool, cpu, context, latency); in timerlat_hist_handler()
234 static void timerlat_hist_header(struct osnoise_tool *tool) in timerlat_hist_header() argument
236 struct timerlat_hist_params *params = tool->params; in timerlat_hist_header()
237 struct timerlat_hist_data *data = tool->data; in timerlat_hist_header()
238 struct trace_seq *s = tool->trace.seq; in timerlat_hist_header()
245 get_duration(tool->start_time, duration, sizeof(duration)); in timerlat_hist_header()
407 timerlat_print_stats(struct timerlat_hist_params *params, struct osnoise_tool *tool) in timerlat_print_stats() argument
409 struct timerlat_hist_data *data = tool->data; in timerlat_print_stats()
410 struct trace_instance *trace = &tool->trace; in timerlat_print_stats()
414 timerlat_hist_header(tool); in timerlat_print_stats()
808 * timerlat_hist_apply_config - apply the hist configs to the initialized tool
811 timerlat_hist_apply_config(struct osnoise_tool *tool, struct timerlat_hist_params *params) in timerlat_hist_apply_config() argument
819 retval = osnoise_set_cpus(tool->context, params->cpus); in timerlat_hist_apply_config()
830 retval = osnoise_set_stop_us(tool->context, params->stop_us); in timerlat_hist_apply_config()
838 retval = osnoise_set_stop_total_us(tool->context, params->stop_total_us); in timerlat_hist_apply_config()
846 retval = osnoise_set_timerlat_period_us(tool->context, params->timerlat_period_us); in timerlat_hist_apply_config()
854 retval = osnoise_set_print_stack(tool->context, params->print_stack); in timerlat_hist_apply_config()
880 retval = osnoise_set_workload(tool->context, 0); in timerlat_hist_apply_config()
894 * timerlat_init_hist - initialize a timerlat hist tool with parameters
899 struct osnoise_tool *tool; in timerlat_init_hist() local
904 tool = osnoise_init_tool("timerlat_hist"); in timerlat_init_hist()
905 if (!tool) in timerlat_init_hist()
908 tool->data = timerlat_alloc_histogram(nr_cpus, params->entries, params->bucket_size); in timerlat_init_hist()
909 if (!tool->data) in timerlat_init_hist()
912 tool->params = params; in timerlat_init_hist()
914 tep_register_event_handler(tool->trace.tep, -1, "ftrace", "timerlat", in timerlat_init_hist()
915 timerlat_hist_handler, tool); in timerlat_init_hist()
917 return tool; in timerlat_init_hist()
920 osnoise_destroy_tool(tool); in timerlat_init_hist()
931 * timerlat_hist_set_signals - handles the signal to stop the tool
948 struct osnoise_tool *tool = NULL; in timerlat_hist_main() local
960 tool = timerlat_init_hist(params); in timerlat_hist_main()
961 if (!tool) { in timerlat_hist_main()
966 retval = timerlat_hist_apply_config(tool, params); in timerlat_hist_main()
972 trace = &tool->trace; in timerlat_hist_main()
1049 tool->start_time = time(NULL); in timerlat_hist_main()
1085 if (trace_is_off(&tool->trace, &record->trace)) in timerlat_hist_main()
1101 timerlat_print_stats(params, tool); in timerlat_hist_main()
1105 if (trace_is_off(&tool->trace, &record->trace)) { in timerlat_hist_main()
1124 timerlat_free_histogram(tool->data); in timerlat_hist_main()
1127 osnoise_destroy_tool(tool); in timerlat_hist_main()