Lines Matching full:top
134 struct osnoise_tool *top; in timerlat_top_handler() local
137 top = container_of(trace, struct osnoise_tool, trace); in timerlat_top_handler()
142 timerlat_top_update(top, cpu, thread, latency); in timerlat_top_handler()
150 static void timerlat_top_header(struct osnoise_tool *top) in timerlat_top_header() argument
152 struct timerlat_top_params *params = top->params; in timerlat_top_header()
153 struct trace_seq *s = top->trace.seq; in timerlat_top_header()
156 get_duration(top->start_time, duration, sizeof(duration)); in timerlat_top_header()
176 static void timerlat_top_print(struct osnoise_tool *top, int cpu) in timerlat_top_print() argument
179 struct timerlat_top_params *params = top->params; in timerlat_top_print()
180 struct timerlat_top_data *data = top->data; in timerlat_top_print()
183 struct trace_seq *s = top->trace.seq; in timerlat_top_print()
238 timerlat_print_stats(struct timerlat_top_params *params, struct osnoise_tool *top) in timerlat_print_stats() argument
240 struct trace_instance *trace = &top->trace; in timerlat_print_stats()
250 timerlat_top_header(top); in timerlat_print_stats()
255 timerlat_top_print(top, i); in timerlat_print_stats()
263 * timerlat_top_usage - prints timerlat top usage message
271 …" usage: rtla timerlat [top] [-h] [-q] [-a us] [-d s] [-D] [-n] [-p us] [-i us] [-T us] [-s us] \… in timerlat_top_usage()
303 fprintf(stderr, "rtla timerlat top: a per-cpu summary of the timer latency (version %s)\n", in timerlat_top_usage()
484 * timerlat_top_apply_config - apply the top configs to the initialized tool
487 timerlat_top_apply_config(struct osnoise_tool *top, struct timerlat_top_params *params) in timerlat_top_apply_config() argument
495 retval = osnoise_set_cpus(top->context, params->cpus); in timerlat_top_apply_config()
503 retval = osnoise_set_stop_us(top->context, params->stop_us); in timerlat_top_apply_config()
511 retval = osnoise_set_stop_total_us(top->context, params->stop_total_us); in timerlat_top_apply_config()
520 retval = osnoise_set_timerlat_period_us(top->context, params->timerlat_period_us); in timerlat_top_apply_config()
529 retval = osnoise_set_print_stack(top->context, params->print_stack); in timerlat_top_apply_config()
543 * timerlat_init_top - initialize a timerlat top tool with parameters
548 struct osnoise_tool *top; in timerlat_init_top() local
553 top = osnoise_init_tool("timerlat_top"); in timerlat_init_top()
554 if (!top) in timerlat_init_top()
557 top->data = timerlat_alloc_top(nr_cpus); in timerlat_init_top()
558 if (!top->data) in timerlat_init_top()
561 top->params = params; in timerlat_init_top()
563 tep_register_event_handler(top->trace.tep, -1, "ftrace", "timerlat", in timerlat_init_top()
564 timerlat_top_handler, top); in timerlat_init_top()
566 return top; in timerlat_init_top()
569 osnoise_destroy_tool(top); in timerlat_init_top()
596 struct osnoise_tool *top = NULL; in timerlat_top_main() local
606 top = timerlat_init_top(params); in timerlat_top_main()
607 if (!top) { in timerlat_top_main()
608 err_msg("Could not init osnoise top\n"); in timerlat_top_main()
612 retval = timerlat_top_apply_config(top, params); in timerlat_top_main()
618 trace = &top->trace; in timerlat_top_main()
660 top->start_time = time(NULL); in timerlat_top_main()
678 timerlat_print_stats(params, top); in timerlat_top_main()
680 if (trace_is_off(&top->trace, &record->trace)) in timerlat_top_main()
685 timerlat_print_stats(params, top); in timerlat_top_main()
689 if (trace_is_off(&top->trace, &record->trace)) { in timerlat_top_main()
703 timerlat_free_top(top->data); in timerlat_top_main()
705 osnoise_destroy_tool(top); in timerlat_top_main()