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/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 dd2a3e52ada1..e8d79e5bfaf7 100644 --- a/tools/perf/util/build-id.c +++ b/tools/perf/util/build-id.c | |||
@@ -18,6 +18,9 @@ | |||
18 | #include "header.h" | 18 | #include "header.h" |
19 | #include "vdso.h" | 19 | #include "vdso.h" |
20 | 20 | ||
21 | |||
22 | static bool no_buildid_cache; | ||
23 | |||
21 | int build_id__mark_dso_hit(struct perf_tool *tool __maybe_unused, | 24 | int build_id__mark_dso_hit(struct perf_tool *tool __maybe_unused, |
22 | union perf_event *event, | 25 | union perf_event *event, |
23 | struct perf_sample *sample, | 26 | struct perf_sample *sample, |
@@ -251,6 +254,11 @@ int dsos__hit_all(struct perf_session *session) | |||
251 | return 0; | 254 | return 0; |
252 | } | 255 | } |
253 | 256 | ||
257 | void disable_buildid_cache(void) | ||
258 | { | ||
259 | no_buildid_cache = true; | ||
260 | } | ||
261 | |||
254 | int build_id_cache__add_s(const char *sbuild_id, const char *debugdir, | 262 | int build_id_cache__add_s(const char *sbuild_id, const char *debugdir, |
255 | const char *name, bool is_kallsyms, bool is_vdso) | 263 | const char *name, bool is_kallsyms, bool is_vdso) |
256 | { | 264 | { |
@@ -404,6 +412,9 @@ int perf_session__cache_build_ids(struct perf_session *session) | |||
404 | int ret; | 412 | int ret; |
405 | char debugdir[PATH_MAX]; | 413 | char debugdir[PATH_MAX]; |
406 | 414 | ||
415 | if (no_buildid_cache) | ||
416 | return 0; | ||
417 | |||
407 | snprintf(debugdir, sizeof(debugdir), "%s", buildid_dir); | 418 | snprintf(debugdir, sizeof(debugdir), "%s", buildid_dir); |
408 | 419 | ||
409 | if (mkdir(debugdir, 0755) != 0 && errno != EEXIST) | 420 | if (mkdir(debugdir, 0755) != 0 && errno != EEXIST) |