On Fri, 23 Jan 2009, stephane eranian wrote:
>
> Could you try the attached patch?
> I could not compile but I think it should cover most issues.

It covered all the issues but one.  The version of gcc I have on this
machine complained about the 64-bit constant.  I added "ULL" to the end of
it and tat made things compile.

That patch, and then an additional one to enable R12k support in pfmon is
included below.

Unfortunately on the kernel I have pfmon still reports "0" for all
counters.  Time to start debugging that.

Vince


diff -ur ../pfmon-3.6.eranian/pfmon/pfmon_util_mips64.c 
./pfmon/pfmon_util_mips64.c
--- ../pfmon-3.6.eranian/pfmon/pfmon_util_mips64.c      2009-01-23 
15:59:49.000000000 -0500
+++ ./pfmon/pfmon_util_mips64.c 2009-01-23 15:57:49.000000000 -0500
@@ -68,7 +68,7 @@
   op = val & 0xffffffff;
 #elif __BYTE_ORDER == __BIG_ENDIAN
   if (sizeof(val) == 8)
-       op = (val64 & 0xffffffff00000000) >> 32;
+       op = (val64 & 0xffffffff00000000ULL) >> 32;
   else
        op = val & 0xffffffff;
 #else



diff -ur ../pfmon-3.6.eranian/pfmon/pfmon.c ./pfmon/pfmon.c
--- ../pfmon-3.6.eranian/pfmon/pfmon.c  2008-10-13 08:41:40.000000000 -0400
+++ ./pfmon/pfmon.c     2009-01-23 16:02:26.000000000 -0500
@@ -61,6 +61,7 @@
        &pfmon_mips64_25kf,
        &pfmon_mips64_ice9a,
        &pfmon_mips64_ice9b,
+       &pfmon_mips64_r12k,
 #endif
 #ifdef CONFIG_PFMON_CELL
        &pfmon_cell,
diff -ur ../pfmon-3.6.eranian/pfmon/pfmon_mips64.c ./pfmon/pfmon_mips64.c
--- ../pfmon-3.6.eranian/pfmon/pfmon_mips64.c   2008-10-13 08:41:40.000000000 
-0400
+++ ./pfmon/pfmon_mips64.c      2009-01-23 16:05:54.000000000 -0500
@@ -256,3 +256,20 @@
        .sz_mod_args                    = sizeof(pfmon_mips64_args_t),
        .sz_mod_inp                     = 
sizeof(pfmlib_gen_mips64_input_param_t)
 };
+
+pfmon_support_t pfmon_mips64_r12k={
+       .name                           = "MIPS R12000",
+       .pmu_type                       = PFMLIB_MIPS_R12000_PMU,
+       .pfmon_initialize               = pfmon_mips64_initialize,
+       .pfmon_usage                    = pfmon_mips64_usage,
+       .pfmon_parse_options            = pfmon_mips64_parse_options,
+       .pfmon_setup                    = pfmon_mips64_setup,
+       .pfmon_prepare_registers        = pfmon_mips64_prepare_registers,
+       .pfmon_install_pmc_registers    = pfmon_mips64_install_pmc_registers,
+       .pfmon_install_pmd_registers    = pfmon_mips64_install_pmd_registers,
+       .pfmon_print_header             = pfmon_mips64_print_header,
+       .pfmon_setup_ctx_flags          = pfmon_mips64_setup_ctx_flags,
+       .pfmon_verify_cmdline           = pfmon_mips64_verify_cmdline,
+       .sz_mod_args                    = sizeof(pfmon_mips64_args_t),
+       .sz_mod_inp                     = 
sizeof(pfmlib_gen_mips64_input_param_t)
+};
diff -ur ../pfmon-3.6.eranian/pfmon/pfmon_support.h ./pfmon/pfmon_support.h
--- ../pfmon-3.6.eranian/pfmon/pfmon_support.h  2008-10-13 08:41:40.000000000 
-0400
+++ ./pfmon/pfmon_support.h     2009-01-23 16:02:10.000000000 -0500
@@ -44,6 +44,7 @@
 extern pfmon_support_t pfmon_mips64_25kf;
 extern pfmon_support_t pfmon_mips64_ice9a;
 extern pfmon_support_t pfmon_mips64_ice9b;
+extern pfmon_support_t pfmon_mips64_r12k;
 extern pfmon_support_t pfmon_cell;
 extern pfmon_support_t pfmon_ultra12;
 extern pfmon_support_t pfmon_ultra3;



------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
perfmon2-devel mailing list
perfmon2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to