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

From: Paul Mackerras
Date: Thu May 14 2009 - 05:47:27 EST


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)

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