lkml.org 
[lkml]   [2012]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 06/12] perf/x86-ibs: Precise event sampling with IBS for AMD CPUs
On 14.04.12 12:24:58, Peter Zijlstra wrote:
> On Mon, 2012-04-02 at 20:19 +0200, Robert Richter wrote:
> > + switch (event->attr.type) {
> > + case PERF_TYPE_HARDWARE:
> > + switch (event->attr.config) {
> > + case PERF_COUNT_HW_CPU_CYCLES:
> > + *config = 0;
> > + return 0;
> > + }
> > + break;
> > + case PERF_TYPE_RAW:
> > + switch (event->attr.config) {
> > + case 0x0076:
> > + *config = 0;
> > + return 0;
> > + case 0x00C1:
> > + *config = IBS_OP_CNT_CTL;
> > + return 0;
> > + }
> > + break;
> > + default:
> > + return -ENOENT;
> > + }
>
> Another option would be to do this from amd_pmu_hw_config() after you've
> already gotten rid of the whole attr.type thing.

I didn't want to have IBS setup code in amd_pmu_hw_config(). The
approach to pass the configuration for precise sampling to the ibs pmu
was the simplest to me.

-Robert

--
Advanced Micro Devices, Inc.
Operating System Research Center



\
 
 \ /
  Last update: 2012-04-23 12:11    [W:0.196 / U:5.856 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site