Lines Matching refs:top

162 	struct osnoise_tool *top;
165 top = container_of(trace, struct osnoise_tool, trace);
166 params = top->params;
172 timerlat_top_update(top, cpu, thread, latency);
181 static void timerlat_top_header(struct osnoise_tool *top)
183 struct timerlat_top_params *params = top->params;
184 struct trace_seq *s = top->trace.seq;
187 get_duration(top->start_time, duration, sizeof(duration));
217 static void timerlat_top_print(struct osnoise_tool *top, int cpu)
220 struct timerlat_top_params *params = top->params;
221 struct timerlat_top_data *data = top->data;
224 struct trace_seq *s = top->trace.seq;
299 timerlat_print_stats(struct timerlat_top_params *params, struct osnoise_tool *top)
301 struct trace_instance *trace = &top->trace;
314 timerlat_top_header(top);
319 timerlat_top_print(top, i);
327 * timerlat_top_usage - prints timerlat top usage message
335 " usage: rtla timerlat [top] [-h] [-q] [-a us] [-d s] [-D] [-n] [-p us] [-i us] [-T us] [-s us] \\",
373 fprintf(stderr, "rtla timerlat top: a per-cpu summary of the timer latency (version %s)\n",
615 * timerlat_top_apply_config - apply the top configs to the initialized tool
618 timerlat_top_apply_config(struct osnoise_tool *top, struct timerlat_top_params *params)
627 retval = osnoise_set_cpus(top->context, params->cpus);
638 retval = osnoise_set_stop_us(top->context, params->stop_us);
646 retval = osnoise_set_stop_total_us(top->context, params->stop_total_us);
655 retval = osnoise_set_timerlat_period_us(top->context, params->timerlat_period_us);
664 retval = osnoise_set_print_stack(top->context, params->print_stack);
690 retval = osnoise_set_workload(top->context, 0);
704 * timerlat_init_top - initialize a timerlat top tool with parameters
709 struct osnoise_tool *top;
714 top = osnoise_init_tool("timerlat_top");
715 if (!top)
718 top->data = timerlat_alloc_top(nr_cpus);
719 if (!top->data)
722 top->params = params;
724 tep_register_event_handler(top->trace.tep, -1, "ftrace", "timerlat",
725 timerlat_top_handler, top);
727 return top;
730 osnoise_destroy_tool(top);
758 struct osnoise_tool *top = NULL;
771 top = timerlat_init_top(params);
772 if (!top) {
773 err_msg("Could not init osnoise top\n");
777 retval = timerlat_top_apply_config(top, params);
783 trace = &top->trace;
831 /* as top is not used for display, use it for aa */
832 aa = top;
847 if (aa != top) {
865 if (!params->no_aa && aa != top)
869 top->start_time = time(NULL);
894 if (params->aa_only && !trace_is_off(&top->trace, &record->trace))
909 timerlat_print_stats(params, top);
911 if (trace_is_off(&top->trace, &record->trace))
928 timerlat_print_stats(params, top);
932 if (trace_is_off(&top->trace, &record->trace)) {
961 timerlat_free_top(top->data);
962 if (aa && aa != top)
965 osnoise_destroy_tool(top);