+++ This bug was initially created as a clone of Bug #250852 +++ Description of problem: The xenoprof patch adds some defines to oprofile/daemon/opd_interface.h. Unfortunately, these defines conflict with the defines added for the Cell processor in oprofile 0.9.3: #define SPU_PROFILING_CODE 11 #define SPU_CTX_SWITCH_CODE 12 Version-Release number of selected component (if applicable): oprofile-0.9.2-6.el5 This problem will become visible when the patch for xenoprof in the xen kernels is updated to avoid conflicting with the defines in oprofile 0.9.3.
Upstream discussion on how to support new oprofile versions without breaking old ones: http://lists.xensource.com/archives/html/xen-devel/2007-11/msg00917.html
Suggested a possible approach to work around this in the following email messages http://marc.info/?l=oprofile-list&m=119697902625115&w=2 However, this assumes that xen doesn't work on ppc. There is xen available for ppc, so this solution won't work in general. However, it might work well enough for RHEL 5.
If it weren't for ABI concerns, we'd just change the Xenoprof escape codes not to conflict. We care for ABI only after we released a non-tech-preview Xenoprof. As far as I know, this is the case only for i386 and x86_64. We won't support Xen on PPC in RHEL-5. Therefore, the approach proposed in comment#4 should work fine for us. A possible alternative is to stick to the old escape codes for i386 and x86_64, and use the new ones for everything else: #define XEN_ENTER_SWITCH_CODE 10 #if defined(__i386__) || defined(__x86_64__) #define DOMAIN_SWITCH_CODE 11 #define LAST_CODE 12 #else #define SPU_PROFILING_CODE 11 #define SPU_CTX_SWITCH_CODE 12 #define DOMAIN_SWITCH_CODE 13 #define LAST_CODE 14 #endif This could be done upstream (I proposed it there), or just in RHEL-5.
The solution sketched in comment#5 was accepted upstream. RHEL-5 user space oprofile picked it up from there (see bug 250852). Kernel picked up a solution with the patch for bug 253211[*]; it is functionally equivalent except for IA-64: there the encoding of escape code DOMAIN_SWITCH_CODE differs. That one is used only with Xenoprof, which does not work on IA-64, so the difference doesn't matter. It's still somewhat ugly from a maintenance point of view, but hardly worth cleaning up for 5.2. [*] linux-2.6-ppc64-cell-support-for-performance-tools-part3.patch
Closing based on comment #6.