Stephane Eranian wrote:
Will,
On Thu, Jan 18, 2007 at 08:19:57AM -0800, Stephane Eranian wrote:
I got OProfile to work on perfmon v2.3 all IA-64 and X86. I need to
clean the user level code a little bit. I would appreciate if you could
take a look at it.
I have made available a first draft of the OProfile patch to make it
work on top of perfmon2 on X86 and IA-64 hardware. The current patch
does not take into account unavailable counters.
The patch includes part of your initial oprofile-perfmon2 patch. I have
now split opd_perfmon.c into 3 different files:
- opd_perfmon.c : common perfmon2 front-end
- opd_perfmon_22.c: all arch, perfmon v2.3 support
- opd_perfmon_compat.c: IA-64 only, perfmon v2.0 compatibility
The daemon auto-detects which code to use based on the perfmon version.
To enable perfmon support, you need to run configure with the --enable-perfmon2
option. There is no options to opcontrol, no event table has been modified.
The patch is relative to the oprofile-0.9.2.tar.gz release. You can grab
it at:
ftp://ftp.hpl.hp.com/pub/linux-ia64/oprofile-perfmon2-070622.tar.gz
You need an updated perfmon2 kernel patch to make this work. The kernel
patch is relative to my 061204 kernel perfmon patch and Linux git:
ftp://ftp.hpl.hp.com/pub/linux-ia64/perfmon2-oprof-070122.diff
Let me know what if it works for you.
--- oprofile-perfmon2/utils/opcontrol.orig 2007-01-22 13:23:33.000000000
-0500
+++ oprofile-perfmon2/utils/opcontrol 2007-01-22 14:24:10.000000000 -0500
@@ -298,6 +298,14 @@
do_init_daemon_vars
decide_oprofile_device
+ OP_IMPLEMENTATION_DIR=$MOUNT/implementation
+ if test -f $OP_IMPLEMENTATION; then
Shouldn't this be $OP_IMPLEMENTATION_DIR? Shouldn't the name be
OP_IMPLEMENTATION_FILE rather than _DIR?
+ OP_IMPLEMENTATION=`cat $OP_IMPLEMENTATION_DIR`
+ else
+ OP_IMPLEMENTATION="unspecified"
+ fi
+
+
The unused parameter ‘pid’ in opd_perfmon_22:do_load_context is flagged. I
worked around this with the following in o9pd_perfmon_22.c:
int do_load_context(int fd, pid_t pid __attribute__ ((unused)), size_t cpu)
Similarly put a #if 0... #endif around get_unavail_counters_p6() in
opd_perfmon_22.c
Was the patch tested to be backward compatible with older kernels? I tried the
with the rawhide kernel and it seemed to be trying to use the perfmon support
even though it wasn't available in this kernel.
-Will
_______________________________________________
perfmon mailing list
[email protected]
http://www.hpl.hp.com/hosted/linux/mail-archives/perfmon/