diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-03-16 14:17:23 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-03-21 11:53:41 -0400 |
commit | 864298f224f20fb7b981b05dd0f77315c75eb189 (patch) | |
tree | 7c97d8223e5fc378b0f2eb96892525804d5d1e48 /tools | |
parent | 3563289208ecef339853692ecbf8690084744b53 (diff) |
perf annotate: Add function header to --stdio2
# perf annotate --stdio2 _raw_spin_lock_irqsave
_raw_spin_lock_irqsave() /lib/modules/4.16.0-rc4/build/vmlinux
Event: anon group { cycles, instructions }
0.00 3.17 → callq __fentry__
0.00 7.94 push %rbx
7.69 36.51 → callq __page_file_index
mov %rax,%rbx
7.69 3.17 → callq *ffffffff82225cd0
xor %eax,%eax
mov $0x1,%edx
80.77 49.21 lock cmpxchg %edx,(%rdi)
test %eax,%eax
↓ jne 2b
3.85 0.00 mov %rbx,%rax
pop %rbx
← retq
2b: mov %eax,%esi
→ callq queued_spin_lock_slowpath
mov %rbx,%rax
pop %rbx
← retq
#
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jin Yao <yao.jin@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: https://lkml.kernel.org/n/tip-i86yfyzl8m194ioxgj1jo32f@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/util/annotate.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index ea83b9754ab0..7a6a85f9fea6 100644 --- a/tools/perf/util/annotate.c +++ b/tools/perf/util/annotate.c | |||
@@ -2244,6 +2244,8 @@ int symbol__tty_annotate2(struct symbol *sym, struct map *map, | |||
2244 | struct dso *dso = map->dso; | 2244 | struct dso *dso = map->dso; |
2245 | struct rb_root source_line = RB_ROOT; | 2245 | struct rb_root source_line = RB_ROOT; |
2246 | struct annotation_options opts = annotation__default_options; | 2246 | struct annotation_options opts = annotation__default_options; |
2247 | const char *ev_name = perf_evsel__name(evsel); | ||
2248 | char buf[1024]; | ||
2247 | 2249 | ||
2248 | if (symbol__annotate2(sym, map, evsel, &opts, NULL) < 0) | 2250 | if (symbol__annotate2(sym, map, evsel, &opts, NULL) < 0) |
2249 | return -1; | 2251 | return -1; |
@@ -2254,6 +2256,12 @@ int symbol__tty_annotate2(struct symbol *sym, struct map *map, | |||
2254 | print_summary(&source_line, dso->long_name); | 2256 | print_summary(&source_line, dso->long_name); |
2255 | } | 2257 | } |
2256 | 2258 | ||
2259 | if (perf_evsel__is_group_event(evsel)) { | ||
2260 | perf_evsel__group_desc(evsel, buf, sizeof(buf)); | ||
2261 | ev_name = buf; | ||
2262 | } | ||
2263 | |||
2264 | fprintf(stdout, "%s() %s\nEvent: %s\n\n", sym->name, dso->long_name, ev_name); | ||
2257 | symbol__annotate_fprintf2(sym, stdout); | 2265 | symbol__annotate_fprintf2(sym, stdout); |
2258 | 2266 | ||
2259 | annotated_source__purge(symbol__annotation(sym)->src); | 2267 | annotated_source__purge(symbol__annotation(sym)->src); |