I have recently applied the 2.6.29 perfmon2 patches to the Fedora 11 2.6.29
kernel (plus a few other patch sets).  They seemed to go in pretty well and
the kernel rebuilt and booted without problems.  I have also installed
copies of libpfm, papi and HPCToolkit on this system.

Papi seems to work fine and hpcrun-flat also produces good results.  But
when I use hpcrun it executes but never collects any samples.  Using the
hpcrun and papi debug information (plus some messages I added), I think I
have identified why no samples are collected.  The traces show that the
hpcrun overflow event handler is being called each time that an overflow
occurs.  It is passed an overflow_vector which has a value of 0x20000 and
then passes this overflow_vector to the PAPI function '
PAPI_get_overflow_event_index'.  This PAPI function gives back a successful
return but an event count of zero so the handler never calls the code to
record the event. I also have a test system which has perfctr installed in
the kernel and hpcrun works correctly on this system.  The debug data on
that system shows an overflow_vector of 0x1 which causes the above
mentioned PAPI function to return an event count of one.

The overflow_vector is obtained (at least in the perfmon PAPI substrate)
from a message returned by a read on the PMU fd.

So I decided the next place to look would be in the perfmon2 debug messages
which I have found before in the kernel message buffer.  I ran 'pfdbg --on
--ovfl-on' and it set the file /sys/kernel/perfmon/debug to 3 to enable
debug prints.  I ran my test again but no messages in the dmesg output.  So
I went looking at the perfmon define macros and found that they require
'CONFIG_PERFMON_DEBUG' to be set.  So I looked in my kernel config and
found this value set to 'y'.  I then noticed that the perfmon macros use
'pr_debug' so I went and found that in the file 'include/linux/kernel.h'.
It is defined as follows:

#if defined(DEBUG)
#define pr_debug(fmt, ...) \
    printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
#elif defined(CONFIG_DYNAMIC_PRINTK_DEBUG)
#define pr_debug(fmt, ...) do { \
    dynamic_pr_debug(pr_fmt(fmt), ##__VA_ARGS__); \
    } while (0)
#else
#define pr_debug(fmt, ...) \
    ({ if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); 0; })
#endif

So I added a '#define DEBUG 1' to the front of file perfmon_kern.h in the
patch file and rebuilt my kernel again.  This did not help, I still do not
get any perfmon2 kernel debug messages.

What have I missed ???

Thanks
Gary


------------------------------------------------------------------------------
_______________________________________________
perfmon2-devel mailing list
perfmon2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to