summaryrefslogtreecommitdiff
path: root/recipes/oprofile
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/oprofile
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/oprofile')
-rw-r--r--recipes/oprofile/oprofile.inc44
-rw-r--r--recipes/oprofile/oprofile/0.9.4-armv7a.diff451
-rw-r--r--recipes/oprofile/oprofile/acinclude.m4600
-rw-r--r--recipes/oprofile/oprofile/armv6_fix.patch54
-rw-r--r--recipes/oprofile/oprofile/armv7a.diff150
-rw-r--r--recipes/oprofile/oprofile/fix-arith.patch52
-rw-r--r--recipes/oprofile/oprofile/gcc43x-fix.patch254
-rw-r--r--recipes/oprofile/oprofile/no_arm_mapping_syms.patch21
-rw-r--r--recipes/oprofile/oprofile/oparchive_fix.patch22
-rw-r--r--recipes/oprofile/oprofile/opcontrol-busybox-compat.patch49
-rw-r--r--recipes/oprofile/oprofile/opcontrol_bashisms.patch16
-rw-r--r--recipes/oprofile/oprofile/opjitconv-execvp-fix.diff23
-rw-r--r--recipes/oprofile/oprofile/opstart.patch235
-rw-r--r--recipes/oprofile/oprofile/root_option.patch1051
-rw-r--r--recipes/oprofile/oprofile/xml_callgraph_details.patch232
-rw-r--r--recipes/oprofile/oprofile_0.9.2.bb8
-rw-r--r--recipes/oprofile/oprofile_0.9.3.bb15
-rw-r--r--recipes/oprofile/oprofile_0.9.4.bb25
-rw-r--r--recipes/oprofile/oprofile_cvs.bb14
-rw-r--r--recipes/oprofile/oprofileui-svn.inc8
-rw-r--r--recipes/oprofile/oprofileui.inc16
-rw-r--r--recipes/oprofile/oprofileui_svn.bb2
22 files changed, 3342 insertions, 0 deletions
diff --git a/recipes/oprofile/oprofile.inc b/recipes/oprofile/oprofile.inc
new file mode 100644
index 0000000000..d98610f3c2
--- /dev/null
+++ b/recipes/oprofile/oprofile.inc
@@ -0,0 +1,44 @@
+SECTION = "devel"
+DESCRIPTION = "OProfile is a system-wide profiler for Linux systems, capable \
+of profiling all running code at low overhead."
+LICENSE = "GPL"
+DEPENDS = "popt binutils"
+
+S = "${WORKDIR}/oprofile-${PV}"
+
+inherit autotools
+
+# NOTE: this disables the build of the kernel modules.
+# Should add the oprofile kernel modules, for those with 2.4
+# kernels, as a seperate .oe file.
+EXTRA_OECONF = "--with-kernel-support \
+ --without-x \
+ --disable-werror "
+
+do_configure () {
+ cp ${WORKDIR}/acinclude.m4 ${S}/
+ autotools_do_configure
+}
+# Available config options
+# --enable-abi enable abi portability code (default is disabled)
+# --enable-pch enable precompiled header (default is disabled)
+# --enable-gcov enable option for gcov coverage testing (default is disabled)
+# --disable-werror disable -Werror flag (default is enabled for non-release)
+# --disable-optimization disable optimization flags (default is enabled)
+# --with-kernel-support Use 2.6 kernel (no kernel source tree required)
+# --with-linux=dir Path to Linux source tree
+# --with-module-dir=dir Path to module installation directory
+# --with-extra-includes=DIR add extra include paths
+# --with-extra-libs=DIR add extra library paths
+# --with-x use the X Window System
+# --with-qt-dir where the root of Qt is installed
+# --with-qt-includes where the Qt includes are.
+# --with-qt-libraries where the Qt library is installed.
+
+OPROFILE_ARCH = "${TARGET_ARCH}"
+OPROFILE_ARCH_i586 = "i386"
+# note this excludes the ppc64 directory
+# but we do not support ppc64 targets yet.
+OPROFILE_ARCH_powerpc = "ppc"
+
+FILES_${PN} = "${bindir} ${datadir}/oprofile/rtc ${datadir}/oprofile/stl.pat ${datadir}/oprofile/${OPROFILE_ARCH}"
diff --git a/recipes/oprofile/oprofile/0.9.4-armv7a.diff b/recipes/oprofile/oprofile/0.9.4-armv7a.diff
new file mode 100644
index 0000000000..dd95ec732b
--- /dev/null
+++ b/recipes/oprofile/oprofile/0.9.4-armv7a.diff
@@ -0,0 +1,451 @@
+Index: oprofile-0.9.4/ChangeLog
+===================================================================
+--- oprofile-0.9.4.orig/ChangeLog 2008-07-18 01:04:22.000000000 +0200
++++ oprofile-0.9.4/ChangeLog 2008-08-08 15:32:15.226950589 +0200
+@@ -1,3 +1,14 @@
++2008-08-08 Jean Pihet <jpihet@mvista.com>
++
++ * events/arm/armv7/events:
++ * events/arm/armv7/unit_masks:
++ * libop/op_cpu_type.c:
++ * libop/op_cpu_type.h:
++ * libop/op_events.c:
++ * utils/ophelp.c: Added ARMv7 support to be consistent with the
++ kernel, remove some duplicate code and add some extra events
++ * event/Makefile.am: Install armv7 stuff.
++
+ 2008-07-17 Maynard Johnson <maynardj@us.ibm.com>
+
+ * configure.in: bump version in AM_INIT_AUTOMAKE to 0.9.4
+Index: oprofile-0.9.4/events/arm/armv7/events
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ oprofile-0.9.4/events/arm/armv7/events 2008-08-08 15:32:15.226950589 +0200
+@@ -0,0 +1,53 @@
++# ARM V7 events
++# From Cortex A8 DDI (ARM DDI 0344B, revision r1p1)
++#
++event:0x00 counters:1,2,3,4 um:zero minimum:500 name:PMNC_SW_INCR : Software increment of PMNC registers
++event:0x01 counters:1,2,3,4 um:zero minimum:500 name:IFETCH_MISS : Instruction fetch misses from cache or normal cacheable memory
++event:0x02 counters:1,2,3,4 um:zero minimum:500 name:ITLB_MISS : Instruction fetch misses from TLB
++event:0x03 counters:1,2,3,4 um:zero minimum:500 name:DCACHE_REFILL : Data R/W operation that causes a refill from cache or normal cacheable memory
++event:0x04 counters:1,2,3,4 um:zero minimum:500 name:DCACHE_ACCESS : Data R/W from cache
++event:0x05 counters:1,2,3,4 um:zero minimum:500 name:DTLB_REFILL : Data R/W that causes a TLB refill
++event:0x06 counters:1,2,3,4 um:zero minimum:500 name:DREAD : Data read architecturally executed (note: architecturally executed = for instructions that are unconditional or that pass the condition code)
++event:0x07 counters:1,2,3,4 um:zero minimum:500 name:DWRITE : Data write architecturally executed
++event:0x08 counters:1,2,3,4 um:zero minimum:500 name:INSTR_EXECUTED : All executed instructions
++event:0x09 counters:1,2,3,4 um:zero minimum:500 name:EXC_TAKEN : Exception taken
++event:0x0A counters:1,2,3,4 um:zero minimum:500 name:EXC_EXECUTED : Exception return architecturally executed
++event:0x0B counters:1,2,3,4 um:zero minimum:500 name:CID_WRITE : Instruction that writes to the Context ID Register architecturally executed
++event:0x0C counters:1,2,3,4 um:zero minimum:500 name:PC_WRITE : SW change of PC, architecturally executed (not by exceptions)
++event:0x0D counters:1,2,3,4 um:zero minimum:500 name:PC_IMM_BRANCH : Immediate branch instruction executed (taken or not)
++event:0x0E counters:1,2,3,4 um:zero minimum:500 name:PC_PROC_RETURN : Procedure return architecturally executed (not by exceptions)
++event:0x0F counters:1,2,3,4 um:zero minimum:500 name:UNALIGNED_ACCESS : Unaligned access architecturally executed
++event:0x10 counters:1,2,3,4 um:zero minimum:500 name:PC_BRANCH_MIS_PRED : Branch mispredicted or not predicted. Counts pipeline flushes because of misprediction
++event:0x12 counters:1,2,3,4 um:zero minimum:500 name:PC_BRANCH_MIS_USED : Branch or change in program flow that could have been predicted
++event:0x40 counters:1,2,3,4 um:zero minimum:500 name:WRITE_BUFFER_FULL : Any write buffer full cycle
++event:0x41 counters:1,2,3,4 um:zero minimum:500 name:L2_STORE_MERGED : Any store that is merged in L2 cache
++event:0x42 counters:1,2,3,4 um:zero minimum:500 name:L2_STORE_BUFF : Any bufferable store from load/store to L2 cache
++event:0x43 counters:1,2,3,4 um:zero minimum:500 name:L2_ACCESS : Any access to L2 cache
++event:0x44 counters:1,2,3,4 um:zero minimum:500 name:L2_CACH_MISS : Any cacheable miss in L2 cache
++event:0x45 counters:1,2,3,4 um:zero minimum:500 name:AXI_READ_CYCLES : Number of cycles for an active AXI read
++event:0x46 counters:1,2,3,4 um:zero minimum:500 name:AXI_WRITE_CYCLES : Number of cycles for an active AXI write
++event:0x47 counters:1,2,3,4 um:zero minimum:500 name:MEMORY_REPLAY : Any replay event in the memory subsystem
++event:0x48 counters:1,2,3,4 um:zero minimum:500 name:UNALIGNED_ACCESS_REPLAY : Unaligned access that causes a replay
++event:0x49 counters:1,2,3,4 um:zero minimum:500 name:L1_DATA_MISS : L1 data cache miss as a result of the hashing algorithm
++event:0x4A counters:1,2,3,4 um:zero minimum:500 name:L1_INST_MISS : L1 instruction cache miss as a result of the hashing algorithm
++event:0x4B counters:1,2,3,4 um:zero minimum:500 name:L1_DATA_COLORING : L1 data access in which a page coloring alias occurs
++event:0x4C counters:1,2,3,4 um:zero minimum:500 name:L1_NEON_DATA : NEON data access that hits L1 cache
++event:0x4D counters:1,2,3,4 um:zero minimum:500 name:L1_NEON_CACH_DATA : NEON cacheable data access that hits L1 cache
++event:0x4E counters:1,2,3,4 um:zero minimum:500 name:L2_NEON : L2 access as a result of NEON memory access
++event:0x4F counters:1,2,3,4 um:zero minimum:500 name:L2_NEON_HIT : Any NEON hit in L2 cache
++event:0x50 counters:1,2,3,4 um:zero minimum:500 name:L1_INST : Any L1 instruction cache access, excluding CP15 cache accesses
++event:0x51 counters:1,2,3,4 um:zero minimum:500 name:PC_RETURN_MIS_PRED : Return stack misprediction at return stack pop (incorrect target address)
++event:0x52 counters:1,2,3,4 um:zero minimum:500 name:PC_BRANCH_FAILED : Branch prediction misprediction
++event:0x53 counters:1,2,3,4 um:zero minimum:500 name:PC_BRANCH_TAKEN : Any predicted branch that is taken
++event:0x54 counters:1,2,3,4 um:zero minimum:500 name:PC_BRANCH_EXECUTED : Any taken branch that is executed
++event:0x55 counters:1,2,3,4 um:zero minimum:500 name:OP_EXECUTED : Number of operations executed (in instruction or mutli-cycle instruction)
++event:0x56 counters:1,2,3,4 um:zero minimum:500 name:CYCLES_INST_STALL : Cycles where no instruction available
++event:0x57 counters:1,2,3,4 um:zero minimum:500 name:CYCLES_INST : Number of instructions issued in a cycle
++event:0x58 counters:1,2,3,4 um:zero minimum:500 name:CYCLES_NEON_DATA_STALL : Number of cycles the processor waits on MRC data from NEON
++event:0x59 counters:1,2,3,4 um:zero minimum:500 name:CYCLES_NEON_INST_STALL : Number of cycles the processor waits on NEON instruction queue or NEON load queue
++event:0x5A counters:1,2,3,4 um:zero minimum:500 name:NEON_CYCLES : Number of cycles NEON and integer processors are not idle
++event:0x70 counters:1,2,3,4 um:zero minimum:500 name:PMU0_EVENTS : Number of events from external input source PMUEXTIN[0]
++event:0x71 counters:1,2,3,4 um:zero minimum:500 name:PMU1_EVENTS : Number of events from external input source PMUEXTIN[1]
++event:0x72 counters:1,2,3,4 um:zero minimum:500 name:PMU_EVENTS : Number of events from both external input sources PMUEXTIN[0] and PMUEXTIN[1]
++event:0xFF counters:0 um:zero minimum:500 name:CPU_CYCLES : Number of CPU cycles
++
+Index: oprofile-0.9.4/events/arm/armv7/unit_masks
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ oprofile-0.9.4/events/arm/armv7/unit_masks 2008-08-08 15:32:15.273760932 +0200
+@@ -0,0 +1,4 @@
++# ARM V7 PMNC possible unit masks
++#
++name:zero type:mandatory default:0x00
++ 0x00 No unit mask
+Index: oprofile-0.9.4/events/Makefile.in
+===================================================================
+--- oprofile-0.9.4.orig/events/Makefile.in 2008-07-18 01:14:45.000000000 +0200
++++ oprofile-0.9.4/events/Makefile.in 2008-08-08 15:32:34.971961074 +0200
+@@ -1,8 +1,8 @@
+-# Makefile.in generated by automake 1.9.6 from Makefile.am.
++# Makefile.in generated by automake 1.10 from Makefile.am.
+ # @configure_input@
+
+ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+-# 2003, 2004, 2005 Free Software Foundation, Inc.
++# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+ # This Makefile.in is free software; the Free Software Foundation
+ # gives unlimited permission to copy and/or distribute it,
+ # with or without modifications, as long as this notice is preserved.
+@@ -13,15 +13,11 @@
+ # PARTICULAR PURPOSE.
+
+ @SET_MAKE@
+-srcdir = @srcdir@
+-top_srcdir = @top_srcdir@
+ VPATH = @srcdir@
+ pkgdatadir = $(datadir)/@PACKAGE@
+ pkglibdir = $(libdir)/@PACKAGE@
+ pkgincludedir = $(includedir)/@PACKAGE@
+-top_builddir = ..
+ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+-INSTALL = @INSTALL@
+ install_sh_DATA = $(install_sh) -c -m 644
+ install_sh_PROGRAM = $(install_sh) -c
+ install_sh_SCRIPT = $(install_sh) -c
+@@ -38,20 +34,8 @@
+ subdir = events
+ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+-am__aclocal_m4_deps = $(top_srcdir)/m4/binutils.m4 \
+- $(top_srcdir)/m4/builtinexpect.m4 \
+- $(top_srcdir)/m4/cellspubfdsupport.m4 \
+- $(top_srcdir)/m4/compileroption.m4 \
+- $(top_srcdir)/m4/configmodule.m4 \
+- $(top_srcdir)/m4/copyifchange.m4 $(top_srcdir)/m4/docbook.m4 \
+- $(top_srcdir)/m4/extradirs.m4 $(top_srcdir)/m4/findkernel.m4 \
+- $(top_srcdir)/m4/kerneloption.m4 \
+- $(top_srcdir)/m4/kernelversion.m4 \
+- $(top_srcdir)/m4/mallocattribute.m4 \
+- $(top_srcdir)/m4/poptconst.m4 \
+- $(top_srcdir)/m4/precompiledheader.m4 $(top_srcdir)/m4/qt.m4 \
+- $(top_srcdir)/m4/resultyn.m4 $(top_srcdir)/m4/sstream.m4 \
+- $(top_srcdir)/m4/typedef.m4 $(top_srcdir)/configure.in
++am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
++ $(top_srcdir)/configure.in
+ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+ mkinstalldirs = $(install_sh) -d
+@@ -61,8 +45,6 @@
+ DIST_SOURCES =
+ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ ACLOCAL = @ACLOCAL@
+-AMDEP_FALSE = @AMDEP_FALSE@
+-AMDEP_TRUE = @AMDEP_TRUE@
+ AMTAR = @AMTAR@
+ AR = @AR@
+ AUTOCONF = @AUTOCONF@
+@@ -70,10 +52,7 @@
+ AUTOMAKE = @AUTOMAKE@
+ AWK = @AWK@
+ BFD_LIBS = @BFD_LIBS@
+-BUILD_JVMPI_AGENT_FALSE = @BUILD_JVMPI_AGENT_FALSE@
+-BUILD_JVMPI_AGENT_TRUE = @BUILD_JVMPI_AGENT_TRUE@
+-BUILD_JVMTI_AGENT_FALSE = @BUILD_JVMTI_AGENT_FALSE@
+-BUILD_JVMTI_AGENT_TRUE = @BUILD_JVMTI_AGENT_TRUE@
++BUILD_HAMMER = @BUILD_HAMMER@
+ CAT_ENTRY_END = @CAT_ENTRY_END@
+ CAT_ENTRY_START = @CAT_ENTRY_START@
+ CC = @CC@
+@@ -90,16 +69,17 @@
+ DEFS = @DEFS@
+ DEPDIR = @DEPDIR@
+ DOCBOOK_ROOT = @DOCBOOK_ROOT@
+-ECHO = @ECHO@
++DSYMUTIL = @DSYMUTIL@
++DUMPBIN = @DUMPBIN@
+ ECHO_C = @ECHO_C@
+ ECHO_N = @ECHO_N@
+ ECHO_T = @ECHO_T@
+ EGREP = @EGREP@
+ EXEEXT = @EXEEXT@
+ EXTRA_CFLAGS_MODULE = @EXTRA_CFLAGS_MODULE@
+-F77 = @F77@
+-FFLAGS = @FFLAGS@
++FGREP = @FGREP@
+ GREP = @GREP@
++INSTALL = @INSTALL@
+ INSTALL_DATA = @INSTALL_DATA@
+ INSTALL_PROGRAM = @INSTALL_PROGRAM@
+ INSTALL_SCRIPT = @INSTALL_SCRIPT@
+@@ -114,17 +94,23 @@
+ LIBOBJS = @LIBOBJS@
+ LIBS = @LIBS@
+ LIBTOOL = @LIBTOOL@
++LIPO = @LIPO@
+ LN_S = @LN_S@
+ LTLIBOBJS = @LTLIBOBJS@
+ MAKEINFO = @MAKEINFO@
++MKDIR_P = @MKDIR_P@
+ MOC = @MOC@
+ MODINSTALLDIR = @MODINSTALLDIR@
++NM = @NM@
++NMEDIT = @NMEDIT@
+ OBJEXT = @OBJEXT@
+ OPROFILE_DIR = @OPROFILE_DIR@
+ OPROFILE_MODULE_ARCH = @OPROFILE_MODULE_ARCH@
+ OP_CFLAGS = @OP_CFLAGS@
+ OP_CXXFLAGS = @OP_CXXFLAGS@
+ OP_DOCDIR = @OP_DOCDIR@
++OTOOL = @OTOOL@
++OTOOL64 = @OTOOL64@
+ PACKAGE = @PACKAGE@
+ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+ PACKAGE_NAME = @PACKAGE_NAME@
+@@ -139,13 +125,13 @@
+ QT_LIB = @QT_LIB@
+ QT_VERSION = @QT_VERSION@
+ RANLIB = @RANLIB@
++SED = @SED@
+ SET_MAKE = @SET_MAKE@
+ SHELL = @SHELL@
+ SIZE_T_TYPE = @SIZE_T_TYPE@
+ STRIP = @STRIP@
+ UIC = @UIC@
+ VERSION = @VERSION@
+-XMKMF = @XMKMF@
+ XML_CATALOG = @XML_CATALOG@
+ XSLTPROC = @XSLTPROC@
+ XSLTPROC_FLAGS = @XSLTPROC_FLAGS@
+@@ -153,13 +139,13 @@
+ X_EXTRA_LIBS = @X_EXTRA_LIBS@
+ X_LIBS = @X_LIBS@
+ X_PRE_LIBS = @X_PRE_LIBS@
++abs_builddir = @abs_builddir@
++abs_srcdir = @abs_srcdir@
++abs_top_builddir = @abs_top_builddir@
++abs_top_srcdir = @abs_top_srcdir@
+ ac_ct_CC = @ac_ct_CC@
+ ac_ct_CXX = @ac_ct_CXX@
+-ac_ct_F77 = @ac_ct_F77@
+-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
++ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ am__include = @am__include@
+ am__leading_dot = @am__leading_dot@
+ am__quote = @am__quote@
+@@ -171,15 +157,12 @@
+ build_cpu = @build_cpu@
+ build_os = @build_os@
+ build_vendor = @build_vendor@
++builddir = @builddir@
+ datadir = @datadir@
+ datarootdir = @datarootdir@
+ docdir = @docdir@
+ dvidir = @dvidir@
+ exec_prefix = @exec_prefix@
+-have_qt_FALSE = @have_qt_FALSE@
+-have_qt_TRUE = @have_qt_TRUE@
+-have_xsltproc_FALSE = @have_xsltproc_FALSE@
+-have_xsltproc_TRUE = @have_xsltproc_TRUE@
+ host = @host@
+ host_alias = @host_alias@
+ host_cpu = @host_cpu@
+@@ -189,12 +172,11 @@
+ includedir = @includedir@
+ infodir = @infodir@
+ install_sh = @install_sh@
+-kernel_support_FALSE = @kernel_support_FALSE@
+-kernel_support_TRUE = @kernel_support_TRUE@
+ libdir = @libdir@
+ libexecdir = @libexecdir@
+ localedir = @localedir@
+ localstatedir = @localstatedir@
++lt_ECHO = @lt_ECHO@
+ mandir = @mandir@
+ mkdir_p = @mkdir_p@
+ oldincludedir = @oldincludedir@
+@@ -204,8 +186,11 @@
+ psdir = @psdir@
+ sbindir = @sbindir@
+ sharedstatedir = @sharedstatedir@
++srcdir = @srcdir@
+ sysconfdir = @sysconfdir@
+ target_alias = @target_alias@
++top_builddir = @top_builddir@
++top_srcdir = @top_srcdir@
+ topdir = @topdir@
+ event_files = \
+ alpha/ev4/events alpha/ev4/unit_masks \
+@@ -298,10 +283,6 @@
+
+ clean-libtool:
+ -rm -rf .libs _libs
+-
+-distclean-libtool:
+- -rm -f libtool
+-uninstall-info-am:
+ tags: TAGS
+ TAGS:
+
+@@ -310,23 +291,21 @@
+
+
+ distdir: $(DISTFILES)
+- $(mkdir_p) $(distdir)/alpha/ev4 $(distdir)/alpha/ev5 $(distdir)/alpha/ev6 $(distdir)/alpha/ev67 $(distdir)/alpha/pca56 $(distdir)/arm/armv6 $(distdir)/arm/mpcore $(distdir)/arm/xscale1 $(distdir)/arm/xscale2 $(distdir)/avr32 $(distdir)/i386/athlon $(distdir)/i386/core $(distdir)/i386/core_2 $(distdir)/i386/p4 $(distdir)/i386/p4-ht $(distdir)/i386/p6_mobile $(distdir)/i386/pii $(distdir)/i386/piii $(distdir)/i386/ppro $(distdir)/ia64/ia64 $(distdir)/ia64/itanium $(distdir)/ia64/itanium2 $(distdir)/mips/20K $(distdir)/mips/24K $(distdir)/mips/25K $(distdir)/mips/34K $(distdir)/mips/5K $(distdir)/mips/r10000 $(distdir)/mips/r12000 $(distdir)/mips/rm7000 $(distdir)/mips/rm9000 $(distdir)/mips/sb1 $(distdir)/mips/vr5432 $(distdir)/mips/vr5500 $(distdir)/ppc/7450 $(distdir)/ppc/e300 $(distdir)/ppc/e500 $(distdir)/ppc/e500v2 $(distdir)/ppc64/970 $(distdir)/ppc64/970MP $(distdir)/ppc64/cell-be $(distdir)/ppc64/pa6t $(distdir)/ppc64/power4 $(distdir)/ppc64/power5 $(distdir)/ppc64/power5+ $(distdir)/ppc64/power5++ $(distdir)/ppc64/power6 $(distdir)/rtc $(distdir)/x86-64/family10 $(distdir)/x86-64/hammer
+- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+- list='$(DISTFILES)'; for file in $$list; do \
+- case $$file in \
+- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+- esac; \
++ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
++ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
++ list='$(DISTFILES)'; \
++ dist_files=`for file in $$list; do echo $$file; done | \
++ sed -e "s|^$$srcdirstrip/||;t" \
++ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
++ case $$dist_files in \
++ */*) $(MKDIR_P) `echo "$$dist_files" | \
++ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
++ sort -u` ;; \
++ esac; \
++ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+- dir="/$$dir"; \
+- $(mkdir_p) "$(distdir)$$dir"; \
+- else \
+- dir=''; \
+- fi; \
+ if test -d $$d/$$file; then \
++ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+@@ -371,7 +350,7 @@
+
+ distclean: distclean-am
+ -rm -f Makefile
+-distclean-am: clean-am distclean-generic distclean-libtool
++distclean-am: clean-am distclean-generic
+
+ dvi: dvi-am
+
+@@ -385,12 +364,20 @@
+
+ install-data-am: install-data-local
+
++install-dvi: install-dvi-am
++
+ install-exec-am:
+
++install-html: install-html-am
++
+ install-info: install-info-am
+
+ install-man:
+
++install-pdf: install-pdf-am
++
++install-ps: install-ps-am
++
+ installcheck-am:
+
+ maintainer-clean: maintainer-clean-am
+@@ -409,17 +396,21 @@
+
+ ps-am:
+
+-uninstall-am: uninstall-info-am uninstall-local
++uninstall-am: uninstall-local
++
++.MAKE: install-am install-strip
+
+ .PHONY: all all-am check check-am clean clean-generic clean-libtool \
+ distclean distclean-generic distclean-libtool distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+- install-data install-data-am install-data-local install-exec \
+- install-exec-am install-info install-info-am install-man \
++ install-data install-data-am install-data-local install-dvi \
++ install-dvi-am install-exec install-exec-am install-html \
++ install-html-am install-info install-info-am install-man \
++ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+- uninstall uninstall-am uninstall-info-am uninstall-local
++ uninstall uninstall-am uninstall-local
+
+
+ install-data-local:
+Index: oprofile-0.9.4/libop/op_cpu_type.c
+===================================================================
+--- oprofile-0.9.4.orig/libop/op_cpu_type.c 2008-02-22 17:17:48.000000000 +0100
++++ oprofile-0.9.4/libop/op_cpu_type.c 2008-08-08 15:32:15.307120161 +0200
+@@ -71,6 +71,7 @@
+ { "ppc64 PA6T", "ppc64/pa6t", CPU_PPC64_PA6T, 6 },
+ { "ARM MPCore", "arm/mpcore", CPU_ARM_MPCORE, 2 },
+ { "ARM V6 PMU", "arm/armv6", CPU_ARM_V6, 3 },
++ { "ARM V7 PMNC", "arm/armv7", CPU_ARM_V7, 5 },
+ { "ppc64 POWER5++", "ppc64/power5++", CPU_PPC64_POWER5pp, 6 },
+ { "e300", "ppc/e300", CPU_PPC_E300, 4 },
+ { "AVR32", "avr32", CPU_AVR32, 3 },
+Index: oprofile-0.9.4/libop/op_cpu_type.h
+===================================================================
+--- oprofile-0.9.4.orig/libop/op_cpu_type.h 2008-02-22 17:17:48.000000000 +0100
++++ oprofile-0.9.4/libop/op_cpu_type.h 2008-08-08 15:32:15.322934386 +0200
+@@ -69,6 +69,7 @@
+ CPU_PPC64_PA6T, /**< ppc64 PA6T */
+ CPU_ARM_MPCORE, /**< ARM MPCore */
+ CPU_ARM_V6, /**< ARM V6 */
++ CPU_ARM_V7, /**< ARM V7 */
+ CPU_PPC64_POWER5pp, /**< ppc64 Power5++ family */
+ CPU_PPC_E300, /**< e300 */
+ CPU_AVR32, /**< AVR32 */
+Index: oprofile-0.9.4/libop/op_events.c
+===================================================================
+--- oprofile-0.9.4.orig/libop/op_events.c 2008-02-22 17:17:48.000000000 +0100
++++ oprofile-0.9.4/libop/op_events.c 2008-08-08 15:32:15.347934528 +0200
+@@ -793,6 +793,7 @@
+ case CPU_ARM_XSCALE2:
+ case CPU_ARM_MPCORE:
+ case CPU_ARM_V6:
++ case CPU_ARM_V7:
+ case CPU_AVR32:
+ descr->name = "CPU_CYCLES";
+ break;
+Index: oprofile-0.9.4/utils/ophelp.c
+===================================================================
+--- oprofile-0.9.4.orig/utils/ophelp.c 2008-02-22 17:17:49.000000000 +0100
++++ oprofile-0.9.4/utils/ophelp.c 2008-08-08 15:32:15.362934395 +0200
+@@ -433,6 +433,11 @@
+ printf("See ARM11 Technical Reference Manual\n");
+ break;
+
++ case CPU_ARM_V7:
++ printf("See ARM11 Technical Reference Manual\n"
++ "Cortex A8 DDI (ARM DDI 0344B, revision r1p1)\n");
++ break;
++
+ case CPU_PPC64_PA6T:
+ printf("See PA6T Power Implementation Features Book IV\n"
+ "Chapter 7 Performance Counters\n");
+Index: oprofile-0.9.4/events/Makefile.am
+===================================================================
+--- oprofile-0.9.4.orig/events/Makefile.am 2008-08-08 15:35:37.318966302 +0200
++++ oprofile-0.9.4/events/Makefile.am 2008-08-08 15:35:57.259878132 +0200
+@@ -31,6 +31,7 @@
+ arm/xscale1/events arm/xscale1/unit_masks \
+ arm/xscale2/events arm/xscale2/unit_masks \
+ arm/armv6/events arm/armv6/unit_masks \
++ arm/armv7/events arm/armv7/unit_masks \
+ arm/mpcore/events arm/mpcore/unit_masks \
+ avr32/events avr32/unit_masks \
+ mips/20K/events mips/20K/unit_masks \
diff --git a/recipes/oprofile/oprofile/acinclude.m4 b/recipes/oprofile/oprofile/acinclude.m4
new file mode 100644
index 0000000000..ffaa8288df
--- /dev/null
+++ b/recipes/oprofile/oprofile/acinclude.m4
@@ -0,0 +1,600 @@
+dnl AX_KERNEL_OPTION(option, action-if-found, action-if-not-found)
+dnl see if autoconf.h defines the option
+AC_DEFUN([AX_KERNEL_OPTION], [
+SAVE_CFLAGS=$CFLAGS
+CFLAGS="-I$KINC -O2 -D__KERNEL__"
+AC_TRY_COMPILE( [#include <linux/config.h>],
+[
+#ifndef $1
+break_me_hard(\\\);
+#endif
+],[$2],[$3],)
+CFLAGS=$SAVE_CFLAGS
+])
+
+dnl Handle the 2.4 module inside module/
+AC_DEFUN([AX_CONFIG_MODULE],
+[
+if test ! -f $KINC/linux/autoconf.h; then
+ AC_MSG_ERROR([no suitably configured kernel include tree found])
+fi
+
+dnl --- Get Linux kernel version and compile parameters ---
+
+AC_SUBST(KVERS)
+AC_MSG_CHECKING([for kernel version])
+dnl it's like this to handle mandrake's fubar version.h - bug #471448
+eval KVERS=`gcc -I$KINC -E -dM $KINC/linux/version.h | grep -w UTS_RELEASE | awk '{print $[]3}'`
+AC_MSG_RESULT([$KVERS])
+case "$KVERS" in
+2.2.*|2.4.*) ;;
+*) AC_MSG_ERROR([Unsupported kernel version])
+esac
+
+dnl Check for the minimal kernel version supported
+AC_MSG_CHECKING([kernel version])
+AX_KERNEL_VERSION(2, 2, 10, <=, AC_MSG_RESULT([ok]), AC_MSG_ERROR([check html documentation install section]))
+
+dnl linux/spinlock.h added at some point in past
+AC_MSG_CHECKING([for $KINC/linux/spinlock.h])
+if test -f $KINC/linux/spinlock.h; then
+ EXTRA_CFLAGS_MODULE="$EXTRA_CFLAGS_MODULE -DHAVE_LINUX_SPINLOCK_HEADER"
+ AC_MSG_RESULT([yes])
+else
+ AC_MSG_RESULT([no])
+fi
+
+AC_MSG_CHECKING([for rtc_lock])
+gcc -I$KINC -E $KINC/linux/mc146818rtc.h | grep rtc_lock >/dev/null
+if test "$?" -eq 0; then
+ EXTRA_CFLAGS_MODULE="$EXTRA_CFLAGS_MODULE -DRTC_LOCK"
+ AC_MSG_RESULT([yes])
+else
+ AC_MSG_RESULT([no])
+fi
+
+arch="unknown"
+AC_MSG_CHECKING(for x86-64 architecture)
+AX_KERNEL_OPTION(CONFIG_X86_64, x8664=1, x8664=0)
+AX_MSG_RESULT_YN($x8664)
+BUILD_HAMMER=no
+if test "$x8664" -eq 1; then
+ arch="x86"
+ BUILD_HAMMER=yes
+else
+ AC_MSG_CHECKING(for x86 architecture)
+ AX_KERNEL_OPTION(CONFIG_X86, x86=1, x86=0)
+ AX_KERNEL_OPTION(CONFIG_X86_WP_WORKS_OK, x86=1, x86=$x86)
+ AX_MSG_RESULT_YN($x86)
+ test "$x86" = 1 && arch="x86"
+
+ if test "$arch" = "unknown"; then
+ AC_MSG_CHECKING(for ia64 architecture)
+ AX_KERNEL_OPTION(CONFIG_IA64, ia64=1, ia64=0)
+ AX_MSG_RESULT_YN($ia64)
+ test "$ia64" = 1 && arch="ia64"
+ fi
+
+fi
+AC_SUBST(BUILD_HAMMER)
+
+test "$arch" = "unknown" && AC_MSG_ERROR(Unsupported architecture)
+
+dnl check to see if kernel verion appropriate for arch
+AC_MSG_CHECKING(arch/kernel version combination)
+case "$arch" in
+ia64)
+ AX_KERNEL_VERSION(2, 4, 18, <, AC_MSG_RESULT([ok]),
+ AC_MSG_ERROR([unsupported arch/kernel])) ;;
+*) AC_MSG_RESULT([ok])
+esac
+
+dnl for now we do not support PREEMPT patch
+AC_MSG_CHECKING([for preempt patch])
+AX_KERNEL_OPTION(CONFIG_PREEMPT,preempt=1,preempt=0)
+AX_MSG_RESULT_YN([$preempt])
+test "$preempt" = 0 || AC_MSG_ERROR([unsupported kernel configuration : CONFIG_PREEMPT])
+
+AC_SUBST(KINC)
+
+MODINSTALLDIR=/lib/modules/$KVERS
+
+OPROFILE_MODULE_ARCH=$arch
+AC_SUBST(OPROFILE_MODULE_ARCH)
+]
+)
+
+dnl AX_KERNEL_VERSION(major, minor, level, comparison, action-if-true, action-if-false)
+AC_DEFUN([AX_KERNEL_VERSION], [
+SAVE_CFLAGS=$CFLAGS
+CFLAGS="-I$KINC -D__KERNEL__ -Werror"
+AC_TRY_COMPILE(
+ [
+ #include <linux/version.h>
+ #include <linux/config.h>
+ ],
+ [
+ #if LINUX_VERSION_CODE $4 KERNEL_VERSION($1, $2, $3)
+ break_me_hard(\\\);
+ #endif
+ ],
+[$5],[$6],)
+CFLAGS=$SAVE_CFLAGS
+])
+
+
+dnl AX_MSG_RESULT_YN(a)
+dnl results "yes" iff a==1, "no" else
+AC_DEFUN([AX_MSG_RESULT_YN], [x=no
+test "x$1" = "x1" && x=yes
+AC_MSG_RESULT($x)])
+
+dnl AX_MALLOC_ATTRIBUTE - see if gcc will take __attribute__((malloc))
+AC_DEFUN([AX_MALLOC_ATTRIBUTE],
+[
+AC_MSG_CHECKING([whether malloc attribute is understood])
+SAVE_CFLAGS=$CFLAGS
+CFLAGS="-Werror $CFLAGS"
+AC_TRY_COMPILE(,[
+void monkey() __attribute__((malloc));
+],AC_MSG_RESULT([yes]); AC_DEFINE(MALLOC_ATTRIBUTE_OK, 1, [whether malloc attribute is understood]), AC_MSG_RESULT([no]))
+CFLAGS=$SAVE_CFLAGS
+]
+)
+
+dnl builtin_expect is used in module we can't add that in config.h
+AC_DEFUN([AX_BUILTIN_EXPECT],
+[
+AC_MSG_CHECKING([whether __builtin_expect is understood])
+SAVE_CFLAGS=$CFLAGS
+CFLAGS="-Werror $CFLAGS"
+AC_TRY_LINK(,[
+int i;
+if (__builtin_expect(i, 0)) { }
+],
+AC_MSG_RESULT([yes]); EXTRA_CFLAGS_MODULE="$EXTRA_CFLAGS_MODULE -DEXPECT_OK",
+AC_MSG_RESULT([no]);)
+CFLAGS=$SAVE_CFLAGS
+]
+)
+
+dnl AX_EXTRA_DIRS - Let user specify extra dirs for include/libs
+AC_DEFUN([AX_EXTRA_DIRS],
+[
+AC_ARG_WITH(extra-includes,
+[ --with-extra-includes=DIR add extra include paths],
+ use_extra_includes="$withval",
+ use_extra_includes=NO
+)
+if test -n "$use_extra_includes" && \
+ test "$use_extra_includes" != "NO"; then
+ ac_save_ifs=$IFS
+ IFS=':'
+ for dir in $use_extra_includes; do
+ extra_includes="$extra_includes -I$dir"
+ done
+ IFS=$ac_save_ifs
+ CPPFLAGS="$CPPFLAGS $extra_includes"
+fi
+
+AC_ARG_WITH(extra-libs,
+[ --with-extra-libs=DIR add extra library paths],
+ use_extra_libs=$withval,
+ use_extra_libs=NO
+)
+if test -n "$use_extra_libs" && \
+ test "$use_extra_libs" != "NO"; then
+ ac_save_ifs=$IFS
+ IFS=':'
+ for dir in $use_extra_libs; do
+ extra_libraries="$extra_libraries -L$dir"
+ done
+ IFS=$ac_save_ifs
+ LDFLAGS="$LDFLAGS $extra_libraries"
+fi
+]
+)
+
+dnl AX_POPT_CONST - check popt prototype
+AC_DEFUN([AX_POPT_CONST],
+[
+AC_MSG_CHECKING([popt prototype])
+SAVE_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="-Werror $CXXFLAGS"
+AC_TRY_COMPILE([#include <popt.h>],
+[
+int c; char **v;
+poptGetContext(0, c, v, 0, 0);
+],
+AC_MSG_RESULT([takes char **]);,
+AC_MSG_RESULT([takes const char **]); AC_DEFINE(CONST_POPT, 1, [whether popt prototype takes a const char **]))
+CXXFLAGS="$SAVE_CXXFLAGS"
+]
+)
+
+dnl AX_CHECK_SSTREAM - check if local sstream is needed to compile OK
+AC_DEFUN([AX_CHECK_SSTREAM],
+[
+AC_MSG_CHECKING([whether to use included sstream])
+AC_TRY_COMPILE([#include <sstream>], [],
+AC_MSG_RESULT([no]);,
+AC_MSG_RESULT([yes]); OP_CXXFLAGS="$OP_CXXFLAGS -I\${top_srcdir}/include")
+]
+)
+
+dnl AX_CHECK_TYPEDEF(typedef_name, type, action-if-true, action-if-false)
+dnl exec action-if-true if typedef_name is a typedef to type else exec
+dnl action-if-false
+dnl currently work only with type typedef'ed in stddef.h
+AC_DEFUN([AX_CHECK_TYPEDEF], [
+dnl AC_LANG_PUSH(C) not in autoconf 2.13
+AC_LANG_SAVE
+AC_LANG_C
+SAVE_CFLAGS=$CFLAGS
+CFLAGS="-Werror $CFLAGS"
+
+AC_TRY_COMPILE(
+ [
+ #include <stddef.h>
+ ],
+ [
+ typedef void (*fct1)($1);
+ typedef void (*fct2)($2);
+ fct1 f1 = 0;
+ fct2 f2 = 0;
+ if (f1 == f2) {}
+ ],
+[$3],[$4])
+
+CFLAGS=$SAVE_CFLAGS
+AC_LANG_RESTORE
+])
+
+
+dnl AX_TYPEDEFED_NAME(typedef_name, candidate_list, var_name)
+dnl set var_name to the typedef name of $1 which must be in canditate_list
+dnl else produce a fatal error
+AC_DEFUN([AX_TYPEDEFED_NAME], [
+ AC_MSG_CHECKING([type of $1])
+ for f in $2; do
+ AX_CHECK_TYPEDEF($1, $f, $3="$f", $3="")
+ if test -n "${$3}"; then
+ break
+ fi
+ done
+ if test -n "${$3}"; then
+ AC_MSG_RESULT([${$3}])
+ else
+ AC_MSG_ERROR([not found])
+ fi
+])
+
+dnl find a binary in the path
+AC_DEFUN([QT_FIND_PATH],
+[
+ AC_MSG_CHECKING([for $1])
+ AC_CACHE_VAL(qt_cv_path_$1,
+ [
+ qt_cv_path_$1="NONE"
+ if test -n "$$2"; then
+ qt_cv_path_$1="$$2";
+ else
+ dirs="$3"
+ qt_save_IFS=$IFS
+ IFS=':'
+ for dir in $PATH; do
+ dirs="$dirs $dir"
+ done
+ IFS=$qt_save_IFS
+
+ for dir in $dirs; do
+ if test -x "$dir/$1"; then
+ if test -n "$5"; then
+ evalstr="$dir/$1 $5 2>&1 "
+ if eval $evalstr; then
+ qt_cv_path_$1="$dir/$1"
+ break
+ fi
+ else
+ qt_cv_path_$1="$dir/$1"
+ break
+ fi
+ fi
+ done
+ fi
+ ])
+
+ if test -z "$qt_cv_path_$1" || test "$qt_cv_path_$1" = "NONE"; then
+ AC_MSG_RESULT(not found)
+ $4
+ else
+ AC_MSG_RESULT($qt_cv_path_$1)
+ $2=$qt_cv_path_$1
+ fi
+])
+
+dnl Find the uic compiler on the path or in qt_cv_dir
+AC_DEFUN([QT_FIND_UIC],
+[
+ QT_FIND_PATH(uic, ac_uic, $qt_cv_dir/bin)
+ if test -z "$ac_uic" -a "$FATAL" = 1; then
+ AC_MSG_ERROR([uic binary not found in \$PATH or $qt_cv_dir/bin !])
+ fi
+])
+
+dnl Find the right moc in path/qt_cv_dir
+AC_DEFUN([QT_FIND_MOC],
+[
+ QT_FIND_PATH(moc2, ac_moc2, $qt_cv_dir/bin)
+ QT_FIND_PATH(moc, ac_moc1, $qt_cv_dir/bin)
+
+ if test -n "$ac_moc1" -a -n "$ac_moc2"; then
+ dnl found both. Prefer Qt3's if it exists else moc2
+ $ac_moc1 -v 2>&1 | grep "Qt 3" >/dev/null
+ if test "$?" = 0; then
+ ac_moc=$ac_moc1;
+ else
+ ac_moc=$ac_moc2;
+ fi
+ else
+ if test -n "$ac_moc1"; then
+ ac_moc=$ac_moc1;
+ else
+ ac_moc=$ac_moc2;
+ fi
+ fi
+
+ if test -z "$ac_moc" -a "$FATAL" = 1; then
+ AC_MSG_ERROR([moc binary not found in \$PATH or $qt_cv_dir/bin !])
+ fi
+])
+
+dnl check a particular libname
+AC_DEFUN([QT_TRY_LINK],
+[
+ SAVE_LIBS="$LIBS"
+ LIBS="$LIBS $1"
+ AC_TRY_LINK([
+ #include <qglobal.h>
+ #include <qstring.h>
+ ],
+ [
+ QString s("mangle_failure");
+ #if (QT_VERSION < 221)
+ break_me_(\\\);
+ #endif
+ ],
+ qt_cv_libname=$1,
+ )
+ LIBS="$SAVE_LIBS"
+])
+
+dnl check we can do a compile
+AC_DEFUN([QT_CHECK_COMPILE],
+[
+ AC_MSG_CHECKING([for Qt library name])
+
+ AC_CACHE_VAL(qt_cv_libname,
+ [
+ AC_LANG_CPLUSPLUS
+ SAVE_CXXFLAGS=$CXXFLAGS
+ CXXFLAGS="$CXXFLAGS $QT_INCLUDES $QT_LDFLAGS"
+
+ for libname in -lqt-mt -lqt3 -lqt2 -lqt;
+ do
+ QT_TRY_LINK($libname)
+ if test -n "$qt_cv_libname"; then
+ break;
+ fi
+ done
+
+ CXXFLAGS=$SAVE_CXXFLAGS
+ ])
+
+ if test -z "$qt_cv_libname"; then
+ AC_MSG_RESULT([failed])
+ if test "$FATAL" = 1 ; then
+ AC_MSG_ERROR([Cannot compile a simple Qt executable. Check you have the right \$QTDIR !])
+ fi
+ else
+ AC_MSG_RESULT([$qt_cv_libname])
+ fi
+])
+
+dnl get Qt version we're using
+AC_DEFUN([QT_GET_VERSION],
+[
+ AC_CACHE_CHECK([Qt version],lyx_cv_qtversion,
+ [
+ AC_LANG_CPLUSPLUS
+ SAVE_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS="$CPPFLAGS $QT_INCLUDES"
+
+ cat > conftest.$ac_ext <<EOF
+#line __oline__ "configure"
+#include "confdefs.h"
+#include <qglobal.h>
+"%%%"QT_VERSION_STR"%%%"
+EOF
+ lyx_cv_qtversion=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | \
+ grep '^"%%%"' 2>/dev/null | \
+ sed -e 's/"%%%"//g' -e 's/"//g'`
+ rm -f conftest.$ac_ext
+ CPPFLAGS=$SAVE_CPPFLAGS
+ ])
+
+ QT_VERSION=$lyx_cv_qtversion
+ AC_SUBST(QT_VERSION)
+])
+
+dnl start here
+AC_DEFUN([QT_DO_IT_ALL],
+[
+ dnl Please leave this alone. I use this file in
+ dnl oprofile.
+ FATAL=0
+
+ AC_ARG_WITH(qt-dir, [ --with-qt-dir where the root of Qt is installed ],
+ [ qt_cv_dir=`eval echo "$withval"/` ])
+
+ AC_ARG_WITH(qt-includes, [ --with-qt-includes where the Qt includes are. ],
+ [ qt_cv_includes=`eval echo "$withval"` ])
+
+ AC_ARG_WITH(qt-libraries, [ --with-qt-libraries where the Qt library is installed.],
+ [ qt_cv_libraries=`eval echo "$withval"` ])
+
+ dnl pay attention to $QTDIR unless overridden
+ if test -z "$qt_cv_dir"; then
+ qt_cv_dir=$QTDIR
+ fi
+
+ dnl derive inc/lib if needed
+ if test -n "$qt_cv_dir"; then
+ if test -z "$qt_cv_includes"; then
+ qt_cv_includes=$qt_cv_dir/include
+ fi
+ if test -z "$qt_cv_libraries"; then
+ qt_cv_libraries=$qt_cv_dir/lib
+ fi
+ fi
+
+ dnl flags for compilation
+ QT_INCLUDES=
+ QT_LDFLAGS=
+ if test -n "$qt_cv_includes"; then
+ QT_INCLUDES="-I$qt_cv_includes"
+ fi
+ if test -n "$qt_cv_libraries"; then
+ QT_LDFLAGS="-L$qt_cv_libraries"
+ fi
+ AC_SUBST(QT_INCLUDES)
+ AC_SUBST(QT_LDFLAGS)
+
+ QT_FIND_MOC
+ MOC=$ac_moc
+ AC_SUBST(MOC)
+ QT_FIND_UIC
+ UIC=$ac_uic
+ AC_SUBST(UIC)
+
+ QT_CHECK_COMPILE
+
+ QT_LIB=$qt_cv_libname;
+ AC_SUBST(QT_LIB)
+
+ if test -n "$qt_cv_libname"; then
+ QT_GET_VERSION
+ fi
+])
+
+dnl AX_CXXFLAGS_OPTIONS(var-name, option)
+dnl add option to var-name if $CXX support it.
+AC_DEFUN([AX_CHECK_PRECOMPILED_HEADER], [
+AC_MSG_CHECKING([whether ${CXX} support precompiled header])
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+SAVE_CXXFLAGS=$CXXFLAGS
+dnl we consider than if -Winvalid-pch is accepted pch will works ...
+CXXFLAGS=-Winvalid-pch
+dnl but we don't want -Winvalid-pch else compilation will fail due -Werror and
+dnl the fact than some pch will be invalid for the given compilation option
+AC_TRY_COMPILE(,[;],AC_MSG_RESULT([yes]); $1="${$1} -include bits/stdc++.h", AC_MSG_RESULT([no]))
+CXXFLAGS=$SAVE_CXXFLAGS
+AC_LANG_RESTORE
+])
+
+dnl AX_CHECK_DOCBOOK
+AC_DEFUN([AX_CHECK_DOCBOOK], [
+# It's just rude to go over the net to build
+XSLTPROC_FLAGS=--nonet
+DOCBOOK_ROOT=
+if test ! -f /etc/xml/catalog; then
+ for i in /usr/share/sgml/docbook/stylesheet/xsl/nwalsh /usr/share/sgml/docbook/xsl-stylesheets/;
+ do
+ if test -d "$i"; then
+ DOCBOOK_ROOT=$i
+ fi
+ done
+
+ # Last resort - try net
+ if test -z "$DOCBOOK_ROOT"; then
+ XSLTPROC_FLAGS=
+ fi
+else
+ XML_CATALOG=/etc/xml/catalog
+ CAT_ENTRY_START='<!--'
+ CAT_ENTRY_END='-->'
+fi
+
+AC_CHECK_PROG(XSLTPROC,xsltproc,xsltproc,)
+XSLTPROC_WORKS=no
+if test -n "$XSLTPROC"; then
+ AC_MSG_CHECKING([whether xsltproc works])
+
+ if test -n "$XML_CATALOG"; then
+ DB_FILE="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"
+ else
+ DB_FILE="$DOCBOOK_ROOT/docbook.xsl"
+ fi
+
+ $XSLTPROC $XSLTPROC_FLAGS $DB_FILE >/dev/null 2>&1 << END
+<?xml version="1.0" encoding='ISO-8859-1'?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<book id="test">
+</book>
+END
+ if test "$?" = 0; then
+ XSLTPROC_WORKS=yes
+ fi
+ AC_MSG_RESULT($XSLTPROC_WORKS)
+fi
+AM_CONDITIONAL(have_xsltproc, test "$XSLTPROC_WORKS" = "yes")
+
+AC_SUBST(XML_CATALOG)
+AC_SUBST(XSLTPROC_FLAGS)
+AC_SUBST(DOCBOOK_ROOT)
+AC_SUBST(CAT_ENTRY_START)
+AC_SUBST(CAT_ENTRY_END)
+])
+
+dnl AX_CFLAGS_OPTIONS(var-name, option)
+dnl add option to var-name if $CC support it.
+AC_DEFUN([AX_CFLAGS_OPTION], [
+AC_MSG_CHECKING([whether ${CC} $2 is understood])
+AC_LANG_SAVE
+AC_LANG_C
+SAVE_CFLAGS=$CFLAGS
+CFLAGS=$2
+AC_TRY_COMPILE(,[;],AC_MSG_RESULT([yes]); $1="${$1} $2",AC_MSG_RESULT([no]))
+CFLAGS=$SAVE_CFLAGS
+AC_LANG_RESTORE
+])
+
+
+dnl AX_CXXFLAGS_OPTIONS(var-name, option)
+dnl add option to var-name if $CXX support it.
+AC_DEFUN([AX_CXXFLAGS_OPTION], [
+AC_MSG_CHECKING([whether ${CXX} $2 is understood])
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+SAVE_CXXFLAGS=$CXXFLAGS
+CXXFLAGS=$2
+AC_TRY_COMPILE(,[;],AC_MSG_RESULT([yes]); $1="${$1} $2",AC_MSG_RESULT([no]))
+CXXFLAGS=$SAVE_CXXFLAGS
+AC_LANG_RESTORE
+])
+
+dnl AX_COPY_IF_CHANGE(source, dest)
+dnl copy source to dest if they don't compare equally or if dest doesn't exist
+AC_DEFUN([AX_COPY_IF_CHANGE], [
+if test -r $2; then
+ if cmp $1 $2 > /dev/null; then
+ echo $2 is unchanged
+ else
+ cp -f $1 $2
+ fi
+else
+ cp -f $1 $2
+fi
+])
+
diff --git a/recipes/oprofile/oprofile/armv6_fix.patch b/recipes/oprofile/oprofile/armv6_fix.patch
new file mode 100644
index 0000000000..b981871e6e
--- /dev/null
+++ b/recipes/oprofile/oprofile/armv6_fix.patch
@@ -0,0 +1,54 @@
+---
+ events/arm/armv6/events | 43 +++++++++++++++++++++----------------------
+ 1 file changed, 21 insertions(+), 22 deletions(-)
+
+Index: oprofile-0.9.3/events/arm/armv6/events
+===================================================================
+--- oprofile-0.9.3.orig/events/arm/armv6/events 2007-07-16 19:22:17.000000000 +0100
++++ oprofile-0.9.3/events/arm/armv6/events 2007-09-28 11:13:32.000000000 +0100
+@@ -1,24 +1,23 @@
+ # ARM V6 events
+ #
+-event:0x00 counters:1,2 um:zero minimum:500 name:IFU_IFETCH_MISS : number of instruction fetch misses
+-event:0x01 counters:1,2 um:zero minimum:500 name:CYCLES_IFU_MEM_STALL : cycles instruction fetch pipe is stalled
+-event:0x02 counters:1,2 um:zero minimum:500 name:CYCLES_DATA_STALL : cycles stall occurs for due to data dependency
+-event:0x03 counters:1,2 um:zero minimum:500 name:ITLB_MISS : number of Instruction MicroTLB misses
+-event:0x04 counters:1,2 um:zero minimum:500 name:DTLB_MISS : number of Data MicroTLB misses
+-event:0x05 counters:1,2 um:zero minimum:500 name:BR_INST_EXECUTED : branch instruction executed w/ or w/o program flow change
+-event:0x06 counters:1,2 um:zero minimum:500 name:BR_INST_MISS_PRED : branch mispredicted
+-event:0x07 counters:1,2 um:zero minimum:500 name:INSN_EXECUTED : instructions executed
+-event:0x09 counters:1,2 um:zero minimum:500 name:DCACHE_ACCESS : data cache access, cacheable locations
+-event:0x0a counters:1,2 um:zero minimum:500 name:DCACHE_ACCESS_ALL : data cache access, all locations
+-event:0x0b counters:1,2 um:zero minimum:500 name:DCACHE_MISS : data cache miss
+-event:0x0c counters:1,2 um:zero minimum:500 name:DCACHE_WB : data cache writeback, 1 event for every half cacheline
+-event:0x0d counters:1,2 um:zero minimum:500 name:PC_CHANGE : number of times the program counter was changed without a mode switch
+-event:0x0f counters:1,2 um:zero minimum:500 name:TLB_MISS : Main TLB miss
+-event:0x10 counters:1,2 um:zero minimum:500 name:EXP_EXTERNAL : Explict external data access
+-event:0x11 counters:1,2 um:zero minimum:500 name:LSU_STALL : cycles stalled because Load Store request queque is full
+-event:0x12 counters:1,2 um:zero minimum:500 name:WRITE_DRAIN : Times write buffer was drained
+-event:0x20 counters:1,2 um:zero minimum:500 name:ETMEXTOUT0 : nuber of cycles ETMEXTOUT[0] signal was asserted
+-event:0x21 counters:1,2 um:zero minimum:500 name:ETMEXTOUT1 : nuber of cycles ETMEXTOUT[1] signal was asserted
+-event:0x22 counters:1,2 um:zero minimum:500 name:ETMEXTOUT_BOTH : nuber of cycles both ETMEXTOUT [0] and [1] were asserted * 2
+-event:0xff counters:1,2 um:zero minimum:500 name:CPU_CYCLES2 : clock cycles counter
+-event:0xfe counters:0 um:zero minimum:500 name:CPU_CYCLES : clock cycles counter
++event:0x00 counters:0,1 um:zero minimum:500 name:IFU_IFETCH_MISS : number of instruction fetch misses
++event:0x01 counters:0,1 um:zero minimum:500 name:CYCLES_IFU_MEM_STALL : cycles instruction fetch pipe is stalled
++event:0x02 counters:0,1 um:zero minimum:500 name:CYCLES_DATA_STALL : cycles stall occurs for due to data dependency
++event:0x03 counters:0,1 um:zero minimum:500 name:ITLB_MISS : number of Instruction MicroTLB misses
++event:0x04 counters:0,1 um:zero minimum:500 name:DTLB_MISS : number of Data MicroTLB misses
++event:0x05 counters:0,1 um:zero minimum:500 name:BR_INST_EXECUTED : branch instruction executed w/ or w/o program flow change
++event:0x06 counters:0,1 um:zero minimum:500 name:BR_INST_MISS_PRED : branch mispredicted
++event:0x07 counters:0,1 um:zero minimum:500 name:INSN_EXECUTED : instructions executed
++event:0x09 counters:0,1 um:zero minimum:500 name:DCACHE_ACCESS : data cache access, cacheable locations
++event:0x0a counters:0,1 um:zero minimum:500 name:DCACHE_ACCESS_ALL : data cache access, all locations
++event:0x0b counters:0,1 um:zero minimum:500 name:DCACHE_MISS : data cache miss
++event:0x0c counters:0,1 um:zero minimum:500 name:DCACHE_WB : data cache writeback, 1 event for every half cacheline
++event:0x0d counters:0,1 um:zero minimum:500 name:PC_CHANGE : number of times the program counter was changed without a mode switch
++event:0x0f counters:0,1 um:zero minimum:500 name:TLB_MISS : Main TLB miss
++event:0x10 counters:0,1 um:zero minimum:500 name:EXP_EXTERNAL : Explict external data access
++event:0x11 counters:0,1 um:zero minimum:500 name:LSU_STALL : cycles stalled because Load Store request queque is full
++event:0x12 counters:0,1 um:zero minimum:500 name:WRITE_DRAIN : Times write buffer was drained
++event:0x20 counters:0,1 um:zero minimum:500 name:ETMEXTOUT0 : nuber of cycles ETMEXTOUT[0] signal was asserted
++event:0x21 counters:0,1 um:zero minimum:500 name:ETMEXTOUT1 : nuber of cycles ETMEXTOUT[1] signal was asserted
++event:0x22 counters:0,1 um:zero minimum:500 name:ETMEXTOUT_BOTH : nuber of cycles both ETMEXTOUT [0] and [1] were asserted * 2
++event:0xff counters:0,1,2 um:zero minimum:500 name:CPU_CYCLES : clock cycles counter
diff --git a/recipes/oprofile/oprofile/armv7a.diff b/recipes/oprofile/oprofile/armv7a.diff
new file mode 100644
index 0000000000..d6dccc16c6
--- /dev/null
+++ b/recipes/oprofile/oprofile/armv7a.diff
@@ -0,0 +1,150 @@
+Index: oprofile-0.9.3/ChangeLog
+===================================================================
+--- oprofile-0.9.3.orig/ChangeLog 2007-07-16 20:22:17.000000000 +0200
++++ oprofile-0.9.3/ChangeLog 2008-08-08 15:41:09.194935711 +0200
+@@ -1,3 +1,14 @@
++
++2008-04-23 Jean Pihet <jpihet@mvista.com>
++
++ * events/arm/armv7/events:
++ * events/arm/armv7/unit_masks:
++ * libop/op_cpu_type.c:
++ * libop/op_cpu_type.h:
++ * libop/op_events.c:
++ * utils/ophelp.c: Added ARMv7 support to be consistent with the kernel,
++ remove some duplicate code and add some extra events
++
+ 2007-07-09 Maynard Johnson <maynardj@us.ibm.com>
+
+ * doc/opreport.xsd:
+Index: oprofile-0.9.3/events/arm/armv7/events
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ oprofile-0.9.3/events/arm/armv7/events 2008-08-08 15:41:09.198936463 +0200
+@@ -0,0 +1,53 @@
++# ARM V7 events
++# From Cortex A8 DDI (ARM DDI 0344B, revision r1p1)
++#
++event:0x00 counters:1,2,3,4 um:zero minimum:500 name:PMNC_SW_INCR : Software increment of PMNC registers
++event:0x01 counters:1,2,3,4 um:zero minimum:500 name:IFETCH_MISS : Instruction fetch misses from cache or normal cacheable memory
++event:0x02 counters:1,2,3,4 um:zero minimum:500 name:ITLB_MISS : Instruction fetch misses from TLB
++event:0x03 counters:1,2,3,4 um:zero minimum:500 name:DCACHE_REFILL : Data R/W operation that causes a refill from cache or normal cacheable memory
++event:0x04 counters:1,2,3,4 um:zero minimum:500 name:DCACHE_ACCESS : Data R/W from cache
++event:0x05 counters:1,2,3,4 um:zero minimum:500 name:DTLB_REFILL : Data R/W that causes a TLB refill
++event:0x06 counters:1,2,3,4 um:zero minimum:500 name:DREAD : Data read architecturally executed (note: architecturally executed = for instructions that are unconditional or that pass the condition code)
++event:0x07 counters:1,2,3,4 um:zero minimum:500 name:DWRITE : Data write architecturally executed
++event:0x08 counters:1,2,3,4 um:zero minimum:500 name:INSTR_EXECUTED : All executed instructions
++event:0x09 counters:1,2,3,4 um:zero minimum:500 name:EXC_TAKEN : Exception taken
++event:0x0A counters:1,2,3,4 um:zero minimum:500 name:EXC_EXECUTED : Exception return architecturally executed
++event:0x0B counters:1,2,3,4 um:zero minimum:500 name:CID_WRITE : Instruction that writes to the Context ID Register architecturally executed
++event:0x0C counters:1,2,3,4 um:zero minimum:500 name:PC_WRITE : SW change of PC, architecturally executed (not by exceptions)
++event:0x0D counters:1,2,3,4 um:zero minimum:500 name:PC_IMM_BRANCH : Immediate branch instruction executed (taken or not)
++event:0x0E counters:1,2,3,4 um:zero minimum:500 name:PC_PROC_RETURN : Procedure return architecturally executed (not by exceptions)
++event:0x0F counters:1,2,3,4 um:zero minimum:500 name:UNALIGNED_ACCESS : Unaligned access architecturally executed
++event:0x10 counters:1,2,3,4 um:zero minimum:500 name:PC_BRANCH_MIS_PRED : Branch mispredicted or not predicted. Counts pipeline flushes because of misprediction
++event:0x12 counters:1,2,3,4 um:zero minimum:500 name:PC_BRANCH_MIS_USED : Branch or change in program flow that could have been predicted
++event:0x40 counters:1,2,3,4 um:zero minimum:500 name:WRITE_BUFFER_FULL : Any write buffer full cycle
++event:0x41 counters:1,2,3,4 um:zero minimum:500 name:L2_STORE_MERGED : Any store that is merged in L2 cache
++event:0x42 counters:1,2,3,4 um:zero minimum:500 name:L2_STORE_BUFF : Any bufferable store from load/store to L2 cache
++event:0x43 counters:1,2,3,4 um:zero minimum:500 name:L2_ACCESS : Any access to L2 cache
++event:0x44 counters:1,2,3,4 um:zero minimum:500 name:L2_CACH_MISS : Any cacheable miss in L2 cache
++event:0x45 counters:1,2,3,4 um:zero minimum:500 name:AXI_READ_CYCLES : Number of cycles for an active AXI read
++event:0x46 counters:1,2,3,4 um:zero minimum:500 name:AXI_WRITE_CYCLES : Number of cycles for an active AXI write
++event:0x47 counters:1,2,3,4 um:zero minimum:500 name:MEMORY_REPLAY : Any replay event in the memory subsystem
++event:0x48 counters:1,2,3,4 um:zero minimum:500 name:UNALIGNED_ACCESS_REPLAY : Unaligned access that causes a replay
++event:0x49 counters:1,2,3,4 um:zero minimum:500 name:L1_DATA_MISS : L1 data cache miss as a result of the hashing algorithm
++event:0x4A counters:1,2,3,4 um:zero minimum:500 name:L1_INST_MISS : L1 instruction cache miss as a result of the hashing algorithm
++event:0x4B counters:1,2,3,4 um:zero minimum:500 name:L1_DATA_COLORING : L1 data access in which a page coloring alias occurs
++event:0x4C counters:1,2,3,4 um:zero minimum:500 name:L1_NEON_DATA : NEON data access that hits L1 cache
++event:0x4D counters:1,2,3,4 um:zero minimum:500 name:L1_NEON_CACH_DATA : NEON cacheable data access that hits L1 cache
++event:0x4E counters:1,2,3,4 um:zero minimum:500 name:L2_NEON : L2 access as a result of NEON memory access
++event:0x4F counters:1,2,3,4 um:zero minimum:500 name:L2_NEON_HIT : Any NEON hit in L2 cache
++event:0x50 counters:1,2,3,4 um:zero minimum:500 name:L1_INST : Any L1 instruction cache access, excluding CP15 cache accesses
++event:0x51 counters:1,2,3,4 um:zero minimum:500 name:PC_RETURN_MIS_PRED : Return stack misprediction at return stack pop (incorrect target address)
++event:0x52 counters:1,2,3,4 um:zero minimum:500 name:PC_BRANCH_FAILED : Branch prediction misprediction
++event:0x53 counters:1,2,3,4 um:zero minimum:500 name:PC_BRANCH_TAKEN : Any predicted branch that is taken
++event:0x54 counters:1,2,3,4 um:zero minimum:500 name:PC_BRANCH_EXECUTED : Any taken branch that is executed
++event:0x55 counters:1,2,3,4 um:zero minimum:500 name:OP_EXECUTED : Number of operations executed (in instruction or mutli-cycle instruction)
++event:0x56 counters:1,2,3,4 um:zero minimum:500 name:CYCLES_INST_STALL : Cycles where no instruction available
++event:0x57 counters:1,2,3,4 um:zero minimum:500 name:CYCLES_INST : Number of instructions issued in a cycle
++event:0x58 counters:1,2,3,4 um:zero minimum:500 name:CYCLES_NEON_DATA_STALL : Number of cycles the processor waits on MRC data from NEON
++event:0x59 counters:1,2,3,4 um:zero minimum:500 name:CYCLES_NEON_INST_STALL : Number of cycles the processor waits on NEON instruction queue or NEON load queue
++event:0x5A counters:1,2,3,4 um:zero minimum:500 name:NEON_CYCLES : Number of cycles NEON and integer processors are not idle
++event:0x70 counters:1,2,3,4 um:zero minimum:500 name:PMU0_EVENTS : Number of events from external input source PMUEXTIN[0]
++event:0x71 counters:1,2,3,4 um:zero minimum:500 name:PMU1_EVENTS : Number of events from external input source PMUEXTIN[1]
++event:0x72 counters:1,2,3,4 um:zero minimum:500 name:PMU_EVENTS : Number of events from both external input sources PMUEXTIN[0] and PMUEXTIN[1]
++event:0xFF counters:0 um:zero minimum:500 name:CPU_CYCLES : Number of CPU cycles
++
+Index: oprofile-0.9.3/events/arm/armv7/unit_masks
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ oprofile-0.9.3/events/arm/armv7/unit_masks 2008-08-08 15:41:09.210955689 +0200
+@@ -0,0 +1,4 @@
++# ARM V7 PMNC possible unit masks
++#
++name:zero type:mandatory default:0x00
++ 0x00 No unit mask
+Index: oprofile-0.9.3/libop/op_cpu_type.c
+===================================================================
+--- oprofile-0.9.3.orig/libop/op_cpu_type.c 2007-07-16 20:22:17.000000000 +0200
++++ oprofile-0.9.3/libop/op_cpu_type.c 2008-08-08 15:41:09.242955608 +0200
+@@ -71,6 +71,7 @@
+ { "ppc64 PA6T", "ppc64/pa6t", CPU_PPC64_PA6T, 6 },
+ { "ARM MPCore", "arm/mpcore", CPU_ARM_MPCORE, 2 },
+ { "ARM V6 PMU", "arm/armv6", CPU_ARM_V6, 3 },
++ { "ARM V7 PMNC", "arm/armv7", CPU_ARM_V7, 5 },
+ { "ppc64 POWER5++", "ppc64/power5++", CPU_PPC64_POWER5pp, 6 },
+ };
+
+Index: oprofile-0.9.3/libop/op_cpu_type.h
+===================================================================
+--- oprofile-0.9.3.orig/libop/op_cpu_type.h 2007-07-16 20:22:17.000000000 +0200
++++ oprofile-0.9.3/libop/op_cpu_type.h 2008-08-08 15:41:09.262956072 +0200
+@@ -69,6 +69,7 @@
+ CPU_PPC64_PA6T, /**< ppc64 PA6T */
+ CPU_ARM_MPCORE, /**< ARM MPCore */
+ CPU_ARM_V6, /**< ARM V6 */
++ CPU_ARM_V7, /**< ARM V7 */
+ CPU_PPC64_POWER5pp, /**< ppc64 Power5++ family */
+ MAX_CPU_TYPE
+ } op_cpu;
+Index: oprofile-0.9.3/libop/op_events.c
+===================================================================
+--- oprofile-0.9.3.orig/libop/op_events.c 2007-07-16 20:22:17.000000000 +0200
++++ oprofile-0.9.3/libop/op_events.c 2008-08-08 15:41:09.278955619 +0200
+@@ -788,6 +788,7 @@
+ case CPU_ARM_XSCALE2:
+ case CPU_ARM_MPCORE:
+ case CPU_ARM_V6:
++ case CPU_ARM_V7:
+ descr->name = "CPU_CYCLES";
+ break;
+
+Index: oprofile-0.9.3/utils/ophelp.c
+===================================================================
+--- oprofile-0.9.3.orig/utils/ophelp.c 2007-07-16 20:22:17.000000000 +0200
++++ oprofile-0.9.3/utils/ophelp.c 2008-08-08 15:41:09.294934552 +0200
+@@ -433,6 +433,11 @@
+ printf("See ARM11 Technical Reference Manual\n");
+ break;
+
++ case CPU_ARM_V7:
++ printf("See ARM11 Technical Reference Manual\n"
++ "Cortex A8 DDI (ARM DDI 0344B, revision r1p1)\n");
++ break;
++
+ case CPU_PPC64_PA6T:
+ printf("See PA6T Power Implementation Features Book IV\n"
+ "Chapter 7 Performance Counters\n");
+Index: oprofile-0.9.3/events/Makefile.am
+===================================================================
+--- oprofile-0.9.3.orig/events/Makefile.am 2008-08-08 15:41:24.746955563 +0200
++++ oprofile-0.9.3/events/Makefile.am 2008-08-08 15:41:43.465544495 +0200
+@@ -31,6 +31,7 @@
+ arm/xscale1/events arm/xscale1/unit_masks \
+ arm/xscale2/events arm/xscale2/unit_masks \
+ arm/armv6/events arm/armv6/unit_masks \
++ arm/armv7/events arm/armv7/unit_masks \
+ arm/mpcore/events arm/mpcore/unit_masks \
+ mips/20K/events mips/20K/unit_masks \
+ mips/24K/events mips/24K/unit_masks \
diff --git a/recipes/oprofile/oprofile/fix-arith.patch b/recipes/oprofile/oprofile/fix-arith.patch
new file mode 100644
index 0000000000..5c55f4b349
--- /dev/null
+++ b/recipes/oprofile/oprofile/fix-arith.patch
@@ -0,0 +1,52 @@
+Index: utils/opcontrol
+===================================================================
+RCS file: /cvsroot/oprofile/oprofile/utils/opcontrol,v
+retrieving revision 1.148
+diff -u -r1.148 opcontrol
+--- utils/opcontrol 8 Nov 2007 09:24:30 -0000 1.148
++++ utils/opcontrol 27 Nov 2007 17:02:20 -0000
+@@ -395,7 +395,7 @@
+ echo "SESSION_DIR=$SESSION_DIR" >>$SETUP_FILE
+
+ if test "$NR_CHOSEN" != "0"; then
+- for f in `seq 0 $((NR_CHOSEN - 1))`; do
++ for f in `seq 0 $(($NR_CHOSEN - 1))`; do
+ get_event $f
+ echo "CHOSEN_EVENTS_${f}=$GOTEVENT" >>$SETUP_FILE
+ done
+@@ -590,7 +590,7 @@
+ OPHELP_ARGS=
+
+ if test "$NR_CHOSEN" != 0; then
+- for f in `seq 0 $((NR_CHOSEN - 1))`; do
++ for f in `seq 0 $(($NR_CHOSEN - 1))`; do
+ get_event $f
+ if test "$GOTEVENT" != ""; then
+ OPHELP_ARGS="$OPHELP_ARGS $GOTEVENT"
+@@ -612,7 +612,7 @@
+ return
+ fi
+
+- for f in `seq 0 $((NR_CHOSEN - 1))`; do
++ for f in `seq 0 $(($NR_CHOSEN - 1))`; do
+ get_event $f
+ if test "$GOTEVENT" != ""; then
+ EVENT=`echo $GOTEVENT | awk -F: '{print $1}'`
+@@ -1226,7 +1226,7 @@
+ verify_counters
+
+ OPROFILED_EVENTS=
+- for f in `seq 0 $((NR_CHOSEN - 1))`; do
++ for f in `seq 0 $(($NR_CHOSEN - 1))`; do
+ get_event $f
+ if test "$GOTEVENT" != ""; then
+ EVENT=`echo $GOTEVENT | awk -F: '{print $1}'`
+@@ -1383,7 +1383,7 @@
+ fi
+
+ if test "$NR_CHOSEN" != "0"; then
+- for f in `seq 0 $((NR_CHOSEN - 1))`; do
++ for f in `seq 0 $(($NR_CHOSEN - 1))`; do
+ get_event $f
+ echo "Event $f: $GOTEVENT"
+ done
diff --git a/recipes/oprofile/oprofile/gcc43x-fix.patch b/recipes/oprofile/oprofile/gcc43x-fix.patch
new file mode 100644
index 0000000000..4be15cb81d
--- /dev/null
+++ b/recipes/oprofile/oprofile/gcc43x-fix.patch
@@ -0,0 +1,254 @@
+This is a multi-part message in MIME format.
+--------------010700040803000401040503
+Content-Type: text/plain; charset=ISO-8859-1; format=flowed
+Content-Transfer-Encoding: 7bit
+
+When I was going through OProfile to compile using GCC-4.3 I found a number of
+include that needed to be added. Information about porting applications to
+GCC-4.3 is on:
+
+http://gcc.gnu.org/gcc-4.3/porting_to.html
+
+The attached patch has required changes to successfully compile with GCC 4.3. I
+have tested that the oprofile still builds on Fedora 8 and RHEL 4 machines.
+However, I haven't tested on older distrobutions. Does anyone see a problem with
+this patch on older systems? If not, I would like to check this in.
+
+-Will
+
+2008-02-15 Will Cohen <wcohen@redhat.com>
+
+ * gui/oprof_start_util.cpp
+ * libutil++/file_manip.cpp
+ * libutil++/bfd_support.cpp
+ * libutil++/bfd_spu_support.cpp
+ * libutil++/op_spu_bfd.cpp
+ * libutil++/cverb.cpp
+ * libutil++/child_reader.cpp
+ * pp/opgprof_options.cpp
+ * pp/opannotate_options.cpp
+ * pp/oparchive.cpp
+ * pp/common_option.cpp
+ * libpp/sample_container.cpp
+ * libpp/op_header.cpp
+ * libpp/profile.cpp
+ * libabi/opimport.cpp
+ * libregex/demangle_symbol.cpp: Add includes for gcc 4.3 compatibility.
+
+--------------010700040803000401040503
+Content-Type: text/x-patch;
+ name="oprofile_gcc43.patch"
+Content-Transfer-Encoding: 7bit
+Content-Disposition: inline;
+ filename="oprofile_gcc43.patch"
+
+diff -up oprofile-gcc43/pp/oparchive.cpp.orig oprofile-gcc43/pp/oparchive.cpp
+--- oprofile-gcc43/pp/oparchive.cpp.orig 2007-11-20 15:47:00.000000000 -0500
++++ oprofile-gcc43/pp/oparchive.cpp 2008-02-15 10:58:50.000000000 -0500
+@@ -12,6 +12,7 @@
+
+ #include <iostream>
+ #include <fstream>
++#include <cstdlib>
+
+ #include <errno.h>
+ #include <string.h>
+diff -up oprofile-gcc43/pp/opgprof_options.cpp.orig oprofile-gcc43/pp/opgprof_options.cpp
+--- oprofile-gcc43/pp/opgprof_options.cpp.orig 2007-11-20 15:47:00.000000000 -0500
++++ oprofile-gcc43/pp/opgprof_options.cpp 2008-02-15 10:58:50.000000000 -0500
+@@ -13,6 +13,7 @@
+ #include <list>
+ #include <iterator>
+ #include <iostream>
++#include <cstdlib>
+
+ #include "opgprof_options.h"
+ #include "popt_options.h"
+diff -up oprofile-gcc43/pp/common_option.cpp.orig oprofile-gcc43/pp/common_option.cpp
+--- oprofile-gcc43/pp/common_option.cpp.orig 2007-11-20 15:46:59.000000000 -0500
++++ oprofile-gcc43/pp/common_option.cpp 2008-02-15 10:58:50.000000000 -0500
+@@ -12,6 +12,7 @@
+ #include <iostream>
+ #include <sstream>
+ #include <iterator>
++#include <cstdlib>
+
+ #include "op_config.h"
+ #include "locate_images.h"
+diff -up oprofile-gcc43/pp/opannotate_options.cpp.orig oprofile-gcc43/pp/opannotate_options.cpp
+--- oprofile-gcc43/pp/opannotate_options.cpp.orig 2008-02-13 13:57:22.000000000 -0500
++++ oprofile-gcc43/pp/opannotate_options.cpp 2008-02-15 10:58:50.000000000 -0500
+@@ -13,6 +13,7 @@
+ #include <list>
+ #include <iterator>
+ #include <iostream>
++#include <cstdlib>
+
+ #include "profile_spec.h"
+ #include "arrange_profiles.h"
+diff -up oprofile-gcc43/libregex/demangle_symbol.cpp.orig oprofile-gcc43/libregex/demangle_symbol.cpp
+--- oprofile-gcc43/libregex/demangle_symbol.cpp.orig 2007-06-03 12:50:17.000000000 -0400
++++ oprofile-gcc43/libregex/demangle_symbol.cpp 2008-02-15 10:58:50.000000000 -0500
+@@ -8,6 +8,8 @@
+ * @author John Levon
+ */
+
++#include <cstdlib>
++
+ #include "config.h"
+
+ #include "demangle_symbol.h"
+diff -up oprofile-gcc43/libpp/sample_container.cpp.orig oprofile-gcc43/libpp/sample_container.cpp
+--- oprofile-gcc43/libpp/sample_container.cpp.orig 2003-08-10 20:59:18.000000000 -0400
++++ oprofile-gcc43/libpp/sample_container.cpp 2008-02-15 10:58:50.000000000 -0500
+@@ -9,6 +9,7 @@
+ * @author John Levon
+ */
+
++#include <climits>
+ #include <set>
+ #include <numeric>
+ #include <algorithm>
+diff -up oprofile-gcc43/libpp/profile.cpp.orig oprofile-gcc43/libpp/profile.cpp
+--- oprofile-gcc43/libpp/profile.cpp.orig 2007-11-12 16:56:07.000000000 -0500
++++ oprofile-gcc43/libpp/profile.cpp 2008-02-15 10:58:50.000000000 -0500
+@@ -15,6 +15,7 @@
+ #include <iostream>
+ #include <string>
+ #include <sstream>
++#include <cstring>
+
+ #include <cerrno>
+
+diff -up oprofile-gcc43/libpp/op_header.cpp.orig oprofile-gcc43/libpp/op_header.cpp
+--- oprofile-gcc43/libpp/op_header.cpp.orig 2007-11-12 16:56:07.000000000 -0500
++++ oprofile-gcc43/libpp/op_header.cpp 2008-02-15 10:58:50.000000000 -0500
+@@ -14,6 +14,7 @@
+ #include <iomanip>
+ #include <set>
+ #include <sstream>
++#include <cstring>
+
+ #include <sys/types.h>
+ #include <sys/stat.h>
+diff -up oprofile-gcc43/libabi/opimport.cpp.orig oprofile-gcc43/libabi/opimport.cpp
+--- oprofile-gcc43/libabi/opimport.cpp.orig 2005-08-17 15:15:41.000000000 -0400
++++ oprofile-gcc43/libabi/opimport.cpp 2008-02-15 10:58:50.000000000 -0500
+@@ -17,6 +17,8 @@
+ #include <iostream>
+ #include <vector>
+ #include <cassert>
++#include <cstring>
++#include <cstdlib>
+
+ #include <sys/types.h>
+ #include <sys/stat.h>
+diff -up oprofile-gcc43/gui/oprof_start_util.cpp.orig oprofile-gcc43/gui/oprof_start_util.cpp
+--- oprofile-gcc43/gui/oprof_start_util.cpp.orig 2005-08-07 07:15:48.000000000 -0400
++++ oprofile-gcc43/gui/oprof_start_util.cpp 2008-02-15 10:58:50.000000000 -0500
+@@ -19,6 +19,7 @@
+ #include <sstream>
+ #include <iostream>
+ #include <fstream>
++#include <cstdlib>
+
+ #include <qfiledialog.h>
+ #include <qmessagebox.h>
+diff -up oprofile-gcc43/libutil++/file_manip.cpp.orig oprofile-gcc43/libutil++/file_manip.cpp
+--- oprofile-gcc43/libutil++/file_manip.cpp.orig 2007-11-12 16:56:07.000000000 -0500
++++ oprofile-gcc43/libutil++/file_manip.cpp 2008-02-15 10:58:50.000000000 -0500
+@@ -15,6 +15,8 @@
+ #include <dirent.h>
+ #include <fnmatch.h>
+ #include <utime.h>
++#include <limits.h>
++#include <stdlib.h>
+
+ #include <cstdio>
+ #include <cerrno>
+diff -up oprofile-gcc43/libutil++/bfd_support.cpp.orig oprofile-gcc43/libutil++/bfd_support.cpp
+--- oprofile-gcc43/libutil++/bfd_support.cpp.orig 2007-11-12 16:56:07.000000000 -0500
++++ oprofile-gcc43/libutil++/bfd_support.cpp 2008-02-15 10:58:50.000000000 -0500
+@@ -19,6 +19,8 @@
+ #include <fstream>
+ #include <sstream>
+ #include <string>
++#include <cstring>
++#include <cstdlib>
+
+ using namespace std;
+
+diff -up oprofile-gcc43/libutil++/child_reader.cpp.orig oprofile-gcc43/libutil++/child_reader.cpp
+--- oprofile-gcc43/libutil++/child_reader.cpp.orig 2004-01-19 15:00:27.000000000 -0500
++++ oprofile-gcc43/libutil++/child_reader.cpp 2008-02-15 10:58:50.000000000 -0500
+@@ -11,10 +11,13 @@
+
+ #include <unistd.h>
+ #include <sys/wait.h>
++#include <limits.h>
+
+ #include <cerrno>
+ #include <sstream>
+ #include <iostream>
++#include <cstring>
++#include <cstdlib>
+
+ #include "op_libiberty.h"
+ #include "child_reader.h"
+diff -up oprofile-gcc43/libutil++/bfd_spu_support.cpp.orig oprofile-gcc43/libutil++/bfd_spu_support.cpp
+--- oprofile-gcc43/libutil++/bfd_spu_support.cpp.orig 2008-02-13 13:57:18.000000000 -0500
++++ oprofile-gcc43/libutil++/bfd_spu_support.cpp 2008-02-15 10:58:50.000000000 -0500
+@@ -20,6 +20,7 @@
+ #include <fstream>
+ #include <sstream>
+ #include <string>
++#include <cstring>
+ #include <sys/types.h>
+
+ struct spu_elf {
+diff -up oprofile-gcc43/libutil++/cverb.cpp.orig oprofile-gcc43/libutil++/cverb.cpp
+--- oprofile-gcc43/libutil++/cverb.cpp.orig 2006-11-20 10:01:48.000000000 -0500
++++ oprofile-gcc43/libutil++/cverb.cpp 2008-02-15 10:58:50.000000000 -0500
+@@ -13,6 +13,7 @@
+ #include <iostream>
+ #include <map>
+ #include <string>
++#include <cstring>
+
+ #include "cverb.h"
+
+diff -up oprofile-gcc43/libutil++/op_spu_bfd.cpp.orig oprofile-gcc43/libutil++/op_spu_bfd.cpp
+--- oprofile-gcc43/libutil++/op_spu_bfd.cpp.orig 2008-02-13 13:57:18.000000000 -0500
++++ oprofile-gcc43/libutil++/op_spu_bfd.cpp 2008-02-15 10:58:50.000000000 -0500
+@@ -14,6 +14,8 @@
+ #include <sys/stat.h>
+
+ #include <iostream>
++#include <cstring>
++#include <cstdlib>
+
+ #include "op_bfd.h"
+ #include "locate_images.h"
+
+--------------010700040803000401040503
+Content-Type: text/plain; charset="us-ascii"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+Content-Disposition: inline
+
+-------------------------------------------------------------------------
+This SF.net email is sponsored by: Microsoft
+Defy all challenges. Microsoft(R) Visual Studio 2008.
+http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
+--------------010700040803000401040503
+Content-Type: text/plain; charset="us-ascii"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+Content-Disposition: inline
+
+_______________________________________________
+oprofile-list mailing list
+oprofile-list@lists.sourceforge.net
+https://lists.sourceforge.net/lists/listinfo/oprofile-list
+
+--------------010700040803000401040503--
diff --git a/recipes/oprofile/oprofile/no_arm_mapping_syms.patch b/recipes/oprofile/oprofile/no_arm_mapping_syms.patch
new file mode 100644
index 0000000000..4c07e5c735
--- /dev/null
+++ b/recipes/oprofile/oprofile/no_arm_mapping_syms.patch
@@ -0,0 +1,21 @@
+
+#
+# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
+#
+
+Index: oprofile-0.9/libutil++/bfd_support.cpp
+===================================================================
+--- oprofile-0.9.orig/libutil++/bfd_support.cpp 2005-05-05 15:43:46.000000000 +0100
++++ oprofile-0.9/libutil++/bfd_support.cpp 2005-06-10 10:18:24.000000000 +0100
+@@ -330,6 +330,11 @@
+ // returning true for fix up in op_bfd_symbol()
+ if (!sym->name || sym->name[0] == '\0')
+ return true;
++ /* ARM assembler internal mapping symbols aren't interesting */
++ if ((strcmp("$a", sym->name) == 0) ||
++ (strcmp("$t", sym->name) == 0) ||
++ (strcmp("$d", sym->name) == 0))
++ return false;
+
+ // C++ exception stuff
+ if (sym->name[0] == '.' && sym->name[1] == 'L')
diff --git a/recipes/oprofile/oprofile/oparchive_fix.patch b/recipes/oprofile/oprofile/oparchive_fix.patch
new file mode 100644
index 0000000000..dbdd5eb4ea
--- /dev/null
+++ b/recipes/oprofile/oprofile/oparchive_fix.patch
@@ -0,0 +1,22 @@
+Index: oprofile/pp/oparchive.cpp
+===================================================================
+--- oprofile.orig/pp/oparchive.cpp
++++ oprofile/pp/oparchive.cpp
+@@ -95,7 +95,7 @@ int oparchive(options::spec const & spec
+ * to avoid overwriting files with the same name. The
+ * /usr/lib/debug search path is not going to work.
+ */
+- bfd * ibfd = open_bfd(exe_name);
++ bfd * ibfd = open_bfd(options::archive_path + exe_name);
+ if (ibfd) {
+ string global(options::archive_path + DEBUGDIR);
+ string dirname = op_dirname(options::archive_path +
+@@ -106,7 +106,7 @@ int oparchive(options::spec const & spec
+ /* found something copy it over */
+ string dest_debug_dir = options::outdirectory +
+ dirname + "/.debug/";
+- if (create_dir(dest_debug_dir.c_str())) {
++ if (!options::list_files && create_dir(dest_debug_dir.c_str())) {
+ cerr << "Unable to create directory: "
+ << dest_debug_dir << "." << endl;
+ exit (EXIT_FAILURE);
diff --git a/recipes/oprofile/oprofile/opcontrol-busybox-compat.patch b/recipes/oprofile/oprofile/opcontrol-busybox-compat.patch
new file mode 100644
index 0000000000..d394e016c5
--- /dev/null
+++ b/recipes/oprofile/oprofile/opcontrol-busybox-compat.patch
@@ -0,0 +1,49 @@
+Index: oprofile-0.9.3/utils/opcontrol
+===================================================================
+--- oprofile-0.9.3.orig/utils/opcontrol 2008-05-23 16:54:21.000000000 +0800
++++ oprofile-0.9.3/utils/opcontrol 2008-05-23 00:47:38.000000000 +0800
+@@ -908,7 +908,7 @@
+ return
+ fi
+
+- kill -s 0 `cat $LOCK_FILE` 2>/dev/null
++ kill -0 `cat $LOCK_FILE` 2>/dev/null
+ if test "$?" -ne 0; then
+ echo "Detected stale lock file. Removing." >&2
+ rm -f "$LOCK_FILE"
+@@ -919,7 +919,7 @@
+ echo "Stopping profiling."
+ echo 0 >/dev/oprofile/enable
+ fi
+- kill -s USR2 `cat $LOCK_FILE` 2>/dev/null
++ kill -usr2 `cat $LOCK_FILE` 2>/dev/null
+ }
+
+
+@@ -932,7 +932,7 @@
+ return
+ fi
+
+- kill -s 0 `cat $LOCK_FILE` 2>/dev/null
++ kill -0 `cat $LOCK_FILE` 2>/dev/null
+ if test "$?" -ne 0; then
+ echo "Detected stale lock file. Removing." >&2
+ rm -f "$LOCK_FILE"
+@@ -1274,7 +1274,7 @@
+ {
+
+ if test -f "$LOCK_FILE"; then
+- kill -s 0 `cat $LOCK_FILE` 2>/dev/null
++ kill -0 `cat $LOCK_FILE` 2>/dev/null
+ if test "$?" -eq 0; then
+ return;
+ else
+@@ -1341,7 +1341,7 @@
+ if test "$KERNEL_SUPPORT" = "yes"; then
+ echo 1 >$MOUNT/enable
+ fi
+- kill -s USR1 `cat $LOCK_FILE` 2>/dev/null
++ kill -USR1 `cat $LOCK_FILE` 2>/dev/null
+ echo "Profiler running."
+ }
+
diff --git a/recipes/oprofile/oprofile/opcontrol_bashisms.patch b/recipes/oprofile/oprofile/opcontrol_bashisms.patch
new file mode 100644
index 0000000000..01ef11df86
--- /dev/null
+++ b/recipes/oprofile/oprofile/opcontrol_bashisms.patch
@@ -0,0 +1,16 @@
+ utils/opcontrol | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: oprofile-0.9.2/utils/opcontrol
+===================================================================
+--- oprofile-0.9.2.orig/utils/opcontrol 2006-03-29 22:54:07.000000000 +0100
++++ oprofile-0.9.2/utils/opcontrol 2006-10-12 11:14:39.000000000 +0100
+@@ -485,7 +485,7 @@ validate_separate_args()
+ SEPARATE_KERNEL=0
+ SEPARATE_THREAD=0
+ SEPARATE_CPU=0
+- while (($i < $#)); do
++ while [ "$i" -lt "$#" ]; do
+ shift
+ case "$1" in
+ lib|library)
diff --git a/recipes/oprofile/oprofile/opjitconv-execvp-fix.diff b/recipes/oprofile/oprofile/opjitconv-execvp-fix.diff
new file mode 100644
index 0000000000..5e6d271cc5
--- /dev/null
+++ b/recipes/oprofile/oprofile/opjitconv-execvp-fix.diff
@@ -0,0 +1,23 @@
+status: applied upstream http://sourceforge.net/tracker/index.php?func=detail&aid=2040417&group_id=16191&atid=116191
+applied in: >0.9.4
+Index: oprofile-0.9.4/daemon/init.c
+===================================================================
+--- oprofile-0.9.4.orig/daemon/init.c 2008-08-06 17:59:43.126578165 +0200
++++ oprofile-0.9.4/daemon/init.c 2008-08-06 18:00:10.694789667 +0200
+@@ -170,14 +170,14 @@
+ sprintf(end_time_str, "%llu", end_time);
+ sprintf(opjitconv_path, "%s/%s", OP_BINDIR, "opjitconv");
+ arg_num = 0;
+- exec_args[arg_num++] = opjitconv_path;
++ exec_args[arg_num++] = "opjitconv";
+ if (vmisc)
+ exec_args[arg_num++] = "-d";
+ exec_args[arg_num++] = session_dir;
+ exec_args[arg_num++] = start_time_str;
+ exec_args[arg_num++] = end_time_str;
+ exec_args[arg_num] = (char *) NULL;
+- execvp("opjitconv", exec_args);
++ execvp(opjitconv_path, exec_args);
+ fprintf(stderr, "Failed to exec %s: %s\n",
+ exec_args[0], strerror(errno));
+ /* We don't want any cleanup in the child */
diff --git a/recipes/oprofile/oprofile/opstart.patch b/recipes/oprofile/oprofile/opstart.patch
new file mode 100644
index 0000000000..e8da0922cc
--- /dev/null
+++ b/recipes/oprofile/oprofile/opstart.patch
@@ -0,0 +1,235 @@
+Index: oprofile/utils/Makefile.am
+===================================================================
+--- oprofile.orig/utils/Makefile.am
++++ oprofile/utils/Makefile.am
+@@ -3,8 +3,15 @@ AM_CFLAGS = @OP_CFLAGS@
+
+ LIBS=@POPT_LIBS@ @LIBERTY_LIBS@
+
+-bin_PROGRAMS = ophelp
++bin_PROGRAMS = ophelp opstart
+ dist_bin_SCRIPTS = opcontrol
+
+ ophelp_SOURCES = ophelp.c
+ ophelp_LDADD = ../libop/libop.a ../libutil/libutil.a
++
++opstart_SOURCES = opstart.c
++
++install-exec-local:
++ cd $(DESTDIR)/$(bindir) && \
++ rm -f opstop && \
++ $(LN_S) opstart opstop
+Index: oprofile/utils/opstart.c
+===================================================================
+--- /dev/null
++++ oprofile/utils/opstart.c
+@@ -0,0 +1,110 @@
++/**
++ * @file opstart.c
++ * Start/Stop oprofile
++ *
++ * @remark Copyright 2007 Openedhand Ltd.
++ * @remark Read the file COPYING
++ *
++ * @author Richard Purdie
++ */
++
++#include <signal.h>
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++#include <unistd.h>
++#include <sys/types.h>
++#include <sys/stat.h>
++
++int main(const int argc, const char* argv[])
++{
++ const char *enable = "/dev/oprofile/enable";
++ const char *lockfile;
++ unsigned long dpid;
++ struct stat sbuf;
++ FILE *lfile, *efile;
++ int sig, enb, err;
++
++ if (argc >= 2) {
++ printf("Error: Invalid options.\n");
++ return 1;
++ }
++
++ lockfile = getenv("LOCK_FILE");
++ if (!lockfile)
++ lockfile = "/var/lib/oprofile/lock";
++
++ /* Add SESSION_DIR support? */
++
++ if (geteuid()) {
++ printf("Error: This program must be run as root.\n");
++ return 1;
++ }
++
++ if (stat(enable, &sbuf)) {
++ printf("Error: Could not find /dev/oprofile/enable, the"
++ " kernel module probably isn't loaded.\n");
++ printf("This binary only works with 2.6 kernels and oprofile"
++ " must have been initialised with 'opcontrol --start-daemon'.\n");
++ return 1;
++ }
++
++ if (stat(lockfile, &sbuf)) {
++ printf("Error: Could not find lockfile %s.\n", lockfile);
++ printf("The oprofile daemon must be running (oprofile must"
++ " have been initialised with 'opcontrol --start-daemon').\n");
++ return 1;
++ }
++
++ lfile = fopen(lockfile, "r");
++ if (!lfile) {
++ printf("Error opening lockfile %s.\n", lockfile);
++ return 1;
++ }
++
++ err = fscanf(lfile, "%lud", (unsigned long *) &dpid);
++ if (err != 1) {
++ printf("Error reading pid from lockfile %s.\n", lockfile);
++ return 1;
++ }
++ fclose(lfile);
++
++ efile = fopen(enable, "r");
++ if (!efile) {
++ printf("Error opening %s.\n", enable);
++ return 1;
++ }
++
++ if (strstr(argv[0], "opstart")) {
++ printf("Starting Profiler\n");
++ sig = SIGUSR1;
++ enb = 1;
++ } else if (strstr(argv[0], "opstop")) {
++ printf("Stopping Oprofile.\n");
++ printf("You need to run 'opcontrol --dump' when the session"
++ " is finished.\n");
++ sig = SIGUSR2;
++ enb = 0;
++ } else {
++ printf("Error: Please call as 'opstart' or 'opstop'\n");
++ return 1;
++ }
++
++ err = kill(dpid, 0);
++ if (err) {
++ printf("Error sending signal to oprofiled. Stale lockfile"
++ " (%s) ?\n", lockfile);
++ return 1;
++ }
++
++ fprintf(efile, "%d\n", enb);
++ err = kill(dpid, sig);
++ if (err) {
++ printf("Error sending signal to oprofiled. Stale lockfile"
++ " (%s) ?\n", lockfile);
++ return 1;
++ }
++
++ return 0;
++}
++
+Index: oprofile/configure.in
+===================================================================
+--- oprofile.orig/configure.in
++++ oprofile/configure.in
+@@ -16,6 +16,7 @@ AM_INIT_AUTOMAKE(oprofile, 0.9.4cvs)
+ AM_CONFIG_HEADER(config.h)
+
+ AC_PROG_RANLIB
++AC_PROG_LN_S
+
+ dnl for the man page
+ DATE="`date '+%a %d %B %Y'`"
+@@ -227,6 +228,8 @@ AC_OUTPUT(Makefile \
+ doc/xsl/catalog-1.xml \
+ doc/oprofile.1 \
+ doc/opcontrol.1 \
++ doc/opstart.1 \
++ doc/opstop.1 \
+ doc/ophelp.1 \
+ doc/opreport.1 \
+ doc/opannotate.1 \
+Index: oprofile/doc/Makefile.am
+===================================================================
+--- oprofile.orig/doc/Makefile.am
++++ oprofile/doc/Makefile.am
+@@ -11,6 +11,8 @@ STYLESHEETS=$(CHUNK_XHTML_STYLESHEET) $(
+ man_MANS = \
+ oprofile.1 \
+ opcontrol.1 \
++ opstart.1 \
++ opstop.1 \
+ opreport.1 \
+ opannotate.1 \
+ opgprof.1 \
+Index: oprofile/doc/opstart.1.in
+===================================================================
+--- /dev/null
++++ oprofile/doc/opstart.1.in
+@@ -0,0 +1,27 @@
++.TH OPSTART 1 "@DATE@" "oprofile @VERSION@"
++.UC 4
++.SH NAME
++opstart \- start OProfile profiling
++.SH SYNOPSIS
++.br
++.B opstart
++.SH DESCRIPTION
++.B opstart
++is a simple optimised command to start profiling with 2.6 Linux kernels.
++OProfile should have already been initialised by calling "opcontrol --start-daemon".
++
++.SH ENVIRONMENT
++No special environment variables are recognised by opstart.
++
++.SH FILES
++.TP
++.I /var/lib/oprofile/samples/
++The location of the generated sample files.
++
++.SH VERSION
++.TP
++This man page is current for @PACKAGE@-@VERSION@.
++
++.SH SEE ALSO
++.BR @OP_DOCDIR@,
++.BR oprofile(1)
+Index: oprofile/doc/opstop.1.in
+===================================================================
+--- /dev/null
++++ oprofile/doc/opstop.1.in
+@@ -0,0 +1,28 @@
++.TH OPSTOP 1 "@DATE@" "oprofile @VERSION@"
++.UC 4
++.SH NAME
++opstop \- stop OProfile profiling
++.SH SYNOPSIS
++.br
++.B opstop
++.SH DESCRIPTION
++.B opstop
++is a simple optimsed command to stop profiling with 2.6 Linux kernels.
++You need to run "opcontrol --dump" before being able to view a profile
++with opreport.
++
++.SH ENVIRONMENT
++No special environment variables are recognised by opstop.
++
++.SH FILES
++.TP
++.I /var/lib/oprofile/samples/
++The location of the generated sample files.
++
++.SH VERSION
++.TP
++This man page is current for @PACKAGE@-@VERSION@.
++
++.SH SEE ALSO
++.BR @OP_DOCDIR@,
++.BR oprofile(1)
diff --git a/recipes/oprofile/oprofile/root_option.patch b/recipes/oprofile/oprofile/root_option.patch
new file mode 100644
index 0000000000..bcb05f6c16
--- /dev/null
+++ b/recipes/oprofile/oprofile/root_option.patch
@@ -0,0 +1,1051 @@
+Index: oprofile/libpp/arrange_profiles.cpp
+===================================================================
+--- oprofile.orig/libpp/arrange_profiles.cpp
++++ oprofile/libpp/arrange_profiles.cpp
+@@ -798,7 +798,7 @@ get_iprofile(app_map_t & app_map, string
+
+ /// Pull out all the images, removing any we can't access.
+ void
+-verify_and_fill(string archive_path, app_map_t & app_map,
++verify_and_fill(std::vector<std::string> const & archive_paths, app_map_t & app_map,
+ list<inverted_profile> & plist, extra_images const & extra)
+ {
+ app_map_t::iterator it = app_map.begin();
+@@ -807,7 +807,7 @@ verify_and_fill(string archive_path, app
+ for (; it != end; ++it) {
+ plist.push_back(it->second);
+ inverted_profile & ip = plist.back();
+- ip.image = find_image_path(archive_path, ip.image, extra,
++ ip.image = find_image_path(archive_paths, ip.image, extra,
+ ip.error);
+ }
+ }
+@@ -816,7 +816,7 @@ verify_and_fill(string archive_path, app
+
+
+ list<inverted_profile> const
+-invert_profiles(string archive_path, profile_classes const & classes,
++invert_profiles(std::vector<std::string> const & archive_paths, profile_classes const & classes,
+ extra_images const & extra)
+ {
+ app_map_t app_map;
+@@ -855,7 +855,7 @@ invert_profiles(string archive_path, pro
+
+ list<inverted_profile> inverted_list;
+
+- verify_and_fill(archive_path, app_map, inverted_list, extra);
++ verify_and_fill(archive_paths, app_map, inverted_list, extra);
+
+ return inverted_list;
+ }
+Index: oprofile/libpp/arrange_profiles.h
+===================================================================
+--- oprofile.orig/libpp/arrange_profiles.h
++++ oprofile/libpp/arrange_profiles.h
+@@ -239,7 +239,7 @@ class extra_images;
+ * applicable (hence image_set).
+ */
+ std::list<inverted_profile> const
+-invert_profiles(std::string archive_path, profile_classes const & classes,
++invert_profiles(std::vector<std::string> const & archive_paths, profile_classes const & classes,
+ extra_images const & extra);
+
+ #endif /* !ARRANGE_PROFILES_H */
+Index: oprofile/libpp/callgraph_container.cpp
+===================================================================
+--- oprofile.orig/libpp/callgraph_container.cpp
++++ oprofile/libpp/callgraph_container.cpp
+@@ -392,7 +392,7 @@ const symbol_collection & arc_recorder::
+ }
+
+
+-void callgraph_container::populate(string const & archive_path,
++void callgraph_container::populate(std::vector<std::string> const & archive_paths,
+ list<inverted_profile> const & iprofiles,
+ extra_images const & extra, bool debug_info, double threshold,
+ bool merge_lib, string_filter const & sym_filter)
+@@ -405,7 +405,7 @@ void callgraph_container::populate(strin
+ list<inverted_profile>::const_iterator const end = iprofiles.end();
+ for (it = iprofiles.begin(); it != end; ++it) {
+ // populate_caller_image take care about empty sample filename
+- populate_for_image(archive_path, pc, *it, sym_filter, 0);
++ populate_for_image(archive_paths, pc, *it, sym_filter, 0);
+ }
+
+ add_symbols(pc);
+@@ -414,7 +414,7 @@ void callgraph_container::populate(strin
+
+ for (it = iprofiles.begin(); it != end; ++it) {
+ for (size_t i = 0; i < it->groups.size(); ++i) {
+- populate(archive_path, it->groups[i], it->image, extra,
++ populate(archive_paths, it->groups[i], it->image, extra,
+ i, pc, debug_info, merge_lib);
+ }
+ }
+@@ -423,7 +423,7 @@ void callgraph_container::populate(strin
+ }
+
+
+-void callgraph_container::populate(string const & archive_path,
++void callgraph_container::populate(std::vector<std::string> const & archive_paths,
+ list<image_set> const & lset,
+ string const & app_image, extra_images const & extra, size_t pclass,
+ profile_container const & pc, bool debug_info, bool merge_lib)
+@@ -435,14 +435,14 @@ void callgraph_container::populate(strin
+ list<profile_sample_files>::const_iterator pend
+ = lit->files.end();
+ for (pit = lit->files.begin(); pit != pend; ++pit) {
+- populate(archive_path, pit->cg_files, app_image,
++ populate(archive_paths, pit->cg_files, app_image,
+ extra, pclass, pc, debug_info, merge_lib);
+ }
+ }
+ }
+
+
+-void callgraph_container::populate(string const & archive_path,
++void callgraph_container::populate(std::vector<std::string> const & archive_paths,
+ list<string> const & cg_files,
+ string const & app_image, extra_images const & extra, size_t pclass,
+ profile_container const & pc, bool debug_info, bool merge_lib)
+@@ -457,15 +457,15 @@ void callgraph_container::populate(strin
+
+ image_error error;
+ string caller_binary =
+- find_image_path(archive_path, caller_file.lib_image,
++ find_image_path(archive_paths, caller_file.lib_image,
+ extra, error);
+
+ if (error != image_ok)
+- report_image_error(archive_path + caller_file.lib_image,
++ report_image_error(caller_file.lib_image,
+ error, false);
+
+ bool caller_bfd_ok = true;
+- op_bfd caller_bfd(archive_path, caller_binary,
++ op_bfd caller_bfd(archive_paths, caller_binary,
+ string_filter(), caller_bfd_ok);
+ if (!caller_bfd_ok)
+ report_image_error(caller_binary,
+@@ -474,13 +474,13 @@ void callgraph_container::populate(strin
+ parsed_filename callee_file = parse_filename(*it);
+
+ string callee_binary =
+- find_image_path(archive_path, callee_file.cg_image,
++ find_image_path(archive_paths, callee_file.cg_image,
+ extra, error);
+ if (error != image_ok)
+ report_image_error(callee_file.cg_image, error, false);
+
+ bool callee_bfd_ok = true;
+- op_bfd callee_bfd(archive_path, callee_binary,
++ op_bfd callee_bfd(archive_paths, callee_binary,
+ string_filter(), callee_bfd_ok);
+ if (!callee_bfd_ok)
+ report_image_error(callee_binary,
+Index: oprofile/libpp/callgraph_container.h
+===================================================================
+--- oprofile.orig/libpp/callgraph_container.h
++++ oprofile/libpp/callgraph_container.h
+@@ -105,7 +105,7 @@ class callgraph_container {
+ public:
+ /**
+ * Populate the container, must be called once only.
+- * @param archive_path oparchive prefix path
++ * @param archive_paths oparchive prefix paths
+ * @param iprofiles sample file list including callgraph files.
+ * @param extra extra image list to fixup binary name.
+ * @param debug_info true if we must record linenr information
+@@ -116,7 +116,7 @@ public:
+ * Currently all errors core dump.
+ * FIXME: consider if this should be a ctor
+ */
+- void populate(std::string const & archive_path,
++ void populate(std::vector<std::string> const & archive_paths,
+ std::list<inverted_profile> const & iprofiles,
+ extra_images const & extra, bool debug_info,
+ double threshold, bool merge_lib,
+@@ -149,13 +149,13 @@ private:
+ profile_container const & pc, bool debug_info,
+ size_t pclass);
+
+- void populate(std::string const & archive_path,
++ void populate(std::vector<std::string> const & archive_paths,
+ std::list<image_set> const & lset,
+ std::string const & app_image,
+ extra_images const & extra, size_t pclass,
+ profile_container const & pc, bool debug_info,
+ bool merge_lib);
+- void populate(std::string const & archive_path,
++ void populate(std::vector<std::string> const & archive_paths,
+ std::list<std::string> const & cg_files,
+ std::string const & app_image,
+ extra_images const & extra, size_t pclass,
+Index: oprofile/libpp/locate_images.cpp
+===================================================================
+--- oprofile.orig/libpp/locate_images.cpp
++++ oprofile/libpp/locate_images.cpp
+@@ -93,14 +93,14 @@ public:
+ } // anon namespace
+
+
+-string const find_image_path(string const & archive_path,
++string const find_image_path(std::vector<std::string> const & archive_paths,
+ string const & image_name,
+ extra_images const & extra_images,
+ image_error & error)
+ {
+ error = image_ok;
+
+- string const image = op_realpath(archive_path + image_name);
++ string const image = op_realpath(op_findfile(archive_paths, image_name));
+
+ // simplest case
+ if (op_file_readable(image)) {
+Index: oprofile/libpp/locate_images.h
+===================================================================
+--- oprofile.orig/libpp/locate_images.h
++++ oprofile/libpp/locate_images.h
+@@ -70,7 +70,7 @@ private:
+ * If we fail to find the file we fill in error and return the original string.
+ */
+ std::string const
+-find_image_path(std::string const & archive_path,
++find_image_path(std::vector<std::string> const & archive_paths,
+ std::string const & image_name,
+ extra_images const & extra_images,
+ image_error & error);
+Index: oprofile/libpp/populate.cpp
+===================================================================
+--- oprofile.orig/libpp/populate.cpp
++++ oprofile/libpp/populate.cpp
+@@ -21,6 +21,7 @@
+ #include "populate_for_spu.h"
+
+ #include "image_errors.h"
++#include "file_manip.h"
+
+ #include <iostream>
+
+@@ -56,16 +57,16 @@ populate_from_files(profile_t & profile,
+
+
+ void
+-populate_for_image(string const & archive_path, profile_container & samples,
++populate_for_image(std::vector<std::string> const & archive_paths, profile_container & samples,
+ inverted_profile const & ip, string_filter const & symbol_filter,
+ bool * has_debug_info)
+ {
+ if (is_spu_profile(ip))
+- return populate_for_spu_image(archive_path, samples, ip,
++ return populate_for_spu_image(archive_paths, samples, ip,
+ symbol_filter, has_debug_info);
+
+ bool ok = ip.error == image_ok;
+- op_bfd abfd(archive_path, ip.image, symbol_filter, ok);
++ op_bfd abfd(archive_paths, ip.image, symbol_filter, ok);
+ if (!ok && ip.error == image_ok)
+ ip.error = image_format_failure;
+
+@@ -96,7 +97,7 @@ populate_for_image(string const & archiv
+ }
+
+ if (found == true && ip.error == image_ok)
+- check_mtime(archive_path + abfd.get_filename(), header);
++ check_mtime(op_findfile(archive_paths, abfd.get_filename()), header);
+
+ if (has_debug_info)
+ *has_debug_info = abfd.has_debug_info();
+Index: oprofile/libpp/populate.h
+===================================================================
+--- oprofile.orig/libpp/populate.h
++++ oprofile/libpp/populate.h
+@@ -19,7 +19,7 @@ class string_filter;
+
+ /// Load all sample file information for exactly one binary image.
+ void
+-populate_for_image(std::string const & archive_path,
++populate_for_image(std::vector<std::string> const & archive_paths,
+ profile_container & samples, inverted_profile const & ip,
+ string_filter const & symbol_filter, bool * has_debug_info);
+
+Index: oprofile/libpp/populate_for_spu.cpp
+===================================================================
+--- oprofile.orig/libpp/populate_for_spu.cpp
++++ oprofile/libpp/populate_for_spu.cpp
+@@ -19,6 +19,7 @@
+ #include "populate_for_spu.h"
+
+ #include "image_errors.h"
++#include "file_manip.h"
+
+ #include <iostream>
+
+@@ -46,7 +47,7 @@ static int spu_profile = unknown_profile
+ void
+ populate_spu_profile_from_files(list<profile_sample_files> const & files,
+ string const app_image,
+- string const & archive_path,
++ std::vector<std::string> const & archive_paths,
+ profile_container & samples,
+ inverted_profile const & ip,
+ string_filter const & symbol_filter,
+@@ -65,14 +66,14 @@ populate_spu_profile_from_files(list<pro
+ profile.add_sample_file(it->sample_filename);
+ opd_header header = profile.get_header();
+ if (header.embedded_offset) {
+- abfd = new op_bfd(archive_path,
++ abfd = new op_bfd(archive_paths,
+ header.embedded_offset,
+ ip.image,
+ symbol_filter,
+ ok);
+ fname_to_check = ip.image;
+ } else {
+- abfd = new op_bfd(archive_path,
++ abfd = new op_bfd(archive_paths,
+ ip.image,
+ symbol_filter,
+ ok);
+@@ -87,7 +88,7 @@ populate_spu_profile_from_files(list<pro
+
+ samples.add(profile, *abfd, app_image, ip_grp_num);
+ if (ip.error == image_ok)
+- check_mtime(archive_path + fname_to_check,
++ check_mtime(op_findfile(archive_paths, fname_to_check),
+ profile.get_header());
+
+ if (has_debug_info && !*has_debug_info)
+@@ -98,7 +99,7 @@ populate_spu_profile_from_files(list<pro
+ } // anon namespace
+
+ void
+-populate_for_spu_image(string const & archive_path,
++populate_for_spu_image(std::vector<std::string> const & archive_paths,
+ profile_container & samples,
+ inverted_profile const & ip,
+ string_filter const & symbol_filter,
+@@ -113,7 +114,7 @@ populate_for_spu_image(string const & ar
+
+ for (; it != end; ++it)
+ populate_spu_profile_from_files(it->files,
+- it->app_image, archive_path, samples, ip,
++ it->app_image, archive_paths, samples, ip,
+ symbol_filter, i, has_debug_info);
+ }
+ }
+Index: oprofile/libpp/populate_for_spu.h
+===================================================================
+--- oprofile.orig/libpp/populate_for_spu.h
++++ oprofile/libpp/populate_for_spu.h
+@@ -13,6 +13,8 @@
+ #ifndef POPULATE_FOR_SPU_H
+ #define POPULATE_FOR_SPU_H
+
++#include <vector>
++
+ class profile_container;
+ class inverted_profile;
+ class string_filter;
+@@ -28,7 +30,7 @@ bool is_spu_profile(inverted_profile con
+ * This is a special-purpose function for CELL BE SPU profiling.
+ * See populate_spu_profile_from_files prologue for more details.
+ */
+-void populate_for_spu_image(std::string const & archive_path,
++void populate_for_spu_image(std::vector<std::string> const & archive_paths,
+ profile_container & samples,
+ inverted_profile const & ip,
+ string_filter const & symbol_filter,
+Index: oprofile/libpp/profile_spec.cpp
+===================================================================
+--- oprofile.orig/libpp/profile_spec.cpp
++++ oprofile/libpp/profile_spec.cpp
+@@ -30,7 +30,7 @@ namespace {
+ // we should maintain the original to maintain the wordexp etc.
+ string const fixup_image_spec(string const & str, extra_images const & extra)
+ {
+- string dummy_archive_path;
++ std::vector<std::string> const dummy_archive_path;
+ // FIXME: what todo if an error in find_image_path() ?
+ image_error error;
+ return find_image_path(dummy_archive_path, str, extra, error);
+Index: oprofile/libpp/xml_utils.cpp
+===================================================================
+--- oprofile.orig/libpp/xml_utils.cpp
++++ oprofile/libpp/xml_utils.cpp
+@@ -111,10 +111,10 @@ string get_cpu_num(size_t pclass)
+
+ xml_utils::xml_utils(format_output::xml_formatter * xo,
+ symbol_collection const & s, size_t nc,
+- string_filter * sf, string const & ap)
++ string_filter * sf, std::vector<std::string> const & ap)
+ :
+ symbol_filter(sf),
+- archive_path(ap),
++ archive_paths(ap),
+ has_subclasses(false),
+ bytes_index(0)
+ {
+@@ -379,11 +379,11 @@ xml_utils::output_symbol_bytes(ostream &
+ string const & image_name = get_image_name(symb->image_name, true);
+ op_bfd * abfd = NULL;
+ if (symb->spu_offset)
+- abfd = new op_bfd(archive_path, symb->spu_offset,
++ abfd = new op_bfd(archive_paths, symb->spu_offset,
+ get_image_name(symb->embedding_filename, true),
+ *symbol_filter, ok);
+ else
+- abfd = new op_bfd(archive_path, image_name, *symbol_filter, ok);
++ abfd = new op_bfd(archive_paths, image_name, *symbol_filter, ok);
+ if (!ok) {
+ report_image_error(image_name, image_format_failure, false);
+ delete abfd;
+Index: oprofile/libpp/xml_utils.h
+===================================================================
+--- oprofile.orig/libpp/xml_utils.h
++++ oprofile/libpp/xml_utils.h
+@@ -22,7 +22,7 @@ class xml_utils {
+ public:
+ xml_utils(format_output::xml_formatter * xo,
+ symbol_collection const & s, size_t nc,
+- string_filter * sf, std::string const & ap);
++ string_filter * sf, std::vector<std::string> const & ap);
+ // these members are static because they are invoked before
+ // the xml_utils object has been created
+ static std::string get_timer_setup(size_t count);
+@@ -51,7 +51,7 @@ public:
+ private:
+ string_filter * symbol_filter;
+ bool multiple_events;
+- std::string archive_path;
++ std::vector<std::string> const & archive_paths;
+ bool has_subclasses;
+ size_t bytes_index;
+ static bool has_nonzero_masks;
+Index: oprofile/libutil++/op_bfd.cpp
+===================================================================
+--- oprofile.orig/libutil++/op_bfd.cpp
++++ oprofile/libutil++/op_bfd.cpp
+@@ -27,6 +27,7 @@
+ #include "string_filter.h"
+ #include "stream_util.h"
+ #include "cverb.h"
++#include "file_manip.h"
+
+ using namespace std;
+
+@@ -87,11 +88,11 @@ bool op_bfd_symbol::operator<(op_bfd_sym
+ }
+
+
+-op_bfd::op_bfd(string const & archive, string const & fname,
++op_bfd::op_bfd(std::vector<std::string> const & archive, string const & fname,
+ string_filter const & symbol_filter, bool & ok)
+ :
+ filename(fname),
+- archive_path(archive),
++ archive_paths(archive),
+ file_size(-1)
+ {
+ int fd;
+@@ -102,7 +103,7 @@ op_bfd::op_bfd(string const & archive, s
+ symbols_found_t symbols;
+ asection const * sect;
+
+- string const image_path = archive_path + filename;
++ string const image_path = op_findfile(archive_paths, filename);
+
+ cverb << vbfd << "op_bfd ctor for " << image_path << endl;
+
+@@ -321,8 +322,8 @@ bool op_bfd::has_debug_info() const
+ return debug_info.reset(true);
+
+ // check to see if there is an .debug file
+- string const global(archive_path + DEBUGDIR);
+- string const image_path = archive_path + filename;
++ string const global(op_findfile(archive_paths, DEBUGDIR));
++ string const image_path = op_findfile(archive_paths, filename);
+ string const dirname(image_path.substr(0, image_path.rfind('/')));
+
+ if (find_separate_debug_file(ibfd.abfd, dirname, global, debug_filename)) {
+Index: oprofile/libutil++/op_bfd.h
+===================================================================
+--- oprofile.orig/libutil++/op_bfd.h
++++ oprofile/libutil++/op_bfd.h
+@@ -89,14 +89,14 @@ private:
+ class op_bfd {
+ public:
+ /**
+- * @param archive_path oparchive prefix path
++ * @param archive_paths oparchive prefix paths
+ * @param filename the name of the image file
+ * @param symbol_filter filter to apply to symbols
+ * @param ok in-out parameter: on in, if not set, don't
+ * open the bfd (because it's not there or whatever). On out,
+ * it's set to false if the bfd couldn't be loaded.
+ */
+- op_bfd(std::string const & archive_path,
++ op_bfd(std::vector<std::string> const & archive_paths,
+ std::string const & filename,
+ string_filter const & symbol_filter,
+ bool & ok);
+@@ -105,7 +105,7 @@ public:
+ * This constructor is used when processing an SPU profile
+ * where the SPU ELF is embedded within the PPE binary.
+ */
+- op_bfd(std::string const & archive_path,
++ op_bfd(std::vector<std::string> const & archive_paths,
+ uint64_t spu_offset,
+ std::string const & filename,
+ string_filter const & symbol_filter,
+@@ -243,8 +243,8 @@ private:
+ /// filename we open (not including archive path)
+ std::string filename;
+
+- /// path to archive
+- std::string archive_path;
++ /// paths to archive
++ std::vector<std::string> archive_paths;
+
+ /// file size in bytes
+ off_t file_size;
+Index: oprofile/libutil++/op_spu_bfd.cpp
+===================================================================
+--- oprofile.orig/libutil++/op_spu_bfd.cpp
++++ oprofile/libutil++/op_spu_bfd.cpp
+@@ -19,6 +19,7 @@
+ #include "op_libiberty.h"
+ #include "string_filter.h"
+ #include "cverb.h"
++#include "file_manip.h"
+
+ using namespace std;
+
+@@ -29,11 +30,11 @@ extern verbose vbfd;
+ * constructor in libutil++/op_bfd.cpp, with the additional processing
+ * needed to handle an embedded spu offset.
+ */
+-op_bfd::op_bfd(string const & archive, uint64_t spu_offset,
++op_bfd::op_bfd(std::vector<std::string> const & archive, uint64_t spu_offset,
+ string const & fname,
+ string_filter const & symbol_filter, bool & ok)
+ :
+- archive_path(archive),
++ archive_paths(archive),
+ file_size(-1),
+ embedding_filename(fname)
+ {
+@@ -48,7 +49,7 @@ op_bfd::op_bfd(string const & archive, u
+ symbols_found_t symbols;
+ asection const * sect;
+
+- string const image_path = archive_path + fname;
++ string const image_path = op_findfile(archive_paths, fname);
+
+ cverb << vbfd << "op_bfd ctor for " << image_path << endl;
+ if (!ok)
+Index: oprofile/pp/opannotate_options.cpp
+===================================================================
+--- oprofile.orig/pp/opannotate_options.cpp
++++ oprofile/pp/opannotate_options.cpp
+@@ -26,7 +26,7 @@ using namespace std;
+ profile_classes classes;
+
+ namespace options {
+- string archive_path;
++ vector<string> archive_paths;
+ demangle_type demangle = dmt_normal;
+ string output_dir;
+ vector<string> search_dirs;
+@@ -87,6 +87,7 @@ popt::option options_array[] = {
+ void handle_options(options::spec const & spec)
+ {
+ using namespace options;
++ string archive_path;
+
+ if (spec.first.size()) {
+ cerr << "differential profiles not allowed" << endl;
+@@ -125,7 +126,9 @@ void handle_options(options::spec const
+ list<string> sample_files = pspec.generate_file_list(exclude_dependent, true);
+
+ archive_path = pspec.get_archive_path();
++ archive_paths.push_back(archive_path);
+ cverb << vsfile << "Archive: " << archive_path << endl;
++ archive_paths.push_back(options::root_path);
+
+ cverb << vsfile << "Matched sample files: " << sample_files.size()
+ << endl;
+Index: oprofile/pp/opannotate_options.h
+===================================================================
+--- oprofile.orig/pp/opannotate_options.h
++++ oprofile/pp/opannotate_options.h
+@@ -21,7 +21,7 @@
+ class profile_classes;
+
+ namespace options {
+- extern std::string archive_path;
++ extern std::vector<std::string> archive_paths;
+ extern demangle_type demangle;
+ extern bool source;
+ extern bool assembly;
+Index: oprofile/pp/oparchive.cpp
+===================================================================
+--- oprofile.orig/pp/oparchive.cpp
++++ oprofile/pp/oparchive.cpp
+@@ -59,7 +59,7 @@ int oparchive(options::spec const & spec
+
+ /* copy over each of the executables and the debuginfo files */
+ list<inverted_profile> iprofiles
+- = invert_profiles(options::archive_path, classes,
++ = invert_profiles(options::archive_paths, classes,
+ options::extra_found_images);
+
+ report_image_errors(iprofiles);
+@@ -86,7 +86,7 @@ int oparchive(options::spec const & spec
+ }
+
+ /* Copy actual executable files */
+- copy_one_file(it->error, options::archive_path + exe_name,
++ copy_one_file(it->error, op_findfile(options::archive_paths, exe_name),
+ exe_archive_file);
+
+ /* If there are any debuginfo files, copy them over.
+@@ -95,11 +95,10 @@ int oparchive(options::spec const & spec
+ * to avoid overwriting files with the same name. The
+ * /usr/lib/debug search path is not going to work.
+ */
+- bfd * ibfd = open_bfd(options::archive_path + exe_name);
++ bfd * ibfd = open_bfd(op_findfile(options::archive_paths, exe_name));
+ if (ibfd) {
+- string global(options::archive_path + DEBUGDIR);
+- string dirname = op_dirname(options::archive_path +
+- exe_name);
++ string global(op_findfile(options::archive_paths, DEBUGDIR));
++ string dirname = op_dirname(op_findfile(options::archive_paths, exe_name));
+ string debug_filename;
+ if (find_separate_debug_file(ibfd, dirname, global,
+ debug_filename)) {
+@@ -130,8 +129,8 @@ int oparchive(options::spec const & spec
+ string sample_name = *sit;
+ string sample_base = sample_name;
+ /* Get rid of the the archive_path from the name */
+- sample_base.replace(sample_base.find(options::archive_path),
+- options::archive_path.size(), "");
++ sample_base.replace(sample_base.find(options::archive_paths[0]),
++ options::archive_paths[0].size(), "");
+ string sample_archive_file = options::outdirectory + sample_base;
+
+ cverb << vdebug << (sample_name) << endl;
+@@ -149,12 +148,12 @@ int oparchive(options::spec const & spec
+
+ /* copy over the /var/lib/oprofile/abi file if it exists */
+ string abi_name = "/var/lib/oprofile/abi";
+- copy_one_file(image_ok, options::archive_path + abi_name,
++ copy_one_file(image_ok, op_findfile(options::archive_paths, abi_name),
+ options::outdirectory + abi_name);
+
+ /* copy over the /var/lib/oprofile/oprofiled.log file */
+ string log_name = "/var/lib/oprofile/oprofiled.log";
+- copy_one_file(image_ok, options::archive_path + log_name,
++ copy_one_file(image_ok, op_findfile(options::archive_paths, log_name),
+ options::outdirectory + log_name);
+
+ return 0;
+Index: oprofile/pp/oparchive_options.cpp
+===================================================================
+--- oprofile.orig/pp/oparchive_options.cpp
++++ oprofile/pp/oparchive_options.cpp
+@@ -31,7 +31,7 @@ profile_classes classes;
+ list<string> sample_files;
+
+ namespace options {
+- string archive_path;
++ std::vector<std::string> archive_paths;
+ demangle_type demangle = dmt_normal;
+ bool exclude_dependent;
+ merge_option merge_by;
+@@ -75,6 +75,7 @@ void check_options()
+ void handle_options(options::spec const & spec)
+ {
+ using namespace options;
++ std::string archive_path;
+
+ if (spec.first.size()) {
+ cerr << "differential profiles not allowed" << endl;
+@@ -96,7 +97,9 @@ void handle_options(options::spec const
+ sample_files = pspec.generate_file_list(exclude_dependent, false);
+
+ archive_path = pspec.get_archive_path();
++ archive_paths.push_back(archive_path);
+ cverb << vsfile << "Archive: " << archive_path << endl;
++ archive_paths.push_back(options::root_path);
+
+ cverb << vsfile << "Matched sample files: " << sample_files.size()
+ << endl;
+Index: oprofile/pp/oparchive_options.h
+===================================================================
+--- oprofile.orig/pp/oparchive_options.h
++++ oprofile/pp/oparchive_options.h
+@@ -18,7 +18,7 @@ class profile_classes;
+ class merge_option;
+
+ namespace options {
+- extern std::string archive_path;
++ extern std::vector<std::string> archive_paths;
+ extern bool exclude_dependent;
+ extern merge_option merge_by;
+ extern std::string outdirectory;
+Index: oprofile/pp/opgprof_options.cpp
+===================================================================
+--- oprofile.orig/pp/opgprof_options.cpp
++++ oprofile/pp/opgprof_options.cpp
+@@ -26,7 +26,7 @@ profile_classes classes;
+ inverted_profile image_profile;
+
+ namespace options {
+- string archive_path;
++ std::vector<std::string> archive_paths;
+ string gmon_filename = "gmon.out";
+
+ // Ugly, for build only
+@@ -71,7 +71,7 @@ bool try_merge_profiles(profile_spec con
+ size_t nr_classes = classes.v.size();
+
+ list<inverted_profile> iprofiles
+- = invert_profiles(options::archive_path, classes,
++ = invert_profiles(options::archive_paths, classes,
+ options::extra_found_images);
+
+ if (nr_classes == 1 && iprofiles.size() == 1) {
+@@ -104,6 +104,8 @@ bool try_merge_profiles(profile_spec con
+
+ void handle_options(options::spec const & spec)
+ {
++ string archive_path;
++
+ if (spec.first.size()) {
+ cerr << "differential profiles not allowed" << endl;
+ exit(EXIT_FAILURE);
+@@ -112,8 +114,10 @@ void handle_options(options::spec const
+ profile_spec const pspec =
+ profile_spec::create(spec.common, options::extra_found_images);
+
+- options::archive_path = pspec.get_archive_path();
+- cverb << vsfile << "Archive: " << options::archive_path << endl;
++ archive_path = pspec.get_archive_path();
++ options::archive_paths.push_back(archive_path);
++ cverb << vsfile << "Archive: " << archive_path << endl;
++ options::archive_paths.push_back(options::root_path);
+
+ cverb << vsfile << "output filename: " << options::gmon_filename
+ << endl;
+Index: oprofile/pp/opgprof_options.h
+===================================================================
+--- oprofile.orig/pp/opgprof_options.h
++++ oprofile/pp/opgprof_options.h
+@@ -17,7 +17,7 @@
+ #include "common_option.h"
+
+ namespace options {
+- extern std::string archive_path;
++ extern std::vector<std::string> archive_paths;
+ extern std::string gmon_filename;
+ }
+
+Index: oprofile/pp/opreport_options.cpp
+===================================================================
+--- oprofile.orig/pp/opreport_options.cpp
++++ oprofile/pp/opreport_options.cpp
+@@ -32,8 +32,8 @@ profile_classes classes;
+ profile_classes classes2;
+
+ namespace options {
+- string archive_path;
+- string archive_path2;
++ std::vector<std::string> archive_paths;
++ std::vector<std::string> archive_paths2;
+ demangle_type demangle = dmt_normal;
+ bool symbols;
+ bool callgraph;
+@@ -314,16 +314,19 @@ void handle_options(options::spec const
+ symbol_filter = string_filter(include_symbols, exclude_symbols);
+
+ if (!spec.first.size()) {
+- archive_path = process_spec(classes, spec.common);
++ archive_paths.push_back(process_spec(classes, spec.common));
++ archive_paths.push_back(options::root_path);
+ } else {
+ if (options::xml) {
+ cerr << "differential profiles are incompatible with --xml" << endl;
+ exit(EXIT_FAILURE);
+ }
+ cverb << vsfile << "profile spec 1:" << endl;
+- archive_path = process_spec(classes, spec.first);
++ archive_paths.push_back(process_spec(classes, spec.first));
++ archive_paths.push_back(options::root_path);
+ cverb << vsfile << "profile spec 2:" << endl;
+- archive_path2 = process_spec(classes2, spec.second);
++ archive_paths2.push_back(process_spec(classes2, spec.second));
++ archive_paths2.push_back(options::root_path);
+
+ if (!classes.matches(classes2)) {
+ cerr << "profile classes are incompatible" << endl;
+Index: oprofile/pp/opreport_options.h
+===================================================================
+--- oprofile.orig/pp/opreport_options.h
++++ oprofile/pp/opreport_options.h
+@@ -24,8 +24,8 @@ class profile_classes;
+ class merge_option;
+
+ namespace options {
+- extern std::string archive_path;
+- extern std::string archive_path2;
++ extern std::vector<std::string> archive_paths;
++ extern std::vector<std::string> archive_paths2;
+ extern demangle_type demangle;
+ extern bool symbols;
+ extern bool callgraph;
+Index: oprofile/libutil++/file_manip.cpp
+===================================================================
+--- oprofile.orig/libutil++/file_manip.cpp
++++ oprofile/libutil++/file_manip.cpp
+@@ -205,3 +205,14 @@ string op_basename(string const & path_n
+
+ return erase_to_last_of(result, '/');
+ }
++
++string op_findfile(const vector<string> & paths, string const & file)
++{
++ for (vector<string>::const_iterator it = paths.begin(); it!=paths.end(); ++it)
++ {
++ if (op_file_readable(*it + file))
++ return *it + file;
++ }
++ return "";
++}
++
+Index: oprofile/libutil++/file_manip.h
+===================================================================
+--- oprofile.orig/libutil++/file_manip.h
++++ oprofile/libutil++/file_manip.h
+@@ -12,6 +12,7 @@
+ #ifndef FILE_MANIP_H
+ #define FILE_MANIP_H
+
++#include <vector>
+ #include <string>
+ #include <list>
+
+@@ -86,4 +87,14 @@ std::string op_dirname(std::string const
+ */
+ std::string op_basename(std::string const & path_name);
+
++/**
++ *
++ * op_findfile - search a set of paths for file
++ * @param paths paths to search
++ * @param file filename to search for
++ *
++ * Returns the path to the first matching file or an empty string if not found.
++ */
++std::string op_findfile(const std::vector<std::string> & paths, std::string const & file);
++
+ #endif /* !FILE_MANIP_H */
+Index: oprofile/pp/common_option.cpp
+===================================================================
+--- oprofile.orig/pp/common_option.cpp
++++ oprofile/pp/common_option.cpp
+@@ -30,6 +30,7 @@ namespace options {
+ string session_dir = OP_SESSION_DIR_DEFAULT;
+ string command_options;
+ vector<string> image_path;
++ string root_path;
+ }
+
+ namespace {
+@@ -44,6 +45,8 @@ popt::option common_options_array[] = {
+ "specify session path to hold samples database and session data (" OP_SESSION_DIR_DEFAULT ")", "path"),
+ popt::option(options::image_path, "image-path", 'p',
+ "comma-separated path to search missing binaries", "path"),
++ popt::option(options::root_path, "root", 'R',
++ "path to filesystem to search for missing binaries", "path"),
+ };
+
+
+Index: oprofile/pp/common_option.h
+===================================================================
+--- oprofile.orig/pp/common_option.h
++++ oprofile/pp/common_option.h
+@@ -26,6 +26,7 @@ namespace options {
+ extern std::string threshold_opt;
+ extern std::string command_options;
+ extern std::vector<std::string> image_path;
++ extern std::string root_path;
+
+ struct spec {
+ std::list<std::string> common;
+Index: oprofile/pp/opreport.cpp
+===================================================================
+--- oprofile.orig/pp/opreport.cpp
++++ oprofile/pp/opreport.cpp
+@@ -403,7 +403,7 @@ void output_symbols(profile_container co
+
+ if (options::xml) {
+ xml_support = new xml_utils(xml_out, symbols, nr_classes,
+- &options::symbol_filter, options::archive_path);
++ &options::symbol_filter, options::archive_paths);
+ xml_out->output(cout);
+ } else {
+ text_out->output(cout, symbols);
+@@ -479,7 +479,7 @@ void output_cg_symbols(callgraph_contain
+
+ if (options::xml) {
+ xml_support = new xml_utils(xml_out, symbols, nr_classes,
+- &options::symbol_filter, options::archive_path);
++ &options::symbol_filter, options::archive_paths);
+ xml_out->output(cout);
+ } else {
+ text_out->output(cout, symbols);
+@@ -511,7 +511,7 @@ int opreport(options::spec const & spec)
+ }
+
+ list<inverted_profile> iprofiles
+- = invert_profiles(options::archive_path, classes,
++ = invert_profiles(options::archive_paths, classes,
+ options::extra_found_images);
+
+ report_image_errors(iprofiles);
+@@ -535,11 +535,11 @@ int opreport(options::spec const & spec)
+ list<inverted_profile>::iterator const end = iprofiles.end();
+
+ for (; it != end; ++it)
+- populate_for_image(options::archive_path, pc1,
++ populate_for_image(options::archive_paths, pc1,
+ *it, options::symbol_filter, 0);
+
+ list<inverted_profile> iprofiles2
+- = invert_profiles(options::archive_path2, classes2,
++ = invert_profiles(options::archive_paths2, classes2,
+ options::extra_found_images);
+
+ report_image_errors(iprofiles2);
+@@ -550,13 +550,13 @@ int opreport(options::spec const & spec)
+ list<inverted_profile>::iterator const end2 = iprofiles2.end();
+
+ for (; it2 != end2; ++it2)
+- populate_for_image(options::archive_path2, pc2,
++ populate_for_image(options::archive_paths2, pc2,
+ *it2, options::symbol_filter, 0);
+
+ output_diff_symbols(pc1, pc2, multiple_apps);
+ } else if (options::callgraph) {
+ callgraph_container cg_container;
+- cg_container.populate(options::archive_path, iprofiles,
++ cg_container.populate(options::archive_paths, iprofiles,
+ options::extra_found_images,
+ options::debug_info, options::threshold,
+ options::merge_by.lib, options::symbol_filter);
+@@ -569,7 +569,7 @@ int opreport(options::spec const & spec)
+ list<inverted_profile>::iterator const end = iprofiles.end();
+
+ for (; it != end; ++it)
+- populate_for_image(options::archive_path, samples,
++ populate_for_image(options::archive_paths, samples,
+ *it, options::symbol_filter, 0);
+
+ output_symbols(samples, multiple_apps);
+Index: oprofile/pp/opannotate.cpp
+===================================================================
+--- oprofile.orig/pp/opannotate.cpp
++++ oprofile/pp/opannotate.cpp
+@@ -690,7 +690,7 @@ int opannotate(options::spec const & spe
+ list<string> images;
+
+ list<inverted_profile> iprofiles
+- = invert_profiles(options::archive_path, classes,
++ = invert_profiles(options::archive_paths, classes,
+ options::extra_found_images);
+
+ report_image_errors(iprofiles);
+@@ -701,7 +701,7 @@ int opannotate(options::spec const & spe
+ bool debug_info = false;
+ for (; it != end; ++it) {
+ bool tmp = false;
+- populate_for_image(options::archive_path, *samples, *it,
++ populate_for_image(options::archive_paths, *samples, *it,
+ options::symbol_filter, &tmp);
+ images.push_back(it->image);
+ if (tmp)
+Index: oprofile/pp/opgprof.cpp
+===================================================================
+--- oprofile.orig/pp/opgprof.cpp
++++ oprofile/pp/opgprof.cpp
+@@ -282,7 +282,7 @@ int opgprof(options::spec const & spec)
+
+ bool ok = image_profile.error == image_ok;
+ // FIXME: symbol_filter would be allowed through option
+- op_bfd abfd(options::archive_path, image_profile.image,
++ op_bfd abfd(options::archive_paths, image_profile.image,
+ string_filter(), ok);
+ if (!ok && image_profile.error == image_ok)
+ image_profile.error = image_format_failure;
+Index: oprofile/doc/opannotate.1.in
+===================================================================
+--- oprofile.orig/doc/opannotate.1.in
++++ oprofile/doc/opannotate.1.in
+@@ -50,6 +50,10 @@ Comma-separated list of additional paths
+ This is needed to find modules in kernels 2.6 and upwards.
+ .br
+ .TP
++.BI "--root / -R [path]"
++A path to a filesystem to search for additional binaries.
++.br
++.TP
+ .BI "--include-file [files]"
+ Only include files in the given comma-separated list of glob patterns.
+ .br
+Index: oprofile/doc/oparchive.1.in
+===================================================================
+--- oprofile.orig/doc/oparchive.1.in
++++ oprofile/doc/oparchive.1.in
+@@ -42,6 +42,10 @@ Comma-separated list of additional paths
+ This is needed to find modules in kernels 2.6 and upwards.
+ .br
+ .TP
++.BI "--root / -R [path]"
++A path to a filesystem to search for additional binaries.
++.br
++.TP
+ .BI "--output-directory / -o [directory]"
+ Output to the given directory. There is no default. This must be specified.
+ .br
+Index: oprofile/doc/opgprof.1.in
+===================================================================
+--- oprofile.orig/doc/opgprof.1.in
++++ oprofile/doc/opgprof.1.in
+@@ -38,6 +38,10 @@ Comma-separated list of additional paths
+ This is needed to find modules in kernels 2.6 and upwards.
+ .br
+ .TP
++.BI "--root / -R [path]"
++A path to a filesystem to search for additional binaries.
++.br
++.TP
+ .BI "--threshold / -t [percentage]"
+ Only output data for symbols that have more than the given percentage
+ of total samples.
+Index: oprofile/doc/opreport.1.in
+===================================================================
+--- oprofile.orig/doc/opreport.1.in
++++ oprofile/doc/opreport.1.in
+@@ -61,6 +61,10 @@ Comma-separated list of additional paths
+ This is needed to find modules in kernels 2.6 and upwards.
+ .br
+ .TP
++.BI "--root / -R [path]"
++A path to a filesystem to search for additional binaries.
++.br
++.TP
+ .BI "--include-symbols / -i [symbols]"
+ Only include symbols in the given comma-separated list.
+ .br
diff --git a/recipes/oprofile/oprofile/xml_callgraph_details.patch b/recipes/oprofile/oprofile/xml_callgraph_details.patch
new file mode 100644
index 0000000000..e5ab3d916e
--- /dev/null
+++ b/recipes/oprofile/oprofile/xml_callgraph_details.patch
@@ -0,0 +1,232 @@
+Work in Progress- This patch breaks output_symbol_bytes
+---
+ ChangeLog | 9 +++++++++
+ libpp/callgraph_container.cpp | 10 ++++++++--
+ libpp/callgraph_container.h | 14 ++++++++++----
+ libpp/format_output.cpp | 30 +++++++++++++++++++++++++-----
+ libpp/format_output.h | 6 +++---
+ pp/opreport.cpp | 5 +++--
+ pp/opreport_options.cpp | 4 ++--
+ 7 files changed, 60 insertions(+), 18 deletions(-)
+
+Index: oprofile1/pp/opreport.cpp
+===================================================================
+--- oprofile1.orig/pp/opreport.cpp 2007-05-24 15:32:20.000000000 +0100
++++ oprofile1/pp/opreport.cpp 2007-05-24 20:07:14.000000000 +0100
+@@ -555,10 +555,11 @@ int opreport(options::spec const & spec)
+
+ output_diff_symbols(pc1, pc2, multiple_apps);
+ } else if (options::callgraph) {
+- callgraph_container cg_container;
++ callgraph_container cg_container(options::debug_info,
++ options::details);
+ cg_container.populate(options::archive_path, iprofiles,
+ options::extra_found_images,
+- options::debug_info, options::threshold,
++ options::threshold,
+ options::merge_by.lib, options::symbol_filter);
+
+ output_cg_symbols(cg_container, multiple_apps);
+Index: oprofile1/ChangeLog
+===================================================================
+--- oprofile1.orig/ChangeLog 2007-05-24 18:30:47.000000000 +0100
++++ oprofile1/ChangeLog 2007-05-24 20:07:14.000000000 +0100
+@@ -1,5 +1,14 @@
+ 2007-05-24 Richard Purdie <rpurdie@openedhand.com>
+
++ * libpp/callgraph_container.cpp:
++ * libpp/callgraph_container.h:
++ * libpp/format_output.cpp:
++ * libpp/format_output.h:
++ * pp/opreport.cpp:
++ * pp/opreport_options.cpp: Add callgraph XML detail support
++
++2007-05-24 Richard Purdie <rpurdie@openedhand.com>
++
+ * events/arm/xscale1/events:
+ * events/arm/xscale2/events: Add extra Xscale PMU event definitions
+
+Index: oprofile1/libpp/callgraph_container.cpp
+===================================================================
+--- oprofile1.orig/libpp/callgraph_container.cpp 2007-05-24 15:32:20.000000000 +0100
++++ oprofile1/libpp/callgraph_container.cpp 2007-05-24 20:07:14.000000000 +0100
+@@ -391,15 +391,21 @@ const symbol_collection & arc_recorder::
+ return cg_syms;
+ }
+
++callgraph_container::callgraph_container(bool debug_info, bool need_details)
++ :
++ pc(debug_info, need_details),
++ debug_info(debug_info)
++{
++}
++
+
+ void callgraph_container::populate(string const & archive_path,
+ list<inverted_profile> const & iprofiles,
+- extra_images const & extra, bool debug_info, double threshold,
++ extra_images const & extra, double threshold,
+ bool merge_lib, string_filter const & sym_filter)
+ {
+ // non callgraph samples container, we record sample at symbol level
+ // not at vma level.
+- profile_container pc(debug_info, false);
+
+ list<inverted_profile>::const_iterator it;
+ list<inverted_profile>::const_iterator const end = iprofiles.end();
+Index: oprofile1/libpp/callgraph_container.h
+===================================================================
+--- oprofile1.orig/libpp/callgraph_container.h 2007-05-24 15:32:20.000000000 +0100
++++ oprofile1/libpp/callgraph_container.h 2007-05-24 20:07:14.000000000 +0100
+@@ -19,8 +19,8 @@
+ #include "symbol.h"
+ #include "symbol_functors.h"
+ #include "string_filter.h"
++#include "profile_container.h"
+
+-class profile_container;
+ class inverted_profile;
+ class profile_t;
+ class extra_images;
+@@ -103,6 +103,8 @@ private:
+ */
+ class callgraph_container {
+ public:
++ callgraph_container(bool debug_info, bool need_details);
++
+ /**
+ * Populate the container, must be called once only.
+ * @param archive_path oparchive prefix path
+@@ -118,9 +120,8 @@ public:
+ */
+ void populate(std::string const & archive_path,
+ std::list<inverted_profile> const & iprofiles,
+- extra_images const & extra, bool debug_info,
+- double threshold, bool merge_lib,
+- string_filter const & sym_filter);
++ extra_images const & extra, double threshold,
++ bool merge_lib, string_filter const & sym_filter);
+
+ /// return hint on how data must be displayed.
+ column_flags output_hint() const;
+@@ -131,6 +132,9 @@ public:
+ // return all the cg symbols
+ const symbol_collection & get_symbols() const;
+
++ // profile container callgraph is based on
++ profile_container pc;
++
+ private:
+ /**
+ * Record caller/callee for one cg file
+@@ -162,6 +166,8 @@ private:
+ profile_container const & pc, bool debug_info,
+ bool merge_lib);
+
++ bool debug_info;
++
+ /// record all main symbols
+ void add_symbols(profile_container const & pc);
+
+Index: oprofile1/pp/opreport_options.cpp
+===================================================================
+--- oprofile1.orig/pp/opreport_options.cpp 2007-05-24 15:32:20.000000000 +0100
++++ oprofile1/pp/opreport_options.cpp 2007-05-24 20:07:14.000000000 +0100
+@@ -165,8 +165,8 @@ void check_options(bool diff)
+
+ if (callgraph) {
+ symbols = true;
+- if (details) {
+- cerr << "--callgraph is incompatible with --details" << endl;
++ if (details && !xml) {
++ cerr << "--callgraph is incompatible with --details without --xml" << endl;
+ do_exit = true;
+ }
+
+Index: oprofile1/libpp/format_output.cpp
+===================================================================
+--- oprofile1.orig/libpp/format_output.cpp 2007-05-24 15:32:20.000000000 +0100
++++ oprofile1/libpp/format_output.cpp 2007-05-24 20:07:14.000000000 +0100
+@@ -594,9 +594,9 @@ xml_formatter::
+ xml_formatter(profile_container const * p,
+ symbol_collection & s)
+ :
++ need_details(false),
+ profile(p),
+- symbols(s),
+- need_details(false)
++ symbols(s)
+ {
+ if (profile)
+ counts.total = profile->samples_count();
+@@ -673,8 +673,8 @@ void xml_formatter::output_symbol_data(o
+ if (name.size() > 0 && name[0] != '?') {
+ output_attribute(out, datum, ff_vma, STARTING_ADDR);
+
+- if (need_details)
+- xml_support->output_symbol_bytes(bytes_out, symb, sd_it->second);
++ //if (need_details)
++ // xml_support->output_symbol_bytes(bytes_out, symb, sd_it->second);
+ }
+ out << close_element();
+
+@@ -843,7 +843,7 @@ output_attribute(ostream & out, field_da
+ xml_cg_formatter::
+ xml_cg_formatter(callgraph_container const * cg, symbol_collection & s)
+ :
+- xml_formatter(0, s),
++ xml_formatter(&cg->pc, s),
+ callgraph(cg)
+ {
+ counts.total = callgraph->samples_count();
+@@ -946,6 +946,26 @@ output_symbol(ostream & out,
+
+ out << init_attr(ID_REF, indx);
+
++ if (need_details) {
++ ostringstream details;
++ symbol_details_t & sd = symbol_details[indx];
++ size_t const detail_lo = sd.index;
++
++ string detail_str = output_symbol_details(symb, sd.index, lo, hi);
++
++ if (detail_str.size() > 0) {
++ if (sd.id < 0)
++ sd.id = indx;
++ details << detail_str;
++ }
++
++ if (sd.index > detail_lo) {
++ sd.details = sd.details + details.str();
++ out << init_attr(DETAIL_LO, detail_lo);
++ out << init_attr(DETAIL_HI, sd.index-1);
++ }
++ }
++
+ out << close_element(NONE, true);
+
+ out << open_element(CALLERS);
+Index: oprofile1/libpp/format_output.h
+===================================================================
+--- oprofile1.orig/libpp/format_output.h 2007-05-24 15:32:20.000000000 +0100
++++ oprofile1/libpp/format_output.h 2007-05-24 20:07:14.000000000 +0100
+@@ -249,6 +249,9 @@ public:
+ // output SymbolData XML elements
+ void output_symbol_data(std::ostream & out);
+
++ /// true if we need to show details for each symbols
++ bool need_details;
++
+ private:
+ /// container we work from
+ profile_container const * profile;
+@@ -256,9 +259,6 @@ private:
+ // ordered collection of symbols associated with this profile
+ symbol_collection & symbols;
+
+- /// true if we need to show details for each symbols
+- bool need_details;
+-
+ // count of DetailData items output so far
+ size_t detail_count;
+
diff --git a/recipes/oprofile/oprofile_0.9.2.bb b/recipes/oprofile/oprofile_0.9.2.bb
new file mode 100644
index 0000000000..c109e8c9de
--- /dev/null
+++ b/recipes/oprofile/oprofile_0.9.2.bb
@@ -0,0 +1,8 @@
+require oprofile.inc
+
+PR = "r3"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/oprofile/oprofile-${PV}.tar.gz \
+ file://no_arm_mapping_syms.patch;patch=1 \
+ file://opcontrol_bashisms.patch;patch=1 \
+ file://acinclude.m4"
diff --git a/recipes/oprofile/oprofile_0.9.3.bb b/recipes/oprofile/oprofile_0.9.3.bb
new file mode 100644
index 0000000000..bdb8d89b42
--- /dev/null
+++ b/recipes/oprofile/oprofile_0.9.3.bb
@@ -0,0 +1,15 @@
+require oprofile.inc
+
+RDEPENDS += "binutils-symlinks"
+RRECOMMENDS += "kernel-vmlinux"
+PR = "r11"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/oprofile/oprofile-${PV}.tar.gz \
+ file://armv6_fix.patch;patch=1 \
+ file://oparchive_fix.patch;patch=1 \
+ file://root_option.patch;patch=1 \
+ file://opstart.patch;patch=1 \
+ file://fix-arith.patch;patch=1;pnum=0 \
+ file://gcc43x-fix.patch;patch=1 \
+ file://armv7a.diff;patch=1 \
+ file://acinclude.m4"
diff --git a/recipes/oprofile/oprofile_0.9.4.bb b/recipes/oprofile/oprofile_0.9.4.bb
new file mode 100644
index 0000000000..a6475ea6f3
--- /dev/null
+++ b/recipes/oprofile/oprofile_0.9.4.bb
@@ -0,0 +1,25 @@
+require oprofile.inc
+
+RDEPENDS += "binutils-symlinks"
+RRECOMMENDS += "kernel-vmlinux"
+PR = "r3"
+
+SRC_URI = "\
+ ${SOURCEFORGE_MIRROR}/oprofile/oprofile-${PV}.tar.gz \
+ file://opjitconv-execvp-fix.diff;patch=1 \
+ file://0.9.4-armv7a.diff;patch=1 \
+ file://acinclude.m4 \
+ "
+
+do_stage () {
+ # As of 0.9.4 there is a libopagent library to compile and link against.
+ autotools_stage_all
+}
+
+PACKAGES = "${PN}-dev ${PN}-doc ${PN}-dbg ${PN}"
+
+FILES_${PN}-dev += "\
+ ${libdir}/oprofile/lib*.so \
+ ${libdir}/oprofile/lib*.a \
+ ${libdir}/oprofile/lib*.la \
+"
diff --git a/recipes/oprofile/oprofile_cvs.bb b/recipes/oprofile/oprofile_cvs.bb
new file mode 100644
index 0000000000..88a6ddecbd
--- /dev/null
+++ b/recipes/oprofile/oprofile_cvs.bb
@@ -0,0 +1,14 @@
+require oprofile.inc
+
+PV = "0.9.4+cvs${SRCDATE}"
+PR = "r3"
+
+RDEPENDS += "binutils-symlinks"
+
+DEFAULT_PREFERENCE = "-1"
+
+SRC_URI = "cvs://anonymous@oprofile.cvs.sourceforge.net/cvsroot/oprofile;module=oprofile \
+ file://opstart.patch;patch=1 \
+ file://acinclude.m4"
+
+S = "${WORKDIR}/oprofile"
diff --git a/recipes/oprofile/oprofileui-svn.inc b/recipes/oprofile/oprofileui-svn.inc
new file mode 100644
index 0000000000..6d111d1d59
--- /dev/null
+++ b/recipes/oprofile/oprofileui-svn.inc
@@ -0,0 +1,8 @@
+require oprofileui.inc
+
+PV = "0.0+svnr${SRCREV}"
+PR = "r1"
+
+S = "${WORKDIR}/trunk"
+
+SRC_URI = "svn://svn.o-hand.com/repos/oprofileui;module=trunk;proto=http"
diff --git a/recipes/oprofile/oprofileui.inc b/recipes/oprofile/oprofileui.inc
new file mode 100644
index 0000000000..93f4631d14
--- /dev/null
+++ b/recipes/oprofile/oprofileui.inc
@@ -0,0 +1,16 @@
+DESCRIPTION = "User interface for the OProfile tool"
+SECTION = "x11"
+LICENSE = "GPLv2"
+DEPENDS = "glib-2.0 gtk+ libglade gnome-vfs libxml2 avahi gconf"
+
+inherit autotools pkgconfig gtk-icon-cache
+
+PACKAGES =+ "oprofileui-server oprofileui-viewer"
+
+EXTRA_OECONF = "--with-avahi"
+
+FILES_oprofileui-viewer = "${bindir}/oparchconv ${bindir}/oprofile-viewer ${datadir}/applications/ ${datadir}/oprofileui/"
+RDEPENDS_oprofile-viewer = "oprofile"
+
+FILES_oprofileui-server = "${bindir}/oprofile-server"
+RDEPENDS_oprofile-server = "oprofile"
diff --git a/recipes/oprofile/oprofileui_svn.bb b/recipes/oprofile/oprofileui_svn.bb
new file mode 100644
index 0000000000..39e10b4fd2
--- /dev/null
+++ b/recipes/oprofile/oprofileui_svn.bb
@@ -0,0 +1,2 @@
+require oprofileui-svn.inc
+