Re: [perfmon2] problem with perfmon2 on SPARC/niagara
Status: Beta
Brought to you by:
seranian
From: Vince W. <vi...@cs...> - 2008-08-15 18:16:23
|
To reply to my own e-mail, the following patch makes perfmon report the expected values for long-running programs on my niagara machine. I have no idea if doing things this way is safe. Vince --- arch/sparc64/perfmon/perfmon.c.orig 2008-08-15 12:23:33.000000000 -0400 +++ arch/sparc64/perfmon/perfmon.c 2008-08-15 13:45:40.000000000 -0400 @@ -113,7 +113,7 @@ i, (unsigned long long)new_val, (new_val&wmask) ? 1 : 0); - if (new_val & wmask) { + if (new_val == 0) { __set_bit(i, set->povfl_pmds); set->npend_ovfls++; } @@ -317,7 +317,7 @@ } static struct pfm_pmu_config pmu_sparc64_pmu_conf = { - .counter_width = 31, + .counter_width = 32, .pmd_desc = pfm_sparc64_pmd_desc, .num_pmd_entries = 2, .pmc_desc = pfm_sparc64_pmc_desc, |