Re: [PATCH 10/22] tools lib traceevent: Add function plugin
From: Steven Rostedt
Date: Thu Nov 21 2013 - 08:20:13 EST
On Thu, 21 Nov 2013 12:01:08 +0100
Jiri Olsa <jolsa@xxxxxxxxxx> wrote:
> Backporting function plugin.
>
> Backported from Steven Rostedt's trace-cmd repo (HEAD 0f2c2fb):
> git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git
>
> This plugin adds function and parent function fields
> resolving for ftrace:function tracepoint event.
>
> The diff of 'perf script' output generated by old and new code:
> (data was generated by 'perf record -e ftrace:function ls')
>
> --- script.function.old
> +++ script.function.new
> - ls 10781 [001] 32667.291379: ftrace:function: ffffffff811adb80 <-- ffffffff811afc48
> - ls 10781 [001] 32667.291379: ftrace:function: ffffffff811b35d0 <-- ffffffff811adb9b
> - ls 10781 [001] 32667.291380: ftrace:function: ffffffff811b3520 <-- ffffffff811b35e8
> - ls 10781 [001] 32667.291380: ftrace:function: ffffffff811b2720 <-- ffffffff811b3549
> - ls 10781 [001] 32667.291381: ftrace:function: ffffffff81297e10 <-- ffffffff811b356c
> - ls 10781 [001] 32667.291381: ftrace:function: ffffffff81298f40 <-- ffffffff81297e2c
> - ls 10781 [001] 32667.291382: ftrace:function: ffffffff81076160 <-- ffffffff811afbf0
> - ls 10781 [001] 32667.291383: ftrace:function: ffffffff811c3eb0 <-- ffffffff811afbfc
> - ls 10781 [001] 32667.291383: ftrace:function: ffffffff8164e100 <-- ffffffff811c3ed8
> - ls 10781 [001] 32667.291384: ftrace:function: ffffffff811a5d10 <-- ffffffff811c3f53
> - ls 10781 [001] 32667.291384: ftrace:function: ffffffff811e8e70 <-- ffffffff811a5d58
> - ls 10781 [001] 32667.291385: ftrace:function: ffffffff811f38e0 <-- ffffffff811a5d63
> - ls 10781 [001] 32667.291385: ftrace:function: ffffffff811a9ff0 <-- ffffffff811a5d6b
> - ls 10781 [001] 32667.291386: ftrace:function: ffffffff811a9fa0 <-- ffffffff811aa015
> - ls 10781 [001] 32667.291387: ftrace:function: ffffffff810851c0 <-- ffffffff811aa053
> - ls 10781 [001] 32667.291387: ftrace:function: ffffffff81090e00 <-- ffffffff81085211
> + ls 10781 [001] 32667.291379: ftrace:function: would_dump <-- setup_new_exec
> + ls 10781 [001] 32667.291379: ftrace:function: inode_permission <-- would_dump
> + ls 10781 [001] 32667.291380: ftrace:function: __inode_permission <-- inode_permission
> + ls 10781 [001] 32667.291380: ftrace:function: generic_permission <-- __inode_permission
> + ls 10781 [001] 32667.291381: ftrace:function: security_inode_permission <-- __inode_permission
> + ls 10781 [001] 32667.291381: ftrace:function: cap_inode_permission <-- security_inode_permission
> + ls 10781 [001] 32667.291382: ftrace:function: flush_signal_handlers <-- setup_new_exec
> + ls 10781 [001] 32667.291383: ftrace:function: do_close_on_exec <-- setup_new_exec
> + ls 10781 [001] 32667.291383: ftrace:function: _raw_spin_lock <-- do_close_on_exec
> + ls 10781 [001] 32667.291384: ftrace:function: filp_close <-- do_close_on_exec
> + ls 10781 [001] 32667.291384: ftrace:function: dnotify_flush <-- filp_close
> + ls 10781 [001] 32667.291385: ftrace:function: locks_remove_posix <-- filp_close
> + ls 10781 [001] 32667.291385: ftrace:function: fput <-- filp_close
> + ls 10781 [001] 32667.291386: ftrace:function: file_sb_list_del <-- fput
> + ls 10781 [001] 32667.291387: ftrace:function: task_work_add <-- fput
> + ls 10781 [001] 32667.291387: ftrace:function: kick_process <-- task_work_add
>
> Removing options support as it's not backported yet.
> Currently this plugin supports 2 options:
> 'parent' to display parent function
The number of times I enabled the parent option, I should make it
default too.
Thanks!
> 'indent' to show function call indents
>
> Enabling both of them by default.
>
> Signed-off-by: Jiri Olsa <jolsa@xxxxxxxxxx>
> Cc: Corey Ashford <cjashfor@xxxxxxxxxxxxxxxxxx>
> Cc: Frederic Weisbecker <fweisbec@xxxxxxxxx>
> Cc: Ingo Molnar <mingo@xxxxxxx>
> Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
> Cc: Paul Mackerras <paulus@xxxxxxxxx>
> Cc: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
> Cc: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
> Cc: Steven Rostedt <rostedt@xxxxxxxxxxx>
Signed-off-by: Steven Rostedt <rostedt@xxxxxxxxxxx>
-- Steve
> Cc: David Ahern <dsahern@xxxxxxxxx>
> ---
> tools/lib/traceevent/Makefile | 1 +
> tools/lib/traceevent/plugin_function.c | 151 +++++++++++++++++++++++++++++++++
> 2 files changed, 152 insertions(+)
> create mode 100644 tools/lib/traceevent/plugin_function.c
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/