summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2009-06-02 15:13:03 +0200
committerIngo Molnar <mingo@elte.hu>2009-06-02 21:45:30 +0200
commitb23f3325ed465f1bd914384884269af0d106778c (patch)
tree7b263c707e50463f1e1defc60d371b09e352a21a /arch
parent8e5799b1ad2a0567fdfaaf0e91b40efee010f2c1 (diff)
downloadtalos-obmc-linux-b23f3325ed465f1bd914384884269af0d106778c.tar.gz
talos-obmc-linux-b23f3325ed465f1bd914384884269af0d106778c.zip
perf_counter: Rename various fields
A few renames: s/irq_period/sample_period/ s/irq_freq/sample_freq/ s/PERF_RECORD_/PERF_SAMPLE_/ s/record_type/sample_type/ And change both the new sample_type and read_format to u64. Reported-by: Stephane Eranian <eranian@googlemail.com> 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> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/kernel/perf_counter.c12
-rw-r--r--arch/x86/kernel/cpu/perf_counter.c8
2 files changed, 10 insertions, 10 deletions
diff --git a/arch/powerpc/kernel/perf_counter.c b/arch/powerpc/kernel/perf_counter.c
index f96d55f55bd6..c9633321e7a5 100644
--- a/arch/powerpc/kernel/perf_counter.c
+++ b/arch/powerpc/kernel/perf_counter.c
@@ -535,7 +535,7 @@ void hw_perf_enable(void)
continue;
}
val = 0;
- if (counter->hw.irq_period) {
+ if (counter->hw.sample_period) {
left = atomic64_read(&counter->hw.period_left);
if (left < 0x80000000L)
val = 0x80000000L - left;
@@ -749,12 +749,12 @@ static void power_pmu_unthrottle(struct perf_counter *counter)
s64 val, left;
unsigned long flags;
- if (!counter->hw.idx || !counter->hw.irq_period)
+ if (!counter->hw.idx || !counter->hw.sample_period)
return;
local_irq_save(flags);
perf_disable();
power_pmu_read(counter);
- left = counter->hw.irq_period;
+ left = counter->hw.sample_period;
val = 0;
if (left < 0x80000000L)
val = 0x80000000L - left;
@@ -789,7 +789,7 @@ static int can_go_on_limited_pmc(struct perf_counter *counter, u64 ev,
if (counter->hw_event.exclude_user
|| counter->hw_event.exclude_kernel
|| counter->hw_event.exclude_hv
- || counter->hw_event.irq_period)
+ || counter->hw_event.sample_period)
return 0;
if (ppmu->limited_pmc_event(ev))
@@ -925,7 +925,7 @@ const struct pmu *hw_perf_counter_init(struct perf_counter *counter)
counter->hw.config = events[n];
counter->hw.counter_base = cflags[n];
- atomic64_set(&counter->hw.period_left, counter->hw.irq_period);
+ atomic64_set(&counter->hw.period_left, counter->hw.sample_period);
/*
* See if we need to reserve the PMU.
@@ -958,7 +958,7 @@ const struct pmu *hw_perf_counter_init(struct perf_counter *counter)
static void record_and_restart(struct perf_counter *counter, long val,
struct pt_regs *regs, int nmi)
{
- u64 period = counter->hw.irq_period;
+ u64 period = counter->hw.sample_period;
s64 prev, delta, left;
int record = 0;
u64 addr, mmcra, sdsync;
diff --git a/arch/x86/kernel/cpu/perf_counter.c b/arch/x86/kernel/cpu/perf_counter.c
index 316b0c995f38..ec06aa5e9282 100644
--- a/arch/x86/kernel/cpu/perf_counter.c
+++ b/arch/x86/kernel/cpu/perf_counter.c
@@ -290,11 +290,11 @@ static int __hw_perf_counter_init(struct perf_counter *counter)
hwc->nmi = 1;
hw_event->nmi = 1;
- if (!hwc->irq_period)
- hwc->irq_period = x86_pmu.max_period;
+ if (!hwc->sample_period)
+ hwc->sample_period = x86_pmu.max_period;
atomic64_set(&hwc->period_left,
- min(x86_pmu.max_period, hwc->irq_period));
+ min(x86_pmu.max_period, hwc->sample_period));
/*
* Raw event type provide the config in the event structure
@@ -462,7 +462,7 @@ x86_perf_counter_set_period(struct perf_counter *counter,
struct hw_perf_counter *hwc, int idx)
{
s64 left = atomic64_read(&hwc->period_left);
- s64 period = min(x86_pmu.max_period, hwc->irq_period);
+ s64 period = min(x86_pmu.max_period, hwc->sample_period);
int err;
/*
OpenPOWER on IntegriCloud