summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-07-09 10:49:47 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2017-07-09 10:49:47 -0700
commitc3931a87db9e840dc20f3b962668d477eaeb2f75 (patch)
treebf92c17ec96ed25b3407435b28be9da2110475bc /tools
parentc8b2ba83fb01336f094226895087b644df0ec397 (diff)
parentdbf580623d5fee785218d1a47a2bcdf36d85c0e9 (diff)
downloadlinux-c3931a87db9e840dc20f3b962668d477eaeb2f75.tar.gz
linux-c3931a87db9e840dc20f3b962668d477eaeb2f75.tar.bz2
linux-c3931a87db9e840dc20f3b962668d477eaeb2f75.zip
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf fixes from Thomas Gleixner: "A couple of fixes for perf and kprobes: - Add he missing exclude_kernel attribute for the precise_ip level so !CAP_SYS_ADMIN users get the proper results. - Warn instead of failing completely when perf has no unwind support for a particular architectiure built in. - Ensure that jprobes are at function entry and not at some random place" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: kprobes: Ensure that jprobe probepoints are at function entry kprobes: Simplify register_jprobes() kprobes: Rename [arch_]function_offset_within_entry() to [arch_]kprobe_on_func_entry() perf unwind: Do not fail due to missing unwind support perf evsel: Set attr.exclude_kernel when probing max attr.precise_ip
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/util/evsel.c1
-rw-r--r--tools/perf/util/unwind-libunwind.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 6f4882f8d61f..87b431886670 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -273,6 +273,7 @@ struct perf_evsel *perf_evsel__new_cycles(void)
struct perf_event_attr attr = {
.type = PERF_TYPE_HARDWARE,
.config = PERF_COUNT_HW_CPU_CYCLES,
+ .exclude_kernel = 1,
};
struct perf_evsel *evsel;
diff --git a/tools/perf/util/unwind-libunwind.c b/tools/perf/util/unwind-libunwind.c
index 6d542a4e0648..8aef572d0889 100644
--- a/tools/perf/util/unwind-libunwind.c
+++ b/tools/perf/util/unwind-libunwind.c
@@ -50,7 +50,7 @@ int unwind__prepare_access(struct thread *thread, struct map *map,
if (!ops) {
pr_err("unwind: target platform=%s is not supported\n", arch);
- return -1;
+ return 0;
}
out_register:
unwind__register_ops(thread, ops);