Lines Matching refs:top

162 	struct osnoise_tool *top;  in timerlat_top_handler()  local
165 top = container_of(trace, struct osnoise_tool, trace); in timerlat_top_handler()
166 params = top->params; in timerlat_top_handler()
172 timerlat_top_update(top, cpu, thread, latency); in timerlat_top_handler()
181 static void timerlat_top_header(struct osnoise_tool *top) in timerlat_top_header() argument
183 struct timerlat_top_params *params = top->params; in timerlat_top_header()
184 struct trace_seq *s = top->trace.seq; in timerlat_top_header()
187 get_duration(top->start_time, duration, sizeof(duration)); in timerlat_top_header()
219 static void timerlat_top_print(struct osnoise_tool *top, int cpu) in timerlat_top_print() argument
222 struct timerlat_top_params *params = top->params; in timerlat_top_print()
223 struct timerlat_top_data *data = top->data; in timerlat_top_print()
226 struct trace_seq *s = top->trace.seq; in timerlat_top_print()
292 timerlat_print_stats(struct timerlat_top_params *params, struct osnoise_tool *top) in timerlat_print_stats() argument
294 struct trace_instance *trace = &top->trace; in timerlat_print_stats()
307 timerlat_top_header(top); in timerlat_print_stats()
312 timerlat_top_print(top, i); in timerlat_print_stats()
611 timerlat_top_apply_config(struct osnoise_tool *top, struct timerlat_top_params *params) in timerlat_top_apply_config() argument
620 retval = osnoise_set_cpus(top->context, params->cpus); in timerlat_top_apply_config()
631 retval = osnoise_set_stop_us(top->context, params->stop_us); in timerlat_top_apply_config()
639 retval = osnoise_set_stop_total_us(top->context, params->stop_total_us); in timerlat_top_apply_config()
648 retval = osnoise_set_timerlat_period_us(top->context, params->timerlat_period_us); in timerlat_top_apply_config()
657 retval = osnoise_set_print_stack(top->context, params->print_stack); in timerlat_top_apply_config()
687 retval = osnoise_set_workload(top->context, !params->user_top); in timerlat_top_apply_config()
705 struct osnoise_tool *top; in timerlat_init_top() local
710 top = osnoise_init_tool("timerlat_top"); in timerlat_init_top()
711 if (!top) in timerlat_init_top()
714 top->data = timerlat_alloc_top(nr_cpus); in timerlat_init_top()
715 if (!top->data) in timerlat_init_top()
718 top->params = params; in timerlat_init_top()
720 tep_register_event_handler(top->trace.tep, -1, "ftrace", "timerlat", in timerlat_init_top()
721 timerlat_top_handler, top); in timerlat_init_top()
723 return top; in timerlat_init_top()
726 osnoise_destroy_tool(top); in timerlat_init_top()
765 struct osnoise_tool *top = NULL; in timerlat_top_main() local
778 top = timerlat_init_top(params); in timerlat_top_main()
779 if (!top) { in timerlat_top_main()
784 retval = timerlat_top_apply_config(top, params); in timerlat_top_main()
790 trace = &top->trace; in timerlat_top_main()
846 aa = top; in timerlat_top_main()
861 if (aa != top) { in timerlat_top_main()
879 if (!params->no_aa && aa != top) in timerlat_top_main()
883 top->start_time = time(NULL); in timerlat_top_main()
908 if (params->aa_only && !trace_is_off(&top->trace, &record->trace)) in timerlat_top_main()
923 timerlat_print_stats(params, top); in timerlat_top_main()
925 if (trace_is_off(&top->trace, &record->trace)) in timerlat_top_main()
942 timerlat_print_stats(params, top); in timerlat_top_main()
946 if (trace_is_off(&top->trace, &record->trace) && !stop_tracing) { in timerlat_top_main()
975 timerlat_free_top(top->data); in timerlat_top_main()
976 if (aa && aa != top) in timerlat_top_main()
979 osnoise_destroy_tool(top); in timerlat_top_main()