aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-19 21:39:36 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-19 21:39:36 -0400
commit8c1bee685e6e9e18ed28cba32f0cec0d2e4effee (patch)
treebec4a299ed9f7210300528c9cce83c41cbdf9482 /arch/x86
parent37820108f395032e850e400139d956561a043c26 (diff)
parent45bff41a9a6f22af28e4ba22f83c87f619e573a8 (diff)
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf fixes from Ingo Molnar: "Assorted small fixes" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf python: Properly link with libtraceevent perf hists browser: Add back callchain folding symbol perf tools: Fix build on sparc. perf python: Link with libtraceevent perf python: Initialize 'page_size' variable tools lib traceevent: Fix missed freeing of subargs in free_arg() in filter lib tools traceevent: Add back pevent assignment in __pevent_parse_format() perf hists browser: Fix off-by-two bug on the first column perf tools: Remove warnings on JIT samples for srcline sort key perf tools: Fix segfault when using srcline sort key perf: Require exclude_guest to use PEBS - kernel side enforcement perf tool: Precise mode requires exclude_guest
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/kernel/cpu/perf_event.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
index 915b876edd1..3373f84d139 100644
--- a/arch/x86/kernel/cpu/perf_event.c
+++ b/arch/x86/kernel/cpu/perf_event.c
@@ -338,6 +338,9 @@ int x86_setup_perfctr(struct perf_event *event)
338 /* BTS is currently only allowed for user-mode. */ 338 /* BTS is currently only allowed for user-mode. */
339 if (!attr->exclude_kernel) 339 if (!attr->exclude_kernel)
340 return -EOPNOTSUPP; 340 return -EOPNOTSUPP;
341
342 if (!attr->exclude_guest)
343 return -EOPNOTSUPP;
341 } 344 }
342 345
343 hwc->config |= config; 346 hwc->config |= config;
@@ -380,6 +383,9 @@ int x86_pmu_hw_config(struct perf_event *event)
380 if (event->attr.precise_ip) { 383 if (event->attr.precise_ip) {
381 int precise = 0; 384 int precise = 0;
382 385
386 if (!event->attr.exclude_guest)
387 return -EOPNOTSUPP;
388
383 /* Support for constant skid */ 389 /* Support for constant skid */
384 if (x86_pmu.pebs_active && !x86_pmu.pebs_broken) { 390 if (x86_pmu.pebs_active && !x86_pmu.pebs_broken) {
385 precise++; 391 precise++;