RE: [PATCH v5 07/12] perf/x86: no counter allocation support

2019-02-15 Thread Wang, Wei W
On Friday, February 15, 2019 12:26 AM, Andi Kleen wrote: > > diff --git a/include/uapi/linux/perf_event.h > > b/include/uapi/linux/perf_event.h index 9de8780..ec97a70 100644 > > --- a/include/uapi/linux/perf_event.h > > +++ b/include/uapi/linux/perf_event.h > > @@ -372,7 +372,8 @@ struct

Re: [PATCH v5 07/12] perf/x86: no counter allocation support

2019-02-14 Thread Andi Kleen
> diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h > index 9de8780..ec97a70 100644 > --- a/include/uapi/linux/perf_event.h > +++ b/include/uapi/linux/perf_event.h > @@ -372,7 +372,8 @@ struct perf_event_attr { > context_switch : 1, /*

[PATCH v5 07/12] perf/x86: no counter allocation support

2019-02-14 Thread Wei Wang
In some cases, an event may be created without needing a counter allocation. For example, an lbr event may be created by the host only to help save/restore the lbr stack on the vCPU context switching. This patch adds a "no_counter" attr boolean to let the callers explicitly tell the perf core