summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2008-07-18 15:40:02 +0000
committerRichard Purdie <richard@openedhand.com>2008-07-18 15:40:02 +0000
commitb45b2c21fcafbdefa2f53b25b7c6cfe2cfbb4260 (patch)
treee7f37896a9511db01ec6aa93f462b0bbc13338f2
parente8bda8575637b967afaa0321fc3aeb69e809087a (diff)
downloadopenembedded-core-b45b2c21fcafbdefa2f53b25b7c6cfe2cfbb4260.tar.gz
openembedded-core-b45b2c21fcafbdefa2f53b25b7c6cfe2cfbb4260.tar.bz2
openembedded-core-b45b2c21fcafbdefa2f53b25b7c6cfe2cfbb4260.tar.xz
openembedded-core-b45b2c21fcafbdefa2f53b25b7c6cfe2cfbb4260.zip
oprofile: Update to 0.9.4 making it the default and remove merged patches from cvs version
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4877 311d38ba-8fff-0310-9ca6-ca027cbcb966
-rw-r--r--meta/packages/oprofile/oprofile/armv6_fix.patch54
-rw-r--r--meta/packages/oprofile/oprofile/fix-arith.patch52
-rw-r--r--meta/packages/oprofile/oprofile/fix_debug_search.patch222
-rw-r--r--meta/packages/oprofile/oprofile/op-cross-compile.patch136
-rw-r--r--meta/packages/oprofile/oprofile/oparchive_fix.patch22
-rw-r--r--meta/packages/oprofile/oprofile/root_option.patch1051
-rw-r--r--meta/packages/oprofile/oprofile_0.9.4.bb (renamed from meta/packages/oprofile/oprofile_0.9.3.bb)12
-rw-r--r--meta/packages/oprofile/oprofile_cvs.bb8
8 files changed, 6 insertions, 1551 deletions
diff --git a/meta/packages/oprofile/oprofile/armv6_fix.patch b/meta/packages/oprofile/oprofile/armv6_fix.patch
deleted file mode 100644
index b981871e6..000000000
--- a/meta/packages/oprofile/oprofile/armv6_fix.patch
+++ /dev/null
@@ -1,54 +0,0 @@
----
- 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/meta/packages/oprofile/oprofile/fix-arith.patch b/meta/packages/oprofile/oprofile/fix-arith.patch
deleted file mode 100644
index 5c55f4b34..000000000
--- a/meta/packages/oprofile/oprofile/fix-arith.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-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/meta/packages/oprofile/oprofile/fix_debug_search.patch b/meta/packages/oprofile/oprofile/fix_debug_search.patch
deleted file mode 100644
index b89490814..000000000
--- a/meta/packages/oprofile/oprofile/fix_debug_search.patch
+++ /dev/null
@@ -1,222 +0,0 @@
-Index: libutil++/bfd_support.cpp
-===================================================================
-RCS file: /cvsroot/oprofile/oprofile/libutil++/bfd_support.cpp,v
-retrieving revision 1.9
-diff -u -r1.9 bfd_support.cpp
---- libutil++/bfd_support.cpp 29 Apr 2008 12:07:46 -0000 1.9
-+++ libutil++/bfd_support.cpp 2 Jul 2008 20:55:09 -0000
-@@ -12,8 +12,11 @@
-
- #include "op_bfd.h"
- #include "op_fileio.h"
-+#include "op_config.h"
- #include "string_manip.h"
-+#include "file_manip.h"
- #include "cverb.h"
-+#include "locate_images.h"
-
- #include <cstdlib>
- #include <cstring>
-@@ -42,13 +45,22 @@
- }
-
-
--bool separate_debug_file_exists(string const & name, unsigned long const crc)
-+bool separate_debug_file_exists(string & name, unsigned long const crc,
-+ extra_images const & extra)
- {
- unsigned long file_crc = 0;
- // The size of 2 * 1024 elements for the buffer is arbitrary.
- char buffer[2 * 1024];
--
-- ifstream file(name.c_str());
-+
-+ image_error img_ok;
-+ string const image_path = extra.find_image_path(name, img_ok, true);
-+
-+ if (img_ok != image_ok)
-+ return false;
-+
-+ name = image_path;
-+
-+ ifstream file(image_path.c_str());
- if (!file)
- return false;
-
-@@ -281,40 +293,35 @@
- }
-
-
--bool find_separate_debug_file(bfd * ibfd, string const & dir_in,
-- string const & global_in, string & filename)
-+bool find_separate_debug_file(bfd * ibfd, string const & filepath_in,
-+ string & debug_filename, extra_images const & extra)
- {
-- string dir(dir_in);
-- string global(global_in);
-+ string filepath(filepath_in);
- string basename;
- unsigned long crc32;
-
- if (!get_debug_link_info(ibfd, basename, crc32))
- return false;
--
-- if (dir.size() > 0 && dir.at(dir.size() - 1) != '/')
-- dir += '/';
--
-- if (global.size() > 0 && global.at(global.size() - 1) != '/')
-- global += '/';
-+
-+ // Work out the image file's directory prefix
-+ string filedir = op_dirname(filepath);
-+ // Make sure it starts with /
-+ if (filedir.size() > 0 && filedir.at(filedir.size() - 1) != '/')
-+ filedir += '/';
-+
-+ string first_try(filedir + ".debug/" + basename);
-+ string second_try(DEBUGDIR + filedir + basename);
-+ string third_try(filedir + basename);
-
- cverb << vbfd << "looking for debugging file " << basename
- << " with crc32 = " << hex << crc32 << endl;
--
-- string first_try(dir + basename);
-- string second_try(dir + ".debug/" + basename);
--
-- if (dir.size() > 0 && dir[0] == '/')
-- dir = dir.substr(1);
-
-- string third_try(global + dir + basename);
--
-- if (separate_debug_file_exists(first_try, crc32))
-- filename = first_try;
-- else if (separate_debug_file_exists(second_try, crc32))
-- filename = second_try;
-- else if (separate_debug_file_exists(third_try, crc32))
-- filename = third_try;
-+ if (separate_debug_file_exists(first_try, crc32, extra))
-+ debug_filename = first_try;
-+ else if (separate_debug_file_exists(second_try, crc32, extra))
-+ debug_filename = second_try;
-+ else if (separate_debug_file_exists(third_try, crc32, extra))
-+ debug_filename = third_try;
- else
- return false;
-
-Index: libutil++/bfd_support.h
-===================================================================
-RCS file: /cvsroot/oprofile/oprofile/libutil++/bfd_support.h,v
-retrieving revision 1.5
-diff -u -r1.5 bfd_support.h
---- libutil++/bfd_support.h 28 Apr 2008 21:23:25 -0000 1.5
-+++ libutil++/bfd_support.h 2 Jul 2008 20:55:09 -0000
-@@ -13,6 +13,7 @@
-
- #include "utility.h"
- #include "op_types.h"
-+#include "locate_images.h"
-
- #include <bfd.h>
- #include <stdint.h>
-@@ -84,9 +85,9 @@
- */
- extern bool
- find_separate_debug_file(bfd * ibfd,
-- std::string const & dir_in,
-- std::string const & global_in,
-- std::string & filename);
-+ std::string const & filepath_in,
-+ std::string & debug_filename,
-+ extra_images const & extra);
-
- /// open the given BFD
- bfd * open_bfd(std::string const & file);
-Index: libutil++/op_bfd.cpp
-===================================================================
-RCS file: /cvsroot/oprofile/oprofile/libutil++/op_bfd.cpp,v
-retrieving revision 1.83
-diff -u -r1.83 op_bfd.cpp
---- libutil++/op_bfd.cpp 19 May 2008 23:15:04 -0000 1.83
-+++ libutil++/op_bfd.cpp 2 Jul 2008 20:55:09 -0000
-@@ -97,6 +97,7 @@
- :
- filename(fname),
- archive_path(extra_images.get_archive_path()),
-+ extra_found_images(extra_images),
- file_size(-1),
- anon_obj(false)
- {
-@@ -341,11 +342,8 @@
- 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 dirname(image_path.substr(0, image_path.rfind('/')));
-
-- if (find_separate_debug_file(ibfd.abfd, dirname, global, debug_filename)) {
-+ if (find_separate_debug_file(ibfd.abfd, filename, debug_filename, extra_found_images)) {
- cverb << vbfd << "now loading: " << debug_filename << endl;
- dbfd.abfd = open_bfd(debug_filename);
- if (dbfd.has_debug_info())
-Index: libutil++/op_bfd.h
-===================================================================
-RCS file: /cvsroot/oprofile/oprofile/libutil++/op_bfd.h,v
-retrieving revision 1.51
-diff -u -r1.51 op_bfd.h
---- libutil++/op_bfd.h 19 May 2008 23:15:04 -0000 1.51
-+++ libutil++/op_bfd.h 2 Jul 2008 20:55:09 -0000
-@@ -21,6 +21,7 @@
- #include <set>
-
- #include "bfd_support.h"
-+#include "locate_images.h"
- #include "utility.h"
- #include "cached_value.h"
- #include "op_types.h"
-@@ -261,6 +262,9 @@
- /// path to archive
- std::string archive_path;
-
-+ /// reference to extra_images
-+ extra_images const & extra_found_images;
-+
- /// file size in bytes
- off_t file_size;
-
-Index: libutil++/op_spu_bfd.cpp
-===================================================================
-RCS file: /cvsroot/oprofile/oprofile/libutil++/op_spu_bfd.cpp,v
-retrieving revision 1.6
-diff -u -r1.6 op_spu_bfd.cpp
---- libutil++/op_spu_bfd.cpp 29 Apr 2008 12:07:46 -0000 1.6
-+++ libutil++/op_spu_bfd.cpp 2 Jul 2008 20:55:09 -0000
-@@ -43,6 +43,7 @@
- extra_images const & extra_images, bool & ok)
- :
- archive_path(extra_images.get_archive_path()),
-+ extra_found_images(extra_images),
- file_size(-1),
- embedding_filename(fname)
- {
-Index: pp/oparchive.cpp
-===================================================================
-RCS file: /cvsroot/oprofile/oprofile/pp/oparchive.cpp,v
-retrieving revision 1.17
-diff -u -r1.17 oparchive.cpp
---- pp/oparchive.cpp 29 Apr 2008 12:07:46 -0000 1.17
-+++ pp/oparchive.cpp 2 Jul 2008 20:55:09 -0000
-@@ -116,11 +116,10 @@
- */
- bfd * ibfd = open_bfd(real_exe_name);
- if (ibfd) {
-- string global(archive_path + DEBUGDIR);
- string dirname = op_dirname(real_exe_name);
- string debug_filename;
-- if (find_separate_debug_file(ibfd, dirname, global,
-- debug_filename)) {
-+ if (find_separate_debug_file(ibfd, real_exe_name,
-+ debug_filename, classes.extra_found_images)) {
- /* found something copy it over */
- string dest_debug_dir = options::outdirectory +
- dirname + "/.debug/";
diff --git a/meta/packages/oprofile/oprofile/op-cross-compile.patch b/meta/packages/oprofile/oprofile/op-cross-compile.patch
deleted file mode 100644
index bc75b9ac3..000000000
--- a/meta/packages/oprofile/oprofile/op-cross-compile.patch
+++ /dev/null
@@ -1,136 +0,0 @@
-Index: libopagent/Makefile.am
-===================================================================
-RCS file: /cvsroot/oprofile/oprofile/libopagent/Makefile.am,v
-retrieving revision 1.2
-diff -p -a -u -r1.2 Makefile.am
---- libopagent/Makefile.am 28 Apr 2008 21:23:25 -0000 1.2
-+++ libopagent/Makefile.am 1 Jul 2008 21:56:02 -0000
-@@ -9,9 +9,9 @@ libopagent_la_SOURCES = opagent.c \
-
- EXTRA_DIST = opagent_symbols.ver
-
--nodist_libopagent_la_SOURCES = bfdheader.h
-
- libopagent_la_CFLAGS = -fPIC -I ${top_srcdir}/libop -I ${top_srcdir}/libutil
-+libopagent_la_LIBADD = $(BFD_LIBS)
-
- # Do not increment the major version for this library except to
- # intentionally break backward ABI compatability. Use the
-@@ -23,21 +23,3 @@ libopagent_la_LDFLAGS = -version-info 1
- -Wl,--version-script=${top_srcdir}/libopagent/opagent_symbols.ver
-
-
--# the bfdheader.h is generated by bfddefines at compile time
--# to extract the machine and architecture ids we need
--# to write out a bfd file for this arch.
--# automake does not support modelling such dependency, but
--# has the variable BUILT_SOURCE for all sources that need to
--# be made before the actual compile
--# see automake info page section 8.4.1
--BUILT_SOURCES = bfdheader.h
--
--CLEANFILES = bfdheader.h
--
--noinst_PROGRAMS = bfddefines
--
--bfddefines_LDADD = $(BFD_LIBS)
--
--bfdheader.h: bfddefines
-- ./bfddefines bfddefines > $@
--
-Index: libopagent/opagent.c
-===================================================================
-RCS file: /cvsroot/oprofile/oprofile/libopagent/opagent.c,v
-retrieving revision 1.2
-diff -p -a -u -r1.2 opagent.c
---- libopagent/opagent.c 28 Apr 2008 21:23:25 -0000 1.2
-+++ libopagent/opagent.c 1 Jul 2008 21:56:02 -0000
-@@ -60,12 +60,57 @@
- #include <fcntl.h>
- #include <unistd.h>
- #include <time.h>
-+#include <bfd.h>
-
- #include "opagent.h"
--#include "bfdheader.h"
- #include "op_config.h"
- #include "jitdump.h"
-
-+// Declare BFD-related global variables.
-+static char * _bfd_target_name;
-+static int _bfd_arch;
-+static unsigned int _bfd_mach;
-+
-+// Define BFD-related global variables.
-+static int define_bfd_vars(void)
-+{
-+ bfd * bfd;
-+ bfd_boolean r;
-+ int len;
-+#define MAX_PATHLENGTH 2048
-+ char mypath[MAX_PATHLENGTH];
-+
-+ len = readlink("/proc/self/exe", mypath, sizeof(mypath));
-+
-+ if (len < 0) {
-+ fprintf(stderr, "libopagent: readlink /proc/self/exe failed\n");
-+ return -1;
-+ }
-+ if (len >= MAX_PATHLENGTH) {
-+ fprintf(stderr, "libopagent: readlink /proc/self/exe returned"
-+ " path length longer than %d.\n", MAX_PATHLENGTH);
-+
-+ return -1;
-+ }
-+ mypath[len] = '\0';
-+
-+ bfd_init();
-+ bfd = bfd_openr(mypath, NULL);
-+ if (bfd == NULL) {
-+ bfd_perror("bfd_openr error. Cannot get required BFD info");
-+ return -1;
-+ }
-+ r = bfd_check_format(bfd, bfd_object);
-+ if (!r) {
-+ bfd_perror("bfd_get_arch error. Cannot get required BFD info");
-+ return -1;
-+ }
-+ _bfd_target_name = bfd->xvec->name;
-+ _bfd_arch = bfd_get_arch(bfd);
-+ _bfd_mach = bfd_get_mach(bfd);
-+
-+ return 0;
-+}
- /**
- * Define the version of the opagent library.
- */
-@@ -112,15 +157,16 @@ op_agent_t op_open_agent(void)
- fprintf(stderr, "%s\n", err_msg);
- return NULL;
- }
--
-+ if (define_bfd_vars())
-+ return NULL;
- header.magic = JITHEADER_MAGIC;
- header.version = JITHEADER_VERSION;
-- header.totalsize = sizeof(header) + strlen(BFD_TARGET_NAME) + 1;
-+ header.totalsize = sizeof(header) + strlen(_bfd_target_name) + 1;
- /* calculate amount of padding '\0' */
- pad_cnt = PADDING_8ALIGNED(header.totalsize);
- header.totalsize += pad_cnt;
-- header.bfd_arch = BFD_ARCH;
-- header.bfd_mach = BFD_MACH;
-+ header.bfd_arch = _bfd_arch;
-+ header.bfd_mach = _bfd_mach;
- if (gettimeofday(&tv, NULL)) {
- fprintf(stderr, "gettimeofday failed\n");
- return NULL;
-@@ -132,7 +178,7 @@ op_agent_t op_open_agent(void)
- fprintf(stderr, "%s\n", err_msg);
- return NULL;
- }
-- if (!fwrite(BFD_TARGET_NAME, strlen(BFD_TARGET_NAME) + 1, 1,
-+ if (!fwrite(_bfd_target_name, strlen(_bfd_target_name) + 1, 1,
- dumpfile)) {
- fprintf(stderr, "%s\n", err_msg);
- return NULL;
diff --git a/meta/packages/oprofile/oprofile/oparchive_fix.patch b/meta/packages/oprofile/oprofile/oparchive_fix.patch
deleted file mode 100644
index dbdd5eb4e..000000000
--- a/meta/packages/oprofile/oprofile/oparchive_fix.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-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/meta/packages/oprofile/oprofile/root_option.patch b/meta/packages/oprofile/oprofile/root_option.patch
deleted file mode 100644
index bcb05f6c1..000000000
--- a/meta/packages/oprofile/oprofile/root_option.patch
+++ /dev/null
@@ -1,1051 +0,0 @@
-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/meta/packages/oprofile/oprofile_0.9.3.bb b/meta/packages/oprofile/oprofile_0.9.4.bb
index 33386e1ab..38f27c78d 100644
--- a/meta/packages/oprofile/oprofile_0.9.3.bb
+++ b/meta/packages/oprofile/oprofile_0.9.4.bb
@@ -5,24 +5,16 @@ LICENSE = "GPL"
DEPENDS = "popt binutils"
RDEPENDS = "binutils-symlinks"
RRECOMMENDS = "kernel-vmlinux"
-PR = "r5"
+PR = "r0"
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://acinclude.m4"
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"
+EXTRA_OECONF = "--with-kernel-support --without-x"
do_configure () {
cp ${WORKDIR}/acinclude.m4 ${S}/
diff --git a/meta/packages/oprofile/oprofile_cvs.bb b/meta/packages/oprofile/oprofile_cvs.bb
index e848bacf4..dd8dd5886 100644
--- a/meta/packages/oprofile/oprofile_cvs.bb
+++ b/meta/packages/oprofile/oprofile_cvs.bb
@@ -1,5 +1,5 @@
-PV = "0.9.3+cvs${SRCDATE}"
-PR = "r4"
+PV = "0.9.4+cvs${SRCDATE}"
+PR = "r0"
SECTION = "devel"
DESCRIPTION = "OProfile is a system-wide profiler for Linux systems, capable \
of profiling all running code at low overhead."
@@ -8,10 +8,10 @@ DEPENDS = "popt binutils"
RDEPENDS = "binutils-symlinks"
RRECOMMENDS = "kernel-vmlinux"
+DEFAULT_PREFERENCE = "-1"
+
SRC_URI = "cvs://anonymous@oprofile.cvs.sourceforge.net/cvsroot/oprofile;module=oprofile \
file://opstart.patch;patch=1 \
- file://fix_debug_search.patch;patch=1;pnum=0 \
- file://op-cross-compile.patch;patch=1;pnum=0 \
file://acinclude.m4"
S = "${WORKDIR}/oprofile"