diff options
author | Ingo Molnar <mingo@kernel.org> | 2014-11-20 08:32:01 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-11-20 08:32:01 +0100 |
commit | 4e6e311e596eadba30d4f56f64eae7d45611a01c (patch) | |
tree | 681fb4c9ae7320ab1192f92e1c153ab35c90bf8e /tools/perf/util/build-id.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/build-id.c')
-rw-r--r-- | tools/perf/util/build-id.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/perf/util/build-id.c b/tools/perf/util/build-id.c index dd2a3e52ada..e8d79e5bfaf 100644 --- a/tools/perf/util/build-id.c +++ b/tools/perf/util/build-id.c @@ -18,6 +18,9 @@ #include "header.h" #include "vdso.h" + +static bool no_buildid_cache; + int build_id__mark_dso_hit(struct perf_tool *tool __maybe_unused, union perf_event *event, struct perf_sample *sample, @@ -251,6 +254,11 @@ int dsos__hit_all(struct perf_session *session) return 0; } +void disable_buildid_cache(void) +{ + no_buildid_cache = true; +} + int build_id_cache__add_s(const char *sbuild_id, const char *debugdir, const char *name, bool is_kallsyms, bool is_vdso) { @@ -404,6 +412,9 @@ int perf_session__cache_build_ids(struct perf_session *session) int ret; char debugdir[PATH_MAX]; + if (no_buildid_cache) + return 0; + snprintf(debugdir, sizeof(debugdir), "%s", buildid_dir); if (mkdir(debugdir, 0755) != 0 && errno != EEXIST) |