aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/perf_counter.c
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2009-06-02 13:22:16 -0400
committerIngo Molnar <mingo@elte.hu>2009-06-02 15:45:33 -0400
commit0d48696f87e3618b0d35bd3e4e9d7c188d51e7de (patch)
tree633d37089c368c0cc2c4f8120014d57df215bb53 /arch/x86/kernel/cpu/perf_counter.c
parent08247e31ca79b8f02cce47b7e8120797a8726606 (diff)
perf_counter: Rename perf_counter_hw_event => perf_counter_attr
The structure isn't hw only and when I read event, I think about those things that fall out the other end. Rename the thing. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: Marcelo Tosatti <mtosatti@redhat.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: John Kacur <jkacur@redhat.com> Cc: Stephane Eranian <eranian@googlemail.com> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/cpu/perf_counter.c')
-rw-r--r--arch/x86/kernel/cpu/perf_counter.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/x86/kernel/cpu/perf_counter.c b/arch/x86/kernel/cpu/perf_counter.c
index 904571bea710..e16e8c13132f 100644
--- a/arch/x86/kernel/cpu/perf_counter.c
+++ b/arch/x86/kernel/cpu/perf_counter.c
@@ -247,11 +247,11 @@ static inline int x86_pmu_initialized(void)
247} 247}
248 248
249/* 249/*
250 * Setup the hardware configuration for a given hw_event_type 250 * Setup the hardware configuration for a given attr_type
251 */ 251 */
252static int __hw_perf_counter_init(struct perf_counter *counter) 252static int __hw_perf_counter_init(struct perf_counter *counter)
253{ 253{
254 struct perf_counter_hw_event *hw_event = &counter->hw_event; 254 struct perf_counter_attr *attr = &counter->attr;
255 struct hw_perf_counter *hwc = &counter->hw; 255 struct hw_perf_counter *hwc = &counter->hw;
256 int err; 256 int err;
257 257
@@ -279,9 +279,9 @@ static int __hw_perf_counter_init(struct perf_counter *counter)
279 /* 279 /*
280 * Count user and OS events unless requested not to. 280 * Count user and OS events unless requested not to.
281 */ 281 */
282 if (!hw_event->exclude_user) 282 if (!attr->exclude_user)
283 hwc->config |= ARCH_PERFMON_EVENTSEL_USR; 283 hwc->config |= ARCH_PERFMON_EVENTSEL_USR;
284 if (!hw_event->exclude_kernel) 284 if (!attr->exclude_kernel)
285 hwc->config |= ARCH_PERFMON_EVENTSEL_OS; 285 hwc->config |= ARCH_PERFMON_EVENTSEL_OS;
286 286
287 if (!hwc->sample_period) 287 if (!hwc->sample_period)
@@ -292,15 +292,15 @@ static int __hw_perf_counter_init(struct perf_counter *counter)
292 /* 292 /*
293 * Raw event type provide the config in the event structure 293 * Raw event type provide the config in the event structure
294 */ 294 */
295 if (perf_event_raw(hw_event)) { 295 if (perf_event_raw(attr)) {
296 hwc->config |= x86_pmu.raw_event(perf_event_config(hw_event)); 296 hwc->config |= x86_pmu.raw_event(perf_event_config(attr));
297 } else { 297 } else {
298 if (perf_event_id(hw_event) >= x86_pmu.max_events) 298 if (perf_event_id(attr) >= x86_pmu.max_events)
299 return -EINVAL; 299 return -EINVAL;
300 /* 300 /*
301 * The generic map: 301 * The generic map:
302 */ 302 */
303 hwc->config |= x86_pmu.event_map(perf_event_id(hw_event)); 303 hwc->config |= x86_pmu.event_map(perf_event_id(attr));
304 } 304 }
305 305
306 counter->destroy = hw_perf_counter_destroy; 306 counter->destroy = hw_perf_counter_destroy;