public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>, LKML <linux-kernel@vger.kernel.org>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Paul Mackerras <paulus@samba.org>,
	David Miller <davem@davemloft.net>
Subject: Re: [PATCH 2/2] perf: Use hot regs with software sched switch/migrate events
Date: Tue, 30 Mar 2010 20:54:52 +0200	[thread overview]
Message-ID: <1269975292.5258.597.camel@laptop> (raw)
In-Reply-To: <20100329224352.GC12254@nowhere>

On Tue, 2010-03-30 at 00:43 +0200, Frederic Weisbecker wrote:

> Actually I have doubts about what should be the strict sense
> of exclude_kernel.
> 
> Does that mean we exclude any event that happened in the kernel?
> Or does that mean we exclude the part that happened in the kernel?
> 
> Depending on the case, we do either.
> 
> In perf_swevent_hrtimer(), we simply go back to task_pt_regs()
> if exclude_kernel.
> 
> But in other software events, we don't such fix, we actually
> filter out the event if it is not user_mode().
> 
> So, I'm a bit confused on what to do.
> I'm tempted to adopt the meaning from perf_swevent_hrtimer()
> for software events too, I'm not sure...

Yes, that is indeed a good point. Problem is that perf_swevent_hrtimer()
is not quite correct either, since strictly speaking its timeline should
stop on the excluded region, but implementing that would make context
switches horribly expensive.

That said, the option that would be most correct is to simply not count
these events, and in that respect the current behaviour seems best.

Maybe we can make a new perf feature that would for each kernel event
(hw pmu included) report on the userspace state, would that be useful?



  parent reply	other threads:[~2010-03-30 18:54 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-28  5:11 [GIT PULL] perf fixes Frederic Weisbecker
2010-03-28  5:11 ` [PATCH 1/2] perf: Correctly align perf event tracing buffer Frederic Weisbecker
2010-03-29  8:51   ` Peter Zijlstra
2010-03-29 17:16     ` Frederic Weisbecker
2010-03-29 17:20       ` Peter Zijlstra
2010-03-29 17:51         ` Frederic Weisbecker
2010-03-28  5:11 ` [PATCH 2/2] perf: Use hot regs with software sched switch/migrate events Frederic Weisbecker
2010-03-29  8:49   ` Peter Zijlstra
2010-03-29 17:47     ` Frederic Weisbecker
2010-03-29 18:05       ` Peter Zijlstra
2010-03-29 22:43         ` Frederic Weisbecker
2010-03-29 22:53           ` Frederic Weisbecker
2010-03-30 18:54           ` Peter Zijlstra [this message]
2010-03-30 19:14             ` Frederic Weisbecker
2010-03-29  3:33 ` [GIT PULL] perf fixes Ingo Molnar

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=1269975292.5258.597.camel@laptop \
    --to=peterz@infradead.org \
    --cc=acme@redhat.com \
    --cc=davem@davemloft.net \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.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