Re: [PATCH 2/2] perf: Use hot regs with software schedswitch/migrate events
From: Frederic Weisbecker
Date: Mon Mar 29 2010 - 18:54:01 EST
On Tue, Mar 30, 2010 at 12:43:54AM +0200, Frederic Weisbecker wrote:
> On Mon, Mar 29, 2010 at 08:05:38PM +0200, Peter Zijlstra wrote:
> > On Mon, 2010-03-29 at 19:47 +0200, Frederic Weisbecker wrote:
> > >
> > >
> > > I'm going to make a quick fix for perf_fetch_caller_regs() that
> > > passes task_pt_regs if exclude_kernel for perf/urgent,
> > > and I'll do the above cleanups/invasive fixes on perf/core.
> > >
> > >
> > ok, sounds sensible, thanks!
>
>
> 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...
I think this is the right thing to do: jump back to user context
instead of filtering out (unless kernel thread).
Otherwise every software events, trace events included, are totally
pointless with exclude_kernel.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/