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.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 b981871e6e..0000000000
--- 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 5c55f4b349..0000000000
--- 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 b894908144..0000000000
--- 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 bc75b9ac39..0000000000
--- 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 dbdd5eb4ea..0000000000
--- 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 bcb05f6c16..0000000000
--- 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 & ar