• Namhyung Kim's avatar
    perf ftrace: Add 'tail' option to --graph-opts · c7780089
    Namhyung Kim authored
    The 'graph-tail' option is to print function name as a comment at the end.
    This is useful when a large function is mixed with other functions
    (possibly from different CPUs).
    
    For example,
    
      $ sudo perf ftrace -- perf stat true
      ...
       1)               |    get_unused_fd_flags() {
       1)               |      alloc_fd() {
       1)   0.178 us    |        _raw_spin_lock();
       1)   0.187 us    |        expand_files();
       1)   0.169 us    |        _raw_spin_unlock();
       1)   1.211 us    |      }
       1)   1.503 us    |    }
    
      $ sudo perf ftrace --graph-opts tail -- perf stat true
      ...
       1)               |    get_unused_fd_flags() {
       1)               |      alloc_fd() {
       1)   0.099 us    |        _raw_spin_lock();
       1)   0.083 us    |        expand_files();
       1)   0.081 us    |        _raw_spin_unlock();
       1)   0.601 us    |      } /* alloc_fd */
       1)   0.751 us    |    } /* get_unused_fd_flags */
    Reviewed-by: default avatarIan Rogers <irogers@google.com>
    Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
    Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    Cc: Adrian Hunter <adrian.hunter@intel.com>
    Cc: Changbin Du <changbin.du@gmail.com>
    Cc: Ingo Molnar <mingo@kernel.org>
    Cc: Jiri Olsa <jolsa@kernel.org>
    Cc: Kan Liang <kan.liang@linux.intel.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Steven Rostedt (VMware) <rostedt@goodmis.org>
    Link: https://lore.kernel.org/lkml/20240729004127.238611-2-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    c7780089
ftrace.h 1.71 KB