Lines Matching refs:tool

44 common_apply_config(struct osnoise_tool *tool, struct common_params *params)  in common_apply_config()  argument
51 retval = osnoise_set_cpus(tool->context, params->cpus ? params->cpus : "all"); in common_apply_config()
85 retval = osnoise_set_workload(tool->context, params->kernel_workload); in common_apply_config()
102 struct osnoise_tool *tool; in run_tool() local
110 tool = ops->init_tool(params); in run_tool()
111 if (!tool) { in run_tool()
115 tool->ops = ops; in run_tool()
116 tool->params = params; in run_tool()
123 trace_inst = &tool->trace; in run_tool()
125 retval = ops->apply_config(tool); in run_tool()
156 tool->record = osnoise_init_trace_tool(ops->tracer); in run_tool()
157 if (!tool->record) { in run_tool()
161 params->threshold_actions.trace_output_inst = tool->record->trace.inst; in run_tool()
162 params->end_actions.trace_output_inst = tool->record->trace.inst; in run_tool()
165 retval = trace_events_enable(&tool->record->trace, params->events); in run_tool()
171 retval = trace_set_buffer_size(&tool->record->trace, params->buffer_size); in run_tool()
198 retval = ops->enable(tool); in run_tool()
202 tool->start_time = time(NULL); in run_tool()
205 retval = ops->main(tool); in run_tool()
214 ops->print_stats(tool); in run_tool()
220 stopped = osnoise_trace_is_off(tool, tool->record) && !stop_tracing; in run_tool()
227 ops->analyze(tool, stopped); in run_tool()
230 trace_events_destroy(&tool->record->trace, params->events); in run_tool()
233 ops->free(tool); in run_tool()
234 osnoise_destroy_tool(tool->record); in run_tool()
235 osnoise_destroy_tool(tool); in run_tool()
243 int top_main_loop(struct osnoise_tool *tool) in top_main_loop() argument
245 struct common_params *params = tool->params; in top_main_loop()
246 struct trace_instance *trace = &tool->trace; in top_main_loop()
247 struct osnoise_tool *record = tool->record; in top_main_loop()
253 if (params->aa_only && !osnoise_trace_is_off(tool, record)) in top_main_loop()
268 tool->ops->print_stats(tool); in top_main_loop()
270 if (osnoise_trace_is_off(tool, record)) { in top_main_loop()
280 if (tool->aa) in top_main_loop()
281 trace_instance_start(&tool->aa->trace); in top_main_loop()
297 int hist_main_loop(struct osnoise_tool *tool) in hist_main_loop() argument
299 struct common_params *params = tool->params; in hist_main_loop()
300 struct trace_instance *trace = &tool->trace; in hist_main_loop()
317 if (osnoise_trace_is_off(tool, tool->record)) { in hist_main_loop()
325 if (tool->record) in hist_main_loop()
326 trace_instance_start(&tool->record->trace); in hist_main_loop()
327 if (tool->aa) in hist_main_loop()
328 trace_instance_start(&tool->aa->trace); in hist_main_loop()
329 trace_instance_start(&tool->trace); in hist_main_loop()