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