summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorChangbin Du <changbin.du@gmail.com>2020-08-08 05:31:24 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2020-08-14 14:36:31 +0300
commiteb6d31ae22d7767789e3c079444157ea40114884 (patch)
treeaa00def0c939d22c962ac5d385f4c9dc81a275b8 /security
parent2db13a9b30f7e438777eb1a462c4b055ba948b89 (diff)
downloadlinux-eb6d31ae22d7767789e3c079444157ea40114884.tar.xz
perf ftrace: Select function/function_graph tracer automatically
The '-g/-G' options have already implied function_graph tracer should be used instead of function tracer. So we don't need extra option '--tracer' in this case. This patch changes the behavior as below: - If '-g' or '-G' option is on, then function_graph tracer is used. - If '-T' or '-N' option is on, then function tracer is used. - The function_graph has priority over function tracer. - The option '--tracer' only take effect if neither -g/-G nor -T/-N is specified. Here are some examples. This will start tracing all functions using default tracer: $ sudo perf ftrace This will trace all functions using function graph tracer: $ sudo perf ftrace -G '*' This will trace function vfs_read using function graph tracer: $ sudo perf ftrace -G vfs_read This will trace function vfs_read using function tracer: $ sudo perf ftrace -T vfs_read Committer notes: Using '-h -G' will tell what that option is about, so to further clarify the above examples: # perf ftrace -h -G -G, --graph-funcs <func> Set graph filter on given functions # perf ftrace -h -g -g, --nograph-funcs <func> Set nograph filter on given functions # perf ftrace -h -T -T, --trace-funcs <func> trace given functions only # perf ftrace -h -N -N, --notrace-funcs <func> do not trace given functions # Signed-off-by: Changbin Du <changbin.du@gmail.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Steven Rostedt (VMware) <rostedt@goodmis.org> Link: http://lore.kernel.org/lkml/20200808023141.14227-2-changbin.du@gmail.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'security')
0 files changed, 0 insertions, 0 deletions