PPC64 fix long event codes

There are eight Power 8 event codes that do not fit into a u32.  The program
used to process the event files and produce the events/power8_events.h file
truncated the event codes to a u32.  The PAPI Power specific struct that
holds the event code is also declared to be a u32. This patch changes the
pme_code field to a u64 and fixes the truncated event codes.

Signed-off-by: Carl Love <c...@us.ibm.com>
---
 src/libpfm4/lib/events/power8_events.h |   16 ++++++++--------
 src/libpfm4/lib/pfmlib_power_priv.h    |    2 +-
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/libpfm4/lib/events/power8_events.h 
b/src/libpfm4/lib/events/power8_events.h
index 3437602..905005b 100644
--- a/src/libpfm4/lib/events/power8_events.h
+++ b/src/libpfm4/lib/events/power8_events.h
@@ -3862,25 +3862,25 @@ static const pme_power_entry_t power8_pe[] = {
 },
 [ POWER8_PME_PM_L1MISS_LAT_EXC_1024 ] = {
        .pme_name = "PM_L1MISS_LAT_EXC_1024",
-       .pme_code = 0x200301ea,
+       .pme_code = 0x67200301ea,
        .pme_short_desc = "L1 misses that took longer than 1024 cyles to 
resolve (miss to reload)",
        .pme_long_desc = "Reload latency exceeded 1024 cyc",
 },
 [ POWER8_PME_PM_L1MISS_LAT_EXC_2048 ] = {
        .pme_name = "PM_L1MISS_LAT_EXC_2048",
-       .pme_code = 0x200401ec,
+       .pme_code = 0x67200401ec,
        .pme_short_desc = "L1 misses that took longer than 2048 cyles to 
resolve (miss to reload)",
        .pme_long_desc = "Reload latency exceeded 2048 cyc",
 },
 [ POWER8_PME_PM_L1MISS_LAT_EXC_256 ] = {
        .pme_name = "PM_L1MISS_LAT_EXC_256",
-       .pme_code = 0x200101e8,
+       .pme_code = 0x67200101e8,
        .pme_short_desc = "L1 misses that took longer than 256 cyles to resolve 
(miss to reload)",
        .pme_long_desc = "Reload latency exceeded 256 cyc",
 },
 [ POWER8_PME_PM_L1MISS_LAT_EXC_32 ] = {
        .pme_name = "PM_L1MISS_LAT_EXC_32",
-       .pme_code = 0x200201e6,
+       .pme_code = 0x67200201e6,
        .pme_short_desc = "L1 misses that took longer than 32 cyles to resolve 
(miss to reload)",
        .pme_long_desc = "Reload latency exceeded 32 cyc",
 },
@@ -6538,25 +6538,25 @@ static const pme_power_entry_t power8_pe[] = {
 },
 [ POWER8_PME_PM_RC_LIFETIME_EXC_1024 ] = {
        .pme_name = "PM_RC_LIFETIME_EXC_1024",
-       .pme_code = 0x200301ea,
+       .pme_code = 0xde200301ea,
        .pme_short_desc = "Number of times the RC machine for a sampled 
instruction was active for more than 1024 cycles",
        .pme_long_desc = "Reload latency exceeded 1024 cyc",
 },
 [ POWER8_PME_PM_RC_LIFETIME_EXC_2048 ] = {
        .pme_name = "PM_RC_LIFETIME_EXC_2048",
-       .pme_code = 0x200401ec,
+       .pme_code = 0xde200401ec,
        .pme_short_desc = "Number of times the RC machine for a sampled 
instruction was active for more than 2048 cycles",
        .pme_long_desc = "Threshold counter exceeded a value of 2048",
 },
 [ POWER8_PME_PM_RC_LIFETIME_EXC_256 ] = {
        .pme_name = "PM_RC_LIFETIME_EXC_256",
-       .pme_code = 0x200101e8,
+       .pme_code = 0xde200101e8,
        .pme_short_desc = "Number of times the RC machine for a sampled 
instruction was active for more than 256 cycles",
        .pme_long_desc = "Threshold counter exceed a count of 256",
 },
 [ POWER8_PME_PM_RC_LIFETIME_EXC_32 ] = {
        .pme_name = "PM_RC_LIFETIME_EXC_32",
-       .pme_code = 0x200201e6,
+       .pme_code = 0xde200201e6,
        .pme_short_desc = "Number of times the RC machine for a sampled 
instruction was active for more than 32 cycles",
        .pme_long_desc = "Reload latency exceeded 32 cyc",
 },
diff --git a/src/libpfm4/lib/pfmlib_power_priv.h 
b/src/libpfm4/lib/pfmlib_power_priv.h
index 725593c..ce44d52 100644
--- a/src/libpfm4/lib/pfmlib_power_priv.h
+++ b/src/libpfm4/lib/pfmlib_power_priv.h
@@ -18,7 +18,7 @@
 *
 */
 typedef struct {
-   unsigned pme_code;
+   uint64_t pme_code;
    const char *pme_name;
    const char *pme_short_desc;
    const char *pme_long_desc;
-- 
1.7.1






------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
perfmon2-devel mailing list
perfmon2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to