lkml.org 
[lkml]   [2016]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [patch V2 26/28] x86/perf/intel/rapl: Convert it to a per package facility
On Mon, Feb 22, 2016 at 11:07:02AM -0000, Thomas Gleixner wrote:
> +static inline struct rapl_pmu *cpu_to_rapl_pmu(unsigned int cpu)
> +{
> + return rapl_pmus->pmus[topology_logical_package_id(cpu)];
> +}

> @@ -370,6 +378,7 @@ static int rapl_pmu_event_init(struct pe
> return -EINVAL;
>
> /* must be done before validate_group */
> + pmu = cpu_to_rapl_pmu(event->cpu);
> event->cpu = pmu->cpu;
> event->pmu_private = pmu;

This again looks like pmu_private is 'trivially' replacable with
something like:

static inline struct rapl_pmu *event_to_rapl_pmu(struct perf_event *event)
{
return cpu_to_rapl_pmu(event->cpu);
}

\
 
 \ /
  Last update: 2016-02-22 13:21    [W:0.146 / U:1.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site