linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] Improve the latency tracers
@ 2019-01-01 15:46 Changbin Du
  2019-01-01 15:46 ` [PATCH 1/5] function_graph: Support displaying relative timestamp Changbin Du
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Changbin Du @ 2019-01-01 15:46 UTC (permalink / raw)
  To: rostedt; +Cc: mingo, corbet, linux-doc, linux-kernel, Changbin Du

Happy new year!

This series make some improments for the kernel latency tracers, especilly
for the wakeup tracers. The latency tracers will show us more useful
information. With this series, the wakeup tracers look like this
when display-graph is enabled:

# tracer: wakeup
#
# wakeup latency trace v1.1.5 on 4.20.0+
# --------------------------------------------------------------------
# latency: 593 us, #674/674, CPU#0 | (M:desktop VP:0, KP:0, SP:0 HP:0 #P:4)
#    -----------------
#    | task: kworker/0:1H-339 (uid:0 nice:-20 policy:0 rt_prio:0)
#    -----------------
#
#                                       _-----=> irqs-off        
#                                      / _----=> need-resched    
#                                     | / _---=> hardirq/softirq 
#                                     || / _--=> preempt-depth   
#                                     ||| /                      
#   REL TIME      CPU  TASK/PID       ||||     DURATION                  FUNCTION CALLS
#      |          |     |    |        ||||      |   |                     |   |   |   |
        0 us |   0)    <idle>-0    |  dNs. |               |  /*      0:120:R   + [000]   339:100:R kworker/0:1H */
        3 us |   0)    <idle>-0    |  dNs. |   0.000 us    |            (null)();
  <idle>-0       0dNs.   66us : <stack trace>
 => try_to_wake_up
 => __queue_work
 => queue_work_on
 => call_timer_fn
 => run_timer_softirq
 => __do_softirq
 => irq_exit
 => smp_apic_timer_interrupt
 => apic_timer_interrupt
 => native_safe_halt
 => default_idle
 => default_idle_call
 => do_idle
 => cpu_startup_entry
 => start_kernel
 => secondary_startup_64
       67 us |   0)    <idle>-0    |  dNs. |   0.721 us    |  ttwu_stat();
       69 us |   0)    <idle>-0    |  dNs. |   0.607 us    |  _raw_spin_unlock_irqrestore();
       71 us |   0)    <idle>-0    |  .Ns. |   0.598 us    |  _raw_spin_lock_irq();
       72 us |   0)    <idle>-0    |  .Ns. |   0.584 us    |  _raw_spin_lock_irq();
       73 us |   0)    <idle>-0    |  dNs. |   1.125 us    |  __next_timer_interrupt();
       75 us |   0)    <idle>-0    |  dNs. |               |  call_timer_fn() {
       76 us |   0)    <idle>-0    |  dNs. |               |    delayed_work_timer_fn() {
      [...]
      564 us |   0)   kworker-13   |  d... |               |      set_next_entity() {
      565 us |   0)   kworker-13   |  d... |   0.524 us    |        __update_load_avg_se();
      566 us |   0)   kworker-13   |  d... |   0.562 us    |        __update_load_avg_cfs_rq();
      567 us |   0)   kworker-13   |  d... |   2.765 us    |      }
      568 us |   0)   kworker-13   |  d... | + 10.077 us   |    }
      569 us |   0)   kworker-13   |  d... |   0.000 us    |  __schedule();
kworker/-13      0d...  593us : <stack trace>
 => schedule
 => worker_thread
 => kthread
 => ret_from_fork
      593 us |   0)   kworker-13   |  d... |               |  /*     13:120:I ==> [000]   339:100:R kworker/0:1H */

Changbin Du (5):
  function_graph: Support displaying relative timestamp
  sched/tracing: Show more info for funcgraph wakeup tracers
  sched/tracing: Put a margin between flags and duration for wakeup
    tracers
  sched/tracing: Show stacktrace for wakeup tracers
  trace/doc: Add latency tracer funcgraph example

 Documentation/trace/ftrace.rst       | 51 ++++++++++++++++++++++++++++
 kernel/trace/trace.h                 |  9 ++---
 kernel/trace/trace_functions_graph.c | 30 ++++++++++++++--
 kernel/trace/trace_irqsoff.c         |  2 +-
 kernel/trace/trace_sched_wakeup.c    | 11 ++++--
 5 files changed, 94 insertions(+), 9 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-01-16 16:05 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-01 15:46 [PATCH 0/5] Improve the latency tracers Changbin Du
2019-01-01 15:46 ` [PATCH 1/5] function_graph: Support displaying relative timestamp Changbin Du
2019-01-01 15:46 ` [PATCH 2/5] sched/tracing: Show more info for funcgraph wakeup tracers Changbin Du
2019-01-01 15:46 ` [PATCH 3/5] sched/tracing: Put a margin between flags and duration for " Changbin Du
2019-01-01 15:46 ` [PATCH 4/5] sched/tracing: Show stacktrace " Changbin Du
2019-01-16  3:25   ` Steven Rostedt
2019-01-16 16:04     ` Changbin Du
2019-01-01 15:46 ` [PATCH 5/5] trace/doc: Add latency tracer funcgraph example Changbin Du
2019-01-12  4:05 ` [PATCH 0/5] Improve the latency tracers Changbin Du
2019-01-14 15:00   ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).