diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2009-06-11 08:06:28 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-06-11 11:54:15 -0400 |
commit | f4dbfa8f3131a84257223393905f7efad0ca5996 (patch) | |
tree | 67bb2666868c4449c2fa9ba6dc931721f60deb6c /kernel/perf_counter.c | |
parent | 1c432d899d32d36371ee4ee310fa3609cf0e5742 (diff) |
perf_counter: Standardize event names
Pure renames only, to PERF_COUNT_HW_* and PERF_COUNT_SW_*.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/perf_counter.c')
-rw-r--r-- | kernel/perf_counter.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/kernel/perf_counter.c b/kernel/perf_counter.c index c02535bed26f..8859b97390ec 100644 --- a/kernel/perf_counter.c +++ b/kernel/perf_counter.c | |||
@@ -1024,7 +1024,7 @@ void perf_counter_task_sched_out(struct task_struct *task, | |||
1024 | int do_switch = 1; | 1024 | int do_switch = 1; |
1025 | 1025 | ||
1026 | regs = task_pt_regs(task); | 1026 | regs = task_pt_regs(task); |
1027 | perf_swcounter_event(PERF_COUNT_CONTEXT_SWITCHES, 1, 1, regs, 0); | 1027 | perf_swcounter_event(PERF_COUNT_SW_CONTEXT_SWITCHES, 1, 1, regs, 0); |
1028 | 1028 | ||
1029 | if (likely(!ctx || !cpuctx->task_ctx)) | 1029 | if (likely(!ctx || !cpuctx->task_ctx)) |
1030 | return; | 1030 | return; |
@@ -3411,13 +3411,13 @@ void perf_counter_task_migration(struct task_struct *task, int cpu) | |||
3411 | struct perf_counter_context *ctx; | 3411 | struct perf_counter_context *ctx; |
3412 | 3412 | ||
3413 | perf_swcounter_ctx_event(&cpuctx->ctx, PERF_TYPE_SOFTWARE, | 3413 | perf_swcounter_ctx_event(&cpuctx->ctx, PERF_TYPE_SOFTWARE, |
3414 | PERF_COUNT_CPU_MIGRATIONS, | 3414 | PERF_COUNT_SW_CPU_MIGRATIONS, |
3415 | 1, 1, NULL, 0); | 3415 | 1, 1, NULL, 0); |
3416 | 3416 | ||
3417 | ctx = perf_pin_task_context(task); | 3417 | ctx = perf_pin_task_context(task); |
3418 | if (ctx) { | 3418 | if (ctx) { |
3419 | perf_swcounter_ctx_event(ctx, PERF_TYPE_SOFTWARE, | 3419 | perf_swcounter_ctx_event(ctx, PERF_TYPE_SOFTWARE, |
3420 | PERF_COUNT_CPU_MIGRATIONS, | 3420 | PERF_COUNT_SW_CPU_MIGRATIONS, |
3421 | 1, 1, NULL, 0); | 3421 | 1, 1, NULL, 0); |
3422 | perf_unpin_context(ctx); | 3422 | perf_unpin_context(ctx); |
3423 | } | 3423 | } |
@@ -3475,11 +3475,11 @@ static const struct pmu *sw_perf_counter_init(struct perf_counter *counter) | |||
3475 | * events. | 3475 | * events. |
3476 | */ | 3476 | */ |
3477 | switch (counter->attr.config) { | 3477 | switch (counter->attr.config) { |
3478 | case PERF_COUNT_CPU_CLOCK: | 3478 | case PERF_COUNT_SW_CPU_CLOCK: |
3479 | pmu = &perf_ops_cpu_clock; | 3479 | pmu = &perf_ops_cpu_clock; |
3480 | 3480 | ||
3481 | break; | 3481 | break; |
3482 | case PERF_COUNT_TASK_CLOCK: | 3482 | case PERF_COUNT_SW_TASK_CLOCK: |
3483 | /* | 3483 | /* |
3484 | * If the user instantiates this as a per-cpu counter, | 3484 | * If the user instantiates this as a per-cpu counter, |
3485 | * use the cpu_clock counter instead. | 3485 | * use the cpu_clock counter instead. |
@@ -3490,11 +3490,11 @@ static const struct pmu *sw_perf_counter_init(struct perf_counter *counter) | |||
3490 | pmu = &perf_ops_cpu_clock; | 3490 | pmu = &perf_ops_cpu_clock; |
3491 | 3491 | ||
3492 | break; | 3492 | break; |
3493 | case PERF_COUNT_PAGE_FAULTS: | 3493 | case PERF_COUNT_SW_PAGE_FAULTS: |
3494 | case PERF_COUNT_PAGE_FAULTS_MIN: | 3494 | case PERF_COUNT_SW_PAGE_FAULTS_MIN: |
3495 | case PERF_COUNT_PAGE_FAULTS_MAJ: | 3495 | case PERF_COUNT_SW_PAGE_FAULTS_MAJ: |
3496 | case PERF_COUNT_CONTEXT_SWITCHES: | 3496 | case PERF_COUNT_SW_CONTEXT_SWITCHES: |
3497 | case PERF_COUNT_CPU_MIGRATIONS: | 3497 | case PERF_COUNT_SW_CPU_MIGRATIONS: |
3498 | pmu = &perf_ops_generic; | 3498 | pmu = &perf_ops_generic; |
3499 | break; | 3499 | break; |
3500 | } | 3500 | } |