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,

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
perfmon2-devel mailing list
perfmon2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to