Commit d15f02eb authored by Carl E. Love's avatar Carl E. Love Committed by Benjamin Herrenschmidt

powerpc/perf_event: Fix Power6 L1 cache read & write event codes]

The current L1 cache read event code 0x80082 only counts for thread 0. The
event code 0x280030 should be used to count events on thread 0 and 1. The
patch fixes the event code for the L1 cache read.

The current L1 cache write event code 0x80086 only counts for thread 0. The
event code 0x180032 should be used to count events on thread 0 and 1. The
patch fixes the event code for the L1 cache write.

FYI, the documentation lists three event codes for the L1 cache read event
and three event codes for the L1 cache write event.  The event description
for the event codes is as follows:

L1 cache read requests  0x80082  LSU 0 only
L1 cache read requests  0x8008A  LSU 1 only
L1 cache read requests  0x80030  LSU 1 or LSU 0, counter 2 only.

L1 cache store requests 0x80086  LSU 0 only
L1 cache store requests 0x8008E  LSU 1 only
L1 cache store requests 0x80032  LSU 0 or LSU 1, counter 1 only.

There can only be one request from either LSU 0 or 1 active at a time.
Signed-off-by: default avatarCarl Love <cel@us.ibm.com>
Acked-by: default avatarPaul Mackerras <paulus@samba.org>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent e69b742a
...@@ -487,8 +487,8 @@ static int power6_generic_events[] = { ...@@ -487,8 +487,8 @@ static int power6_generic_events[] = {
*/ */
static int power6_cache_events[C(MAX)][C(OP_MAX)][C(RESULT_MAX)] = { static int power6_cache_events[C(MAX)][C(OP_MAX)][C(RESULT_MAX)] = {
[C(L1D)] = { /* RESULT_ACCESS RESULT_MISS */ [C(L1D)] = { /* RESULT_ACCESS RESULT_MISS */
[C(OP_READ)] = { 0x80082, 0x80080 }, [C(OP_READ)] = { 0x280030, 0x80080 },
[C(OP_WRITE)] = { 0x80086, 0x80088 }, [C(OP_WRITE)] = { 0x180032, 0x80088 },
[C(OP_PREFETCH)] = { 0x810a4, 0 }, [C(OP_PREFETCH)] = { 0x810a4, 0 },
}, },
[C(L1I)] = { /* RESULT_ACCESS RESULT_MISS */ [C(L1I)] = { /* RESULT_ACCESS RESULT_MISS */
......
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