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 /arch | |
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 'arch')
-rw-r--r-- | arch/powerpc/kernel/power4-pmu.c | 12 | ||||
-rw-r--r-- | arch/powerpc/kernel/power5+-pmu.c | 12 | ||||
-rw-r--r-- | arch/powerpc/kernel/power5-pmu.c | 12 | ||||
-rw-r--r-- | arch/powerpc/kernel/power6-pmu.c | 12 | ||||
-rw-r--r-- | arch/powerpc/kernel/ppc970-pmu.c | 12 | ||||
-rw-r--r-- | arch/powerpc/mm/fault.c | 6 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/perf_counter.c | 32 | ||||
-rw-r--r-- | arch/x86/mm/fault.c | 6 |
8 files changed, 52 insertions, 52 deletions
diff --git a/arch/powerpc/kernel/power4-pmu.c b/arch/powerpc/kernel/power4-pmu.c index 0e94b6857220..73956f084b29 100644 --- a/arch/powerpc/kernel/power4-pmu.c +++ b/arch/powerpc/kernel/power4-pmu.c | |||
@@ -535,12 +535,12 @@ static void p4_disable_pmc(unsigned int pmc, u64 mmcr[]) | |||
535 | } | 535 | } |
536 | 536 | ||
537 | static int p4_generic_events[] = { | 537 | static int p4_generic_events[] = { |
538 | [PERF_COUNT_CPU_CYCLES] = 7, | 538 | [PERF_COUNT_HW_CPU_CYCLES] = 7, |
539 | [PERF_COUNT_INSTRUCTIONS] = 0x1001, | 539 | [PERF_COUNT_HW_INSTRUCTIONS] = 0x1001, |
540 | [PERF_COUNT_CACHE_REFERENCES] = 0x8c10, /* PM_LD_REF_L1 */ | 540 | [PERF_COUNT_HW_CACHE_REFERENCES] = 0x8c10, /* PM_LD_REF_L1 */ |
541 | [PERF_COUNT_CACHE_MISSES] = 0x3c10, /* PM_LD_MISS_L1 */ | 541 | [PERF_COUNT_HW_CACHE_MISSES] = 0x3c10, /* PM_LD_MISS_L1 */ |
542 | [PERF_COUNT_BRANCH_INSTRUCTIONS] = 0x330, /* PM_BR_ISSUED */ | 542 | [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = 0x330, /* PM_BR_ISSUED */ |
543 | [PERF_COUNT_BRANCH_MISSES] = 0x331, /* PM_BR_MPRED_CR */ | 543 | [PERF_COUNT_HW_BRANCH_MISSES] = 0x331, /* PM_BR_MPRED_CR */ |
544 | }; | 544 | }; |
545 | 545 | ||
546 | #define C(x) PERF_COUNT_HW_CACHE_##x | 546 | #define C(x) PERF_COUNT_HW_CACHE_##x |
diff --git a/arch/powerpc/kernel/power5+-pmu.c b/arch/powerpc/kernel/power5+-pmu.c index bbf2cbb07388..5f8b7741e970 100644 --- a/arch/powerpc/kernel/power5+-pmu.c +++ b/arch/powerpc/kernel/power5+-pmu.c | |||
@@ -606,12 +606,12 @@ static void power5p_disable_pmc(unsigned int pmc, u64 mmcr[]) | |||
606 | } | 606 | } |
607 | 607 | ||
608 | static int power5p_generic_events[] = { | 608 | static int power5p_generic_events[] = { |
609 | [PERF_COUNT_CPU_CYCLES] = 0xf, | 609 | [PERF_COUNT_HW_CPU_CYCLES] = 0xf, |
610 | [PERF_COUNT_INSTRUCTIONS] = 0x100009, | 610 | [PERF_COUNT_HW_INSTRUCTIONS] = 0x100009, |
611 | [PERF_COUNT_CACHE_REFERENCES] = 0x1c10a8, /* LD_REF_L1 */ | 611 | [PERF_COUNT_HW_CACHE_REFERENCES] = 0x1c10a8, /* LD_REF_L1 */ |
612 | [PERF_COUNT_CACHE_MISSES] = 0x3c1088, /* LD_MISS_L1 */ | 612 | [PERF_COUNT_HW_CACHE_MISSES] = 0x3c1088, /* LD_MISS_L1 */ |
613 | [PERF_COUNT_BRANCH_INSTRUCTIONS] = 0x230e4, /* BR_ISSUED */ | 613 | [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = 0x230e4, /* BR_ISSUED */ |
614 | [PERF_COUNT_BRANCH_MISSES] = 0x230e5, /* BR_MPRED_CR */ | 614 | [PERF_COUNT_HW_BRANCH_MISSES] = 0x230e5, /* BR_MPRED_CR */ |
615 | }; | 615 | }; |
616 | 616 | ||
617 | #define C(x) PERF_COUNT_HW_CACHE_##x | 617 | #define C(x) PERF_COUNT_HW_CACHE_##x |
diff --git a/arch/powerpc/kernel/power5-pmu.c b/arch/powerpc/kernel/power5-pmu.c index 670cf10b91e8..d54723ab627d 100644 --- a/arch/powerpc/kernel/power5-pmu.c +++ b/arch/powerpc/kernel/power5-pmu.c | |||
@@ -548,12 +548,12 @@ static void power5_disable_pmc(unsigned int pmc, u64 mmcr[]) | |||
548 | } | 548 | } |
549 | 549 | ||
550 | static int power5_generic_events[] = { | 550 | static int power5_generic_events[] = { |
551 | [PERF_COUNT_CPU_CYCLES] = 0xf, | 551 | [PERF_COUNT_HW_CPU_CYCLES] = 0xf, |
552 | [PERF_COUNT_INSTRUCTIONS] = 0x100009, | 552 | [PERF_COUNT_HW_INSTRUCTIONS] = 0x100009, |
553 | [PERF_COUNT_CACHE_REFERENCES] = 0x4c1090, /* LD_REF_L1 */ | 553 | [PERF_COUNT_HW_CACHE_REFERENCES] = 0x4c1090, /* LD_REF_L1 */ |
554 | [PERF_COUNT_CACHE_MISSES] = 0x3c1088, /* LD_MISS_L1 */ | 554 | [PERF_COUNT_HW_CACHE_MISSES] = 0x3c1088, /* LD_MISS_L1 */ |
555 | [PERF_COUNT_BRANCH_INSTRUCTIONS] = 0x230e4, /* BR_ISSUED */ | 555 | [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = 0x230e4, /* BR_ISSUED */ |
556 | [PERF_COUNT_BRANCH_MISSES] = 0x230e5, /* BR_MPRED_CR */ | 556 | [PERF_COUNT_HW_BRANCH_MISSES] = 0x230e5, /* BR_MPRED_CR */ |
557 | }; | 557 | }; |
558 | 558 | ||
559 | #define C(x) PERF_COUNT_HW_CACHE_##x | 559 | #define C(x) PERF_COUNT_HW_CACHE_##x |
diff --git a/arch/powerpc/kernel/power6-pmu.c b/arch/powerpc/kernel/power6-pmu.c index 4da707866097..0cd406ee765b 100644 --- a/arch/powerpc/kernel/power6-pmu.c +++ b/arch/powerpc/kernel/power6-pmu.c | |||
@@ -466,12 +466,12 @@ static void p6_disable_pmc(unsigned int pmc, u64 mmcr[]) | |||
466 | } | 466 | } |
467 | 467 | ||
468 | static int power6_generic_events[] = { | 468 | static int power6_generic_events[] = { |
469 | [PERF_COUNT_CPU_CYCLES] = 0x1e, | 469 | [PERF_COUNT_HW_CPU_CYCLES] = 0x1e, |
470 | [PERF_COUNT_INSTRUCTIONS] = 2, | 470 | [PERF_COUNT_HW_INSTRUCTIONS] = 2, |
471 | [PERF_COUNT_CACHE_REFERENCES] = 0x280030, /* LD_REF_L1 */ | 471 | [PERF_COUNT_HW_CACHE_REFERENCES] = 0x280030, /* LD_REF_L1 */ |
472 | [PERF_COUNT_CACHE_MISSES] = 0x30000c, /* LD_MISS_L1 */ | 472 | [PERF_COUNT_HW_CACHE_MISSES] = 0x30000c, /* LD_MISS_L1 */ |
473 | [PERF_COUNT_BRANCH_INSTRUCTIONS] = 0x410a0, /* BR_PRED */ | 473 | [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = 0x410a0, /* BR_PRED */ |
474 | [PERF_COUNT_BRANCH_MISSES] = 0x400052, /* BR_MPRED */ | 474 | [PERF_COUNT_HW_BRANCH_MISSES] = 0x400052, /* BR_MPRED */ |
475 | }; | 475 | }; |
476 | 476 | ||
477 | #define C(x) PERF_COUNT_HW_CACHE_##x | 477 | #define C(x) PERF_COUNT_HW_CACHE_##x |
diff --git a/arch/powerpc/kernel/ppc970-pmu.c b/arch/powerpc/kernel/ppc970-pmu.c index 336adf1736af..46a206409420 100644 --- a/arch/powerpc/kernel/ppc970-pmu.c +++ b/arch/powerpc/kernel/ppc970-pmu.c | |||
@@ -419,12 +419,12 @@ static void p970_disable_pmc(unsigned int pmc, u64 mmcr[]) | |||
419 | } | 419 | } |
420 | 420 | ||
421 | static int ppc970_generic_events[] = { | 421 | static int ppc970_generic_events[] = { |
422 | [PERF_COUNT_CPU_CYCLES] = 7, | 422 | [PERF_COUNT_HW_CPU_CYCLES] = 7, |
423 | [PERF_COUNT_INSTRUCTIONS] = 1, | 423 | [PERF_COUNT_HW_INSTRUCTIONS] = 1, |
424 | [PERF_COUNT_CACHE_REFERENCES] = 0x8810, /* PM_LD_REF_L1 */ | 424 | [PERF_COUNT_HW_CACHE_REFERENCES] = 0x8810, /* PM_LD_REF_L1 */ |
425 | [PERF_COUNT_CACHE_MISSES] = 0x3810, /* PM_LD_MISS_L1 */ | 425 | [PERF_COUNT_HW_CACHE_MISSES] = 0x3810, /* PM_LD_MISS_L1 */ |
426 | [PERF_COUNT_BRANCH_INSTRUCTIONS] = 0x431, /* PM_BR_ISSUED */ | 426 | [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = 0x431, /* PM_BR_ISSUED */ |
427 | [PERF_COUNT_BRANCH_MISSES] = 0x327, /* PM_GRP_BR_MPRED */ | 427 | [PERF_COUNT_HW_BRANCH_MISSES] = 0x327, /* PM_GRP_BR_MPRED */ |
428 | }; | 428 | }; |
429 | 429 | ||
430 | #define C(x) PERF_COUNT_HW_CACHE_##x | 430 | #define C(x) PERF_COUNT_HW_CACHE_##x |
diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c index ac0e112031b2..5beffc8f481e 100644 --- a/arch/powerpc/mm/fault.c +++ b/arch/powerpc/mm/fault.c | |||
@@ -171,7 +171,7 @@ int __kprobes do_page_fault(struct pt_regs *regs, unsigned long address, | |||
171 | die("Weird page fault", regs, SIGSEGV); | 171 | die("Weird page fault", regs, SIGSEGV); |
172 | } | 172 | } |
173 | 173 | ||
174 | perf_swcounter_event(PERF_COUNT_PAGE_FAULTS, 1, 0, regs, address); | 174 | perf_swcounter_event(PERF_COUNT_SW_PAGE_FAULTS, 1, 0, regs, address); |
175 | 175 | ||
176 | /* When running in the kernel we expect faults to occur only to | 176 | /* When running in the kernel we expect faults to occur only to |
177 | * addresses in user space. All other faults represent errors in the | 177 | * addresses in user space. All other faults represent errors in the |
@@ -312,7 +312,7 @@ good_area: | |||
312 | } | 312 | } |
313 | if (ret & VM_FAULT_MAJOR) { | 313 | if (ret & VM_FAULT_MAJOR) { |
314 | current->maj_flt++; | 314 | current->maj_flt++; |
315 | perf_swcounter_event(PERF_COUNT_PAGE_FAULTS_MAJ, 1, 0, | 315 | perf_swcounter_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, 0, |
316 | regs, address); | 316 | regs, address); |
317 | #ifdef CONFIG_PPC_SMLPAR | 317 | #ifdef CONFIG_PPC_SMLPAR |
318 | if (firmware_has_feature(FW_FEATURE_CMO)) { | 318 | if (firmware_has_feature(FW_FEATURE_CMO)) { |
@@ -323,7 +323,7 @@ good_area: | |||
323 | #endif | 323 | #endif |
324 | } else { | 324 | } else { |
325 | current->min_flt++; | 325 | current->min_flt++; |
326 | perf_swcounter_event(PERF_COUNT_PAGE_FAULTS_MIN, 1, 0, | 326 | perf_swcounter_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, 0, |
327 | regs, address); | 327 | regs, address); |
328 | } | 328 | } |
329 | up_read(&mm->mmap_sem); | 329 | up_read(&mm->mmap_sem); |
diff --git a/arch/x86/kernel/cpu/perf_counter.c b/arch/x86/kernel/cpu/perf_counter.c index 57ae1bec81be..572fb434a666 100644 --- a/arch/x86/kernel/cpu/perf_counter.c +++ b/arch/x86/kernel/cpu/perf_counter.c | |||
@@ -69,13 +69,13 @@ static DEFINE_PER_CPU(struct cpu_hw_counters, cpu_hw_counters) = { | |||
69 | */ | 69 | */ |
70 | static const u64 intel_perfmon_event_map[] = | 70 | static const u64 intel_perfmon_event_map[] = |
71 | { | 71 | { |
72 | [PERF_COUNT_CPU_CYCLES] = 0x003c, | 72 | [PERF_COUNT_HW_CPU_CYCLES] = 0x003c, |
73 | [PERF_COUNT_INSTRUCTIONS] = 0x00c0, | 73 | [PERF_COUNT_HW_INSTRUCTIONS] = 0x00c0, |
74 | [PERF_COUNT_CACHE_REFERENCES] = 0x4f2e, | 74 | [PERF_COUNT_HW_CACHE_REFERENCES] = 0x4f2e, |
75 | [PERF_COUNT_CACHE_MISSES] = 0x412e, | 75 | [PERF_COUNT_HW_CACHE_MISSES] = 0x412e, |
76 | [PERF_COUNT_BRANCH_INSTRUCTIONS] = 0x00c4, | 76 | [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = 0x00c4, |
77 | [PERF_COUNT_BRANCH_MISSES] = 0x00c5, | 77 | [PERF_COUNT_HW_BRANCH_MISSES] = 0x00c5, |
78 | [PERF_COUNT_BUS_CYCLES] = 0x013c, | 78 | [PERF_COUNT_HW_BUS_CYCLES] = 0x013c, |
79 | }; | 79 | }; |
80 | 80 | ||
81 | static u64 intel_pmu_event_map(int event) | 81 | static u64 intel_pmu_event_map(int event) |
@@ -485,12 +485,12 @@ static const u64 amd_0f_hw_cache_event_ids | |||
485 | */ | 485 | */ |
486 | static const u64 amd_perfmon_event_map[] = | 486 | static const u64 amd_perfmon_event_map[] = |
487 | { | 487 | { |
488 | [PERF_COUNT_CPU_CYCLES] = 0x0076, | 488 | [PERF_COUNT_HW_CPU_CYCLES] = 0x0076, |
489 | [PERF_COUNT_INSTRUCTIONS] = 0x00c0, | 489 | [PERF_COUNT_HW_INSTRUCTIONS] = 0x00c0, |
490 | [PERF_COUNT_CACHE_REFERENCES] = 0x0080, | 490 | [PERF_COUNT_HW_CACHE_REFERENCES] = 0x0080, |
491 | [PERF_COUNT_CACHE_MISSES] = 0x0081, | 491 | [PERF_COUNT_HW_CACHE_MISSES] = 0x0081, |
492 | [PERF_COUNT_BRANCH_INSTRUCTIONS] = 0x00c4, | 492 | [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = 0x00c4, |
493 | [PERF_COUNT_BRANCH_MISSES] = 0x00c5, | 493 | [PERF_COUNT_HW_BRANCH_MISSES] = 0x00c5, |
494 | }; | 494 | }; |
495 | 495 | ||
496 | static u64 amd_pmu_event_map(int event) | 496 | static u64 amd_pmu_event_map(int event) |
@@ -970,11 +970,11 @@ fixed_mode_idx(struct perf_counter *counter, struct hw_perf_counter *hwc) | |||
970 | 970 | ||
971 | event = hwc->config & ARCH_PERFMON_EVENT_MASK; | 971 | event = hwc->config & ARCH_PERFMON_EVENT_MASK; |
972 | 972 | ||
973 | if (unlikely(event == x86_pmu.event_map(PERF_COUNT_INSTRUCTIONS))) | 973 | if (unlikely(event == x86_pmu.event_map(PERF_COUNT_HW_INSTRUCTIONS))) |
974 | return X86_PMC_IDX_FIXED_INSTRUCTIONS; | 974 | return X86_PMC_IDX_FIXED_INSTRUCTIONS; |
975 | if (unlikely(event == x86_pmu.event_map(PERF_COUNT_CPU_CYCLES))) | 975 | if (unlikely(event == x86_pmu.event_map(PERF_COUNT_HW_CPU_CYCLES))) |
976 | return X86_PMC_IDX_FIXED_CPU_CYCLES; | 976 | return X86_PMC_IDX_FIXED_CPU_CYCLES; |
977 | if (unlikely(event == x86_pmu.event_map(PERF_COUNT_BUS_CYCLES))) | 977 | if (unlikely(event == x86_pmu.event_map(PERF_COUNT_HW_BUS_CYCLES))) |
978 | return X86_PMC_IDX_FIXED_BUS_CYCLES; | 978 | return X86_PMC_IDX_FIXED_BUS_CYCLES; |
979 | 979 | ||
980 | return -1; | 980 | return -1; |
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c index 6f9df2babe48..5c6d816f30b4 100644 --- a/arch/x86/mm/fault.c +++ b/arch/x86/mm/fault.c | |||
@@ -1045,7 +1045,7 @@ do_page_fault(struct pt_regs *regs, unsigned long error_code) | |||
1045 | if (unlikely(error_code & PF_RSVD)) | 1045 | if (unlikely(error_code & PF_RSVD)) |
1046 | pgtable_bad(regs, error_code, address); | 1046 | pgtable_bad(regs, error_code, address); |
1047 | 1047 | ||
1048 | perf_swcounter_event(PERF_COUNT_PAGE_FAULTS, 1, 0, regs, address); | 1048 | perf_swcounter_event(PERF_COUNT_SW_PAGE_FAULTS, 1, 0, regs, address); |
1049 | 1049 | ||
1050 | /* | 1050 | /* |
1051 | * If we're in an interrupt, have no user context or are running | 1051 | * If we're in an interrupt, have no user context or are running |
@@ -1142,11 +1142,11 @@ good_area: | |||
1142 | 1142 | ||
1143 | if (fault & VM_FAULT_MAJOR) { | 1143 | if (fault & VM_FAULT_MAJOR) { |
1144 | tsk->maj_flt++; | 1144 | tsk->maj_flt++; |
1145 | perf_swcounter_event(PERF_COUNT_PAGE_FAULTS_MAJ, 1, 0, | 1145 | perf_swcounter_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, 0, |
1146 | regs, address); | 1146 | regs, address); |
1147 | } else { | 1147 | } else { |
1148 | tsk->min_flt++; | 1148 | tsk->min_flt++; |
1149 | perf_swcounter_event(PERF_COUNT_PAGE_FAULTS_MIN, 1, 0, | 1149 | perf_swcounter_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, 0, |
1150 | regs, address); | 1150 | regs, address); |
1151 | } | 1151 | } |
1152 | 1152 | ||