Re: [PATCH 2/3] perf_counter: allow arch to supply event miscflags and instruction pointer

From: Peter Zijlstra
Date: Thu May 14 2009 - 05:52:07 EST


On Thu, 2009-05-14 at 19:47 +1000, Paul Mackerras wrote:
> Peter Zijlstra writes:
>
> > On Thu, 2009-05-14 at 13:29 +1000, Paul Mackerras wrote:
>
> > > #define PERF_EVENT_MISC_KERNEL (1 << 0)
> > > #define PERF_EVENT_MISC_USER (1 << 1)
> > > #define PERF_EVENT_MISC_OVERFLOW (1 << 2)
> > > +#define PERF_EVENT_MISC_HYPERVISOR (1 << 3)
> >
> > Ah, I think I've taught userspace that either !USER && !KERNEL or USER
> > && KERNEL is HV information, since neither really makes sense :-)
>
> OK, should we do something like this?
>
> #define PERF_EVENT_MISC_CPUMODE_MASK (3 << 0)
> #define PERF_EVENT_MISC_CPUMODE_UNKNOWN (0 << 0)
> #define PERF_EVENT_MISC_USER (1 << 0)
> #define PERF_EVENT_MISC_KERNEL (2 << 0)
> #define PERF_EVENT_MISC_HYPERVISOR (3 << 0)

Yep, that reads nicer :-)



--
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/