All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: David Ahern <dsahern@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Arnaldo Carvalho de Melo <acme@infradead.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Thomas Gleixner <tglx@linutronix.de>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH] Revert "perf: Require exclude_guest to use PEBS - kernel side enforcement"
Date: Thu, 13 Dec 2012 08:48:34 +0100	[thread overview]
Message-ID: <20121213074834.GB13446@gmail.com> (raw)
In-Reply-To: <50C94ECD.6020504@gmail.com>


* David Ahern <dsahern@gmail.com> wrote:

> On 12/12/12 8:34 PM, Linus Torvalds wrote:
> >On Wed, Dec 12, 2012 at 7:25 PM, David Ahern <dsahern@gmail.com> wrote:
> >>
> >>Are you running an older perf binary on the 3.8 kernel?
> >
> >I am.. I don't tend to rebuild 'perf'..
> >
> >>Does this work: perf record -e cycles:ppH  ...
> >
> >Yes it does. What is 'H' and why should anybody care? Especially since
> >I'm not running virtualized.
> >
> > That whole "exclude_guest" test is insane when there isn't 
> > any virtualization going on. Very annoying.
> 
> you know what's worse? [...]

No, nothing can be worse than breaking 99% of our installed 
base...

I'm wondering where this broke - is it:

  20b279ddb38c perf: Require exclude_guest to use PEBS - kernel side enforcement

Linus, does the straight revert below fix everything for you - 
or do we need to do more?

( The VM problem needs a different fix: a new include_guest bit 
  should be introduced, which would naturally default to 'off' 
  on older binaries, and the old bit should be phased out. Then 
  new perf binaries can turn on that bit safely. Or PEBS should 
  be fixed for guests. Or something along these lines - but 
  it should *not* by fixed by regressing existing binaries ... )

Thanks,

	Ingo

----------------->
>From 581ba4671bf1d1095e9ecf843be61904e4c97e91 Mon Sep 17 00:00:00 2001
From: Ingo Molnar <mingo@kernel.org>
Date: Thu, 13 Dec 2012 08:41:40 +0100
Subject: [PATCH] Revert "perf: Require exclude_guest to use PEBS - kernel
 side enforcement"

This reverts commit 20b279ddb38ca42f8863cec07b4d45ec24589f13.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/kernel/cpu/perf_event.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
index 4428fd1..6774c17 100644
--- a/arch/x86/kernel/cpu/perf_event.c
+++ b/arch/x86/kernel/cpu/perf_event.c
@@ -340,9 +340,6 @@ int x86_setup_perfctr(struct perf_event *event)
 		/* BTS is currently only allowed for user-mode. */
 		if (!attr->exclude_kernel)
 			return -EOPNOTSUPP;
-
-		if (!attr->exclude_guest)
-			return -EOPNOTSUPP;
 	}
 
 	hwc->config |= config;
@@ -385,9 +382,6 @@ int x86_pmu_hw_config(struct perf_event *event)
 	if (event->attr.precise_ip) {
 		int precise = 0;
 
-		if (!event->attr.exclude_guest)
-			return -EOPNOTSUPP;
-
 		/* Support for constant skid */
 		if (x86_pmu.pebs_active && !x86_pmu.pebs_broken) {
 			precise++;

  parent reply	other threads:[~2012-12-13  7:48 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-11  9:09 [GIT PULL] perf changes for v3.8 Ingo Molnar
2012-12-13  2:53 ` Linus Torvalds
2012-12-13  3:02   ` David Ahern
2012-12-13  3:09     ` Linus Torvalds
2012-12-13  3:16       ` David Ahern
2012-12-13  3:25   ` David Ahern
2012-12-13  3:34     ` Linus Torvalds
2012-12-13  3:43       ` David Ahern
2012-12-13  3:51         ` Linus Torvalds
2012-12-13  4:31           ` David Ahern
2012-12-13  4:46             ` Linus Torvalds
2012-12-13  7:27               ` Ingo Molnar
2012-12-13  7:30             ` Ingo Molnar
2012-12-13 14:30               ` David Ahern
2012-12-13 14:38                 ` David Ahern
2012-12-13 16:03                 ` Linus Torvalds
2012-12-13 16:24                   ` David Ahern
2012-12-13 16:33                     ` Linus Torvalds
2012-12-13 16:59                       ` Ingo Molnar
2012-12-13 17:10                         ` Linus Torvalds
2012-12-13 17:31                           ` Ingo Molnar
2012-12-17  4:43                             ` David Ahern
2012-12-22 19:22                               ` David Ahern
2012-12-23  0:00                                 ` Linus Torvalds
2012-12-13 17:02                       ` Linus Torvalds
2012-12-13 17:30                         ` David Ahern
2012-12-13 17:36                           ` Ingo Molnar
2012-12-13 19:12                             ` David Ahern
2012-12-13  7:48         ` Ingo Molnar [this message]
     [not found]         ` <20121217102000.GE11016@redhat.com>
2012-12-22 19:30           ` David Ahern
2012-12-23  9:23             ` Gleb Natapov
2012-12-23 23:17               ` David Ahern
2012-12-24 10:36                 ` Gleb Natapov
2012-12-13 17:04 ` [PATCH] x86: fix perf build with uclibc toolchains Florian Fainelli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121213074834.GB13446@gmail.com \
    --to=mingo@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=dsahern@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.