[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20130105014741.GA4438@us.ibm.com>
Date: Fri, 4 Jan 2013 17:47:41 -0800
From: Sukadev Bhattiprolu <sukadev@...ux.vnet.ibm.com>
To: Jiri Olsa <jolsa@...hat.com>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Paul Mackerras <paulus@...ba.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
Anton Blanchard <anton@....ibm.com>, robert.richter@....com,
linuxppc-dev@...abs.org, linux-kernel@...r.kernel.org,
Stephane Eranian <eranian@...gle.com>,
Andi Kleen <ak@...ux.intel.com>
Subject: Re: [PATCH 2/5] perf: Make EVENT_ATTR and EVENT_PTR global
Jiri Olsa [jolsa@...hat.com] wrote:
| On Tue, Dec 18, 2012 at 11:28:02PM -0800, Sukadev Bhattiprolu wrote:
| >
| > Rename EVENT_ATTR() and EVENT_PTR() PMU_EVENT_ATTR() and PMU_EVENT_PTR().
| > Make them global so they are available to all architectures.
| >
| > Further to allow architectures flexibility, have PMU_EVENT_PTR() pass in the
| > variable name as a parameter.
| >
| hi,
| the change looks ok apart from some nits below.
|
| There' another version of the x86 event attributes change
| I mentioned earlier:
|
| http://marc.info/?l=linux-kernel&m=135601815224373&w=2
|
| I'm not sure which one will make it in first, but you
| guys need to sync ;-) CC-ing Andi and Stephane.
One change that would help powerpc (and other architectures) is to move
the 'struct perf_pmu_events_attr' to say, include/linux/perf_event.h.
Each architecture can define EVENT_VAR(), EVENT_PTR() etc as needed.
|
| thanks,
| jirka
|
<snip>
| > +struct perf_pmu_events_attr {
| > + struct device_attribute attr;
| > + u64 id;
| > +};
| > +
| > +#define PMU_EVENT_PTR(_var) &_var.attr.attr
|
| this one seems superfluous as well, could be replaced by '&'
I guess that would encode the assumption that both the 'attr' fields are
the first in their respective structures. If so, an explicit comment beside
the fields would be useful.
Sukadev
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists