diff options
author | Namhyung Kim <namhyung@kernel.org> | 2017-06-18 23:23:01 +0900 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2017-06-19 22:05:53 -0300 |
commit | 78b83e8b12b4467540ca501c7c019e9d46051957 (patch) | |
tree | bcd5ff0e7f25f4f3e77416675389bc04978afb81 /ipc | |
parent | 29681bc5bb4326c2f9eac5dc68d8fad3e88b4bb5 (diff) | |
download | linux-78b83e8b12b4467540ca501c7c019e9d46051957.tar.gz linux-78b83e8b12b4467540ca501c7c019e9d46051957.tar.bz2 linux-78b83e8b12b4467540ca501c7c019e9d46051957.zip |
perf ftrace: Add option for function filtering
The -T/--trace-funcs and -N/--notrace-funcs options are to specify
functions to enable/disable tracing dynamically.
The -G/--graph-funcs and -g/--nograph-funcs options are to set filters
for function graph tracer.
For example, to trace fault handling functions only:
$ sudo perf ftrace -T *fault hello
0) | __do_page_fault() {
0) | handle_mm_fault() {
0) 2.117 us | __handle_mm_fault();
0) 3.627 us | }
0) 7.811 us | }
0) | __do_page_fault() {
0) | handle_mm_fault() {
0) 2.014 us | __handle_mm_fault();
0) 2.424 us | }
0) 2.951 us | }
...
To trace all functions executed in __do_page_fault:
$ sudo perf ftrace -G __do_page_fault hello
2) | __do_page_fault() {
3) 0.060 us | down_read_trylock();
3) | find_vma() {
3) 0.075 us | vmacache_find();
3) 0.053 us | vmacache_update();
3) 1.246 us | }
3) | handle_mm_fault() {
3) 0.063 us | __rcu_read_lock();
3) 0.056 us | mem_cgroup_from_task();
3) 0.057 us | __rcu_read_unlock();
3) | __handle_mm_fault() {
3) | filemap_map_pages() {
3) 0.058 us | __rcu_read_lock();
3) | alloc_set_pte() {
...
But don't want to show details in handle_mm_fault:
$ sudo perf ftrace -G __do_page_fault -g handle_mm_fault hello
3) | __do_page_fault() {
3) 0.049 us | down_read_trylock();
3) | find_vma() {
3) 0.048 us | vmacache_find();
3) 0.041 us | vmacache_update();
3) 0.680 us | }
3) 0.036 us | up_read();
3) 4.547 us | } /* __do_page_fault */
...
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: kernel-team@lge.com
Link: http://lkml.kernel.org/r/20170618142302.25390-3-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'ipc')
0 files changed, 0 insertions, 0 deletions