lkml.org 
[lkml]   [2017]   [Dec]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/4] perf/x86/intel: drain PEBS buffer in event read
On Mon, Dec 18, 2017 at 03:34:51AM -0800, kan.liang@linux.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?

\
 
 \ /
  Last update: 2017-12-19 20:03    [W:0.103 / U:3.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site