lkml.org 
[lkml]   [2019]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[for-next][PATCH 07/29] tracing/doc: Add latency tracer funcgraph example
    From: Changbin Du <changbin.du@gmail.com>

    This add an example about how to use funcgraph with latency tracers.

    Link: http://lkml.kernel.org/r/20190101154614.8887-6-changbin.du@gmail.com

    Signed-off-by: Changbin Du <changbin.du@gmail.com>
    Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
    ---
    Documentation/trace/ftrace.rst | 51 ++++++++++++++++++++++++++++++++++
    1 file changed, 51 insertions(+)

    diff --git a/Documentation/trace/ftrace.rst b/Documentation/trace/ftrace.rst
    index 0131df7f5968..6ce2763a2a3e 100644
    --- a/Documentation/trace/ftrace.rst
    +++ b/Documentation/trace/ftrace.rst
    @@ -1396,6 +1396,57 @@ enabling function tracing, we incur an added overhead. This
    overhead may extend the latency times. But nevertheless, this
    trace has provided some very helpful debugging information.

    +If we prefer function graph output instead of function, we can set
    +display-graph option::
    + with echo 1 > options/display-graph
    +
    + # tracer: irqsoff
    + #
    + # irqsoff latency trace v1.1.5 on 4.20.0-rc6+
    + # --------------------------------------------------------------------
    + # latency: 3751 us, #274/274, CPU#0 | (M:desktop VP:0, KP:0, SP:0 HP:0 #P:4)
    + # -----------------
    + # | task: bash-1507 (uid:0 nice:0 policy:0 rt_prio:0)
    + # -----------------
    + # => started at: free_debug_processing
    + # => ended at: return_to_handler
    + #
    + #
    + # _-----=> irqs-off
    + # / _----=> need-resched
    + # | / _---=> hardirq/softirq
    + # || / _--=> preempt-depth
    + # ||| /
    + # REL TIME CPU TASK/PID |||| DURATION FUNCTION CALLS
    + # | | | | |||| | | | | | |
    + 0 us | 0) bash-1507 | d... | 0.000 us | _raw_spin_lock_irqsave();
    + 0 us | 0) bash-1507 | d..1 | 0.378 us | do_raw_spin_trylock();
    + 1 us | 0) bash-1507 | d..2 | | set_track() {
    + 2 us | 0) bash-1507 | d..2 | | save_stack_trace() {
    + 2 us | 0) bash-1507 | d..2 | | __save_stack_trace() {
    + 3 us | 0) bash-1507 | d..2 | | __unwind_start() {
    + 3 us | 0) bash-1507 | d..2 | | get_stack_info() {
    + 3 us | 0) bash-1507 | d..2 | 0.351 us | in_task_stack();
    + 4 us | 0) bash-1507 | d..2 | 1.107 us | }
    + [...]
    + 3750 us | 0) bash-1507 | d..1 | 0.516 us | do_raw_spin_unlock();
    + 3750 us | 0) bash-1507 | d..1 | 0.000 us | _raw_spin_unlock_irqrestore();
    + 3764 us | 0) bash-1507 | d..1 | 0.000 us | tracer_hardirqs_on();
    + bash-1507 0d..1 3792us : <stack trace>
    + => free_debug_processing
    + => __slab_free
    + => kmem_cache_free
    + => vm_area_free
    + => remove_vma
    + => exit_mmap
    + => mmput
    + => flush_old_exec
    + => load_elf_binary
    + => search_binary_handler
    + => __do_execve_file.isra.32
    + => __x64_sys_execve
    + => do_syscall_64
    + => entry_SYSCALL_64_after_hwframe

    preemptoff
    ----------
    --
    2.20.1

    \
     
     \ /
      Last update: 2019-02-20 19:40    [W:2.269 / U:0.196 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site