stephane eranian wrote:
Will,

Patch applied.
Thanks.

Hi Stephane,

Looking through the code there are some other areas that need to be changed. The attached patch appears to compile on ppc machine. However, it has NOT been tested. I compiled it on a ppc machine, but didn't have a perfmon patched kernel on the machine. Didn't try on cell based machine yet.

Could someone with a bit more experience with the ppc and cell machines comment on the patch? A cell-built libpfm shared library should be useable on regular ppc machine and ppc-built libpfm shared library should be useable on cell based machine.

-Will


On Fri, Aug 1, 2008 at 7:21 AM, William Cohen <[EMAIL PROTECTED]> wrote:
stephane eranian wrote:
Hello,

I have released the perfmon2 kernel patch for kernel v2.6.26. There is
no new major features.  Concerning the merge with mainline, we use a
different
code base which contains only code to  supports only per-thread counting
on
X86 processors. The patch is distributed as a quilt patchset and is
posted on LKML.

Here are some of the kernel changes:
 - Support for Intel architectural perfmon v3 (as per IA-32 Vol3b June
2008)
 - base syscall exported in /sys/kernel/perfmon/syscall
 - experimental utrace support
 - added dep_pmcs[] to PMD definitions to avoid picking up stale config
 - important IBM Power updates to solve counter overflow issues (Corey
Ashford)
 - AMD64 APIC/PCI cleanups for IBS support (Robert Richter)
 - new API for handler routine of sampling formats to accomodate IBM
Cell (Carl Love)

There is also a new release for libpfm, now at version 3.5.
The changes include:
 - support for AMD K7 (Vince Weaver)
 - support for Intel architectural perfmon v3
 - support for SiCortex (ICA9A, ICA9B) (Phil Mucci)
 - dynamic perfmon syscall support via /sys
 - new environment variable to control debugging and force particular PMU
model

Finally, a new major version of pfmon, now at pfmon-3.5 with some minor
changes:
 - group unknown symbols as UNKNOWN when sampling (Andrzej Nowak)
 - lots of bug fixes

As usual all files and more detailed changelogs can be downloaded from our
website at:

       http://perfmon2.sourceforge.net

Enjoy,
Hi Stephane,

I was working on new RPMS for Fedora rawhide based on the just released
libpfm-3.5 and pfmon-3.5 tarballs. I tried to include the ppc in the build.
However, the build in koji for pfmon failed because libpfm does not install
the needed cell include file the log of the problem is at:

http://koji.fedoraproject.org/koji/getfile?taskID=752368&name=build.log

The libpfm/Makefile has a special case for the Cell processor. It seems like
it would be wiser not to have this type of special casing. I noticed a
similar one for the MIPS. I have attached an untested (and incomplete) patch
showing one suggested change. I am sure that this is not complete.

Having this kind of specialization in the build should be avoided. There are
a number of build systems in the Fedora build system. For the ppc
architecture some of the ppc systems are Cell and some are not. Depending
which Fedora build system compiles the code either produce a ppc or a cell
runnable version. The both ppc and cell compiled code should be runnable on
BOTH ppc or cell.

-Will


? mout
? examples/multiplex
? examples/multiplex2
? examples/notify_self
? examples/notify_self2
? examples/notify_self3
? examples/notify_self_fork
? examples/notify_standalone
? examples/pfmsetup
? examples/rtop
? examples/self
? examples/self_pipe
? examples/self_smpl_multi
? examples/self_standalone
? examples/set_notify
? examples/showevtinfo
? examples/showreginfo
? examples/smpl_standalone
? examples/syst
? examples/task
? examples/task_attach
? examples/task_attach_timeout
? examples/task_smpl
? examples/task_smpl_user
? examples/whichpmu
? examples/x86/smpl_amd64_ibs
? examples/x86/smpl_core_pebs
? examples/x86/smpl_p4_pebs
? lib/libpfm.so.3.5.0
? lib/pfmlib_amd64.lo
? lib/pfmlib_common.lo
? lib/pfmlib_core.lo
? lib/pfmlib_gen_ia32.lo
? lib/pfmlib_os_linux.lo
? lib/pfmlib_pentium4.lo
? lib/pfmlib_priv.lo
? libpfms/syst_smp
? libpfms/lib/libpfms.lo
? libpfms/lib/libpfms.so.0.1.0
Index: config.mk
===================================================================
RCS file: /cvsroot/perfmon2/libpfm/config.mk,v
retrieving revision 1.43
diff -u -r1.43 config.mk
--- config.mk	30 Jul 2008 21:52:12 -0000	1.43
+++ config.mk	4 Aug 2008 14:43:52 -0000
@@ -63,16 +63,6 @@
 endif
 
 #
-# Cell Broadband Engine is reported as PPC but needs special handling.
-#
-ifeq ($(SYS),Linux)
-MACHINE := $(shell grep -q 'Cell Broadband Engine' /proc/cpuinfo && echo cell)
-ifeq (cell,$(MACHINE))
-override ARCH=cell
-endif
-endif
-
-#
 # Library version
 #
 VERSION=3
Index: docs/Makefile
===================================================================
RCS file: /cvsroot/perfmon2/libpfm/docs/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- docs/Makefile	7 Nov 2007 22:37:47 -0000	1.5
+++ docs/Makefile	4 Aug 2008 14:43:52 -0000
@@ -49,9 +49,6 @@
 ifeq ($(CONFIG_PFMLIB_ARCH_CRAYXT),y)
 endif
 
-ifeq ($(CONFIG_PFMLIB_CELL),y)
-endif
-
 GEN_MAN= libpfm.3 pfm_dispatch_events.3 pfm_find_event.3 pfm_find_event_bycode.3 \
          pfm_find_event_bycode_next.3 pfm_find_event_mask.3 pfm_find_full_event.3 \
          pfm_force_pmu.3 pfm_get_cycle_event.3 pfm_get_event_code.3 pfm_get_event_code_counter.3 \
Index: include/perfmon/pfmlib_comp.h
===================================================================
RCS file: /cvsroot/perfmon2/libpfm/include/perfmon/pfmlib_comp.h,v
retrieving revision 1.5
diff -u -r1.5 pfmlib_comp.h
--- include/perfmon/pfmlib_comp.h	20 Nov 2007 23:56:10 -0000	1.5
+++ include/perfmon/pfmlib_comp.h	4 Aug 2008 14:43:52 -0000
@@ -38,7 +38,7 @@
 #include <perfmon/pfmlib_comp_mips64.h>
 #endif
 
-#ifdef __powerpc__
+#if defined(__powerpc__) || defined(__cell__)
 #include <perfmon/pfmlib_comp_powerpc.h>
 #endif
 
@@ -46,10 +46,6 @@
 #include <perfmon/pfmlib_comp_sparc.h>
 #endif
 
-#ifdef __cell__
-#include <perfmon/pfmlib_comp_powerpc.h>
-#endif
-
 #ifdef __crayx2
 #include <perfmon/pfmlib_comp_crayx2.h>
 #endif
Index: include/perfmon/pfmlib_os.h
===================================================================
RCS file: /cvsroot/perfmon2/libpfm/include/perfmon/pfmlib_os.h,v
retrieving revision 1.6
diff -u -r1.6 pfmlib_os.h
--- include/perfmon/pfmlib_os.h	31 Mar 2008 09:56:13 -0000	1.6
+++ include/perfmon/pfmlib_os.h	4 Aug 2008 14:43:52 -0000
@@ -39,7 +39,7 @@
 #include <perfmon/pfmlib_os_mips64.h>
 #endif
 
-#ifdef __powerpc__
+#if defined(__powerpc__) || defined(__cell__)
 #include <perfmon/pfmlib_os_powerpc.h>
 #endif
 
@@ -47,10 +47,6 @@
 #include <perfmon/pfmlib_os_sparc.h>
 #endif
 
-#ifdef __cell__
-#include <perfmon/pfmlib_os_powerpc.h>
-#endif
-
 #ifdef __crayx2
 #include <perfmon/pfmlib_os_crayx2.h>
 #endif
Index: lib/Makefile
===================================================================
RCS file: /cvsroot/perfmon2/libpfm/lib/Makefile,v
retrieving revision 1.41
diff -u -r1.41 Makefile
--- lib/Makefile	30 May 2008 11:37:43 -0000	1.41
+++ lib/Makefile	4 Aug 2008 14:43:52 -0000
@@ -79,6 +79,9 @@
 INCARCH = $(INC_POWERPC)
 SRCS   += pfmlib_gen_powerpc.c
 CFLAGS += -DCONFIG_PFMLIB_ARCH_POWERPC
+INCARCH += $(INC_CELL)
+SRCS   += pfmlib_cell.c
+CFLAGS += -DCONFIG_PFMLIB_CELL
 endif
 
 ifeq ($(CONFIG_PFMLIB_ARCH_SPARC),y)
@@ -97,12 +100,6 @@
 CFLAGS += -DCONFIG_PFMLIB_ARCH_CRAYXT
 endif
 
-ifeq ($(CONFIG_PFMLIB_CELL),y)
-INCARCH = $(INC_CELL)
-SRCS   += pfmlib_cell.c
-CFLAGS += -DCONFIG_PFMLIB_CELL
-endif
-
 ifeq ($(SYS),Linux)
 SLDFLAGS=-shared -Wl,-soname -Wl,$(VLIBPFM)
 SLIBPFM=libpfm.so.$(VERSION).$(REVISION).$(AGE)
Index: lib/pfmlib_common.c
===================================================================
RCS file: /cvsroot/perfmon2/libpfm/lib/pfmlib_common.c,v
retrieving revision 1.48
diff -u -r1.48 pfmlib_common.c
--- lib/pfmlib_common.c	30 Jul 2008 04:08:06 -0000	1.48
+++ lib/pfmlib_common.c	4 Aug 2008 14:43:52 -0000
@@ -73,6 +73,7 @@
 
 #ifdef CONFIG_PFMLIB_ARCH_POWERPC
 	&gen_powerpc_support,
+	&cell_support,
 #endif
 
 #ifdef CONFIG_PFMLIB_ARCH_SPARC
@@ -83,9 +84,6 @@
 	&crayx2_support,
 #endif
 
-#ifdef CONFIG_PFMLIB_CELL
-	&cell_support,
-#endif
 	NULL
 };
 
-------------------------------------------------------------------------
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