lkml.org 
[lkml]   [2019]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V4 07/14] perf/x86/intel: Support hardware TopDown metrics
On Mon, Sep 16, 2019 at 06:41:21AM -0700, kan.liang@linux.intel.com wrote:
> +static int add_nr_metric_event(struct cpu_hw_events *cpuc,
> + struct perf_event *event,
> + int *max_count)
> +{
> + /* There are 4 TopDown metrics events. */
> + if (is_metric_event(event) && (++cpuc->n_metric_event > 4))
> + return -EINVAL;
> +
> + *max_count += cpuc->n_metric_event;

That's busted; it would increment with 1,2,3,4 for a total of 10.

> +
> + return 0;
> +}

\
 
 \ /
  Last update: 2019-09-30 15:37    [W:0.195 / U:0.416 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site