On Wed, 2014-12-03 at 17:42 +0100, Stephane Eranian wrote: > Hi Carl, > > The patch looks fine when compiling 64=bit but on PPC8, is there also > a 32-bit mode? If so, that you need to add the ull suffix to all the event > codes > using more than 32-bit, otherwise the compiler will complain. I have seen > this on x86 32-bit compiles and the validation test suite. Please confirm > that there is no 32-bit mode support on PPC8 and then I will apply the > patch as is. >
Stephane: Yes, there is 32-bit support for POWER 8. I added the ull to the event codes and regenerated the patch against the git tree as of 12/3/2014. Thanks for catching that. Carl Love ------------------------------------------------------------------------------- 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> --- lib/events/power8_events.h | 16 ++++++++-------- lib/pfmlib_power_priv.h | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/events/power8_events.h b/lib/events/power8_events.h index 3437602..2aee218 100644 --- a/lib/events/power8_events.h +++ b/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 = 0x67200301eaull, .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 = 0x67200401ecull, .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 = 0x67200101e8ull, .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 = 0x67200201e6ull, .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 = 0xde200301eaull, .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 = 0xde200401ecull, .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 = 0xde200101e8ull, .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 = 0xde200201e6ull, .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/lib/pfmlib_power_priv.h b/lib/pfmlib_power_priv.h index 725593c..ce44d52 100644 --- a/lib/pfmlib_power_priv.h +++ b/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.9.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=164703151&iu=/4140/ostg.clktrk _______________________________________________ perfmon2-devel mailing list perfmon2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perfmon2-devel