linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Paul Mackerras <paulus@samba.org>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Mike Galbraith <efault@gmx.de>,
	linux-kernel@vger.kernel.org, Jens Axboe <jens.axboe@oracle.com>,
	James Morris <jmorris@namei.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH 1/4] perf_counter: Default to higher paranoia level
Date: Mon, 24 Aug 2009 09:37:11 +0200	[thread overview]
Message-ID: <20090824073711.GA26637@elte.hu> (raw)
In-Reply-To: <1251098962.7538.143.camel@twins>


* Peter Zijlstra <peterz@infradead.org> wrote:

> On Fri, 2009-08-21 at 16:21 +0200, Ingo Molnar wrote:
> > * Peter Zijlstra <peterz@infradead.org> wrote:
> 
> > > diff --git a/include/linux/perf_counter.h b/include/linux/perf_counter.h
> > > index 9ba1822..2b0528f 100644
> > > --- a/include/linux/perf_counter.h
> > > +++ b/include/linux/perf_counter.h
> > > @@ -439,6 +439,7 @@ enum perf_callchain_context {
> > >  struct perf_callchain_entry {
> > >  	__u64				nr;
> > >  	__u64				ip[PERF_MAX_STACK_DEPTH];
> > > +	int				restricted;
> > >  };
> > 
> > i'd love to have something more specific here - i.e. a context type 
> > ID that identifies these basic types:
> > 
> >  - process
> >  - softirq
> >  - hardirq
> >  - NMI
> > 
> > and then let it be up to upper layers to decide what they do with a 
> > restricted entry, and how to further process this information.
> > 
> > And it's not just security: for example it would be interesting to 
> > sample pure, non-irq overhead - as IRQ overhead is often unrelated 
> > to the process being measured.
> 
> Yes it is, this is purely about not showing some data. If you 
> don't want to sample IRQ stuff that's something else, we'd have to 
> grow that capability in hardware (like the OS/USR bits) or put 
> perf enable/disable hooks into the irq entry/exit hooks (which 
> doesn't sound all too hot an idea to me).
> 
> Simply not showing the call-trace is something all-together 
> different from not profiling it.

Well, it's not about not profiling it - it's about being able to 
_separate out_ the samples from the various contexts.

Right now we already have context separators for call-chains:

        PERF_CONTEXT_HV                 = (__u64)-32,
        PERF_CONTEXT_KERNEL             = (__u64)-128,
        PERF_CONTEXT_USER               = (__u64)-512,

        PERF_CONTEXT_GUEST              = (__u64)-2048,
        PERF_CONTEXT_GUEST_KERNEL       = (__u64)-2176,
        PERF_CONTEXT_GUEST_USER         = (__u64)-2560,

All i'm suggesting is to also have these context separators:

	PERF_CONTEXT_KERNEL_HARDIRQ
	PERF_CONTEXT_KERNEL_SOFTIRQ
	PERF_CONTEXT_KERNEL              /* syscall level */

So that if user-space wants to visualize just a portion of it, it 
can do it.

	Ingo

  reply	other threads:[~2009-08-24  7:37 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-19  9:18 [PATCH 0/4] perf counter bits Peter Zijlstra
2009-08-19  9:18 ` [PATCH 1/4] perf_counter: Default to higher paranoia level Peter Zijlstra
2009-08-19 14:07   ` Peter Zijlstra
2009-08-19 16:04     ` Frederic Weisbecker
2009-08-20 12:00     ` Peter Zijlstra
2009-08-21 14:21       ` Ingo Molnar
2009-08-24  7:29         ` Peter Zijlstra
2009-08-24  7:37           ` Ingo Molnar [this message]
2009-08-19  9:18 ` [PATCH 2/4] perf_counter: powerpc: Support the anonymized kernel callchain bits Peter Zijlstra
2009-08-19 13:30   ` [tip:perfcounters/core] perf_counter: powerpc: Support the anonimized " tip-bot for Peter Zijlstra
2009-08-19  9:18 ` [PATCH 3/4] perf tools: Check perf.data owner Peter Zijlstra
2009-08-19 13:32   ` [tip:perfcounters/core] " tip-bot for Peter Zijlstra
2009-08-19  9:18 ` [PATCH 4/4][RFC] perf_counter: Allow sharing of output channels Peter Zijlstra
2009-08-19 10:58   ` Ingo Molnar
2009-08-19 11:07     ` Peter Zijlstra
2009-08-19 12:41     ` Paul Mackerras
2009-08-19 12:36   ` Paul Mackerras
2009-08-19 12:56     ` Ingo Molnar
2009-08-19 12:56     ` Peter Zijlstra
2009-08-19 13:00       ` Ingo Molnar
2009-08-20 10:13       ` stephane eranian
2009-08-20 10:24         ` Peter Zijlstra
2009-08-20 10:28         ` Ingo Molnar
2009-08-19 16:19   ` Frederic Weisbecker
2009-08-19 16:24     ` Peter Zijlstra
2009-08-19 16:27       ` Frederic Weisbecker
2009-08-25  7:39   ` [tip:perfcounters/core] " tip-bot for Peter Zijlstra

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=20090824073711.GA26637@elte.hu \
    --to=mingo@elte.hu \
    --cc=acme@redhat.com \
    --cc=efault@gmx.de \
    --cc=fweisbec@gmail.com \
    --cc=jens.axboe@oracle.com \
    --cc=jmorris@namei.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    --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).