Lines Matching refs:tool
76 static void timerlat_free_histogram_tool(struct osnoise_tool *tool)
78 timerlat_free_histogram(tool->data);
79 timerlat_free(tool);
136 timerlat_hist_update(struct osnoise_tool *tool, int cpu,
140 struct timerlat_params *params = to_timerlat_params(tool->params);
141 struct timerlat_hist_data *data = tool->data;
186 struct osnoise_tool *tool;
189 tool = container_of(trace, struct osnoise_tool, trace);
194 timerlat_hist_update(tool, cpu, context, latency);
202 static int timerlat_hist_bpf_pull_data(struct osnoise_tool *tool)
204 struct timerlat_hist_data *data = tool->data;
280 static void timerlat_hist_header(struct osnoise_tool *tool)
282 struct timerlat_params *params = to_timerlat_params(tool->params);
283 struct timerlat_hist_data *data = tool->data;
284 struct trace_seq *s = tool->trace.seq;
291 get_duration(tool->start_time, duration, sizeof(duration));
607 timerlat_print_stats(struct osnoise_tool *tool)
609 struct timerlat_params *params = to_timerlat_params(tool->params);
610 struct timerlat_hist_data *data = tool->data;
611 struct trace_instance *trace = &tool->trace;
615 timerlat_hist_header(tool);
685 osnoise_report_missed_events(tool);
689 * timerlat_hist_apply_config - apply the hist configs to the initialized tool
692 timerlat_hist_apply_config(struct osnoise_tool *tool)
694 struct timerlat_params *params = to_timerlat_params(tool->params);
697 retval = timerlat_apply_config(tool, params);
708 * timerlat_init_hist - initialize a timerlat hist tool with parameters
713 struct osnoise_tool *tool;
715 tool = osnoise_init_tool("timerlat_hist");
716 if (!tool)
719 tool->data = timerlat_alloc_histogram(params->hist.entries,
721 if (!tool->data)
724 tep_register_event_handler(tool->trace.tep, -1, "ftrace", "timerlat",
725 timerlat_hist_handler, tool);
727 return tool;
730 osnoise_destroy_tool(tool);
734 static int timerlat_hist_bpf_main_loop(struct osnoise_tool *tool)
743 retval = common_threshold_handler(tool);
747 if (!should_continue_tracing(tool->params))
758 retval = timerlat_hist_bpf_pull_data(tool);
765 static int timerlat_hist_main(struct osnoise_tool *tool)
767 struct timerlat_params *params = to_timerlat_params(tool->params);
771 retval = hist_main_loop(tool);
773 retval = timerlat_hist_bpf_main_loop(tool);