Lines Matching full:tool
141 timerlat_hist_update(struct osnoise_tool *tool, int cpu, in timerlat_hist_update() argument
145 struct timerlat_hist_params *params = tool->params; in timerlat_hist_update()
146 struct timerlat_hist_data *data = tool->data; in timerlat_hist_update()
186 struct osnoise_tool *tool; in timerlat_hist_handler() local
189 tool = container_of(trace, struct osnoise_tool, trace); in timerlat_hist_handler()
194 timerlat_hist_update(tool, cpu, thread, latency); in timerlat_hist_handler()
202 static void timerlat_hist_header(struct osnoise_tool *tool) in timerlat_hist_header() argument
204 struct timerlat_hist_params *params = tool->params; in timerlat_hist_header()
205 struct timerlat_hist_data *data = tool->data; in timerlat_hist_header()
206 struct trace_seq *s = tool->trace.seq; in timerlat_hist_header()
213 get_duration(tool->start_time, duration, sizeof(duration)); in timerlat_hist_header()
352 timerlat_print_stats(struct timerlat_hist_params *params, struct osnoise_tool *tool) in timerlat_print_stats() argument
354 struct timerlat_hist_data *data = tool->data; in timerlat_print_stats()
355 struct trace_instance *trace = &tool->trace; in timerlat_print_stats()
359 timerlat_hist_header(tool); in timerlat_print_stats()
695 * timerlat_hist_apply_config - apply the hist configs to the initialized tool
698 timerlat_hist_apply_config(struct osnoise_tool *tool, struct timerlat_hist_params *params) in timerlat_hist_apply_config() argument
706 retval = osnoise_set_cpus(tool->context, params->cpus); in timerlat_hist_apply_config()
714 retval = osnoise_set_stop_us(tool->context, params->stop_us); in timerlat_hist_apply_config()
722 retval = osnoise_set_stop_total_us(tool->context, params->stop_total_us); in timerlat_hist_apply_config()
730 retval = osnoise_set_timerlat_period_us(tool->context, params->timerlat_period_us); in timerlat_hist_apply_config()
738 retval = osnoise_set_print_stack(tool->context, params->print_stack); in timerlat_hist_apply_config()
752 * timerlat_init_hist - initialize a timerlat hist tool with parameters
757 struct osnoise_tool *tool; in timerlat_init_hist() local
762 tool = osnoise_init_tool("timerlat_hist"); in timerlat_init_hist()
763 if (!tool) in timerlat_init_hist()
766 tool->data = timerlat_alloc_histogram(nr_cpus, params->entries, params->bucket_size); in timerlat_init_hist()
767 if (!tool->data) in timerlat_init_hist()
770 tool->params = params; in timerlat_init_hist()
772 tep_register_event_handler(tool->trace.tep, -1, "ftrace", "timerlat", in timerlat_init_hist()
773 timerlat_hist_handler, tool); in timerlat_init_hist()
775 return tool; in timerlat_init_hist()
778 osnoise_destroy_tool(tool); in timerlat_init_hist()
789 * timerlat_hist_set_signals - handles the signal to stop the tool
805 struct osnoise_tool *tool = NULL; in timerlat_hist_main() local
815 tool = timerlat_init_hist(params); in timerlat_hist_main()
816 if (!tool) { in timerlat_hist_main()
821 retval = timerlat_hist_apply_config(tool, params); in timerlat_hist_main()
827 trace = &tool->trace; in timerlat_hist_main()
869 tool->start_time = time(NULL); in timerlat_hist_main()
886 if (trace_is_off(&tool->trace, &record->trace)) in timerlat_hist_main()
890 timerlat_print_stats(params, tool); in timerlat_hist_main()
894 if (trace_is_off(&tool->trace, &record->trace)) { in timerlat_hist_main()
908 timerlat_free_histogram(tool->data); in timerlat_hist_main()
910 osnoise_destroy_tool(tool); in timerlat_hist_main()