[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171219190214.zaqhmpz2rv2a5pgl@hirez.programming.kicks-ass.net>
Date: Tue, 19 Dec 2017 20:02:14 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: kan.liang@...ux.intel.com
Cc: mingo@...hat.com, acme@...nel.org, linux-kernel@...r.kernel.org,
tglx@...utronix.de, jolsa@...hat.com, eranian@...gle.com,
ak@...ux.intel.com
Subject: Re: [PATCH 4/4] perf/x86/intel: drain PEBS buffer in event read
On Mon, Dec 18, 2017 at 03:34:51AM -0800, kan.liang@...ux.intel.com wrote:
> --- a/arch/x86/events/intel/ds.c
> +++ b/arch/x86/events/intel/ds.c
> @@ -926,6 +926,16 @@ void intel_pmu_pebs_del(struct perf_event *event)
> pebs_update_state(needed_cb, cpuc, event->ctx->pmu);
> }
>
> +void intel_pmu_pebs_read(struct perf_event *event)
> +{
> + struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
> +
> + if (pebs_needs_sched_cb(cpuc))
> + return intel_pmu_drain_pebs_buffer();
> +
> + x86_perf_event_update(event, 0, 0);
> +}
This is completely broken.. what if @event isn't a pebs event, but we
do have an auto-reloading pebs event configured?
Powered by blists - more mailing lists