Messages in this thread | | | Date | Mon, 30 Mar 2015 16:02:56 +0200 | From | Peter Zijlstra <> | Subject | Re: [PATCH V5 1/6] perf, x86: use the PEBS auto reload mechanism when possible |
| |
On Mon, Mar 30, 2015 at 02:06:07PM +0200, Peter Zijlstra wrote: > On Mon, Feb 23, 2015 at 09:25:51AM -0500, Kan Liang wrote: > > +++ b/arch/x86/kernel/cpu/perf_event_intel_ds.c > > @@ -673,6 +673,8 @@ void intel_pmu_pebs_enable(struct perf_event *event) > > struct hw_perf_event *hwc = &event->hw; > > > > hwc->config &= ~ARCH_PERFMON_EVENTSEL_INT; > > + if (!event->attr.freq) > > + hwc->flags |= PERF_X86_EVENT_AUTO_RELOAD; > > > > cpuc->pebs_enabled |= 1ULL << hwc->idx; > > Why not in x86_pmu_event_init()? This is not something that will change, > ever, right?
intel_pmu_hw_config() would be the better place, as said in a later email.
| |