linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Ingo Molnar <mingo@kernel.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: Re: [GIT PULL] perf changes for v3.8
Date: Thu, 13 Dec 2012 10:30:48 -0700	[thread overview]
Message-ID: <50CA10C8.3020509@gmail.com> (raw)
In-Reply-To: <CA+55aFwSYyoLmdDJ5xsdwcWLThYQ7oieoeWDV2g+wV3CJk4vtg@mail.gmail.com>

On 12/13/12 10:02 AM, Linus Torvalds wrote:

 From your response to Ingo I take it you looked into other cases. I'll 
summarize here to make sure we are on the same page:

1. guest only profiling from the host
perf {record|top} -e cycles:G

2. host only profiling
perf {record|top} -e cycles:H

These are 4 existing use cases that toggle exclude_guest and do work 
today for those who care. Not the lack of precise attribute on the 
commands. These are the existing use cases that break by inverting the 
logic in the kernel.

The problem child is perf record -e cycles:ppG. That command silently 
crashes running VMs. You don't get a pop up or message that says "Dave, 
you crashed your VMs running perf". You don't notice the VMs have 
crashed until you attempt to login or what have you.

So how many perf users are having weird VM crashes? I don't know. I just 
happened to:

1. not use libbvirt
2. have a running VM with console messages kicked to ttyS0
3. ttyS0 connected to stdio
4. screen session with a running VM open

at the time I ran perf.


> Btw, I do *not* think that you should necessariyl default to 'H' for
> host-only mode.

The change made to perf userspace was to set exclude_guest IF precise is 
requested AND GH have not been specified.

>
> The way it should work is that ":pp", ":ppH" and ":ppV" are all different.
>
>   - "cycles:ppH" means: I want precise cycles only for the host case
>
>   - "cycles:ppV" means: I want precise cycles, and I want the VM too
>
>     This would result in EOPNOTSUPP for the case we know is buggy (but
> presumably work on some other CPUs that don't have the problem)
>
>   - "cycles:pp" is "I want precise cycles, and I don't care about virtualization"

yes, this is the case I handled within perf userspace.

And then there is the whole 'perf kvm {top|record}' twists to the perf code.

David


  reply	other threads:[~2012-12-13 17:30 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 [this message]
2012-12-13 17:36                           ` Ingo Molnar
2012-12-13 19:12                             ` David Ahern
2012-12-13  7:48         ` [PATCH] Revert "perf: Require exclude_guest to use PEBS - kernel side enforcement" Ingo Molnar
     [not found]         ` <20121217102000.GE11016@redhat.com>
2012-12-22 19:30           ` [GIT PULL] perf changes for v3.8 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=50CA10C8.3020509@gmail.com \
    --to=dsahern@gmail.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).