Update of /cvsroot/oprofile/oprofile/pp
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28032/pp
Modified Files:
Makefile.am opannotate.cpp opannotate_options.cpp
opannotate_options.h opgprof.cpp opgprof_options.cpp
opgprof_options.h opreport.cpp opreport_options.cpp
opreport_options.h opstack.cpp opstack_options.cpp
opstack_options.h
Log Message:
Check in oparchive support.
Index: Makefile.am
===================================================================
RCS file: /cvsroot/oprofile/oprofile/pp/Makefile.am,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -p -d -r1.18 -r1.19
--- Makefile.am 18 Jan 2004 02:21:15 -0000 1.18
+++ Makefile.am 6 Jul 2004 20:46:00 -0000 1.19
@@ -9,7 +9,7 @@ AM_CPPFLAGS = \
AM_CXXFLAGS = @OP_CXXFLAGS@
-bin_PROGRAMS = opreport opannotate opgprof opstack
+bin_PROGRAMS = opreport opannotate opgprof opstack oparchive
LIBS=@POPT_LIBS@ @BFD_LIBS@
@@ -43,3 +43,8 @@ opstack_SOURCES = opstack.cpp \
opstack_options.h opstack_options.cpp \
$(pp_common)
opstack_LDADD = $(common_libs)
+
+oparchive_SOURCES = oparchive.cpp \
+ oparchive_options.h oparchive_options.cpp \
+ $(pp_common)
+oparchive_LDADD = $(common_libs)
Index: opannotate.cpp
===================================================================
RCS file: /cvsroot/oprofile/oprofile/pp/opannotate.cpp,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -p -d -r1.34 -r1.35
--- opannotate.cpp 11 May 2004 19:10:31 -0000 1.34
+++ opannotate.cpp 6 Jul 2004 20:46:00 -0000 1.35
@@ -677,7 +677,8 @@ int opannotate(vector<string> const & no
list<string> images;
list<inverted_profile> iprofiles
- = invert_profiles(classes, options::extra_found_images);
+ = invert_profiles(options::archive_path, classes,
+ options::extra_found_images);
report_image_errors(iprofiles);
@@ -686,8 +687,8 @@ int opannotate(vector<string> const & no
bool debug_info = false;
for (; it != end; ++it) {
- debug_info |= populate_for_image(*samples, *it,
- options::symbol_filter);
+ debug_info |= populate_for_image(options::archive_path,
+ *samples, *it, options::symbol_filter);
images.push_back(it->image);
}
Index: opannotate_options.cpp
===================================================================
RCS file: /cvsroot/oprofile/oprofile/pp/opannotate_options.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -p -d -r1.16 -r1.17
--- opannotate_options.cpp 20 Jan 2004 13:49:32 -0000 1.16
+++ opannotate_options.cpp 6 Jul 2004 20:46:00 -0000 1.17
@@ -26,6 +26,7 @@ using namespace std;
profile_classes classes;
namespace options {
+ std::string archive_path;
demangle_type demangle = dmt_normal;
string output_dir;
vector<string> search_dirs;
@@ -110,6 +111,9 @@ void handle_options(vector<string> const
list<string> sample_files = spec.generate_file_list(exclude_dependent, true);
+ archive_path = spec.get_archive_path();
+ cverb << vsfile << "Archive: " << archive_path << endl;
+
cverb << vsfile << "Matched sample files: " << sample_files.size()
<< endl;
copy(sample_files.begin(), sample_files.end(),
Index: opannotate_options.h
===================================================================
RCS file: /cvsroot/oprofile/oprofile/pp/opannotate_options.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -p -d -r1.10 -r1.11
--- opannotate_options.h 3 Nov 2003 23:48:50 -0000 1.10
+++ opannotate_options.h 6 Jul 2004 20:46:00 -0000 1.11
@@ -21,6 +21,7 @@
class profile_classes;
namespace options {
+ extern std::string archive_path;
extern demangle_type demangle;
extern bool source;
extern bool assembly;
Index: opgprof.cpp
===================================================================
RCS file: /cvsroot/oprofile/oprofile/pp/opgprof.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -p -d -r1.19 -r1.20
--- opgprof.cpp 25 Jan 2004 01:53:56 -0000 1.19
+++ opgprof.cpp 6 Jul 2004 20:46:00 -0000 1.20
@@ -270,7 +270,8 @@ int opgprof(vector<string> const & non_o
bool ok = image_profile.error == image_ok;
// FIXME: symbol_filter would be allowed through option
- op_bfd abfd(image_profile.image, string_filter(), ok);
+ op_bfd abfd(options::archive_path, image_profile.image,
+ string_filter(), ok);
if (!ok && image_profile.error == image_ok)
image_profile.error = image_format_failure;
Index: opgprof_options.cpp
===================================================================
RCS file: /cvsroot/oprofile/oprofile/pp/opgprof_options.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -p -d -r1.14 -r1.15
--- opgprof_options.cpp 20 Jan 2004 13:49:32 -0000 1.14
+++ opgprof_options.cpp 6 Jul 2004 20:46:00 -0000 1.15
@@ -25,6 +25,7 @@ using namespace std;
inverted_profile image_profile;
namespace options {
+ std::string archive_path;
string gmon_filename = "gmon.out";
// Ugly, for build only
@@ -66,7 +67,8 @@ bool try_merge_profiles(profile_spec con
size_t nr_classes = classes.v.size();
list<inverted_profile> iprofiles
- = invert_profiles(classes, options::extra_found_images);
+ = invert_profiles(options::archive_path, classes,
+ options::extra_found_images);
if (nr_classes == 1 && iprofiles.size() == 1) {
image_profile = *(iprofiles.begin());
@@ -98,12 +100,15 @@ bool try_merge_profiles(profile_spec con
void handle_options(vector<string> const & non_options)
{
- cverb << vsfile << "output filename: " << options::gmon_filename
- << endl;
-
profile_spec const spec =
profile_spec::create(non_options, options::extra_found_images);
+ options::archive_path = spec.get_archive_path();
+ cverb << vsfile << "Archive: " << options::archive_path << endl;
+
+ cverb << vsfile << "output filename: " << options::gmon_filename
+ << endl;
+
// we do a first try with exclude-dependent if it fails we include
// dependent. First try should catch "opgrof /usr/bin/make" whilst
// the second catch "opgprof /lib/libc-2.2.5.so"
Index: opgprof_options.h
===================================================================
RCS file: /cvsroot/oprofile/oprofile/pp/opgprof_options.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -p -d -r1.5 -r1.6
--- opgprof_options.h 3 Nov 2003 23:48:50 -0000 1.5
+++ opgprof_options.h 6 Jul 2004 20:46:00 -0000 1.6
@@ -17,6 +17,7 @@
#include "common_option.h"
namespace options {
+ extern std::string archive_path;
extern std::string gmon_filename;
}
Index: opreport.cpp
===================================================================
RCS file: /cvsroot/oprofile/oprofile/pp/opreport.cpp,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -p -d -r1.45 -r1.46
--- opreport.cpp 31 Jan 2004 23:42:54 -0000 1.45
+++ opreport.cpp 6 Jul 2004 20:46:00 -0000 1.46
@@ -415,7 +415,8 @@ int opreport(vector<string> const & non_
}
list<inverted_profile> iprofiles
- = invert_profiles(classes, options::extra_found_images);
+ = invert_profiles(options::archive_path, classes,
+ options::extra_found_images);
report_image_errors(iprofiles);
@@ -423,7 +424,8 @@ int opreport(vector<string> const & non_
list<inverted_profile>::iterator const end = iprofiles.end();
for (; it != end; ++it)
- populate_for_image(samples, *it, options::symbol_filter);
+ populate_for_image(options::archive_path, samples,
+ *it, options::symbol_filter);
output_header();
Index: opreport_options.cpp
===================================================================
RCS file: /cvsroot/oprofile/oprofile/pp/opreport_options.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -p -d -r1.19 -r1.20
--- opreport_options.cpp 20 Jan 2004 13:49:32 -0000 1.19
+++ opreport_options.cpp 6 Jul 2004 20:46:00 -0000 1.20
@@ -29,6 +29,7 @@ using namespace std;
profile_classes classes;
namespace options {
+ std::string archive_path;
demangle_type demangle = dmt_normal;
bool symbols;
bool debug_info;
@@ -199,6 +200,9 @@ void handle_options(vector<string> const
list<string> sample_files = spec.generate_file_list(exclude_dependent, true);
+ archive_path = spec.get_archive_path();
+ cverb << vsfile << "Archive: " << archive_path << endl;
+
cverb << vsfile << "Matched sample files: " << sample_files.size()
<< endl;
copy(sample_files.begin(), sample_files.end(),
Index: opreport_options.h
===================================================================
RCS file: /cvsroot/oprofile/oprofile/pp/opreport_options.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -p -d -r1.9 -r1.10
--- opreport_options.h 2 Feb 2004 21:51:30 -0000 1.9
+++ opreport_options.h 6 Jul 2004 20:46:00 -0000 1.10
@@ -23,6 +23,7 @@ class profile_classes;
class merge_option;
namespace options {
+ extern std::string archive_path;
extern demangle_type demangle;
extern bool symbols;
extern bool debug_info;
Index: opstack.cpp
===================================================================
RCS file: /cvsroot/oprofile/oprofile/pp/opstack.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -p -d -r1.9 -r1.10
--- opstack.cpp 21 Feb 2004 03:53:47 -0000 1.9
+++ opstack.cpp 6 Jul 2004 20:46:00 -0000 1.10
@@ -62,12 +62,14 @@ int opstack(vector<string> const & non_o
}
list<inverted_profile> iprofiles
- = invert_profiles(classes, options::extra_found_images);
+ = invert_profiles(options::archive_path, classes,
+ options::extra_found_images);
report_image_errors(iprofiles);
callgraph_container cg_container;
- cg_container.populate(iprofiles, options::extra_found_images,
+ cg_container.populate(options::archive_path, iprofiles,
+ options::extra_found_images,
options::debug_info, options::threshold,
options::merge_by.lib);
Index: opstack_options.cpp
===================================================================
RCS file: /cvsroot/oprofile/oprofile/pp/opstack_options.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -p -d -r1.5 -r1.6
--- opstack_options.cpp 1 Feb 2004 22:34:05 -0000 1.5
+++ opstack_options.cpp 6 Jul 2004 20:46:00 -0000 1.6
@@ -23,6 +23,7 @@ using namespace std;
profile_classes classes;
namespace options {
+ std::string archive_path;
demangle_type demangle = dmt_normal;
bool exclude_dependent;
merge_option merge_by;
@@ -75,6 +76,9 @@ void handle_options(vector<string> const
list<string> sample_files =
spec.generate_file_list(exclude_dependent, false);
+ archive_path = spec.get_archive_path();
+ cverb << vsfile << "Archive: " << archive_path << endl;
+
cverb << vsfile << "Matched sample files: " << sample_files.size()
<< endl;
copy(sample_files.begin(), sample_files.end(),
Index: opstack_options.h
===================================================================
RCS file: /cvsroot/oprofile/oprofile/pp/opstack_options.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -p -d -r1.4 -r1.5
--- opstack_options.h 17 Feb 2004 22:43:56 -0000 1.4
+++ opstack_options.h 6 Jul 2004 20:46:00 -0000 1.5
@@ -20,6 +20,7 @@ class profile_classes;
extern profile_classes classes;
namespace options {
+ extern std::string archive_path;
extern demangle_type demangle;
extern merge_option merge_by;
extern bool long_filenames;
|