Lines Matching defs:tool

31  * set_signals - handles the signal to stop the tool
52 * if the option should be handled by tool-specific parsing.
121 * common_apply_config - apply common configs to the initialized tool
124 common_apply_config(struct osnoise_tool *tool, struct common_params *params)
131 retval = osnoise_set_cpus(tool->context, params->cpus ? params->cpus : "all");
165 retval = osnoise_set_workload(tool->context, params->kernel_workload);
182 struct osnoise_tool *tool;
190 tool = ops->init_tool(params);
191 if (!tool) {
192 err_msg("Could not init osnoise tool\n");
195 tool->ops = ops;
196 tool->params = params;
203 trace_inst = &tool->trace;
205 retval = ops->apply_config(tool);
236 tool->record = osnoise_init_trace_tool(ops->tracer);
237 if (!tool->record) {
241 params->threshold_actions.trace_output_inst = tool->record->trace.inst;
242 params->end_actions.trace_output_inst = tool->record->trace.inst;
245 retval = trace_events_enable(&tool->record->trace, params->events);
251 retval = trace_set_buffer_size(&tool->record->trace, params->buffer_size);
278 retval = ops->enable(tool);
282 tool->start_time = time(NULL);
285 retval = ops->main(tool);
294 ops->print_stats(tool);
300 stopped = osnoise_trace_is_off(tool, tool->record) && !stop_tracing;
307 ops->analyze(tool, stopped);
310 trace_events_destroy(&tool->record->trace, params->events);
313 ops->free(tool);
314 osnoise_destroy_tool(tool->record);
315 osnoise_destroy_tool(tool);
323 int top_main_loop(struct osnoise_tool *tool)
325 struct common_params *params = tool->params;
326 struct trace_instance *trace = &tool->trace;
327 struct osnoise_tool *record = tool->record;
333 if (params->aa_only && !osnoise_trace_is_off(tool, record))
348 tool->ops->print_stats(tool);
350 if (osnoise_trace_is_off(tool, record)) {
364 if (tool->aa)
365 trace_instance_start(&tool->aa->trace);
381 int hist_main_loop(struct osnoise_tool *tool)
383 struct common_params *params = tool->params;
384 struct trace_instance *trace = &tool->trace;
401 if (osnoise_trace_is_off(tool, tool->record)) {
413 if (tool->record)
414 trace_instance_start(&tool->record->trace);
415 if (tool->aa)
416 trace_instance_start(&tool->aa->trace);
417 trace_instance_start(&tool->trace);
432 int osn_set_stop(struct osnoise_tool *tool)
434 struct common_params *params = tool->params;
437 retval = osnoise_set_stop_us(tool->context, params->stop_us);
443 retval = osnoise_set_stop_total_us(tool->context, params->stop_total_us);
464 void common_usage(const char *tool, const char *mode,
471 fprintf(stderr, "rtla %s", tool);
475 fprintf(stderr, " usage: [rtla] %s ", tool);