diff options
author | Ingo Molnar <mingo@kernel.org> | 2014-11-20 02:32:01 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-11-20 02:32:01 -0500 |
commit | 4e6e311e596eadba30d4f56f64eae7d45611a01c (patch) | |
tree | 681fb4c9ae7320ab1192f92e1c153ab35c90bf8e /tools/perf/util/callchain.c | |
parent | 2565711fb7d7c28e0cd93c8971b520d1b10b857c (diff) | |
parent | a84808083688d82d7f1e5786ccf5df0ff7d448cb (diff) |
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
User visible fixes:
- Fallback to kallsyms when using the minimal 'ELF' loader (Arnaldo Carvalho de Melo)
- Fix annotation with kcore (Adrian Hunter)
- Fix up srcline histogram key formatting (Arnaldo Carvalho de Melo)
- Add missing handler for PERF_RECORD_MMAP2 events in 'perf diff' (Kan Liang)
User visible changes/new features:
- Only print base source file for srcline histogram sort key (Andi Kleen)
- Support source line numbers in annotate using a hotkey (Andi Kleen)
Infrastructure changes and fixes:
- Do not poll events that use the system_wide flag (Adrian Hunter)
- Add perf-read-vdso32 and perf-read-vdsox32 to .gitignore (Adrian Hunter)
- Only override the default :tid comm entry (Adrian Hunter)
- Factor out adding new call chain entries (Andi Kleen)
- Use al.addr to set up call chain (Andi Kleen)
- Use a common function to resolve symbol or name (Andi Kleen)
- Fix ftrace:function event recording (Jiri Olsa)
- Move disable_buildid_cache() to util/build-id.c (Namhyung Kim)
- Clean up libelf feature support code (Namhyung Kim)
- Fix typo in python 'perf test' (WANG Chao)
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/util/callchain.c')
-rw-r--r-- | tools/perf/util/callchain.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tools/perf/util/callchain.c b/tools/perf/util/callchain.c index 00229809a904..38da69c8c1ff 100644 --- a/tools/perf/util/callchain.c +++ b/tools/perf/util/callchain.c | |||
@@ -808,3 +808,22 @@ int fill_callchain_info(struct addr_location *al, struct callchain_cursor_node * | |||
808 | out: | 808 | out: |
809 | return 1; | 809 | return 1; |
810 | } | 810 | } |
811 | |||
812 | char *callchain_list__sym_name(struct callchain_list *cl, | ||
813 | char *bf, size_t bfsize, bool show_dso) | ||
814 | { | ||
815 | int printed; | ||
816 | |||
817 | if (cl->ms.sym) { | ||
818 | printed = scnprintf(bf, bfsize, "%s", cl->ms.sym->name); | ||
819 | } else | ||
820 | printed = scnprintf(bf, bfsize, "%#" PRIx64, cl->ip); | ||
821 | |||
822 | if (show_dso) | ||
823 | scnprintf(bf + printed, bfsize - printed, " %s", | ||
824 | cl->ms.map ? | ||
825 | cl->ms.map->dso->short_name : | ||
826 | "unknown"); | ||
827 | |||
828 | return bf; | ||
829 | } | ||