Messages in this thread | | | Subject | Re: [PATCH 2/2] perf: SNB exclusive PMU access for INST_RETIRED:PREC_DIST | From | Peter Zijlstra <> | Date | Fri, 19 Oct 2012 18:27:57 +0200 |
| |
On Fri, 2012-10-19 at 16:52 +0200, Stephane Eranian wrote: > +static int intel_pebs_aliases_snb(struct perf_event *event) > +{ > + u64 cfg = event->hw.config; > + /* > + * for INST_RETIRED.PREC_DIST to work correctly with PEBS, it must > + * be measured alone on SNB (exclusive PMU access) as per Intel SDM. > + */ > + if ((cfg & INTEL_ARCH_EVENT_MASK) == 0x01c0 && !event->attr.exclusive) { > + pr_info("perf: INST_RETIRED.PREC_DIST only works in exclusive mode\n"); > + return -EINVAL;
This isn't limited to admin, right? So the above turns into a DoS on the console.
> + } > + > + return intel_pebs_aliases_ivb(event); > }
| |