aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2010-03-02 14:18:39 -0500
committerIngo Molnar <mingo@elte.hu>2010-03-10 07:22:27 -0500
commitcc2ad4ba8792b9d4ff893ae3b845d2c5a6206fc9 (patch)
tree0f8b181f766a4bc9c5a8d2fea96833bb55e0b0e8 /arch/x86
parent07088edb88164c2a2406cd2d9a7be19d8515214b (diff)
perf, x86: Remove superfluous arguments to x86_perf_event_update()
The second and third argument to x86_perf_event_update() are superfluous since they are simple expressions of the first argument. Hence remove them. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: paulus@samba.org Cc: eranian@google.com Cc: robert.richter@amd.com Cc: fweisbec@gmail.com Cc: Arnaldo Carvalho de Melo <acme@infradead.org> LKML-Reference: <20100304140100.089468871@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/kernel/cpu/perf_event.c11
-rw-r--r--arch/x86/kernel/cpu/perf_event_intel.c10
2 files changed, 8 insertions, 13 deletions
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
index fcf1788f9626..086127ba580f 100644
--- a/arch/x86/kernel/cpu/perf_event.c
+++ b/arch/x86/kernel/cpu/perf_event.c
@@ -193,11 +193,12 @@ static u64 __read_mostly hw_cache_event_ids
193 * Returns the delta events processed. 193 * Returns the delta events processed.
194 */ 194 */
195static u64 195static u64
196x86_perf_event_update(struct perf_event *event, 196x86_perf_event_update(struct perf_event *event)
197 struct hw_perf_event *hwc, int idx)
198{ 197{
198 struct hw_perf_event *hwc = &event->hw;
199 int shift = 64 - x86_pmu.event_bits; 199 int shift = 64 - x86_pmu.event_bits;
200 u64 prev_raw_count, new_raw_count; 200 u64 prev_raw_count, new_raw_count;
201 int idx = hwc->idx;
201 s64 delta; 202 s64 delta;
202 203
203 if (idx == X86_PMC_IDX_FIXED_BTS) 204 if (idx == X86_PMC_IDX_FIXED_BTS)
@@ -1064,7 +1065,7 @@ static void x86_pmu_stop(struct perf_event *event)
1064 * Drain the remaining delta count out of a event 1065 * Drain the remaining delta count out of a event
1065 * that we are disabling: 1066 * that we are disabling:
1066 */ 1067 */
1067 x86_perf_event_update(event, hwc, idx); 1068 x86_perf_event_update(event);
1068 1069
1069 cpuc->events[idx] = NULL; 1070 cpuc->events[idx] = NULL;
1070} 1071}
@@ -1112,7 +1113,7 @@ static int x86_pmu_handle_irq(struct pt_regs *regs)
1112 event = cpuc->events[idx]; 1113 event = cpuc->events[idx];
1113 hwc = &event->hw; 1114 hwc = &event->hw;
1114 1115
1115 val = x86_perf_event_update(event, hwc, idx); 1116 val = x86_perf_event_update(event);
1116 if (val & (1ULL << (x86_pmu.event_bits - 1))) 1117 if (val & (1ULL << (x86_pmu.event_bits - 1)))
1117 continue; 1118 continue;
1118 1119
@@ -1458,7 +1459,7 @@ void __init init_hw_perf_events(void)
1458 1459
1459static inline void x86_pmu_read(struct perf_event *event) 1460static inline void x86_pmu_read(struct perf_event *event)
1460{ 1461{
1461 x86_perf_event_update(event, &event->hw, event->hw.idx); 1462 x86_perf_event_update(event);
1462} 1463}
1463 1464
1464static const struct pmu pmu = { 1465static const struct pmu pmu = {
diff --git a/arch/x86/kernel/cpu/perf_event_intel.c b/arch/x86/kernel/cpu/perf_event_intel.c
index 6dbdf91ab342..a4c9f160448e 100644
--- a/arch/x86/kernel/cpu/perf_event_intel.c
+++ b/arch/x86/kernel/cpu/perf_event_intel.c
@@ -694,14 +694,8 @@ static void intel_pmu_enable_event(struct hw_perf_event *hwc, int idx)
694 */ 694 */
695static int intel_pmu_save_and_restart(struct perf_event *event) 695static int intel_pmu_save_and_restart(struct perf_event *event)
696{ 696{
697 struct hw_perf_event *hwc = &event->hw; 697 x86_perf_event_update(event);
698 int idx = hwc->idx; 698 return x86_perf_event_set_period(event);
699 int ret;
700
701 x86_perf_event_update(event, hwc, idx);
702 ret = x86_perf_event_set_period(event);
703
704 return ret;
705} 699}
706 700
707static void intel_pmu_reset(void) 701static void intel_pmu_reset(void)