summaryrefslogtreecommitdiff
path: root/packages/oprofile
diff options
context:
space:
mode:
authorOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2008-06-30 22:07:04 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2008-06-30 22:07:04 +0000
commitd4f7af436d07c7bc4dd61ac45bff3414a1c12c74 (patch)
tree049f5903fea26153466932a6b271c49f10b75ba8 /packages/oprofile
parent873ce28c40814edb45f534003450318c6e9b2650 (diff)
parent7339a83b4095582728045cee92aa215373607caf (diff)
merge of '08199c52a592fe71e2675200cf618a439d710884'
and '3e5f187370604cf4577025ebc49d90ca52a72d4d'
Diffstat (limited to 'packages/oprofile')
-rw-r--r--packages/oprofile/oprofile/armv6_fix.patch54
-rw-r--r--packages/oprofile/oprofile/fix-arith.patch52
-rw-r--r--packages/oprofile/oprofile/oparchive_fix.patch22
-rw-r--r--packages/oprofile/oprofile/opstart.patch235
-rw-r--r--packages/oprofile/oprofile/root_option.patch1051
-rw-r--r--packages/oprofile/oprofile/xml_callgraph_details.patch232
-rw-r--r--packages/oprofile/oprofile_0.9.3.bb22
-rw-r--r--packages/oprofile/oprofile_cvs.bb8
-rw-r--r--packages/oprofile/oprofileui-svn.inc8
-rw-r--r--packages/oprofile/oprofileui.inc16
-rw-r--r--packages/oprofile/oprofileui_svn.bb2
11 files changed, 1688 insertions, 14 deletions
diff --git a/packages/oprofile/oprofile/armv6_fix.patch b/packages/oprofile/oprofile/armv6_fix.patch
new file mode 100644
index 0000000000..b981871e6e
--- /dev/null
+++ b/packages/oprofile/oprofile/armv6_fix.patch
@@ -0,0 +1,54 @@
+---
+ events/arm/armv6/events | 43 +++++++++++++++++++++----------------------
+ 1 file changed, 21 insertions(+), 22 deletions(-)
+
+Index: oprofile-0.9.3/events/arm/armv6/events
+===================================================================
+--- oprofile-0.9.3.orig/events/arm/armv6/events 2007-07-16 19:22:17.000000000 +0100
++++ oprofile-0.9.3/events/arm/armv6/events 2007-09-28 11:13:32.000000000 +0100
+@@ -1,24 +1,23 @@
+ # ARM V6 events
+ #
+-event:0x00 counters:1,2 um:zero minimum:500 name:IFU_IFETCH_MISS : number of instruction fetch misses
+-event:0x01 counters:1,2 um:zero minimum:500 name:CYCLES_IFU_MEM_STALL : cycles instruction fetch pipe is stalled
+-event:0x02 counters:1,2 um:zero minimum:500 name:CYCLES_DATA_STALL : cycles stall occurs for due to data dependency
+-event:0x03 counters:1,2 um:zero minimum:500 name:ITLB_MISS : number of Instruction MicroTLB misses
+-event:0x04 counters:1,2 um:zero minimum:500 name:DTLB_MISS : number of Data MicroTLB misses
+-event:0x05 counters:1,2 um:zero minimum:500 name:BR_INST_EXECUTED : branch instruction executed w/ or w/o program flow change
+-event:0x06 counters:1,2 um:zero minimum:500 name:BR_INST_MISS_PRED : branch mispredicted
+-event:0x07 counters:1,2 um:zero minimum:500 name:INSN_EXECUTED : instructions executed
+-event:0x09 counters:1,2 um:zero minimum:500 name:DCACHE_ACCESS : data cache access, cacheable locations
+-event:0x0a counters:1,2 um:zero minimum:500 name:DCACHE_ACCESS_ALL : data cache access, all locations
+-event:0x0b counters:1,2 um:zero minimum:500 name:DCACHE_MISS : data cache miss
+-event:0x0c counters:1,2 um:zero minimum:500 name:DCACHE_WB : data cache writeback, 1 event for every half cacheline
+-event:0x0d counters:1,2 um:zero minimum:500 name:PC_CHANGE : number of times the program counter was changed without a mode switch
+-event:0x0f counters:1,2 um:zero minimum:500 name:TLB_MISS : Main TLB miss
+-event:0x10 counters:1,2 um:zero minimum:500 name:EXP_EXTERNAL : Explict external data access
+-event:0x11 counters:1,2 um:zero minimum:500 name:LSU_STALL : cycles stalled because Load Store request queque is full
+-event:0x12 counters:1,2 um:zero minimum:500 name:WRITE_DRAIN : Times write buffer was drained
+-event:0x20 counters:1,2 um:zero minimum:500 name:ETMEXTOUT0 : nuber of cycles ETMEXTOUT[0] signal was asserted
+-event:0x21 counters:1,2 um:zero minimum:500 name:ETMEXTOUT1 : nuber of cycles ETMEXTOUT[1] signal was asserted
+-event:0x22 counters:1,2 um:zero minimum:500 name:ETMEXTOUT_BOTH : nuber of cycles both ETMEXTOUT [0] and [1] were asserted * 2
+-event:0xff counters:1,2 um:zero minimum:500 name:CPU_CYCLES2 : clock cycles counter
+-event:0xfe counters:0 um:zero minimum:500 name:CPU_CYCLES : clock cycles counter
++event:0x00 counters:0,1 um:zero minimum:500 name:IFU_IFETCH_MISS : number of instruction fetch misses
++event:0x01 counters:0,1 um:zero minimum:500 name:CYCLES_IFU_MEM_STALL : cycles instruction fetch pipe is stalled
++event:0x02 counters:0,1 um:zero minimum:500 name:CYCLES_DATA_STALL : cycles stall occurs for due to data dependency
++event:0x03 counters:0,1 um:zero minimum:500 name:ITLB_MISS : number of Instruction MicroTLB misses
++event:0x04 counters:0,1 um:zero minimum:500 name:DTLB_MISS : number of Data MicroTLB misses
++event:0x05 counters:0,1 um:zero minimum:500 name:BR_INST_EXECUTED : branch instruction executed w/ or w/o program flow change
++event:0x06 counters:0,1 um:zero minimum:500 name:BR_INST_MISS_PRED : branch mispredicted
++event:0x07 counters:0,1 um:zero minimum:500 name:INSN_EXECUTED : instructions executed
++event:0x09 counters:0,1 um:zero minimum:500 name:DCACHE_ACCESS : data cache access, cacheable locations
++event:0x0a counters:0,1 um:zero minimum:500 name:DCACHE_ACCESS_ALL : data cache access, all locations
++event:0x0b counters:0,1 um:zero minimum:500 name:DCACHE_MISS : data cache miss
++event:0x0c counters:0,1 um:zero minimum:500 name:DCACHE_WB : data cache writeback, 1 event for every half cacheline
++event:0x0d counters:0,1 um:zero minimum:500 name:PC_CHANGE : number of times the program counter was changed without a mode switch
++event:0x0f counters:0,1 um:zero minimum:500 name:TLB_MISS : Main TLB miss
++event:0x10 counters:0,1 um:zero minimum:500 name:EXP_EXTERNAL : Explict external data access
++event:0x11 counters:0,1 um:zero minimum:500 name:LSU_STALL : cycles stalled because Load Store request queque is full
++event:0x12 counters:0,1 um:zero minimum:500 name:WRITE_DRAIN : Times write buffer was drained
++event:0x20 counters:0,1 um:zero minimum:500 name:ETMEXTOUT0 : nuber of cycles ETMEXTOUT[0] signal was asserted
++event:0x21 counters:0,1 um:zero minimum:500 name:ETMEXTOUT1 : nuber of cycles ETMEXTOUT[1] signal was asserted
++event:0x22 counters:0,1 um:zero minimum:500 name:ETMEXTOUT_BOTH : nuber of cycles both ETMEXTOUT [0] and [1] were asserted * 2
++event:0xff counters:0,1,2 um:zero minimum:500 name:CPU_CYCLES : clock cycles counter
diff --git a/packages/oprofile/oprofile/fix-arith.patch b/packages/oprofile/oprofile/fix-arith.patch
new file mode 100644
index 0000000000..5c55f4b349
--- /dev/null
+++ b/packages/oprofile/oprofile/fix-arith.patch
@@ -0,0 +1,52 @@
+Index: utils/opcontrol
+===================================================================
+RCS file: /cvsroot/oprofile/oprofile/utils/opcontrol,v
+retrieving revision 1.148
+diff -u -r1.148 opcontrol
+--- utils/opcontrol 8 Nov 2007 09:24:30 -0000 1.148
++++ utils/opcontrol 27 Nov 2007 17:02:20 -0000
+@@ -395,7 +395,7 @@
+ echo "SESSION_DIR=$SESSION_DIR" >>$SETUP_FILE
+
+ if test "$NR_CHOSEN" != "0"; then
+- for f in `seq 0 $((NR_CHOSEN - 1))`; do
++ for f in `seq 0 $(($NR_CHOSEN - 1))`; do
+ get_event $f
+ echo "CHOSEN_EVENTS_${f}=$GOTEVENT" >>$SETUP_FILE
+ done
+@@ -590,7 +590,7 @@
+ OPHELP_ARGS=
+
+ if test "$NR_CHOSEN" != 0; then
+- for f in `seq 0 $((NR_CHOSEN - 1))`; do
++ for f in `seq 0 $(($NR_CHOSEN - 1))`; do
+ get_event $f
+ if test "$GOTEVENT" != ""; then
+ OPHELP_ARGS="$OPHELP_ARGS $GOTEVENT"
+@@ -612,7 +612,7 @@
+ return
+ fi
+
+- for f in `seq 0 $((NR_CHOSEN - 1))`; do
++ for f in `seq 0 $(($NR_CHOSEN - 1))`; do
+ get_event $f
+ if test "$GOTEVENT" != ""; then
+ EVENT=`echo $GOTEVENT | awk -F: '{print $1}'`
+@@ -1226,7 +1226,7 @@
+ verify_counters
+
+ OPROFILED_EVENTS=
+- for f in `seq 0 $((NR_CHOSEN - 1))`; do
++ for f in `seq 0 $(($NR_CHOSEN - 1))`; do
+ get_event $f
+ if test "$GOTEVENT" != ""; then
+ EVENT=`echo $GOTEVENT | awk -F: '{print $1}'`
+@@ -1383,7 +1383,7 @@
+ fi
+
+ if test "$NR_CHOSEN" != "0"; then
+- for f in `seq 0 $((NR_CHOSEN - 1))`; do
++ for f in `seq 0 $(($NR_CHOSEN - 1))`; do
+ get_event $f
+ echo "Event $f: $GOTEVENT"
+ done
diff --git a/packages/oprofile/oprofile/oparchive_fix.patch b/packages/oprofile/oprofile/oparchive_fix.patch
new file mode 100644
index 0000000000..dbdd5eb4ea
--- /dev/null
+++ b/packages/oprofile/oprofile/oparchive_fix.patch
@@ -0,0 +1,22 @@
+Index: oprofile/pp/oparchive.cpp
+===================================================================
+--- oprofile.orig/pp/oparchive.cpp
++++ oprofile/pp/oparchive.cpp
+@@ -95,7 +95,7 @@ int oparchive(options::spec const & spec
+ * to avoid overwriting files with the same name. The
+ * /usr/lib/debug search path is not going to work.
+ */
+- bfd * ibfd = open_bfd(exe_name);
++ bfd * ibfd = open_bfd(options::archive_path + exe_name);
+ if (ibfd) {
+ string global(options::archive_path + DEBUGDIR);
+ string dirname = op_dirname(options::archive_path +
+@@ -106,7 +106,7 @@ int oparchive(options::spec const & spec
+ /* found something copy it over */
+ string dest_debug_dir = options::outdirectory +
+ dirname + "/.debug/";
+- if (create_dir(dest_debug_dir.c_str())) {
++ if (!options::list_files && create_dir(dest_debug_dir.c_str())) {
+ cerr << "Unable to create directory: "
+ << dest_debug_dir << "." << endl;
+ exit (EXIT_FAILURE);
diff --git a/packages/oprofile/oprofile/opstart.patch b/packages/oprofile/oprofile/opstart.patch
new file mode 100644
index 0000000000..e8da0922cc
--- /dev/null
+++ b/packages/oprofile/oprofile/opstart.patch
@@ -0,0 +1,235 @@
+Index: oprofile/utils/Makefile.am
+===================================================================
+--- oprofile.orig/utils/Makefile.am
++++ oprofile/utils/Makefile.am
+@@ -3,8 +3,15 @@ AM_CFLAGS = @OP_CFLAGS@
+
+ LIBS=@POPT_LIBS@ @LIBERTY_LIBS@
+
+-bin_PROGRAMS = ophelp
++bin_PROGRAMS = ophelp opstart
+ dist_bin_SCRIPTS = opcontrol
+
+ ophelp_SOURCES = ophelp.c
+ ophelp_LDADD = ../libop/libop.a ../libutil/libutil.a
++
++opstart_SOURCES = opstart.c
++
++install-exec-local:
++ cd $(DESTDIR)/$(bindir) && \
++ rm -f opstop && \
++ $(LN_S) opstart opstop
+Index: oprofile/utils/opstart.c
+===================================================================
+--- /dev/null
++++ oprofile/utils/opstart.c
+@@ -0,0 +1,110 @@
++/**
++ * @file opstart.c
++ * Start/Stop oprofile
++ *
++ * @remark Copyright 2007 Openedhand Ltd.
++ * @remark Read the file COPYING
++ *
++ * @author Richard Purdie
++ */
++
++#include <signal.h>
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++#include <unistd.h>
++#include <sys/types.h>
++#include <sys/stat.h>
++
++int main(const int argc, const char* argv[])
++{
++ const char *enable = "/dev/oprofile/enable";
++ const char *lockfile;
++ unsigned long dpid;
++ struct stat sbuf;
++ FILE *lfile, *efile;
++ int sig, enb, err;
++
++ if (argc >= 2) {
++ printf("Error: Invalid options.\n");
++ return 1;
++ }
++
++ lockfile = getenv("LOCK_FILE");
++ if (!lockfile)
++ lockfile = "/var/lib/oprofile/lock";
++
++ /* Add SESSION_DIR support? */
++
++ if (geteuid()) {
++ printf("Error: This program must be run as root.\n");
++ return 1;
++ }
++
++ if (stat(enable, &sbuf)) {
++ printf("Error: Could not find /dev/oprofile/enable, the"
++ " kernel module probably isn't loaded.\n");
++ printf("This binary only works with 2.6 kernels and oprofile"
++ " must have been initialised with 'opcontrol --start-daemon'.\n");
++ return 1;
++ }
++
++ if (stat(lockfile, &sbuf)) {
++ printf("Error: Could not find lockfile %s.\n", lockfile);
++ printf("The oprofile daemon must be running (oprofile must"
++ " have been initialised with 'opcontrol --start-daemon').\n");
++ return 1;
++ }
++
++ lfile = fopen(lockfile, "r");
++ if (!lfile) {
++ printf("Error opening lockfile %s.\n", lockfile);
++ return 1;
++ }
++
++ err = fscanf(lfile, "%lud", (unsigned long *) &dpid);
++ if (err != 1) {
++ printf("Error reading pid from lockfile %s.\n", lockfile);
++ return 1;
++ }
++ fclose(lfile);
++
++ efile = fopen(enable, "r");
++ if (!efile) {
++ printf("Error opening %s.\n", enable);
++ return 1;
++ }
++
++ if (strstr(argv[0], "opstart")) {
++ printf("Starting Profiler\n");
++ sig = SIGUSR1;
++ enb = 1;
++ } else if (strstr(argv[0], "opstop")) {
++ printf("Stopping Oprofile.\n");
++ printf("You need to run 'opcontrol --dump' when the session"
++ " is finished.\n");
++ sig = SIGUSR2;
++ enb = 0;
++ } else {
++ printf("Error: Please call as 'opstart' or 'opstop'\n");
++ return 1;
++ }
++
++ err = kill(dpid, 0);
++ if (err) {
++ printf("Error sending signal to oprofiled. Stale lockfile"
++ " (%s) ?\n", lockfile);
++ return 1;
++ }
++
++ fprintf(efile, "%d\n", enb);
++ err = kill(dpid, sig);
++ if (err) {
++ printf("Error sending signal to oprofiled. Stale lockfile"
++ " (%s) ?\n", lockfile);
++ return 1;
++ }
++
++ return 0;
++}
++
+Index: oprofile/configure.in
+===================================================================
+--- oprofile.orig/configure.in
++++ oprofile/configure.in
+@@ -16,6 +16,7 @@ AM_INIT_AUTOMAKE(oprofile, 0.9.4cvs)
+ AM_CONFIG_HEADER(config.h)
+
+ AC_PROG_RANLIB
++AC_PROG_LN_S
+
+ dnl for the man page
+ DATE="`date '+%a %d %B %Y'`"
+@@ -227,6 +228,8 @@ AC_OUTPUT(Makefile \
+ doc/xsl/catalog-1.xml \
+ doc/oprofile.1 \
+ doc/opcontrol.1 \
++ doc/opstart.1 \
++ doc/opstop.1 \
+ doc/ophelp.1 \
+ doc/opreport.1 \
+ doc/opannotate.1 \
+Index: oprofile/doc/Makefile.am
+===================================================================
+--- oprofile.orig/doc/Makefile.am
++++ oprofile/doc/Makefile.am
+@@ -11,6 +11,8 @@ STYLESHEETS=$(CHUNK_XHTML_STYLESHEET) $(
+ man_MANS = \
+ oprofile.1 \
+ opcontrol.1 \
++ opstart.1 \
++ opstop.1 \
+ opreport.1 \
+ opannotate.1 \
+ opgprof.1 \
+Index: oprofile/doc/opstart.1.in
+===================================================================
+--- /dev/null
++++ oprofile/doc/opstart.1.in
+@@ -0,0 +1,27 @@
++.TH OPSTART 1 "@DATE@" "oprofile @VERSION@"
++.UC 4
++.SH NAME
++opstart \- start OProfile profiling
++.SH SYNOPSIS
++.br
++.B opstart
++.SH DESCRIPTION
++.B opstart
++is a simple optimised command to start profiling with 2.6 Linux kernels.
++OProfile should have already been initialised by calling "opcontrol --start-daemon".
++
++.SH ENVIRONMENT
++No special environment variables are recognised by opstart.
++
++.SH FILES
++.TP
++.I /var/lib/oprofile/samples/
++The location of the generated sample files.
++
++.SH VERSION
++.TP
++This man page is current for @PACKAGE@-@VERSION@.
++
++.SH SEE ALSO
++.BR @OP_DOCDIR@,
++.BR oprofile(1)
+Index: oprofile/doc/opstop.1.in
+===================================================================
+--- /dev/null
++++ oprofile/doc/opstop.1.in
+@@ -0,0 +1,28 @@
++.TH OPSTOP 1 "@DATE@" "oprofile @VERSION@"
++.UC 4
++.SH NAME
++opstop \- stop OProfile profiling
++.SH SYNOPSIS
++.br
++.B opstop
++.SH DESCRIPTION
++.B opstop
++is a simple optimsed command to stop profiling with 2.6 Linux kernels.
++You need to run "opcontrol --dump" before being able to view a profile
++with opreport.
++
++.SH ENVIRONMENT
++No special environment variables are recognised by opstop.
++
++.SH FILES
++.TP
++.I /var/lib/oprofile/samples/
++The location of the generated sample files.
++
++.SH VERSION
++.TP
++This man page is current for @PACKAGE@-@VERSION@.
++
++.SH SEE ALSO
++.BR @OP_DOCDIR@,
++.BR oprofile(1)
diff --git a/packages/oprofile/oprofile/root_option.patch b/packages/oprofile/oprofile/root_option.patch
new file mode 100644
index 0000000000..bcb05f6c16
--- /dev/null
+++ b/packages/oprofile/oprofile/root_option.patch
@@ -0,0 +1,1051 @@
+Index: oprofile/libpp/arrange_profiles.cpp
+===================================================================
+--- oprofile.orig/libpp/arrange_profiles.cpp
++++ oprofile/libpp/arrange_profiles.cpp
+@@ -798,7 +798,7 @@ get_iprofile(app_map_t & app_map, string
+
+ /// Pull out all the images, removing any we can't access.
+ void
+-verify_and_fill(string archive_path, app_map_t & app_map,
++verify_and_fill(std::vector<std::string> const & archive_paths, app_map_t & app_map,
+ list<inverted_profile> & plist, extra_images const & extra)
+ {
+ app_map_t::iterator it = app_map.begin();
+@@ -807,7 +807,7 @@ verify_and_fill(string archive_path, app
+ for (; it != end; ++it) {
+ plist.push_back(it->second);
+ inverted_profile & ip = plist.back();
+- ip.image = find_image_path(archive_path, ip.image, extra,
++ ip.image = find_image_path(archive_paths, ip.image, extra,
+ ip.error);
+ }
+ }
+@@ -816,7 +816,7 @@ verify_and_fill(string archive_path, app
+
+
+ list<inverted_profile> const
+-invert_profiles(string archive_path, profile_classes const & classes,
++invert_profiles(std::vector<std::string> const & archive_paths, profile_classes const & classes,
+ extra_images const & extra)
+ {
+ app_map_t app_map;
+@@ -855,7 +855,7 @@ invert_profiles(string archive_path, pro
+
+ list<inverted_profile> inverted_list;
+
+- verify_and_fill(archive_path, app_map, inverted_list, extra);
++ verify_and_fill(archive_paths, app_map, inverted_list, extra);
+
+ return inverted_list;
+ }
+Index: oprofile/libpp/arrange_profiles.h
+===================================================================
+--- oprofile.orig/libpp/arrange_profiles.h
++++ oprofile/libpp/arrange_profiles.h
+@@ -239,7 +239,7 @@ class extra_images;
+ * applicable (hence image_set).
+ */
+ std::list<inverted_profile> const
+-invert_profiles(std::string archive_path, profile_classes const & classes,
++invert_profiles(std::vector<std::string> const & archive_paths, profile_classes const & classes,
+ extra_images const & extra);
+
+ #endif /* !ARRANGE_PROFILES_H */
+Index: oprofile/libpp/callgraph_container.cpp
+===================================================================
+--- oprofile.orig/libpp/callgraph_container.cpp
++++ oprofile/libpp/callgraph_container.cpp
+@@ -392,7 +392,7 @@ const symbol_collection & arc_recorder::
+ }
+
+
+-void callgraph_container::populate(string const & archive_path,
++void callgraph_container::populate(std::vector<std::string> const & archive_paths,
+ list<inverted_profile> const & iprofiles,
+ extra_images const & extra, bool debug_info, double threshold,
+ bool merge_lib, string_filter const & sym_filter)
+@@ -405,7 +405,7 @@ void callgraph_container::populate(strin
+ list<inverted_profile>::const_iterator const end = iprofiles.end();
+ for (it = iprofiles.begin(); it != end; ++it) {
+ // populate_caller_image take care about empty sample filename
+- populate_for_image(archive_path, pc, *it, sym_filter, 0);
++ populate_for_image(archive_paths, pc, *it, sym_filter, 0);
+ }
+
+ add_symbols(pc);
+@@ -414,7 +414,7 @@ void callgraph_container::populate(strin
+
+ for (it = iprofiles.begin(); it != end; ++it) {
+ for (size_t i = 0; i < it->groups.size(); ++i) {
+- populate(archive_path, it->groups[i], it->image, extra,
++ populate(archive_paths, it->groups[i], it->image, extra,
+ i, pc, debug_info, merge_lib);
+ }
+ }
+@@ -423,7 +423,7 @@ void callgraph_container::populate(strin
+ }
+
+
+-void callgraph_container::populate(string const & archive_path,
++void callgraph_container::populate(std::vector<std::string> const & archive_paths,
+ list<image_set> const & lset,
+ string const & app_image, extra_images const & extra, size_t pclass,
+ profile_container const & pc, bool debug_info, bool merge_lib)
+@@ -435,14 +435,14 @@ void callgraph_container::populate(strin
+ list<profile_sample_files>::const_iterator pend
+ = lit->files.end();
+ for (pit = lit->files.begin(); pit != pend; ++pit) {
+- populate(archive_path, pit->cg_files, app_image,
++ populate(archive_paths, pit->cg_files, app_image,
+ extra, pclass, pc, debug_info, merge_lib);
+ }
+ }
+ }
+
+
+-void callgraph_container::populate(string const & archive_path,
++void callgraph_container::populate(std::vector<std::string> const & archive_paths,
+ list<string> const & cg_files,
+ string const & app_image, extra_images const & extra, size_t pclass,
+ profile_container const & pc, bool debug_info, bool merge_lib)
+@@ -457,15 +457,15 @@ void callgraph_container::populate(strin
+
+ image_error error;
+ string caller_binary =
+- find_image_path(archive_path, caller_file.lib_image,
++ find_image_path(archive_paths, caller_file.lib_image,
+ extra, error);
+
+ if (error != image_ok)
+- report_image_error(archive_path + caller_file.lib_image,
++ report_image_error(caller_file.lib_image,
+ error, false);
+
+ bool caller_bfd_ok = true;
+- op_bfd caller_bfd(archive_path, caller_binary,
++ op_bfd caller_bfd(archive_paths, caller_binary,
+ string_filter(), caller_bfd_ok);
+ if (!caller_bfd_ok)
+ report_image_error(caller_binary,
+@@ -474,13 +474,13 @@ void callgraph_container::populate(strin
+ parsed_filename callee_file = parse_filename(*it);
+
+ string callee_binary =
+- find_image_path(archive_path, callee_file.cg_image,
++ find_image_path(archive_paths, callee_file.cg_image,
+ extra, error);
+ if (error != image_ok)
+ report_image_error(callee_file.cg_image, error, false);
+
+ bool callee_bfd_ok = true;
+- op_bfd callee_bfd(archive_path, callee_binary,
++ op_bfd callee_bfd(archive_paths, callee_binary,
+ string_filter(), callee_bfd_ok);
+ if (!callee_bfd_ok)
+ report_image_error(callee_binary,
+Index: oprofile/libpp/callgraph_container.h
+===================================================================
+--- oprofile.orig/libpp/callgraph_container.h
++++ oprofile/libpp/callgraph_container.h
+@@ -105,7 +105,7 @@ class callgraph_container {
+ public:
+ /**
+ * Populate the container, must be called once only.
+- * @param archive_path oparchive prefix path
++ * @param archive_paths oparchive prefix paths
+ * @param iprofiles sample file list including callgraph files.
+ * @param extra extra image list to fixup binary name.
+ * @param debug_info true if we must record linenr information
+@@ -116,7 +116,7 @@ public:
+ * Currently all errors core dump.
+ * FIXME: consider if this should be a ctor
+ */
+- void populate(std::string const & archive_path,
++ void populate(std::vector<std::string> const & archive_paths,
+ std::list<inverted_profile> const & iprofiles,
+ extra_images const & extra, bool debug_info,
+ double threshold, bool merge_lib,
+@@ -149,13 +149,13 @@ private:
+ profile_container const & pc, bool debug_info,
+ size_t pclass);
+
+- void populate(std::string const & archive_path,
++ void populate(std::vector<std::string> const & archive_paths,
+ std::list<image_set> const & lset,
+ std::string const & app_image,
+ extra_images const & extra, size_t pclass,
+ profile_container const & pc, bool debug_info,
+ bool merge_lib);
+- void populate(std::string const & archive_path,
++ void populate(std::vector<std::string> const & archive_paths,
+ std::list<std::string> const & cg_files,
+ std::string const & app_image,
+ extra_images const & extra, size_t pclass,
+Index: oprofile/libpp/locate_images.cpp
+===================================================================
+--- oprofile.orig/libpp/locate_images.cpp
++++ oprofile/libpp/locate_images.cpp
+@@ -93,14 +93,14 @@ public:
+ } // anon namespace
+
+
+-string const find_image_path(string const & archive_path,
++string const find_image_path(std::vector<std::string> const & archive_paths,
+ string const & image_name,
+ extra_images const & extra_images,
+ image_error & error)
+ {
+ error = image_ok;
+
+- string const image = op_realpath(archive_path + image_name);
++ string const image = op_realpath(op_findfile(archive_paths, image_name));
+
+ // simplest case
+ if (op_file_readable(image)) {
+Index: oprofile/libpp/locate_images.h
+===================================================================
+--- oprofile.orig/libpp/locate_images.h
++++ oprofile/libpp/locate_images.h
+@@ -70,7 +70,7 @@ private:
+ * If we fail to find the file we fill in error and return the original string.
+ */
+ std::string const
+-find_image_path(std::string const & archive_path,
++find_image_path(std::vector<std::string> const & archive_paths,
+ std::string const & image_name,
+ extra_images const & extra_images,
+ image_error & error);
+Index: oprofile/libpp/populate.cpp
+===================================================================
+--- oprofile.orig/libpp/populate.cpp
++++ oprofile/libpp/populate.cpp
+@@ -21,6 +21,7 @@
+ #include "populate_for_spu.h"
+
+ #include "image_errors.h"
++#include "file_manip.h"
+
+ #include <iostream>
+
+@@ -56,16 +57,16 @@ populate_from_files(profile_t & profile,
+
+
+ void
+-populate_for_image(string const & archive_path, profile_container & samples,
++populate_for_image(std::vector<std::string> const & archive_paths, profile_container & samples,
+ inverted_profile const & ip, string_filter const & symbol_filter,
+ bool * has_debug_info)
+ {
+ if (is_spu_profile(ip))
+- return populate_for_spu_image(archive_path, samples, ip,
++ return populate_for_spu_image(archive_paths, samples, ip,
+ symbol_filter, has_debug_info);
+
+ bool ok = ip.error == image_ok;
+- op_bfd abfd(archive_path, ip.image, symbol_filter, ok);
++ op_bfd abfd(archive_paths, ip.image, symbol_filter, ok);
+ if (!ok && ip.error == image_ok)
+ ip.error = image_format_failure;
+
+@@ -96,7 +97,7 @@ populate_for_image(string const & archiv
+ }
+
+ if (found == true && ip.error == image_ok)
+- check_mtime(archive_path + abfd.get_filename(), header);
++ check_mtime(op_findfile(archive_paths, abfd.get_filename()), header);
+
+ if (has_debug_info)
+ *has_debug_info = abfd.has_debug_info();
+Index: oprofile/libpp/populate.h
+===================================================================
+--- oprofile.orig/libpp/populate.h
++++ oprofile/libpp/populate.h
+@@ -19,7 +19,7 @@ class string_filter;
+
+ /// Load all sample file information for exactly one binary image.
+ void
+-populate_for_image(std::string const & archive_path,
++populate_for_image(std::vector<std::string> const & archive_paths,
+ profile_container & samples, inverted_profile const & ip,
+ string_filter const & symbol_filter, bool * has_debug_info);
+
+Index: oprofile/libpp/populate_for_spu.cpp
+===================================================================
+--- oprofile.orig/libpp/populate_for_spu.cpp
++++ oprofile/libpp/populate_for_spu.cpp
+@@ -19,6 +19,7 @@
+ #include "populate_for_spu.h"
+
+ #include "image_errors.h"
++#include "file_manip.h"
+
+ #include <iostream>
+
+@@ -46,7 +47,7 @@ static int spu_profile = unknown_profile
+ void
+ populate_spu_profile_from_files(list<profile_sample_files> const & files,
+ string const app_image,
+- string const & archive_path,
++ std::vector<std::string> const & archive_paths,
+ profile_container & samples,
+ inverted_profile const & ip,
+ string_filter const & symbol_filter,
+@@ -65,14 +66,14 @@ populate_spu_profile_from_files(list<pro
+ profile.add_sample_file(it->sample_filename);
+ opd_header header = profile.get_header();
+ if (header.embedded_offset) {
+- abfd = new op_bfd(archive_path,
++ abfd = new op_bfd(archive_paths,
+ header.embedded_offset,
+ ip.image,
+ symbol_filter,
+ ok);
+ fname_to_check = ip.image;
+ } else {
+- abfd = new op_bfd(archive_path,
++ abfd = new op_bfd(archive_paths,
+ ip.image,
+ symbol_filter,
+ ok);
+@@ -87,7 +88,7 @@ populate_spu_profile_from_files(list<pro
+
+ samples.add(profile, *abfd, app_image, ip_grp_num);
+ if (ip.error == image_ok)
+- check_mtime(archive_path + fname_to_check,
++ check_mtime(op_findfile(archive_paths, fname_to_check),
+ profile.get_header());
+
+ if (has_debug_info && !*has_debug_info)
+@@ -98,7 +99,7 @@ populate_spu_profile_from_files(list<pro
+ } // anon namespace
+
+ void
+-populate_for_spu_image(string const & archive_path,
++populate_for_spu_image(std::vector<std::string> const & archive_paths,
+ profile_container & samples,
+ inverted_profile const & ip,
+ string_filter const & symbol_filter,
+@@ -113,7 +114,7 @@ populate_for_spu_image(string const & ar
+
+ for (; it != end; ++it)
+ populate_spu_profile_from_files(it->files,
+- it->app_image, archive_path, samples, ip,
++ it->app_image, archive_paths, samples, ip,
+ symbol_filter, i, has_debug_info);
+ }
+ }
+Index: oprofile/libpp/populate_for_spu.h
+===================================================================
+--- oprofile.orig/libpp/populate_for_spu.h
++++ oprofile/libpp/populate_for_spu.h
+@@ -13,6 +13,8 @@
+ #ifndef POPULATE_FOR_SPU_H
+ #define POPULATE_FOR_SPU_H
+
++#include <vector>
++
+ class profile_container;
+ class inverted_profile;
+ class string_filter;
+@@ -28,7 +30,7 @@ bool is_spu_profile(inverted_profile con
+ * This is a special-purpose function for CELL BE SPU profiling.
+ * See populate_spu_profile_from_files prologue for more details.
+ */
+-void populate_for_spu_image(std::string const & archive_path,
++void populate_for_spu_image(std::vector<std::string> const & archive_paths,
+ profile_container & samples,
+ inverted_profile const & ip,
+ string_filter const & symbol_filter,
+Index: oprofile/libpp/profile_spec.cpp
+===================================================================
+--- oprofile.orig/libpp/profile_spec.cpp
++++ oprofile/libpp/profile_spec.cpp
+@@ -30,7 +30,7 @@ namespace {
+ // we should maintain the original to maintain the wordexp etc.
+ string const fixup_image_spec(string const & str, extra_images const & extra)
+ {
+- string dummy_archive_path;
++ std::vector<std::string> const dummy_archive_path;
+ // FIXME: what todo if an error in find_image_path() ?
+ image_error error;
+ return find_image_path(dummy_archive_path, str, extra, error);
+Index: oprofile/libpp/xml_utils.cpp
+===================================================================
+--- oprofile.orig/libpp/xml_utils.cpp
++++ oprofile/libpp/xml_utils.cpp
+@@ -111,10 +111,10 @@ string get_cpu_num(size_t pclass)
+
+ xml_utils::xml_utils(format_output::xml_formatter * xo,
+ symbol_collection const & s, size_t nc,
+- string_filter * sf, string const & ap)
++ string_filter * sf, std::vector<std::string> const & ap)
+ :
+ symbol_filter(sf),
+- archive_path(ap),
++ archive_paths(ap),
+ has_subclasses(false),
+ bytes_index(0)
+ {
+@@ -379,11 +379,11 @@ xml_utils::output_symbol_bytes(ostream &
+ string const & image_name = get_image_name(symb->image_name, true);
+ op_bfd * abfd = NULL;
+ if (symb->spu_offset)
+- abfd = new op_bfd(archive_path, symb->spu_offset,
++ abfd = new op_bfd(archive_paths, symb->spu_offset,
+ get_image_name(symb->embedding_filename, true),
+ *symbol_filter, ok);
+ else
+- abfd = new op_bfd(archive_path, image_name, *symbol_filter, ok);
++ abfd = new op_bfd(archive_paths, image_name, *symbol_filter, ok);
+ if (!ok) {
+ report_image_error(image_name, image_format_failure, false);
+ delete abfd;
+Index: oprofile/libpp/xml_utils.h
+===================================================================
+--- oprofile.orig/libpp/xml_utils.h
++++ oprofile/libpp/xml_utils.h
+@@ -22,7 +22,7 @@ class xml_utils {
+ public:
+ xml_utils(format_output::xml_formatter * xo,
+ symbol_collection const & s, size_t nc,
+- string_filter * sf, std::string const & ap);
++ string_filter * sf, std::vector<std::string> const & ap);
+ // these members are static because they are invoked before
+ // the xml_utils object has been created
+ static std::string get_timer_setup(size_t count);
+@@ -51,7 +51,7 @@ public:
+ private:
+ string_filter * symbol_filter;
+ bool multiple_events;
+- std::string archive_path;
++ std::vector<std::string> const & archive_paths;
+ bool has_subclasses;
+ size_t bytes_index;
+ static bool has_nonzero_masks;
+Index: oprofile/libutil++/op_bfd.cpp
+===================================================================
+--- oprofile.orig/libutil++/op_bfd.cpp
++++ oprofile/libutil++/op_bfd.cpp
+@@ -27,6 +27,7 @@
+ #include "string_filter.h"
+ #include "stream_util.h"
+ #include "cverb.h"
++#include "file_manip.h"
+
+ using namespace std;
+
+@@ -87,11 +88,11 @@ bool op_bfd_symbol::operator<(op_bfd_sym
+ }
+
+
+-op_bfd::op_bfd(string const & archive, string const & fname,
++op_bfd::op_bfd(std::vector<std::string> const & archive, string const & fname,
+ string_filter const & symbol_filter, bool & ok)
+ :
+ filename(fname),
+- archive_path(archive),
++ archive_paths(archive),
+ file_size(-1)
+ {
+ int fd;
+@@ -102,7 +103,7 @@ op_bfd::op_bfd(string const & archive, s
+ symbols_found_t symbols;
+ asection const * sect;
+
+- string const image_path = archive_path + filename;
++ string const image_path = op_findfile(archive_paths, filename);
+
+ cverb << vbfd << "op_bfd ctor for " << image_path << endl;
+
+@@ -321,8 +322,8 @@ bool op_bfd::has_debug_info() const
+ return debug_info.reset(true);
+
+ // check to see if there is an .debug file
+- string const global(archive_path + DEBUGDIR);
+- string const image_path = archive_path + filename;
++ string const global(op_findfile(archive_paths, DEBUGDIR));
++ string const image_path = op_findfile(archive_paths, filename);
+ string const dirname(image_path.substr(0, image_path.rfind('/')));
+
+ if (find_separate_debug_file(ibfd.abfd, dirname, global, debug_filename)) {
+Index: oprofile/libutil++/op_bfd.h
+===================================================================
+--- oprofile.orig/libutil++/op_bfd.h
++++ oprofile/libutil++/op_bfd.h
+@@ -89,14 +89,14 @@ private:
+ class op_bfd {
+ public:
+ /**
+- * @param archive_path oparchive prefix path
++ * @param archive_paths oparchive prefix paths
+ * @param filename the name of the image file
+ * @param symbol_filter filter to apply to symbols
+ * @param ok in-out parameter: on in, if not set, don't
+ * open the bfd (because it's not there or whatever). On out,
+ * it's set to false if the bfd couldn't be loaded.
+ */
+- op_bfd(std::string const & archive_path,
++ op_bfd(std::vector<std::string> const & archive_paths,
+ std::string const & filename,
+ string_filter const & symbol_filter,
+ bool & ok);
+@@ -105,7 +105,7 @@ public:
+ * This constructor is used when processing an SPU profile
+ * where the SPU ELF is embedded within the PPE binary.
+ */
+- op_bfd(std::string const & archive_path,
++ op_bfd(std::vector<std::string> const & archive_paths,
+ uint64_t spu_offset,
+ std::string const & filename,
+ string_filter const & symbol_filter,
+@@ -243,8 +243,8 @@ private:
+ /// filename we open (not including archive path)
+ std::string filename;
+
+- /// path to archive
+- std::string archive_path;
++ /// paths to archive
++ std::vector<std::string> archive_paths;
+
+ /// file size in bytes
+ off_t file_size;
+Index: oprofile/libutil++/op_spu_bfd.cpp
+===================================================================
+--- oprofile.orig/libutil++/op_spu_bfd.cpp
++++ oprofile/libutil++/op_spu_bfd.cpp
+@@ -19,6 +19,7 @@
+ #include "op_libiberty.h"
+ #include "string_filter.h"
+ #include "cverb.h"
++#include "file_manip.h"
+
+ using namespace std;
+
+@@ -29,11 +30,11 @@ extern verbose vbfd;
+ * constructor in libutil++/op_bfd.cpp, with the additional processing
+ * needed to handle an embedded spu offset.
+ */
+-op_bfd::op_bfd(string const & archive, uint64_t spu_offset,
++op_bfd::op_bfd(std::vector<std::string> const & archive, uint64_t spu_offset,
+ string const & fname,
+ string_filter const & symbol_filter, bool & ok)
+ :
+- archive_path(archive),
++ archive_paths(archive),
+ file_size(-1),
+ embedding_filename(fname)
+ {
+@@ -48,7 +49,7 @@ op_bfd::op_bfd(string const & archive, u
+ symbols_found_t symbols;
+ asection const * sect;
+
+- string const image_path = archive_path + fname;
++ string const image_path = op_findfile(archive_paths, fname);
+
+ cverb << vbfd << "op_bfd ctor for " << image_path << endl;
+ if (!ok)
+Index: oprofile/pp/opannotate_options.cpp
+===================================================================
+--- oprofile.orig/pp/opannotate_options.cpp
++++ oprofile/pp/opannotate_options.cpp
+@@ -26,7 +26,7 @@ using namespace std;
+ profile_classes classes;
+
+ namespace options {
+- string archive_path;
++ vector<string> archive_paths;
+ demangle_type demangle = dmt_normal;
+ string output_dir;
+ vector<string> search_dirs;
+@@ -87,6 +87,7 @@ popt::option options_array[] = {
+ void handle_options(options::spec const & spec)
+ {
+ using namespace options;
++ string archive_path;
+
+ if (spec.first.size()) {
+ cerr << "differential profiles not allowed" << endl;
+@@ -125,7 +126,9 @@ void handle_options(options::spec const
+ list<string> sample_files = pspec.generate_file_list(exclude_dependent, true);
+
+ archive_path = pspec.get_archive_path();
++ archive_paths.push_back(archive_path);
+ cverb << vsfile << "Archive: " << archive_path << endl;
++ archive_paths.push_back(options::root_path);
+
+ cverb << vsfile << "Matched sample files: " << sample_files.size()
+ << endl;
+Index: oprofile/pp/opannotate_options.h
+===================================================================
+--- oprofile.orig/pp/opannotate_options.h
++++ oprofile/pp/opannotate_options.h
+@@ -21,7 +21,7 @@
+ class profile_classes;
+
+ namespace options {
+- extern std::string archive_path;
++ extern std::vector<std::string> archive_paths;
+ extern demangle_type demangle;
+ extern bool source;
+ extern bool assembly;
+Index: oprofile/pp/oparchive.cpp
+===================================================================
+--- oprofile.orig/pp/oparchive.cpp
++++ oprofile/pp/oparchive.cpp
+@@ -59,7 +59,7 @@ int oparchive(options::spec const & spec
+
+ /* copy over each of the executables and the debuginfo files */
+ list<inverted_profile> iprofiles
+- = invert_profiles(options::archive_path, classes,
++ = invert_profiles(options::archive_paths, classes,
+ options::extra_found_images);
+
+ report_image_errors(iprofiles);
+@@ -86,7 +86,7 @@ int oparchive(options::spec const & spec
+ }
+
+ /* Copy actual executable files */
+- copy_one_file(it->error, options::archive_path + exe_name,
++ copy_one_file(it->error, op_findfile(options::archive_paths, exe_name),
+ exe_archive_file);
+
+ /* If there are any debuginfo files, copy them over.
+@@ -95,11 +95,10 @@ int oparchive(options::spec const & spec
+ * to avoid overwriting files with the same name. The
+ * /usr/lib/debug search path is not going to work.
+ */
+- bfd * ibfd = open_bfd(options::archive_path + exe_name);
++ bfd * ibfd = open_bfd(op_findfile(options::archive_paths, exe_name));
+ if (ibfd) {
+- string global(options::archive_path + DEBUGDIR);
+- string dirname = op_dirname(options::archive_path +
+- exe_name);
++ string global(op_findfile(options::archive_paths, DEBUGDIR));
++ string dirname = op_dirname(op_findfile(options::archive_paths, exe_name));
+ string debug_filename;
+ if (find_separate_debug_file(ibfd, dirname, global,
+ debug_filename)) {
+@@ -130,8 +129,8 @@ int oparchive(options::spec const & spec
+ string sample_name = *sit;
+ string sample_base = sample_name;
+ /* Get rid of the the archive_path from the name */
+- sample_base.replace(sample_base.find(options::archive_path),
+- options::archive_path.size(), "");
++ sample_base.replace(sample_base.find(options::archive_paths[0]),
++ options::archive_paths[0].size(), "");
+ string sample_archive_file = options::outdirectory + sample_base;
+
+ cverb << vdebug << (sample_name) << endl;
+@@ -149,12 +148,12 @@ int oparchive(options::spec const & spec
+
+ /* copy over the /var/lib/oprofile/abi file if it exists */
+ string abi_name = "/var/lib/oprofile/abi";
+- copy_one_file(image_ok, options::archive_path + abi_name,
++ copy_one_file(image_ok, op_findfile(options::archive_paths, abi_name),
+ options::outdirectory + abi_name);
+
+ /* copy over the /var/lib/oprofile/oprofiled.log file */
+ string log_name = "/var/lib/oprofile/oprofiled.log";
+- copy_one_file(image_ok, options::archive_path + log_name,
++ copy_one_file(image_ok, op_findfile(options::archive_paths, log_name),
+ options::outdirectory + log_name);
+
+ return 0;
+Index: oprofile/pp/oparchive_options.cpp
+===================================================================
+--- oprofile.orig/pp/oparchive_options.cpp
++++ oprofile/pp/oparchive_options.cpp
+@@ -31,7 +31,7 @@ profile_classes classes;
+ list<string> sample_files;
+
+ namespace options {
+- string archive_path;
++ std::vector<std::string> archive_paths;
+ demangle_type demangle = dmt_normal;
+ bool exclude_dependent;
+ merge_option merge_by;
+@@ -75,6 +75,7 @@ void check_options()
+ void handle_options(options::spec const & spec)
+ {
+ using namespace options;
++ std::string archive_path;
+
+ if (spec.first.size()) {
+ cerr << "differential profiles not allowed" << endl;
+@@ -96,7 +97,9 @@ void handle_options(options::spec const
+ sample_files = pspec.generate_file_list(exclude_dependent, false);
+
+ archive_path = pspec.get_archive_path();
++ archive_paths.push_back(archive_path);
+ cverb << vsfile << "Archive: " << archive_path << endl;
++ archive_paths.push_back(options::root_path);
+
+ cverb << vsfile << "Matched sample files: " << sample_files.size()
+ << endl;
+Index: oprofile/pp/oparchive_options.h
+===================================================================
+--- oprofile.orig/pp/oparchive_options.h
++++ oprofile/pp/oparchive_options.h
+@@ -18,7 +18,7 @@ class profile_classes;
+ class merge_option;
+
+ namespace options {
+- extern std::string archive_path;
++ extern std::vector<std::string> archive_paths;
+ extern bool exclude_dependent;
+ extern merge_option merge_by;
+ extern std::string outdirectory;
+Index: oprofile/pp/opgprof_options.cpp
+===================================================================
+--- oprofile.orig/pp/opgprof_options.cpp
++++ oprofile/pp/opgprof_options.cpp
+@@ -26,7 +26,7 @@ profile_classes classes;
+ inverted_profile image_profile;
+
+ namespace options {
+- string archive_path;
++ std::vector<std::string> archive_paths;
+ string gmon_filename = "gmon.out";
+
+ // Ugly, for build only
+@@ -71,7 +71,7 @@ bool try_merge_profiles(profile_spec con
+ size_t nr_classes = classes.v.size();
+
+ list<inverted_profile> iprofiles
+- = invert_profiles(options::archive_path, classes,
++ = invert_profiles(options::archive_paths, classes,
+ options::extra_found_images);
+
+ if (nr_classes == 1 && iprofiles.size() == 1) {
+@@ -104,6 +104,8 @@ bool try_merge_profiles(profile_spec con
+
+ void handle_options(options::spec const & spec)
+ {
++ string archive_path;
++
+ if (spec.first.size()) {
+ cerr << "differential profiles not allowed" << endl;
+ exit(EXIT_FAILURE);
+@@ -112,8 +114,10 @@ void handle_options(options::spec const
+ profile_spec const pspec =
+ profile_spec::create(spec.common, options::extra_found_images);
+
+- options::archive_path = pspec.get_archive_path();
+- cverb << vsfile << "Archive: " << options::archive_path << endl;
++ archive_path = pspec.get_archive_path();
++ options::archive_paths.push_back(archive_path);
++ cverb << vsfile << "Archive: " << archive_path << endl;
++ options::archive_paths.push_back(options::root_path);
+
+ cverb << vsfile << "output filename: " << options::gmon_filename
+ << endl;
+Index: oprofile/pp/opgprof_options.h
+===================================================================
+--- oprofile.orig/pp/opgprof_options.h
++++ oprofile/pp/opgprof_options.h
+@@ -17,7 +17,7 @@
+ #include "common_option.h"
+
+ namespace options {
+- extern std::string archive_path;
++ extern std::vector<std::string> archive_paths;
+ extern std::string gmon_filename;
+ }
+
+Index: oprofile/pp/opreport_options.cpp
+===================================================================
+--- oprofile.orig/pp/opreport_options.cpp
++++ oprofile/pp/opreport_options.cpp
+@@ -32,8 +32,8 @@ profile_classes classes;
+ profile_classes classes2;
+
+ namespace options {
+- string archive_path;
+- string archive_path2;
++ std::vector<std::string> archive_paths;
++ std::vector<std::string> archive_paths2;
+ demangle_type demangle = dmt_normal;
+ bool symbols;
+ bool callgraph;
+@@ -314,16 +314,19 @@ void handle_options(options::spec const
+ symbol_filter = string_filter(include_symbols, exclude_symbols);
+
+ if (!spec.first.size()) {
+- archive_path = process_spec(classes, spec.common);
++ archive_paths.push_back(process_spec(classes, spec.common));
++ archive_paths.push_back(options::root_path);
+ } else {
+ if (options::xml) {
+ cerr << "differential profiles are incompatible with --xml" << endl;
+ exit(EXIT_FAILURE);
+ }
+ cverb << vsfile << "profile spec 1:" << endl;
+- archive_path = process_spec(classes, spec.first);
++ archive_paths.push_back(process_spec(classes, spec.first));
++ archive_paths.push_back(options::root_path);
+ cverb << vsfile << "profile spec 2:" << endl;
+- archive_path2 = process_spec(classes2, spec.second);
++ archive_paths2.push_back(process_spec(classes2, spec.second));
++ archive_paths2.push_back(options::root_path);
+
+ if (!classes.matches(classes2)) {
+ cerr << "profile classes are incompatible" << endl;
+Index: oprofile/pp/opreport_options.h
+===================================================================
+--- oprofile.orig/pp/opreport_options.h
++++ oprofile/pp/opreport_options.h
+@@ -24,8 +24,8 @@ class profile_classes;
+ class merge_option;
+
+ namespace options {
+- extern std::string archive_path;
+- extern std::string archive_path2;
++ extern std::vector<std::string> archive_paths;
++ extern std::vector<std::string> archive_paths2;
+ extern demangle_type demangle;
+ extern bool symbols;
+ extern bool callgraph;
+Index: oprofile/libutil++/file_manip.cpp
+===================================================================
+--- oprofile.orig/libutil++/file_manip.cpp
++++ oprofile/libutil++/file_manip.cpp
+@@ -205,3 +205,14 @@ string op_basename(string const & path_n
+
+ return erase_to_last_of(result, '/');
+ }
++
++string op_findfile(const vector<string> & paths, string const & file)
++{
++ for (vector<string>::const_iterator it = paths.begin(); it!=paths.end(); ++it)
++ {
++ if (op_file_readable(*it + file))
++ return *it + file;
++ }
++ return "";
++}
++
+Index: oprofile/libutil++/file_manip.h
+===================================================================
+--- oprofile.orig/libutil++/file_manip.h
++++ oprofile/libutil++/file_manip.h
+@@ -12,6 +12,7 @@
+ #ifndef FILE_MANIP_H
+ #define FILE_MANIP_H
+
++#include <vector>
+ #include <string>
+ #include <list>
+
+@@ -86,4 +87,14 @@ std::string op_dirname(std::string const
+ */
+ std::string op_basename(std::string const & path_name);
+
++/**
++ *
++ * op_findfile - search a set of paths for file
++ * @param paths paths to search
++ * @param file filename to search for
++ *
++ * Returns the path to the first matching file or an empty string if not found.
++ */
++std::string op_findfile(const std::vector<std::string> & paths, std::string const & file);
++
+ #endif /* !FILE_MANIP_H */
+Index: oprofile/pp/common_option.cpp
+===================================================================
+--- oprofile.orig/pp/common_option.cpp
++++ oprofile/pp/common_option.cpp
+@@ -30,6 +30,7 @@ namespace options {
+ string session_dir = OP_SESSION_DIR_DEFAULT;
+ string command_options;
+ vector<string> image_path;
++ string root_path;
+ }
+
+ namespace {
+@@ -44,6 +45,8 @@ popt::option common_options_array[] = {
+ "specify session path to hold samples database and session data (" OP_SESSION_DIR_DEFAULT ")", "path"),
+ popt::option(options::image_path, "image-path", 'p',
+ "comma-separated path to search missing binaries", "path"),
++ popt::option(options::root_path, "root", 'R',
++ "path to filesystem to search for missing binaries", "path"),
+ };
+
+
+Index: oprofile/pp/common_option.h
+===================================================================
+--- oprofile.orig/pp/common_option.h
++++ oprofile/pp/common_option.h
+@@ -26,6 +26,7 @@ namespace options {
+ extern std::string threshold_opt;
+ extern std::string command_options;
+ extern std::vector<std::string> image_path;
++ extern std::string root_path;
+
+ struct spec {
+ std::list<std::string> common;
+Index: oprofile/pp/opreport.cpp
+===================================================================
+--- oprofile.orig/pp/opreport.cpp
++++ oprofile/pp/opreport.cpp
+@@ -403,7 +403,7 @@ void output_symbols(profile_container co
+
+ if (options::xml) {
+ xml_support = new xml_utils(xml_out, symbols, nr_classes,
+- &options::symbol_filter, options::archive_path);
++ &options::symbol_filter, options::archive_paths);
+ xml_out->output(cout);
+ } else {
+ text_out->output(cout, symbols);
+@@ -479,7 +479,7 @@ void output_cg_symbols(callgraph_contain
+
+ if (options::xml) {
+ xml_support = new xml_utils(xml_out, symbols, nr_classes,
+- &options::symbol_filter, options::archive_path);
++ &options::symbol_filter, options::archive_paths);
+ xml_out->output(cout);
+ } else {
+ text_out->output(cout, symbols);
+@@ -511,7 +511,7 @@ int opreport(options::spec const & spec)
+ }
+
+ list<inverted_profile> iprofiles
+- = invert_profiles(options::archive_path, classes,
++ = invert_profiles(options::archive_paths, classes,
+ options::extra_found_images);
+
+ report_image_errors(iprofiles);
+@@ -535,11 +535,11 @@ int opreport(options::spec const & spec)
+ list<inverted_profile>::iterator const end = iprofiles.end();
+
+ for (; it != end; ++it)
+- populate_for_image(options::archive_path, pc1,
++ populate_for_image(options::archive_paths, pc1,
+ *it, options::symbol_filter, 0);
+
+ list<inverted_profile> iprofiles2
+- = invert_profiles(options::archive_path2, classes2,
++ = invert_profiles(options::archive_paths2, classes2,
+ options::extra_found_images);
+
+ report_image_errors(iprofiles2);
+@@ -550,13 +550,13 @@ int opreport(options::spec const & spec)
+ list<inverted_profile>::iterator const end2 = iprofiles2.end();
+
+ for (; it2 != end2; ++it2)
+- populate_for_image(options::archive_path2, pc2,
++ populate_for_image(options::archive_paths2, pc2,
+ *it2, options::symbol_filter, 0);
+
+ output_diff_symbols(pc1, pc2, multiple_apps);
+ } else if (options::callgraph) {
+ callgraph_container cg_container;
+- cg_container.populate(options::archive_path, iprofiles,
++ cg_container.populate(options::archive_paths, iprofiles,
+ options::extra_found_images,
+ options::debug_info, options::threshold,
+ options::merge_by.lib, options::symbol_filter);
+@@ -569,7 +569,7 @@ int opreport(options::spec const & spec)
+ list<inverted_profile>::iterator const end = iprofiles.end();
+
+ for (; it != end; ++it)
+- populate_for_image(options::archive_path, samples,
++ populate_for_image(options::archive_paths, samples,
+ *it, options::symbol_filter, 0);
+
+ output_symbols(samples, multiple_apps);
+Index: oprofile/pp/opannotate.cpp
+===================================================================
+--- oprofile.orig/pp/opannotate.cpp
++++ oprofile/pp/opannotate.cpp
+@@ -690,7 +690,7 @@ int opannotate(options::spec const & spe
+ list<string> images;
+
+ list<inverted_profile> iprofiles
+- = invert_profiles(options::archive_path, classes,
++ = invert_profiles(options::archive_paths, classes,
+ options::extra_found_images);
+
+ report_image_errors(iprofiles);
+@@ -701,7 +701,7 @@ int opannotate(options::spec const & spe
+ bool debug_info = false;
+ for (; it != end; ++it) {
+ bool tmp = false;
+- populate_for_image(options::archive_path, *samples, *it,
++ populate_for_image(options::archive_paths, *samples, *it,
+ options::symbol_filter, &tmp);
+ images.push_back(it->image);
+ if (tmp)
+Index: oprofile/pp/opgprof.cpp
+===================================================================
+--- oprofile.orig/pp/opgprof.cpp
++++ oprofile/pp/opgprof.cpp
+@@ -282,7 +282,7 @@ int opgprof(options::spec const & spec)
+
+ bool ok = image_profile.error == image_ok;
+ // FIXME: symbol_filter would be allowed through option
+- op_bfd abfd(options::archive_path, image_profile.image,
++ op_bfd abfd(options::archive_paths, image_profile.image,
+ string_filter(), ok);
+ if (!ok && image_profile.error == image_ok)
+ image_profile.error = image_format_failure;
+Index: oprofile/doc/opannotate.1.in
+===================================================================
+--- oprofile.orig/doc/opannotate.1.in
++++ oprofile/doc/opannotate.1.in
+@@ -50,6 +50,10 @@ Comma-separated list of additional paths
+ This is needed to find modules in kernels 2.6 and upwards.
+ .br
+ .TP
++.BI "--root / -R [path]"
++A path to a filesystem to search for additional binaries.
++.br
++.TP
+ .BI "--include-file [files]"
+ Only include files in the given comma-separated list of glob patterns.
+ .br
+Index: oprofile/doc/oparchive.1.in
+===================================================================
+--- oprofile.orig/doc/oparchive.1.in
++++ oprofile/doc/oparchive.1.in
+@@ -42,6 +42,10 @@ Comma-separated list of additional paths
+ This is needed to find modules in kernels 2.6 and upwards.
+ .br
+ .TP
++.BI "--root / -R [path]"
++A path to a filesystem to search for additional binaries.
++.br
++.TP
+ .BI "--output-directory / -o [directory]"
+ Output to the given directory. There is no default. This must be specified.
+ .br
+Index: oprofile/doc/opgprof.1.in
+===================================================================
+--- oprofile.orig/doc/opgprof.1.in
++++ oprofile/doc/opgprof.1.in
+@@ -38,6 +38,10 @@ Comma-separated list of additional paths
+ This is needed to find modules in kernels 2.6 and upwards.
+ .br
+ .TP
++.BI "--root / -R [path]"
++A path to a filesystem to search for additional binaries.
++.br
++.TP
+ .BI "--threshold / -t [percentage]"
+ Only output data for symbols that have more than the given percentage
+ of total samples.
+Index: oprofile/doc/opreport.1.in
+===================================================================
+--- oprofile.orig/doc/opreport.1.in
++++ oprofile/doc/opreport.1.in
+@@ -61,6 +61,10 @@ Comma-separated list of additional paths
+ This is needed to find modules in kernels 2.6 and upwards.
+ .br
+ .TP
++.BI "--root / -R [path]"
++A path to a filesystem to search for additional binaries.
++.br
++.TP
+ .BI "--include-symbols / -i [symbols]"
+ Only include symbols in the given comma-separated list.
+ .br
diff --git a/packages/oprofile/oprofile/xml_callgraph_details.patch b/packages/oprofile/oprofile/xml_callgraph_details.patch
new file mode 100644
index 0000000000..e5ab3d916e
--- /dev/null
+++ b/packages/oprofile/oprofile/xml_callgraph_details.patch
@@ -0,0 +1,232 @@
+Work in Progress- This patch breaks output_symbol_bytes
+---
+ ChangeLog | 9 +++++++++
+ libpp/callgraph_container.cpp | 10 ++++++++--
+ libpp/callgraph_container.h | 14 ++++++++++----
+ libpp/format_output.cpp | 30 +++++++++++++++++++++++++-----
+ libpp/format_output.h | 6 +++---
+ pp/opreport.cpp | 5 +++--
+ pp/opreport_options.cpp | 4 ++--
+ 7 files changed, 60 insertions(+), 18 deletions(-)
+
+Index: oprofile1/pp/opreport.cpp
+===================================================================
+--- oprofile1.orig/pp/opreport.cpp 2007-05-24 15:32:20.000000000 +0100
++++ oprofile1/pp/opreport.cpp 2007-05-24 20:07:14.000000000 +0100
+@@ -555,10 +555,11 @@ int opreport(options::spec const & spec)
+
+ output_diff_symbols(pc1, pc2, multiple_apps);
+ } else if (options::callgraph) {
+- callgraph_container cg_container;
++ callgraph_container cg_container(options::debug_info,
++ options::details);
+ cg_container.populate(options::archive_path, iprofiles,
+ options::extra_found_images,
+- options::debug_info, options::threshold,
++ options::threshold,
+ options::merge_by.lib, options::symbol_filter);
+
+ output_cg_symbols(cg_container, multiple_apps);
+Index: oprofile1/ChangeLog
+===================================================================
+--- oprofile1.orig/ChangeLog 2007-05-24 18:30:47.000000000 +0100
++++ oprofile1/ChangeLog 2007-05-24 20:07:14.000000000 +0100
+@@ -1,5 +1,14 @@
+ 2007-05-24 Richard Purdie <rpurdie@openedhand.com>
+
++ * libpp/callgraph_container.cpp:
++ * libpp/callgraph_container.h:
++ * libpp/format_output.cpp:
++ * libpp/format_output.h:
++ * pp/opreport.cpp:
++ * pp/opreport_options.cpp: Add callgraph XML detail support
++
++2007-05-24 Richard Purdie <rpurdie@openedhand.com>
++
+ * events/arm/xscale1/events:
+ * events/arm/xscale2/events: Add extra Xscale PMU event definitions
+
+Index: oprofile1/libpp/callgraph_container.cpp
+===================================================================
+--- oprofile1.orig/libpp/callgraph_container.cpp 2007-05-24 15:32:20.000000000 +0100
++++ oprofile1/libpp/callgraph_container.cpp 2007-05-24 20:07:14.000000000 +0100
+@@ -391,15 +391,21 @@ const symbol_collection & arc_recorder::
+ return cg_syms;
+ }
+
++callgraph_container::callgraph_container(bool debug_info, bool need_details)
++ :
++ pc(debug_info, need_details),
++ debug_info(debug_info)
++{
++}
++
+
+ void callgraph_container::populate(string const & archive_path,
+ list<inverted_profile> const & iprofiles,
+- extra_images const & extra, bool debug_info, double threshold,
++ extra_images const & extra, double threshold,
+ bool merge_lib, string_filter const & sym_filter)
+ {
+ // non callgraph samples container, we record sample at symbol level
+ // not at vma level.
+- profile_container pc(debug_info, false);
+
+ list<inverted_profile>::const_iterator it;
+ list<inverted_profile>::const_iterator const end = iprofiles.end();
+Index: oprofile1/libpp/callgraph_container.h
+===================================================================
+--- oprofile1.orig/libpp/callgraph_container.h 2007-05-24 15:32:20.000000000 +0100
++++ oprofile1/libpp/callgraph_container.h 2007-05-24 20:07:14.000000000 +0100
+@@ -19,8 +19,8 @@
+ #include "symbol.h"
+ #include "symbol_functors.h"
+ #include "string_filter.h"
++#include "profile_container.h"
+
+-class profile_container;
+ class inverted_profile;
+ class profile_t;
+ class extra_images;
+@@ -103,6 +103,8 @@ private:
+ */
+ class callgraph_container {
+ public:
++ callgraph_container(bool debug_info, bool need_details);
++
+ /**
+ * Populate the container, must be called once only.
+ * @param archive_path oparchive prefix path
+@@ -118,9 +120,8 @@ public:
+ */
+ void populate(std::string const & archive_path,
+ std::list<inverted_profile> const & iprofiles,
+- extra_images const & extra, bool debug_info,
+- double threshold, bool merge_lib,
+- string_filter const & sym_filter);
++ extra_images const & extra, double threshold,
++ bool merge_lib, string_filter const & sym_filter);
+
+ /// return hint on how data must be displayed.
+ column_flags output_hint() const;
+@@ -131,6 +132,9 @@ public:
+ // return all the cg symbols
+ const symbol_collection & get_symbols() const;
+
++ // profile container callgraph is based on
++ profile_container pc;
++
+ private:
+ /**
+ * Record caller/callee for one cg file
+@@ -162,6 +166,8 @@ private:
+ profile_container const & pc, bool debug_info,
+ bool merge_lib);
+
++ bool debug_info;
++
+ /// record all main symbols
+ void add_symbols(profile_container const & pc);
+
+Index: oprofile1/pp/opreport_options.cpp
+===================================================================
+--- oprofile1.orig/pp/opreport_options.cpp 2007-05-24 15:32:20.000000000 +0100
++++ oprofile1/pp/opreport_options.cpp 2007-05-24 20:07:14.000000000 +0100
+@@ -165,8 +165,8 @@ void check_options(bool diff)
+
+ if (callgraph) {
+ symbols = true;
+- if (details) {
+- cerr << "--callgraph is incompatible with --details" << endl;
++ if (details && !xml) {
++ cerr << "--callgraph is incompatible with --details without --xml" << endl;
+ do_exit = true;
+ }
+
+Index: oprofile1/libpp/format_output.cpp
+===================================================================
+--- oprofile1.orig/libpp/format_output.cpp 2007-05-24 15:32:20.000000000 +0100
++++ oprofile1/libpp/format_output.cpp 2007-05-24 20:07:14.000000000 +0100
+@@ -594,9 +594,9 @@ xml_formatter::
+ xml_formatter(profile_container const * p,
+ symbol_collection & s)
+ :
++ need_details(false),
+ profile(p),
+- symbols(s),
+- need_details(false)
++ symbols(s)
+ {
+ if (profile)
+ counts.total = profile->samples_count();
+@@ -673,8 +673,8 @@ void xml_formatter::output_symbol_data(o
+ if (name.size() > 0 && name[0] != '?') {
+ output_attribute(out, datum, ff_vma, STARTING_ADDR);
+
+- if (need_details)
+- xml_support->output_symbol_bytes(bytes_out, symb, sd_it->second);
++ //if (need_details)
++ // xml_support->output_symbol_bytes(bytes_out, symb, sd_it->second);
+ }
+ out << close_element();
+
+@@ -843,7 +843,7 @@ output_attribute(ostream & out, field_da
+ xml_cg_formatter::
+ xml_cg_formatter(callgraph_container const * cg, symbol_collection & s)
+ :
+- xml_formatter(0, s),
++ xml_formatter(&cg->pc, s),
+ callgraph(cg)
+ {
+ counts.total = callgraph->samples_count();
+@@ -946,6 +946,26 @@ output_symbol(ostream & out,
+
+ out << init_attr(ID_REF, indx);
+
++ if (need_details) {
++ ostringstream details;
++ symbol_details_t & sd = symbol_details[indx];
++ size_t const detail_lo = sd.index;
++
++ string detail_str = output_symbol_details(symb, sd.index, lo, hi);
++
++ if (detail_str.size() > 0) {
++ if (sd.id < 0)
++ sd.id = indx;
++ details << detail_str;
++ }
++
++ if (sd.index > detail_lo) {
++ sd.details = sd.details + details.str();
++ out << init_attr(DETAIL_LO, detail_lo);
++ out << init_attr(DETAIL_HI, sd.index-1);
++ }
++ }
++
+ out << close_element(NONE, true);
+
+ out << open_element(CALLERS);
+Index: oprofile1/libpp/format_output.h
+===================================================================
+--- oprofile1.orig/libpp/format_output.h 2007-05-24 15:32:20.000000000 +0100
++++ oprofile1/libpp/format_output.h 2007-05-24 20:07:14.000000000 +0100
+@@ -249,6 +249,9 @@ public:
+ // output SymbolData XML elements
+ void output_symbol_data(std::ostream & out);
+
++ /// true if we need to show details for each symbols
++ bool need_details;
++
+ private:
+ /// container we work from
+ profile_container const * profile;
+@@ -256,9 +259,6 @@ private:
+ // ordered collection of symbols associated with this profile
+ symbol_collection & symbols;
+
+- /// true if we need to show details for each symbols
+- bool need_details;
+-
+ // count of DetailData items output so far
+ size_t detail_count;
+
diff --git a/packages/oprofile/oprofile_0.9.3.bb b/packages/oprofile/oprofile_0.9.3.bb
index 977907e305..c4194ab2e1 100644
--- a/packages/oprofile/oprofile_0.9.3.bb
+++ b/packages/oprofile/oprofile_0.9.3.bb
@@ -1,15 +1,18 @@
+SECTION = "devel"
DESCRIPTION = "OProfile is a system-wide profiler for Linux systems, capable \
of profiling all running code at low overhead."
-SECTION = "devel"
LICENSE = "GPL"
DEPENDS = "popt binutils"
-PR = "r1"
+RDEPENDS = "binutils-symlinks"
+PR = "r4"
SRC_URI = "${SOURCEFORGE_MIRROR}/oprofile/oprofile-${PV}.tar.gz \
- file://acinclude.m4 \
- file://opcontrol-busybox-compat.patch;patch=1 \
- "
-
+ 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
@@ -18,12 +21,11 @@ inherit autotools
# Should add the oprofile kernel modules, for those with 2.4
# kernels, as a seperate .oe file.
EXTRA_OECONF = "--with-kernel-support \
- --without-x \
- --disable-werror "
+ --without-x"
do_configure () {
- cp ${WORKDIR}/acinclude.m4 ${S}/
- autotools_do_configure
+ cp ${WORKDIR}/acinclude.m4 ${S}/
+ autotools_do_configure
}
# Available config options
# --enable-abi enable abi portability code (default is disabled)
diff --git a/packages/oprofile/oprofile_cvs.bb b/packages/oprofile/oprofile_cvs.bb
index 2eec2a7836..2096a27b40 100644
--- a/packages/oprofile/oprofile_cvs.bb
+++ b/packages/oprofile/oprofile_cvs.bb
@@ -1,14 +1,14 @@
-PV = "0.9.2+cvs${SRCDATE}"
-PR = "r1"
+PV = "0.9.3+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."
LICENSE = "GPL"
DEPENDS = "popt binutils"
-
-DEFAULT_PREFERENCE = "-1"
+RDEPENDS = "binutils-symlinks"
SRC_URI = "cvs://anonymous@oprofile.cvs.sourceforge.net/cvsroot/oprofile;module=oprofile \
+ file://opstart.patch;patch=1 \
file://acinclude.m4"
S = "${WORKDIR}/oprofile"
diff --git a/packages/oprofile/oprofileui-svn.inc b/packages/oprofile/oprofileui-svn.inc
new file mode 100644
index 0000000000..6d111d1d59
--- /dev/null
+++ b/packages/oprofile/oprofileui-svn.inc
@@ -0,0 +1,8 @@
+require oprofileui.inc
+
+PV = "0.0+svnr${SRCREV}"
+PR = "r1"
+
+S = "${WORKDIR}/trunk"
+
+SRC_URI = "svn://svn.o-hand.com/repos/oprofileui;module=trunk;proto=http"
diff --git a/packages/oprofile/oprofileui.inc b/packages/oprofile/oprofileui.inc
new file mode 100644
index 0000000000..93f4631d14
--- /dev/null
+++ b/packages/oprofile/oprofileui.inc
@@ -0,0 +1,16 @@
+DESCRIPTION = "User interface for the OProfile tool"
+SECTION = "x11"
+LICENSE = "GPLv2"
+DEPENDS = "glib-2.0 gtk+ libglade gnome-vfs libxml2 avahi gconf"
+
+inherit autotools pkgconfig gtk-icon-cache
+
+PACKAGES =+ "oprofileui-server oprofileui-viewer"
+
+EXTRA_OECONF = "--with-avahi"
+
+FILES_oprofileui-viewer = "${bindir}/oparchconv ${bindir}/oprofile-viewer ${datadir}/applications/ ${datadir}/oprofileui/"
+RDEPENDS_oprofile-viewer = "oprofile"
+
+FILES_oprofileui-server = "${bindir}/oprofile-server"
+RDEPENDS_oprofile-server = "oprofile"
diff --git a/packages/oprofile/oprofileui_svn.bb b/packages/oprofile/oprofileui_svn.bb
new file mode 100644
index 0000000000..39e10b4fd2
--- /dev/null
+++ b/packages/oprofile/oprofileui_svn.bb
@@ -0,0 +1,2 @@
+require oprofileui-svn.inc
+