Update of /cvsroot/oprofile/oprofile/libpp In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv32368/libpp Modified Files: Tag: JIT_SUPPORT arrange_profiles.cpp arrange_profiles.h callgraph_container.cpp callgraph_container.h format_output.cpp image_errors.cpp image_errors.h locate_images.cpp locate_images.h populate.cpp populate.h populate_for_spu.cpp populate_for_spu.h profile_spec.cpp xml_utils.cpp xml_utils.h Log Message: sync with HEAD, one minor conflict yet again in op_bfd.cpp Index: arrange_profiles.cpp =================================================================== RCS file: /cvsroot/oprofile/oprofile/libpp/arrange_profiles.cpp,v retrieving revision 1.42.2.2 retrieving revision 1.42.2.3 diff -u -p -d -r1.42.2.2 -r1.42.2.3 --- arrange_profiles.cpp 27 Oct 2007 16:31:14 -0000 1.42.2.2 +++ arrange_profiles.cpp 29 Oct 2007 19:52:21 -0000 1.42.2.3 @@ -802,8 +802,8 @@ 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, - list<inverted_profile> & plist, extra_images const & extra) +verify_and_fill(app_map_t & app_map, list<inverted_profile> & plist, + extra_images const & extra) { app_map_t::iterator it = app_map.begin(); app_map_t::iterator const end = app_map.end(); @@ -811,8 +811,7 @@ verify_and_fill(string archive_path, app for (; it != end; ++it) { plist.push_back(it->second); inverted_profile & ip = plist.back(); - find_image_path(archive_path, ip.image, extra, - ip.error, false); + extra.find_image_path(ip.image, ip.error, false); } } @@ -820,7 +819,7 @@ verify_and_fill(string archive_path, app list<inverted_profile> const -invert_profiles(string archive_path, profile_classes const & classes) +invert_profiles(profile_classes const & classes) { app_map_t app_map; @@ -858,8 +857,7 @@ invert_profiles(string archive_path, pro list<inverted_profile> inverted_list; - verify_and_fill(archive_path, app_map, inverted_list, - classes.extra_found_images); + verify_and_fill(app_map, inverted_list, classes.extra_found_images); return inverted_list; } Index: arrange_profiles.h =================================================================== RCS file: /cvsroot/oprofile/oprofile/libpp/arrange_profiles.h,v retrieving revision 1.15.6.1 retrieving revision 1.15.6.2 diff -u -p -d -r1.15.6.1 -r1.15.6.2 --- arrange_profiles.h 27 Oct 2007 16:31:14 -0000 1.15.6.1 +++ arrange_profiles.h 29 Oct 2007 19:52:21 -0000 1.15.6.2 @@ -241,6 +241,6 @@ struct inverted_profile { * applicable (hence image_set). */ std::list<inverted_profile> const -invert_profiles(std::string archive_path, profile_classes const & classes); +invert_profiles(profile_classes const & classes); #endif /* !ARRANGE_PROFILES_H */ Index: callgraph_container.cpp =================================================================== RCS file: /cvsroot/oprofile/oprofile/libpp/callgraph_container.cpp,v retrieving revision 1.37.2.1 retrieving revision 1.37.2.2 diff -u -p -d -r1.37.2.1 -r1.37.2.2 --- callgraph_container.cpp 27 Oct 2007 16:31:14 -0000 1.37.2.1 +++ callgraph_container.cpp 29 Oct 2007 19:52:24 -0000 1.37.2.2 @@ -392,8 +392,7 @@ const symbol_collection & arc_recorder:: } -void callgraph_container::populate(string const & archive_path, - list<inverted_profile> const & iprofiles, +void callgraph_container::populate(list<inverted_profile> const & iprofiles, extra_images const & extra, bool debug_info, double threshold, bool merge_lib, string_filter const & sym_filter) { @@ -406,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(pc, *it, sym_filter, 0); } add_symbols(pc); @@ -415,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, + populate(it->groups[i], it->image, i, pc, debug_info, merge_lib); } } @@ -424,8 +423,7 @@ void callgraph_container::populate(strin } -void callgraph_container::populate(string const & archive_path, - list<image_set> const & lset, +void callgraph_container::populate(list<image_set> const & lset, string const & app_image, size_t pclass, profile_container const & pc, bool debug_info, bool merge_lib) { @@ -436,15 +434,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(pit->cg_files, app_image, pclass, pc, debug_info, merge_lib); } } } -void callgraph_container::populate(string const & archive_path, - list<string> const & cg_files, +void callgraph_container::populate(list<string> const & cg_files, string const & app_image, size_t pclass, profile_container const & pc, bool debug_info, bool merge_lib) { @@ -457,33 +454,36 @@ void callgraph_container::populate(strin string const app_name = caller_file.image; image_error error; - find_image_path(archive_path, caller_file.lib_image, - extra_found_images, error, false); + extra_found_images.find_image_path(caller_file.lib_image, + error, false); if (error != image_ok) report_image_error(caller_file.lib_image, - error, false); + error, false, extra_found_images); bool caller_bfd_ok = true; - op_bfd caller_bfd(archive_path, caller_file.lib_image, + op_bfd caller_bfd(caller_file.lib_image, string_filter(), extra_found_images, caller_bfd_ok); if (!caller_bfd_ok) - report_image_error(archive_path + caller_file.lib_image, - image_format_failure, false); + report_image_error(caller_file.lib_image, + image_format_failure, false, + extra_found_images); parsed_filename callee_file = parse_filename(*it); - find_image_path(archive_path, callee_file.cg_image, - extra_found_images, error, false); + extra_found_images.find_image_path(callee_file.cg_image, + error, false); if (error != image_ok) - report_image_error(callee_file.cg_image, error, false); + report_image_error(callee_file.cg_image, + error, false, extra_found_images); bool callee_bfd_ok = true; - op_bfd callee_bfd(archive_path, callee_file.cg_image, + op_bfd callee_bfd(callee_file.cg_image, string_filter(), extra_found_images, callee_bfd_ok); if (!callee_bfd_ok) - report_image_error(archive_path + callee_file.cg_image, - image_format_failure, false); + report_image_error(callee_file.cg_image, + image_format_failure, false, + extra_found_images); profile_t profile; // We can't use start_offset support in profile_t, give Index: callgraph_container.h =================================================================== RCS file: /cvsroot/oprofile/oprofile/libpp/callgraph_container.h,v retrieving revision 1.17.2.1 retrieving revision 1.17.2.2 diff -u -p -d -r1.17.2.1 -r1.17.2.2 --- callgraph_container.h 27 Oct 2007 16:31:14 -0000 1.17.2.1 +++ callgraph_container.h 29 Oct 2007 19:52:24 -0000 1.17.2.2 @@ -105,7 +105,6 @@ class callgraph_container { public: /** * Populate the container, must be called once only. - * @param archive_path oparchive prefix path * @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,8 +115,7 @@ public: * Currently all errors core dump. * FIXME: consider if this should be a ctor */ - void populate(std::string const & archive_path, - std::list<inverted_profile> const & iprofiles, + void populate(std::list<inverted_profile> const & iprofiles, extra_images const & extra, bool debug_info, double threshold, bool merge_lib, string_filter const & sym_filter); @@ -148,13 +146,11 @@ private: std::string const & app_name, profile_container const & pc, bool debug_info, size_t pclass); - void populate(std::string const & archive_path, - std::list<image_set> const & lset, + void populate(std::list<image_set> const & lset, std::string const & app_image, size_t pclass, profile_container const & pc, bool debug_info, bool merge_lib); - void populate(std::string const & archive_path, - std::list<std::string> const & cg_files, + void populate(std::list<std::string> const & cg_files, std::string const & app_image, size_t pclass, profile_container const & pc, bool debug_info, bool merge_lib); Index: format_output.cpp =================================================================== RCS file: /cvsroot/oprofile/oprofile/libpp/format_output.cpp,v retrieving revision 1.36 retrieving revision 1.36.2.1 diff -u -p -d -r1.36 -r1.36.2.1 --- format_output.cpp 22 May 2007 00:26:26 -0000 1.36 +++ format_output.cpp 29 Oct 2007 19:52:24 -0000 1.36.2.1 @@ -346,15 +346,10 @@ string formatter::format_cumulated_perce string formatter::format_diff(field_datum const & f) { - if (f.diff == INFINITY) { - ostringstream out; - out << "+++"; - return out.str(); - } else if (f.diff == -INFINITY) { - ostringstream out; - out << "---"; - return out.str(); - } + if (f.diff == INFINITY) + return "+++"; + else if (f.diff == -INFINITY) + return "---"; return ::format_percent(f.diff, percent_int_width, percent_fract_width, true); Index: image_errors.cpp =================================================================== RCS file: /cvsroot/oprofile/oprofile/libpp/image_errors.cpp,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -u -p -d -r1.6 -r1.6.2.1 --- image_errors.cpp 7 Aug 2005 11:15:51 -0000 1.6 +++ image_errors.cpp 29 Oct 2007 19:52:24 -0000 1.6.2.1 @@ -12,6 +12,7 @@ #include "arrange_profiles.h" #include "string_manip.h" +#include "locate_images.h" #include <iostream> #include <set> @@ -24,20 +25,24 @@ set<string> reported_images_error; } -void report_image_error(string const & image, image_error error, bool fatal) +void report_image_error(string const & image, image_error error, bool fatal, + extra_images const & extra) { if (error == image_ok) return; - if (reported_images_error.find(image) == reported_images_error.end()) { - reported_images_error.insert(image); + string image_name = extra.get_archive_path() + image; + + if (reported_images_error.find(image_name) == + reported_images_error.end()) { + reported_images_error.insert(image_name); // FIXME: hacky if (error == image_not_found && is_prefix(image, "anon ")) return; cerr << (fatal ? "error: " : "warning: "); - cerr << image << ' '; + cerr << image_name << ' '; switch (error) { case image_not_found: @@ -64,17 +69,19 @@ void report_image_error(string const & i } -void report_image_error(inverted_profile const & profile, bool fatal) +void report_image_error(inverted_profile const & profile, bool fatal, + extra_images const & extra) { - report_image_error(profile.image, profile.error, fatal); + report_image_error(profile.image, profile.error, fatal, extra); } -void report_image_errors(list<inverted_profile> const & plist) +void report_image_errors(list<inverted_profile> const & plist, + extra_images const & extra) { list<inverted_profile>::const_iterator it = plist.begin(); list<inverted_profile>::const_iterator const end = plist.end(); for (; it != end; ++it) - report_image_error(*it, false); + report_image_error(*it, false, extra); } Index: image_errors.h =================================================================== RCS file: /cvsroot/oprofile/oprofile/libpp/image_errors.h,v retrieving revision 1.3 retrieving revision 1.3.6.1 diff -u -p -d -r1.3 -r1.3.6.1 --- image_errors.h 28 Jan 2004 03:08:31 -0000 1.3 +++ image_errors.h 29 Oct 2007 19:52:24 -0000 1.3.6.1 @@ -15,6 +15,7 @@ #include <string> class inverted_profile; +class extra_images; /// possible reasons why we can't read a binary image enum image_error { @@ -28,12 +29,15 @@ enum image_error { /// output why the image passed can't be read to stderr, we warranty only one /// error report by image name. void -report_image_error(std::string const & image, image_error error, bool fatal); +report_image_error(std::string const & image, image_error error, bool fatal, + extra_images const & extra); /// output why the image passed can't be read to stderr -void report_image_error(inverted_profile const & profile, bool fatal); +void report_image_error(inverted_profile const & profile, bool fatal, + extra_images const & extra); /// output why any bad images can't be read to stderr -void report_image_errors(std::list<inverted_profile> const & plist); +void report_image_errors(std::list<inverted_profile> const & plist, + extra_images const & extra); #endif /* IMAGE_ERRORS_H */ Index: locate_images.cpp =================================================================== RCS file: /cvsroot/oprofile/oprofile/libpp/locate_images.cpp,v retrieving revision 1.14.6.1 retrieving revision 1.14.6.2 diff -u -p -d -r1.14.6.1 -r1.14.6.2 --- locate_images.cpp 27 Oct 2007 16:31:14 -0000 1.14.6.1 +++ locate_images.cpp 29 Oct 2007 19:52:24 -0000 1.14.6.2 @@ -21,8 +21,10 @@ using namespace std; void extra_images::populate(vector<string> const & paths, - string const & archive_path) + string const & archive_path_) { + archive_path = archive_path_; + vector<string>::const_iterator cit = paths.begin(); vector<string>::const_iterator end = paths.end(); for (; cit != end; ++cit) { @@ -94,10 +96,8 @@ public: } // anon namespace -string const find_image_path(string const & archive_path, - string const & image_name, - extra_images const & extra_images, - image_error & error, bool fixup) +string const extra_images::find_image_path(string const & image_name, + image_error & error, bool fixup) const { error = image_ok; @@ -116,11 +116,11 @@ string const find_image_path(string cons string const base = op_basename(image); - vector<string> result = extra_images.find(base); + vector<string> result = find(base); // not found, try a module search if (result.empty()) - result = extra_images.find(module_matcher(base + ".ko")); + result = find(module_matcher(base + ".ko")); if (result.empty()) { error = image_not_found; @@ -132,6 +132,7 @@ string const find_image_path(string cons return image_name; } - // extra_images already contains the archive path as prefix + // extra_images::images name already contains the archive path as + // prefix return fixup ? result[0] : image_name; } Index: locate_images.h =================================================================== RCS file: /cvsroot/oprofile/oprofile/libpp/locate_images.h,v retrieving revision 1.15.6.1 retrieving revision 1.15.6.2 diff -u -p -d -r1.15.6.1 -r1.15.6.2 --- locate_images.h 27 Oct 2007 16:31:14 -0000 1.15.6.1 +++ locate_images.h 29 Oct 2007 19:52:24 -0000 1.15.6.2 @@ -53,6 +53,22 @@ public: /// return a vector of all directories that match the given name std::vector<std::string> const find(std::string const & name) const; + /** + * @param image_name binary image name + * @param error errors are flagged in this passed enum ref + * @param fixup if true return the fixed image name else always return + * image_name and update error + * + * Locate a (number of) matching absolute paths to the given image + * name. 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 & image_name, + image_error & error, bool fixup) const; + + /// return the archive path used to populate the images name map + std::string get_archive_path() const { return archive_path; } + private: typedef std::multimap<std::string, std::string> images_t; typedef images_t::value_type value_type; @@ -60,23 +76,8 @@ private: /// map from image basename to owning directory images_t images; + /// the archive path passed to populate the images name map. + std::string archive_path; }; -/** - * @param archive_path archive prefix path - * @param extra_images container where all extra candidate filenames are stored - * @param image_name binary image name - * @param error errors are flagged in this passed enum ref - * @param fixup if true return the fixed image name else always return - * image_name - * - * Locate a (number of) matching absolute paths to the given image name. - * 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, - std::string const & image_name, - extra_images const & extra_images, - image_error & error, bool fixup); - #endif /* LOCATE_IMAGES_H */ Index: populate.cpp =================================================================== RCS file: /cvsroot/oprofile/oprofile/libpp/populate.cpp,v retrieving revision 1.9.2.1 retrieving revision 1.9.2.2 diff -u -p -d -r1.9.2.1 -r1.9.2.2 --- populate.cpp 27 Oct 2007 16:31:14 -0000 1.9.2.1 +++ populate.cpp 29 Oct 2007 19:52:24 -0000 1.9.2.2 @@ -56,24 +56,23 @@ populate_from_files(profile_t & profile, void -populate_for_image(string const & archive_path, profile_container & samples, - inverted_profile const & ip, string_filter const & symbol_filter, - bool * has_debug_info) +populate_for_image(profile_container & samples, inverted_profile const & ip, + string_filter const & symbol_filter, bool * has_debug_info) { if (is_spu_profile(ip)) { - populate_for_spu_image(archive_path, samples, ip, - symbol_filter, has_debug_info); + populate_for_spu_image(samples, ip, symbol_filter, + has_debug_info); return; } bool ok = ip.error == image_ok; - op_bfd abfd(archive_path, ip.image, symbol_filter, + op_bfd abfd(ip.image, symbol_filter, samples.extra_found_images, ok); if (!ok && ip.error == image_ok) ip.error = image_format_failure; if (ip.error == image_format_failure) - report_image_error(ip, false); + report_image_error(ip, false, samples.extra_found_images); opd_header header; @@ -99,7 +98,8 @@ populate_for_image(string const & archiv } if (found == true && ip.error == image_ok) - check_mtime(archive_path + abfd.get_filename(), header); + check_mtime(samples.extra_found_images.get_archive_path() + + abfd.get_filename(), header); if (has_debug_info) *has_debug_info = abfd.has_debug_info(); Index: populate.h =================================================================== RCS file: /cvsroot/oprofile/oprofile/libpp/populate.h,v retrieving revision 1.4 retrieving revision 1.4.6.1 diff -u -p -d -r1.4 -r1.4.6.1 --- populate.h 6 Apr 2005 21:07:06 -0000 1.4 +++ populate.h 29 Oct 2007 19:52:24 -0000 1.4.6.1 @@ -19,8 +19,7 @@ class string_filter; /// Load all sample file information for exactly one binary image. void -populate_for_image(std::string const & archive_path, - profile_container & samples, inverted_profile const & ip, +populate_for_image(profile_container & samples, inverted_profile const & ip, string_filter const & symbol_filter, bool * has_debug_info); #endif /* POPULATE_H */ Index: populate_for_spu.cpp =================================================================== RCS file: /cvsroot/oprofile/oprofile/libpp/populate_for_spu.cpp,v retrieving revision 1.2.2.1 retrieving revision 1.2.2.2 diff -u -p -d -r1.2.2.1 -r1.2.2.2 --- populate_for_spu.cpp 27 Oct 2007 16:31:14 -0000 1.2.2.1 +++ populate_for_spu.cpp 29 Oct 2007 19:52:24 -0000 1.2.2.2 @@ -46,12 +46,12 @@ 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, profile_container & samples, inverted_profile const & ip, string_filter const & symbol_filter, size_t ip_grp_num, bool * has_debug_info) { + string archive_path = samples.extra_found_images.get_archive_path(); bool ok = ip.error == image_ok; op_bfd * abfd = NULL; string fname_to_check; @@ -65,16 +65,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, - header.embedded_offset, + abfd = new op_bfd(header.embedded_offset, ip.image, symbol_filter, samples.extra_found_images, ok); fname_to_check = ip.image; } else { - abfd = new op_bfd(archive_path, - ip.image, + abfd = new op_bfd(ip.image, symbol_filter, samples.extra_found_images, ok); @@ -85,7 +83,7 @@ populate_spu_profile_from_files(list<pro ip.error = image_format_failure; if (ip.error == image_format_failure) - report_image_error(ip, false); + report_image_error(ip, false, samples.extra_found_images); samples.add(profile, *abfd, app_image, ip_grp_num); if (ip.error == image_ok) @@ -100,8 +98,7 @@ populate_spu_profile_from_files(list<pro } // anon namespace void -populate_for_spu_image(string const & archive_path, - profile_container & samples, +populate_for_spu_image(profile_container & samples, inverted_profile const & ip, string_filter const & symbol_filter, bool * has_debug_info) @@ -115,7 +112,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, samples, ip, symbol_filter, i, has_debug_info); } } Index: populate_for_spu.h =================================================================== RCS file: /cvsroot/oprofile/oprofile/libpp/populate_for_spu.h,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -u -p -d -r1.1 -r1.1.2.1 --- populate_for_spu.h 10 May 2007 23:54:35 -0000 1.1 +++ populate_for_spu.h 29 Oct 2007 19:52:24 -0000 1.1.2.1 @@ -28,8 +28,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, - profile_container & samples, +void populate_for_spu_image(profile_container & samples, inverted_profile const & ip, string_filter const & symbol_filter, bool * has_debug_info); Index: profile_spec.cpp =================================================================== RCS file: /cvsroot/oprofile/oprofile/libpp/profile_spec.cpp,v retrieving revision 1.30.2.2 retrieving revision 1.30.2.3 diff -u -p -d -r1.30.2.2 -r1.30.2.3 --- profile_spec.cpp 27 Oct 2007 16:31:14 -0000 1.30.2.2 +++ profile_spec.cpp 29 Oct 2007 19:52:24 -0000 1.30.2.3 @@ -28,23 +28,21 @@ namespace { // PP:3.7, full path, or relative path. If we can't find it, // we should maintain the original to maintain the wordexp etc. -string const fixup_image_spec(string const & archive_path, - string const & str, extra_images const & extra) +string const fixup_image_spec(string const & str, extra_images const & extra) { // On error find_image_path() return str, so if an occur we will // use the provided image_name not the fixed one. image_error error; - return find_image_path(archive_path, str, extra, error, true); + return extra.find_image_path(str, error, true); } -void fixup_image_spec(string const & archive_path, - vector<string> & images, extra_images const & extra) +void fixup_image_spec(vector<string> & images, extra_images const & extra) { vector<string>::iterator it = images.begin(); vector<string>::iterator const end = images.end(); for (; it != end; ++it) - *it = fixup_image_spec(archive_path, *it, extra); + *it = fixup_image_spec(*it, extra); } } // anon namespace @@ -94,8 +92,7 @@ void profile_spec::set_image_or_lib_name { /* FIXME: what does spec say about this being allowed to be * a comma list or not ? */ - image_or_lib_image.push_back(fixup_image_spec(archive_path, - str, extra_found_images)); + image_or_lib_image.push_back(fixup_image_spec(str, extra_found_images)); } @@ -126,21 +123,21 @@ void profile_spec::parse_session_exclude void profile_spec::parse_image(string const & str) { image = separate_token(str, ','); - fixup_image_spec(archive_path, image, extra_found_images); + fixup_image_spec(image, extra_found_images); } void profile_spec::parse_image_exclude(string const & str) { image_exclude = separate_token(str, ','); - fixup_image_spec(archive_path, image_exclude, extra_found_images); + fixup_image_spec(image_exclude, extra_found_images); } void profile_spec::parse_lib_image(string const & str) { lib_image = separate_token(str, ','); - fixup_image_spec(archive_path, lib_image, extra_found_images); + fixup_image_spec(lib_image, extra_found_images); } @@ -229,9 +226,8 @@ bool profile_spec::match(filename_spec c // filename for the benefit of module which have /oprofile in their // sample filename. This allow to specify profile spec based on the // real name of the image, e.g. 'binary:*oprofile.ko' - string simage = fixup_image_spec(archive_path, spec.image, - extra_found_images); - string slib_image = fixup_image_spec(archive_path, spec.lib_image, + string simage = fixup_image_spec(spec.image, extra_found_images); + string slib_image = fixup_image_spec(spec.lib_image, extra_found_images); // PP:3.19 Index: xml_utils.cpp =================================================================== RCS file: /cvsroot/oprofile/oprofile/libpp/xml_utils.cpp,v retrieving revision 1.7.2.1 retrieving revision 1.7.2.2 diff -u -p -d -r1.7.2.1 -r1.7.2.2 --- xml_utils.cpp 27 Oct 2007 16:31:14 -0000 1.7.2.1 +++ xml_utils.cpp 29 Oct 2007 19:52:24 -0000 1.7.2.2 @@ -111,11 +111,9 @@ 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, - extra_images const & extra_) + string_filter * sf,extra_images const & extra_) : symbol_filter(sf), - archive_path(ap), has_subclasses(false), bytes_index(0), extra_image(extra_) @@ -382,15 +380,15 @@ xml_utils::output_symbol_bytes(ostream & op_bfd * abfd = NULL; if (symb->spu_offset) { string tmp = get_image_name(symb->embedding_filename, true); - abfd = new op_bfd(archive_path, symb->spu_offset, - tmp, *symbol_filter, extra_image, ok); - } else { - abfd = new op_bfd(archive_path, image_name, *symbol_filter, + abfd = new op_bfd(symb->spu_offset, tmp, *symbol_filter, extra_image, ok); + } else { + abfd = new op_bfd(image_name, *symbol_filter, extra_image, ok); } if (!ok) { - report_image_error(image_name, image_format_failure, false); + report_image_error(image_name, image_format_failure, + false, extra_image); delete abfd; return; } Index: xml_utils.h =================================================================== RCS file: /cvsroot/oprofile/oprofile/libpp/xml_utils.h,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -p -d -r1.1.2.1 -r1.1.2.2 --- xml_utils.h 27 Oct 2007 16:31:14 -0000 1.1.2.1 +++ xml_utils.h 29 Oct 2007 19:52:24 -0000 1.1.2.2 @@ -24,13 +24,12 @@ 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, - extra_images const & extra); + string_filter * sf, extra_images const & extra); // 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); static std::string get_event_setup(std::string event, size_t count, - std::string unit_mask); + std::string unit_mask); static std::string get_profile_header(std::string cpu_name, double const speed); static void set_nr_cpus(size_t cpus); @@ -54,7 +53,6 @@ public: private: string_filter * symbol_filter; bool multiple_events; - std::string archive_path; bool has_subclasses; size_t bytes_index; extra_images const & extra_image; |