Commit 8be6e8f3 authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Ingo Molnar

perf_counter: Rename L2 to LL cache

The top (fastest) and last level (biggest) caches are the most
interesting ones, performance wise.
Signed-off-by: default avatarPeter 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>
[ Fixed the Nehalem LL table to LLC Reference/Miss events ]
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent f4dbfa8f
...@@ -561,7 +561,7 @@ static int power4_cache_events[C(MAX)][C(OP_MAX)][C(RESULT_MAX)] = { ...@@ -561,7 +561,7 @@ static int power4_cache_events[C(MAX)][C(OP_MAX)][C(RESULT_MAX)] = {
[C(OP_WRITE)] = { -1, -1 }, [C(OP_WRITE)] = { -1, -1 },
[C(OP_PREFETCH)] = { 0, 0 }, [C(OP_PREFETCH)] = { 0, 0 },
}, },
[C(L2)] = { /* RESULT_ACCESS RESULT_MISS */ [C(LL)] = { /* RESULT_ACCESS RESULT_MISS */
[C(OP_READ)] = { 0, 0 }, [C(OP_READ)] = { 0, 0 },
[C(OP_WRITE)] = { 0, 0 }, [C(OP_WRITE)] = { 0, 0 },
[C(OP_PREFETCH)] = { 0xc34, 0 }, [C(OP_PREFETCH)] = { 0xc34, 0 },
......
...@@ -632,7 +632,7 @@ static int power5p_cache_events[C(MAX)][C(OP_MAX)][C(RESULT_MAX)] = { ...@@ -632,7 +632,7 @@ static int power5p_cache_events[C(MAX)][C(OP_MAX)][C(RESULT_MAX)] = {
[C(OP_WRITE)] = { -1, -1 }, [C(OP_WRITE)] = { -1, -1 },
[C(OP_PREFETCH)] = { 0, 0 }, [C(OP_PREFETCH)] = { 0, 0 },
}, },
[C(L2)] = { /* RESULT_ACCESS RESULT_MISS */ [C(LL)] = { /* RESULT_ACCESS RESULT_MISS */
[C(OP_READ)] = { 0, 0 }, [C(OP_READ)] = { 0, 0 },
[C(OP_WRITE)] = { 0, 0 }, [C(OP_WRITE)] = { 0, 0 },
[C(OP_PREFETCH)] = { 0xc50c3, 0 }, [C(OP_PREFETCH)] = { 0xc50c3, 0 },
......
...@@ -574,7 +574,7 @@ static int power5_cache_events[C(MAX)][C(OP_MAX)][C(RESULT_MAX)] = { ...@@ -574,7 +574,7 @@ static int power5_cache_events[C(MAX)][C(OP_MAX)][C(RESULT_MAX)] = {
[C(OP_WRITE)] = { -1, -1 }, [C(OP_WRITE)] = { -1, -1 },
[C(OP_PREFETCH)] = { 0, 0 }, [C(OP_PREFETCH)] = { 0, 0 },
}, },
[C(L2)] = { /* RESULT_ACCESS RESULT_MISS */ [C(LL)] = { /* RESULT_ACCESS RESULT_MISS */
[C(OP_READ)] = { 0, 0x3c309b }, [C(OP_READ)] = { 0, 0x3c309b },
[C(OP_WRITE)] = { 0, 0 }, [C(OP_WRITE)] = { 0, 0 },
[C(OP_PREFETCH)] = { 0xc50c3, 0 }, [C(OP_PREFETCH)] = { 0xc50c3, 0 },
......
...@@ -493,7 +493,7 @@ static int power6_cache_events[C(MAX)][C(OP_MAX)][C(RESULT_MAX)] = { ...@@ -493,7 +493,7 @@ static int power6_cache_events[C(MAX)][C(OP_MAX)][C(RESULT_MAX)] = {
[C(OP_WRITE)] = { -1, -1 }, [C(OP_WRITE)] = { -1, -1 },
[C(OP_PREFETCH)] = { 0x4008c, 0 }, [C(OP_PREFETCH)] = { 0x4008c, 0 },
}, },
[C(L2)] = { /* RESULT_ACCESS RESULT_MISS */ [C(LL)] = { /* RESULT_ACCESS RESULT_MISS */
[C(OP_READ)] = { 0x150730, 0x250532 }, [C(OP_READ)] = { 0x150730, 0x250532 },
[C(OP_WRITE)] = { 0x250432, 0x150432 }, [C(OP_WRITE)] = { 0x250432, 0x150432 },
[C(OP_PREFETCH)] = { 0x810a6, 0 }, [C(OP_PREFETCH)] = { 0x810a6, 0 },
......
...@@ -320,7 +320,7 @@ static int power7_cache_events[C(MAX)][C(OP_MAX)][C(RESULT_MAX)] = { ...@@ -320,7 +320,7 @@ static int power7_cache_events[C(MAX)][C(OP_MAX)][C(RESULT_MAX)] = {
[C(OP_WRITE)] = { -1, -1 }, [C(OP_WRITE)] = { -1, -1 },
[C(OP_PREFETCH)] = { 0x408a, 0 }, [C(OP_PREFETCH)] = { 0x408a, 0 },
}, },
[C(L2)] = { /* RESULT_ACCESS RESULT_MISS */ [C(LL)] = { /* RESULT_ACCESS RESULT_MISS */
[C(OP_READ)] = { 0x6080, 0x6084 }, [C(OP_READ)] = { 0x6080, 0x6084 },
[C(OP_WRITE)] = { 0x6082, 0x6086 }, [C(OP_WRITE)] = { 0x6082, 0x6086 },
[C(OP_PREFETCH)] = { 0, 0 }, [C(OP_PREFETCH)] = { 0, 0 },
......
...@@ -445,7 +445,7 @@ static int ppc970_cache_events[C(MAX)][C(OP_MAX)][C(RESULT_MAX)] = { ...@@ -445,7 +445,7 @@ static int ppc970_cache_events[C(MAX)][C(OP_MAX)][C(RESULT_MAX)] = {
[C(OP_WRITE)] = { -1, -1 }, [C(OP_WRITE)] = { -1, -1 },
[C(OP_PREFETCH)] = { 0, 0 }, [C(OP_PREFETCH)] = { 0, 0 },
}, },
[C(L2)] = { /* RESULT_ACCESS RESULT_MISS */ [C(LL)] = { /* RESULT_ACCESS RESULT_MISS */
[C(OP_READ)] = { 0, 0 }, [C(OP_READ)] = { 0, 0 },
[C(OP_WRITE)] = { 0, 0 }, [C(OP_WRITE)] = { 0, 0 },
[C(OP_PREFETCH)] = { 0x733, 0 }, [C(OP_PREFETCH)] = { 0x733, 0 },
......
...@@ -131,7 +131,7 @@ static const u64 nehalem_hw_cache_event_ids ...@@ -131,7 +131,7 @@ static const u64 nehalem_hw_cache_event_ids
[ C(RESULT_MISS) ] = 0x0, [ C(RESULT_MISS) ] = 0x0,
}, },
}, },
[ C(L2 ) ] = { [ C(LL ) ] = {
[ C(OP_READ) ] = { [ C(OP_READ) ] = {
[ C(RESULT_ACCESS) ] = 0x0324, /* L2_RQSTS.LOADS */ [ C(RESULT_ACCESS) ] = 0x0324, /* L2_RQSTS.LOADS */
[ C(RESULT_MISS) ] = 0x0224, /* L2_RQSTS.LD_MISS */ [ C(RESULT_MISS) ] = 0x0224, /* L2_RQSTS.LD_MISS */
...@@ -141,8 +141,8 @@ static const u64 nehalem_hw_cache_event_ids ...@@ -141,8 +141,8 @@ static const u64 nehalem_hw_cache_event_ids
[ C(RESULT_MISS) ] = 0x0824, /* L2_RQSTS.RFO_MISS */ [ C(RESULT_MISS) ] = 0x0824, /* L2_RQSTS.RFO_MISS */
}, },
[ C(OP_PREFETCH) ] = { [ C(OP_PREFETCH) ] = {
[ C(RESULT_ACCESS) ] = 0xc024, /* L2_RQSTS.PREFETCHES */ [ C(RESULT_ACCESS) ] = 0x4f2e, /* LLC Reference */
[ C(RESULT_MISS) ] = 0x8024, /* L2_RQSTS.PREFETCH_MISS */ [ C(RESULT_MISS) ] = 0x412e, /* LLC Misses */
}, },
}, },
[ C(DTLB) ] = { [ C(DTLB) ] = {
...@@ -222,7 +222,7 @@ static const u64 core2_hw_cache_event_ids ...@@ -222,7 +222,7 @@ static const u64 core2_hw_cache_event_ids
[ C(RESULT_MISS) ] = 0, [ C(RESULT_MISS) ] = 0,
}, },
}, },
[ C(L2 ) ] = { [ C(LL ) ] = {
[ C(OP_READ) ] = { [ C(OP_READ) ] = {
[ C(RESULT_ACCESS) ] = 0x4f29, /* L2_LD.MESI */ [ C(RESULT_ACCESS) ] = 0x4f29, /* L2_LD.MESI */
[ C(RESULT_MISS) ] = 0x4129, /* L2_LD.ISTATE */ [ C(RESULT_MISS) ] = 0x4129, /* L2_LD.ISTATE */
...@@ -313,7 +313,7 @@ static const u64 atom_hw_cache_event_ids ...@@ -313,7 +313,7 @@ static const u64 atom_hw_cache_event_ids
[ C(RESULT_MISS) ] = 0, [ C(RESULT_MISS) ] = 0,
}, },
}, },
[ C(L2 ) ] = { [ C(LL ) ] = {
[ C(OP_READ) ] = { [ C(OP_READ) ] = {
[ C(RESULT_ACCESS) ] = 0x4f29, /* L2_LD.MESI */ [ C(RESULT_ACCESS) ] = 0x4f29, /* L2_LD.MESI */
[ C(RESULT_MISS) ] = 0x4129, /* L2_LD.ISTATE */ [ C(RESULT_MISS) ] = 0x4129, /* L2_LD.ISTATE */
...@@ -422,7 +422,7 @@ static const u64 amd_0f_hw_cache_event_ids ...@@ -422,7 +422,7 @@ static const u64 amd_0f_hw_cache_event_ids
[ C(RESULT_MISS) ] = 0, [ C(RESULT_MISS) ] = 0,
}, },
}, },
[ C(L2 ) ] = { [ C(LL ) ] = {
[ C(OP_READ) ] = { [ C(OP_READ) ] = {
[ C(RESULT_ACCESS) ] = 0, [ C(RESULT_ACCESS) ] = 0,
[ C(RESULT_MISS) ] = 0, [ C(RESULT_MISS) ] = 0,
......
...@@ -56,14 +56,14 @@ enum perf_hw_id { ...@@ -56,14 +56,14 @@ enum perf_hw_id {
/* /*
* Generalized hardware cache counters: * Generalized hardware cache counters:
* *
* { L1-D, L1-I, L2, LLC, ITLB, DTLB, BPU } x * { L1-D, L1-I, LLC, ITLB, DTLB, BPU } x
* { read, write, prefetch } x * { read, write, prefetch } x
* { accesses, misses } * { accesses, misses }
*/ */
enum perf_hw_cache_id { enum perf_hw_cache_id {
PERF_COUNT_HW_CACHE_L1D = 0, PERF_COUNT_HW_CACHE_L1D = 0,
PERF_COUNT_HW_CACHE_L1I = 1, PERF_COUNT_HW_CACHE_L1I = 1,
PERF_COUNT_HW_CACHE_L2 = 2, PERF_COUNT_HW_CACHE_LL = 2,
PERF_COUNT_HW_CACHE_DTLB = 3, PERF_COUNT_HW_CACHE_DTLB = 3,
PERF_COUNT_HW_CACHE_ITLB = 4, PERF_COUNT_HW_CACHE_ITLB = 4,
PERF_COUNT_HW_CACHE_BPU = 5, PERF_COUNT_HW_CACHE_BPU = 5,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment