Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 1f833081 authored by Pavankumar Kondeti's avatar Pavankumar Kondeti
Browse files

sched/tracing: GKI friendly long preempt/irq disable traces



Hook into preemptirq trace points and print the call stacks of
scenarios where preemption/irqs is disabled for more than
a use configured threshold. The threshold tunables are available
under /proc/sys/preemptirq directory. All the units are in nano seconds.

The following commands can be used to enable the trace. The stacktrace
trigger prints the stacktrace when the trace event is printed.

echo 1 > /d/tracing/events/preemptirq_long/enable
echo stacktrace > /d/tracing/events/preemptirq_long/preempt_disable_long/trigger
echo stacktrace > /d/tracing/events/preemptirq_long/irq_disable_long/trigger

Sample output is copied below. Note that this format works with both systrace
and commandline ftrace utilities.

   init-1     [005] d..2   187.905211: irq_disable_long: delta=15244480(ns)
   init-1     [005] d..3   187.905216: <stack trace>

 => test_irq_disable_long
 => trace_irq_enable_rcuidle
 => trace_hardirqs_on
 => console_unlock
 => vprintk_emit
 => devkmsg_emit
 => devkmsg_write
 => do_iter_readv_writev
 => do_iter_write
 => do_writev
 => __arm64_sys_writev
 => el0_svc_common
 => el0_svc_handler
 => el0_svc

   kworker/u16:4-419   [000] .N.2   187.905221: preempt_disable_long: delta=4923646(ns)
   kworker/u16:4-419   [000] .N.3   187.905226: <stack trace>
 => test_preempt_disable_long
 => trace_preempt_enable_rcuidle
 => trace_preempt_on
 => preempt_count_sub
 => perf_event_read
 => __perf_event_read_value
 => perf_event_read_value
 => memlat_monitor_work
 => process_one_work
 => worker_thread
 => kthread
 => ret_from_fork

Change-Id: If87a8d65359632b93da10b691e9b83e37000aeb3
Signed-off-by: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
parent fcecef89
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment