Lines Matching +full:duration +full:- +full:us

1 // SPDX-License-Identifier: GPL-2.0
25 * Per-cpu data statistics and data.
66 * If now - timestamp is <= latency, it might have influenced
137 * timerlat_aa_get_data - Get the per-cpu data from the timerlat context
142 return &taa_ctx->taa_data[cpu]; in timerlat_aa_get_data()
146 * timerlat_aa_irq_latency - Handles timerlat IRQ event
156 taa_data->curr_state = TIMERLAT_WAITING_THREAD; in timerlat_aa_irq_latency()
157 taa_data->tlat_irq_timstamp = record->ts; in timerlat_aa_irq_latency()
162 taa_data->thread_nmi_sum = 0; in timerlat_aa_irq_latency()
163 taa_data->thread_irq_sum = 0; in timerlat_aa_irq_latency()
164 taa_data->thread_softirq_sum = 0; in timerlat_aa_irq_latency()
165 taa_data->thread_thread_sum = 0; in timerlat_aa_irq_latency()
166 taa_data->thread_blocking_duration = 0; in timerlat_aa_irq_latency()
167 taa_data->timer_irq_start_time = 0; in timerlat_aa_irq_latency()
168 taa_data->timer_irq_duration = 0; in timerlat_aa_irq_latency()
169 taa_data->timer_exit_from_idle = 0; in timerlat_aa_irq_latency()
174 trace_seq_reset(taa_data->nmi_seq); in timerlat_aa_irq_latency()
175 trace_seq_reset(taa_data->irqs_seq); in timerlat_aa_irq_latency()
176 trace_seq_reset(taa_data->softirqs_seq); in timerlat_aa_irq_latency()
177 trace_seq_reset(taa_data->threads_seq); in timerlat_aa_irq_latency()
180 tep_get_field_val(s, event, "timer_latency", record, &taa_data->tlat_irq_latency, 1); in timerlat_aa_irq_latency()
181 tep_get_field_val(s, event, "seqnum", record, &taa_data->tlat_irq_seqnum, 1); in timerlat_aa_irq_latency()
184 tep_get_common_field_val(s, event, "common_pid", record, &taa_data->run_thread_pid, 1); in timerlat_aa_irq_latency()
191 if (taa_data->run_thread_pid) in timerlat_aa_irq_latency()
197 if (taa_data->tlat_irq_latency < taa_data->max_exit_idle_latency) in timerlat_aa_irq_latency()
204 if (taa_data->tlat_irq_timstamp - taa_data->tlat_irq_latency in timerlat_aa_irq_latency()
205 < taa_data->prev_irq_timstamp + taa_data->prev_irq_duration) in timerlat_aa_irq_latency()
208 taa_data->max_exit_idle_latency = taa_data->tlat_irq_latency; in timerlat_aa_irq_latency()
214 * timerlat_aa_thread_latency - Handles timerlat thread event
224 taa_data->curr_state = TIMERLAT_WAITING_IRQ; in timerlat_aa_thread_latency()
225 taa_data->tlat_thread_timstamp = record->ts; in timerlat_aa_thread_latency()
228 tep_get_field_val(s, event, "timer_latency", record, &taa_data->tlat_thread_latency, 1); in timerlat_aa_thread_latency()
229 tep_get_field_val(s, event, "seqnum", record, &taa_data->tlat_thread_seqnum, 1); in timerlat_aa_thread_latency()
235 * timerlat_aa_handler - Handle timerlat events
239 * Returns 0 on success, -1 otherwise.
245 struct timerlat_aa_data *taa_data = timerlat_aa_get_data(taa_ctx, record->cpu); in timerlat_aa_handler()
249 return -1; in timerlat_aa_handler()
259 * timerlat_aa_nmi_handler - Handles NMI noise
268 struct timerlat_aa_data *taa_data = timerlat_aa_get_data(taa_ctx, record->cpu); in timerlat_aa_nmi_handler()
269 unsigned long long duration; in timerlat_aa_nmi_handler() local
272 tep_get_field_val(s, event, "duration", record, &duration, 1); in timerlat_aa_nmi_handler()
275 if (taa_data->curr_state == TIMERLAT_WAITING_IRQ) { in timerlat_aa_nmi_handler()
276 taa_data->prev_irq_duration = duration; in timerlat_aa_nmi_handler()
277 taa_data->prev_irq_timstamp = start; in timerlat_aa_nmi_handler()
279 trace_seq_reset(taa_data->prev_irqs_seq); in timerlat_aa_nmi_handler()
280 trace_seq_printf(taa_data->prev_irqs_seq, " %24s %.*s %9.2f us\n", in timerlat_aa_nmi_handler()
283 ns_to_usf(duration)); in timerlat_aa_nmi_handler()
287 taa_data->thread_nmi_sum += duration; in timerlat_aa_nmi_handler()
288 trace_seq_printf(taa_data->nmi_seq, " %24s %.*s %9.2f us\n", in timerlat_aa_nmi_handler()
290 24, spaces, ns_to_usf(duration)); in timerlat_aa_nmi_handler()
296 * timerlat_aa_irq_handler - Handles IRQ noise
302 * - The IRQs that can delay the timer IRQ before it happened.
303 * - The Timerlat IRQ handler
304 * - The IRQs that happened between the timerlat IRQ and the timerlat thread
311 struct timerlat_aa_data *taa_data = timerlat_aa_get_data(taa_ctx, record->cpu); in timerlat_aa_irq_handler()
313 unsigned long long duration; in timerlat_aa_irq_handler() local
319 tep_get_field_val(s, event, "duration", record, &duration, 1); in timerlat_aa_irq_handler()
327 if (taa_data->curr_state == TIMERLAT_WAITING_IRQ) { in timerlat_aa_irq_handler()
328 taa_data->prev_irq_duration = duration; in timerlat_aa_irq_handler()
329 taa_data->prev_irq_timstamp = start; in timerlat_aa_irq_handler()
331 trace_seq_reset(taa_data->prev_irqs_seq); in timerlat_aa_irq_handler()
332 trace_seq_printf(taa_data->prev_irqs_seq, " %24s:%-3llu %.*s %9.2f us\n", in timerlat_aa_irq_handler()
335 ns_to_usf(duration)); in timerlat_aa_irq_handler()
340 * The timerlat IRQ: taa_data->timer_irq_start_time is zeroed at in timerlat_aa_irq_handler()
343 if (!taa_data->timer_irq_start_time) { in timerlat_aa_irq_handler()
344 expected_start = taa_data->tlat_irq_timstamp - taa_data->tlat_irq_latency; in timerlat_aa_irq_handler()
346 taa_data->timer_irq_start_time = start; in timerlat_aa_irq_handler()
347 taa_data->timer_irq_duration = duration; in timerlat_aa_irq_handler()
362 if (expected_start < taa_data->timer_irq_start_time) in timerlat_aa_irq_handler()
363 taa_data->timer_irq_start_delay = taa_data->timer_irq_start_time - expected_start; in timerlat_aa_irq_handler()
365 taa_data->timer_irq_start_delay = 0; in timerlat_aa_irq_handler()
370 if (taa_data->run_thread_pid) in timerlat_aa_irq_handler()
373 if (expected_start > taa_data->prev_irq_timstamp + taa_data->prev_irq_duration) in timerlat_aa_irq_handler()
374 taa_data->timer_exit_from_idle = taa_data->timer_irq_start_delay; in timerlat_aa_irq_handler()
382 taa_data->thread_irq_sum += duration; in timerlat_aa_irq_handler()
383 trace_seq_printf(taa_data->irqs_seq, " %24s:%-3llu %.*s %9.2f us\n", in timerlat_aa_irq_handler()
386 ns_to_usf(duration)); in timerlat_aa_irq_handler()
396 * timerlat_aa_softirq_handler - Handles Softirq noise
401 * It is only printed in the non-rt kernel, as softirqs become thread on RT.
407 struct timerlat_aa_data *taa_data = timerlat_aa_get_data(taa_ctx, record->cpu); in timerlat_aa_softirq_handler()
408 unsigned long long duration; in timerlat_aa_softirq_handler() local
412 if (taa_data->curr_state == TIMERLAT_WAITING_IRQ) in timerlat_aa_softirq_handler()
415 tep_get_field_val(s, event, "duration", record, &duration, 1); in timerlat_aa_softirq_handler()
419 taa_data->thread_softirq_sum += duration; in timerlat_aa_softirq_handler()
421 trace_seq_printf(taa_data->softirqs_seq, " %24s:%-3llu %.*s %9.2f us\n", in timerlat_aa_softirq_handler()
424 ns_to_usf(duration)); in timerlat_aa_softirq_handler()
429 * timerlat_aa_softirq_handler - Handles thread noise
440 struct timerlat_aa_data *taa_data = timerlat_aa_get_data(taa_ctx, record->cpu); in timerlat_aa_thread_handler()
441 unsigned long long duration; in timerlat_aa_thread_handler() local
447 if (taa_data->curr_state == TIMERLAT_WAITING_IRQ) in timerlat_aa_thread_handler()
450 tep_get_field_val(s, event, "duration", record, &duration, 1); in timerlat_aa_thread_handler()
456 if (pid == taa_data->run_thread_pid && !taa_data->thread_blocking_duration) { in timerlat_aa_thread_handler()
457 taa_data->thread_blocking_duration = duration; in timerlat_aa_thread_handler()
460 strncpy(taa_data->run_thread_comm, comm, MAX_COMM); in timerlat_aa_thread_handler()
462 sprintf(taa_data->run_thread_comm, "<...>"); in timerlat_aa_thread_handler()
465 taa_data->thread_thread_sum += duration; in timerlat_aa_thread_handler()
467 trace_seq_printf(taa_data->threads_seq, " %24s:%-12llu %.*s %9.2f us\n", in timerlat_aa_thread_handler()
470 ns_to_usf(duration)); in timerlat_aa_thread_handler()
477 * timerlat_aa_stack_handler - Handles timerlat IRQ stack trace
485 struct timerlat_aa_data *taa_data = timerlat_aa_get_data(taa_ctx, record->cpu); in timerlat_aa_stack_handler()
490 trace_seq_reset(taa_data->stack_seq); in timerlat_aa_stack_handler()
492 trace_seq_printf(taa_data->stack_seq, " Blocking thread stack trace\n"); in timerlat_aa_stack_handler()
496 function = tep_find_function(taa_ctx->tool->trace.tep, caller[i]); in timerlat_aa_stack_handler()
499 trace_seq_printf(taa_data->stack_seq, " %.*s -> %s\n", in timerlat_aa_stack_handler()
507 * timerlat_aa_sched_switch_handler - Tracks the current thread running on the CPU
517 struct timerlat_aa_data *taa_data = timerlat_aa_get_data(taa_ctx, record->cpu); in timerlat_aa_sched_switch_handler()
521 tep_get_field_val(s, event, "next_pid", record, &taa_data->current_pid, 1); in timerlat_aa_sched_switch_handler()
524 strncpy(taa_data->current_comm, comm, MAX_COMM); in timerlat_aa_sched_switch_handler()
529 taa_data->kworker = 0; in timerlat_aa_sched_switch_handler()
530 taa_data->kworker_func = 0; in timerlat_aa_sched_switch_handler()
536 * timerlat_aa_kworker_start_handler - Tracks a kworker running on the CPU
548 struct timerlat_aa_data *taa_data = timerlat_aa_get_data(taa_ctx, record->cpu); in timerlat_aa_kworker_start_handler()
550 tep_get_field_val(s, event, "work", record, &taa_data->kworker, 1); in timerlat_aa_kworker_start_handler()
551 tep_get_field_val(s, event, "function", record, &taa_data->kworker_func, 1); in timerlat_aa_kworker_start_handler()
556 * timerlat_thread_analysis - Prints the analysis of a CPU that hit a stop tracing
570 if (taa_data->tlat_irq_seqnum > taa_data->tlat_thread_seqnum) { in timerlat_thread_analysis()
572 total = taa_data->tlat_irq_latency; in timerlat_thread_analysis()
575 total = taa_data->tlat_thread_latency; in timerlat_thread_analysis()
583 exp_irq_ts = taa_data->timer_irq_start_time - taa_data->timer_irq_start_delay; in timerlat_thread_analysis()
584 if (exp_irq_ts < taa_data->prev_irq_timstamp + taa_data->prev_irq_duration) { in timerlat_thread_analysis()
585 if (taa_data->prev_irq_timstamp < taa_data->timer_irq_start_time) in timerlat_thread_analysis()
586 printf(" Previous IRQ interference: %.*s up to %9.2f us\n", in timerlat_thread_analysis()
588 ns_to_usf(taa_data->prev_irq_duration)); in timerlat_thread_analysis()
594 printf(" IRQ handler delay: %.*s %16s %9.2f us (%.2f %%)\n", 16, spaces, in timerlat_thread_analysis()
595 (ns_to_usf(taa_data->timer_exit_from_idle) > 10) ? "(exit from idle)" : "", in timerlat_thread_analysis()
596 ns_to_usf(taa_data->timer_irq_start_delay), in timerlat_thread_analysis()
597 ns_to_per(total, taa_data->timer_irq_start_delay)); in timerlat_thread_analysis()
602 printf(" IRQ latency: %.*s %9.2f us\n", 40, spaces, in timerlat_thread_analysis()
603 ns_to_usf(taa_data->tlat_irq_latency)); in timerlat_thread_analysis()
608 * because... the trace stopped :-). in timerlat_thread_analysis()
614 printf(" %.*s %24s:%-9llu\n", 6, spaces, taa_data->run_thread_comm, in timerlat_thread_analysis()
615 taa_data->run_thread_pid); in timerlat_thread_analysis()
618 * The duration of the IRQ handler that handled the timerlat IRQ. in timerlat_thread_analysis()
620 printf(" Timerlat IRQ duration: %.*s %9.2f us (%.2f %%)\n", in timerlat_thread_analysis()
622 ns_to_usf(taa_data->timer_irq_duration), in timerlat_thread_analysis()
623 ns_to_per(total, taa_data->timer_irq_duration)); in timerlat_thread_analysis()
631 printf(" Blocking thread: %.*s %9.2f us (%.2f %%)\n", 36, spaces, in timerlat_thread_analysis()
632 ns_to_usf(taa_data->thread_blocking_duration), in timerlat_thread_analysis()
633 ns_to_per(total, taa_data->thread_blocking_duration)); in timerlat_thread_analysis()
635 printf(" %.*s %24s:%-9llu %.*s %9.2f us\n", 6, spaces, in timerlat_thread_analysis()
636 taa_data->run_thread_comm, taa_data->run_thread_pid, in timerlat_thread_analysis()
637 12, spaces, ns_to_usf(taa_data->thread_blocking_duration)); in timerlat_thread_analysis()
643 trace_seq_do_printf(taa_data->stack_seq); in timerlat_thread_analysis()
648 if (taa_data->thread_nmi_sum) in timerlat_thread_analysis()
649 printf(" NMI interference %.*s %9.2f us (%.2f %%)\n", 36, spaces, in timerlat_thread_analysis()
650 ns_to_usf(taa_data->thread_nmi_sum), in timerlat_thread_analysis()
651 ns_to_per(total, taa_data->thread_nmi_sum)); in timerlat_thread_analysis()
662 if (taa_data->thread_irq_sum) { in timerlat_thread_analysis()
663 printf(" IRQ interference %.*s %9.2f us (%.2f %%)\n", 36, spaces, in timerlat_thread_analysis()
664 ns_to_usf(taa_data->thread_irq_sum), in timerlat_thread_analysis()
665 ns_to_per(total, taa_data->thread_irq_sum)); in timerlat_thread_analysis()
667 trace_seq_do_printf(taa_data->irqs_seq); in timerlat_thread_analysis()
673 if (taa_data->thread_softirq_sum) { in timerlat_thread_analysis()
674 printf(" Softirq interference %.*s %9.2f us (%.2f %%)\n", 32, spaces, in timerlat_thread_analysis()
675 ns_to_usf(taa_data->thread_softirq_sum), in timerlat_thread_analysis()
676 ns_to_per(total, taa_data->thread_softirq_sum)); in timerlat_thread_analysis()
678 trace_seq_do_printf(taa_data->softirqs_seq); in timerlat_thread_analysis()
689 if (taa_data->thread_thread_sum) { in timerlat_thread_analysis()
690 printf(" Thread interference %.*s %9.2f us (%.2f %%)\n", 33, spaces, in timerlat_thread_analysis()
691 ns_to_usf(taa_data->thread_thread_sum), in timerlat_thread_analysis()
692 ns_to_per(total, taa_data->thread_thread_sum)); in timerlat_thread_analysis()
694 trace_seq_do_printf(taa_data->threads_seq); in timerlat_thread_analysis()
701 printf("------------------------------------------------------------------------\n"); in timerlat_thread_analysis()
702 printf(" %s latency: %.*s %9.2f us (100%%)\n", irq ? " IRQ" : "Thread", in timerlat_thread_analysis()
708 struct trace_instance *trace = &taa_ctx->tool->trace; in timerlat_auto_analysis_collect_trace()
711 retval = tracefs_iterate_raw_events(trace->tep, in timerlat_auto_analysis_collect_trace()
712 trace->inst, in timerlat_auto_analysis_collect_trace()
726 * timerlat_auto_analysis - Analyze the collected data
743 for (cpu = 0; cpu < taa_ctx->nr_cpus; cpu++) { in timerlat_auto_analysis()
746 if (irq_thresh && taa_data->tlat_irq_latency >= irq_thresh) { in timerlat_auto_analysis()
749 } else if (thread_thresh && (taa_data->tlat_thread_latency) >= thread_thresh) { in timerlat_auto_analysis()
754 if (taa_data->max_exit_idle_latency > max_exit_from_idle) { in timerlat_auto_analysis()
755 max_exit_from_idle = taa_data->max_exit_idle_latency; in timerlat_auto_analysis()
763 printf("Max timerlat IRQ latency from idle: %.2f us in cpu %d\n", in timerlat_auto_analysis()
766 if (!taa_ctx->dump_tasks) in timerlat_auto_analysis()
771 for (cpu = 0; cpu < taa_ctx->nr_cpus; cpu++) { in timerlat_auto_analysis()
773 tep = taa_ctx->tool->trace.tep; in timerlat_auto_analysis()
775 printf(" [%.3d] %24s:%llu", cpu, taa_data->current_comm, taa_data->current_pid); in timerlat_auto_analysis()
777 if (taa_data->kworker_func) in timerlat_auto_analysis()
779 tep_find_function(tep, taa_data->kworker) ? : "<...>", in timerlat_auto_analysis()
780 tep_find_function(tep, taa_data->kworker_func)); in timerlat_auto_analysis()
787 * timerlat_aa_destroy_seqs - Destroy seq files used to store parsed data
794 if (!taa_ctx->taa_data) in timerlat_aa_destroy_seqs()
797 for (i = 0; i < taa_ctx->nr_cpus; i++) { in timerlat_aa_destroy_seqs()
800 if (taa_data->prev_irqs_seq) { in timerlat_aa_destroy_seqs()
801 trace_seq_destroy(taa_data->prev_irqs_seq); in timerlat_aa_destroy_seqs()
802 free(taa_data->prev_irqs_seq); in timerlat_aa_destroy_seqs()
805 if (taa_data->nmi_seq) { in timerlat_aa_destroy_seqs()
806 trace_seq_destroy(taa_data->nmi_seq); in timerlat_aa_destroy_seqs()
807 free(taa_data->nmi_seq); in timerlat_aa_destroy_seqs()
810 if (taa_data->irqs_seq) { in timerlat_aa_destroy_seqs()
811 trace_seq_destroy(taa_data->irqs_seq); in timerlat_aa_destroy_seqs()
812 free(taa_data->irqs_seq); in timerlat_aa_destroy_seqs()
815 if (taa_data->softirqs_seq) { in timerlat_aa_destroy_seqs()
816 trace_seq_destroy(taa_data->softirqs_seq); in timerlat_aa_destroy_seqs()
817 free(taa_data->softirqs_seq); in timerlat_aa_destroy_seqs()
820 if (taa_data->threads_seq) { in timerlat_aa_destroy_seqs()
821 trace_seq_destroy(taa_data->threads_seq); in timerlat_aa_destroy_seqs()
822 free(taa_data->threads_seq); in timerlat_aa_destroy_seqs()
825 if (taa_data->stack_seq) { in timerlat_aa_destroy_seqs()
826 trace_seq_destroy(taa_data->stack_seq); in timerlat_aa_destroy_seqs()
827 free(taa_data->stack_seq); in timerlat_aa_destroy_seqs()
833 * timerlat_aa_init_seqs - Init seq files used to store parsed information
840 * Returns 0 on success, -1 otherwise.
847 for (i = 0; i < taa_ctx->nr_cpus; i++) { in timerlat_aa_init_seqs()
851 taa_data->prev_irqs_seq = calloc(1, sizeof(*taa_data->prev_irqs_seq)); in timerlat_aa_init_seqs()
852 if (!taa_data->prev_irqs_seq) in timerlat_aa_init_seqs()
855 trace_seq_init(taa_data->prev_irqs_seq); in timerlat_aa_init_seqs()
857 taa_data->nmi_seq = calloc(1, sizeof(*taa_data->nmi_seq)); in timerlat_aa_init_seqs()
858 if (!taa_data->nmi_seq) in timerlat_aa_init_seqs()
861 trace_seq_init(taa_data->nmi_seq); in timerlat_aa_init_seqs()
863 taa_data->irqs_seq = calloc(1, sizeof(*taa_data->irqs_seq)); in timerlat_aa_init_seqs()
864 if (!taa_data->irqs_seq) in timerlat_aa_init_seqs()
867 trace_seq_init(taa_data->irqs_seq); in timerlat_aa_init_seqs()
869 taa_data->softirqs_seq = calloc(1, sizeof(*taa_data->softirqs_seq)); in timerlat_aa_init_seqs()
870 if (!taa_data->softirqs_seq) in timerlat_aa_init_seqs()
873 trace_seq_init(taa_data->softirqs_seq); in timerlat_aa_init_seqs()
875 taa_data->threads_seq = calloc(1, sizeof(*taa_data->threads_seq)); in timerlat_aa_init_seqs()
876 if (!taa_data->threads_seq) in timerlat_aa_init_seqs()
879 trace_seq_init(taa_data->threads_seq); in timerlat_aa_init_seqs()
881 taa_data->stack_seq = calloc(1, sizeof(*taa_data->stack_seq)); in timerlat_aa_init_seqs()
882 if (!taa_data->stack_seq) in timerlat_aa_init_seqs()
885 trace_seq_init(taa_data->stack_seq); in timerlat_aa_init_seqs()
892 return -1; in timerlat_aa_init_seqs()
896 * timerlat_aa_unregister_events - Unregister events used in the auto-analysis
901 tep_unregister_event_handler(tool->trace.tep, -1, "ftrace", "timerlat", in timerlat_aa_unregister_events()
904 tracefs_event_disable(tool->trace.inst, "osnoise", NULL); in timerlat_aa_unregister_events()
906 tep_unregister_event_handler(tool->trace.tep, -1, "osnoise", "nmi_noise", in timerlat_aa_unregister_events()
909 tep_unregister_event_handler(tool->trace.tep, -1, "osnoise", "irq_noise", in timerlat_aa_unregister_events()
912 tep_unregister_event_handler(tool->trace.tep, -1, "osnoise", "softirq_noise", in timerlat_aa_unregister_events()
915 tep_unregister_event_handler(tool->trace.tep, -1, "osnoise", "thread_noise", in timerlat_aa_unregister_events()
918 tep_unregister_event_handler(tool->trace.tep, -1, "ftrace", "kernel_stack", in timerlat_aa_unregister_events()
923 tracefs_event_disable(tool->trace.inst, "sched", "sched_switch"); in timerlat_aa_unregister_events()
924 tep_unregister_event_handler(tool->trace.tep, -1, "sched", "sched_switch", in timerlat_aa_unregister_events()
927 tracefs_event_disable(tool->trace.inst, "workqueue", "workqueue_execute_start"); in timerlat_aa_unregister_events()
928 tep_unregister_event_handler(tool->trace.tep, -1, "workqueue", "workqueue_execute_start", in timerlat_aa_unregister_events()
933 * timerlat_aa_register_events - Register events used in the auto-analysis
935 * Returns 0 on success, -1 otherwise.
941 tep_register_event_handler(tool->trace.tep, -1, "ftrace", "timerlat", in timerlat_aa_register_events()
946 * register auto-analysis handlers. in timerlat_aa_register_events()
948 retval = tracefs_event_enable(tool->trace.inst, "osnoise", NULL); in timerlat_aa_register_events()
954 tep_register_event_handler(tool->trace.tep, -1, "osnoise", "nmi_noise", in timerlat_aa_register_events()
957 tep_register_event_handler(tool->trace.tep, -1, "osnoise", "irq_noise", in timerlat_aa_register_events()
960 tep_register_event_handler(tool->trace.tep, -1, "osnoise", "softirq_noise", in timerlat_aa_register_events()
963 tep_register_event_handler(tool->trace.tep, -1, "osnoise", "thread_noise", in timerlat_aa_register_events()
966 tep_register_event_handler(tool->trace.tep, -1, "ftrace", "kernel_stack", in timerlat_aa_register_events()
975 retval = tracefs_event_enable(tool->trace.inst, "sched", "sched_switch"); in timerlat_aa_register_events()
981 tep_register_event_handler(tool->trace.tep, -1, "sched", "sched_switch", in timerlat_aa_register_events()
984 retval = tracefs_event_enable(tool->trace.inst, "workqueue", "workqueue_execute_start"); in timerlat_aa_register_events()
990 tep_register_event_handler(tool->trace.tep, -1, "workqueue", "workqueue_execute_start", in timerlat_aa_register_events()
997 return -1; in timerlat_aa_register_events()
1001 * timerlat_aa_destroy - Destroy timerlat auto-analysis
1010 if (!taa_ctx->taa_data) in timerlat_aa_destroy()
1013 timerlat_aa_unregister_events(taa_ctx->tool, taa_ctx->dump_tasks); in timerlat_aa_destroy()
1015 free(taa_ctx->taa_data); in timerlat_aa_destroy()
1021 * timerlat_aa_init - Initialize timerlat auto-analysis
1023 * Returns 0 on success, -1 otherwise.
1033 return -1; in timerlat_aa_init()
1037 taa_ctx->nr_cpus = nr_cpus; in timerlat_aa_init()
1038 taa_ctx->tool = tool; in timerlat_aa_init()
1039 taa_ctx->dump_tasks = dump_tasks; in timerlat_aa_init()
1041 taa_ctx->taa_data = calloc(nr_cpus, sizeof(*taa_ctx->taa_data)); in timerlat_aa_init()
1042 if (!taa_ctx->taa_data) in timerlat_aa_init()
1057 return -1; in timerlat_aa_init()