lkml.org 
[lkml]   [2017]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] perf/x86/intel: Drop kernel samples even though :u is specified
On Mon, May 22, 2017 at 09:45:30AM +0100, Mark Rutland wrote:
> On Mon, May 22, 2017 at 10:12:22AM +0800, Jin, Yao wrote:

> > But the code is being ugly and hard to maintain. And frankly I don't
> > know kernel address space for all arch.
> >
> > Any idea? Could we just do at x86 side this time?
>
> Can we not check user_mode(regs) for all architectures?
>
> !user_mode(regs) implies a kernel sample.

Yes, that should work at that point. We specifically already rely on
user_mode() in the generic code.

On x86 we specifically set regs->cs to match regs->ip (in cases where
this isn't necessarily so) before calling into the generic code to make
this work.

\
 
 \ /
  Last update: 2017-05-22 11:27    [W:6.065 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site