From: John L. <mov...@us...> - 2008-01-21 21:35:16
|
Update of /cvsroot/oprofile/oprofile/libpp In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv1164/libpp Modified Files: callgraph_container.cpp callgraph_container.h format_output.cpp format_output.h image_errors.cpp parse_filename.cpp populate.cpp populate_for_spu.cpp xml_utils.cpp Log Message: style fixes from Daniel Index: callgraph_container.cpp =================================================================== RCS file: /cvsroot/oprofile/oprofile/libpp/callgraph_container.cpp,v retrieving revision 1.41 retrieving revision 1.42 diff -u -p -d -r1.41 -r1.42 --- callgraph_container.cpp 11 Dec 2007 13:16:15 -0000 1.41 +++ callgraph_container.cpp 21 Jan 2008 21:35:17 -0000 1.42 @@ -386,7 +386,7 @@ process(count_array_t total, double thre } -const symbol_collection & arc_recorder::get_symbols() const +symbol_collection const & arc_recorder::get_symbols() const { return cg_syms; } @@ -598,7 +598,7 @@ count_array_t callgraph_container::sampl } -const symbol_collection & callgraph_container::get_symbols() const +symbol_collection const & callgraph_container::get_symbols() const { return recorder.get_symbols(); } Index: callgraph_container.h =================================================================== RCS file: /cvsroot/oprofile/oprofile/libpp/callgraph_container.h,v retrieving revision 1.19 retrieving revision 1.20 diff -u -p -d -r1.19 -r1.20 --- callgraph_container.h 29 Oct 2007 15:44:29 -0000 1.19 +++ callgraph_container.h 21 Jan 2008 21:35:17 -0000 1.20 @@ -53,7 +53,7 @@ public: count_array_t const & arc_count); /// return all the cg symbols - const symbol_collection & get_symbols() const; + symbol_collection const & get_symbols() const; /** * After population, build the final output, and do @@ -127,7 +127,7 @@ public: count_array_t samples_count() const; // return all the cg symbols - const symbol_collection & get_symbols() const; + symbol_collection const & get_symbols() const; private: /** Index: format_output.cpp =================================================================== RCS file: /cvsroot/oprofile/oprofile/libpp/format_output.cpp,v retrieving revision 1.42 retrieving revision 1.43 diff -u -p -d -r1.42 -r1.43 --- format_output.cpp 15 Nov 2007 19:44:25 -0000 1.42 +++ format_output.cpp 21 Jan 2008 21:35:17 -0000 1.43 @@ -510,7 +510,7 @@ void cg_formatter::output(ostream & out, symbol_collection::const_iterator end = syms.end(); for (it = syms.begin(); it < end; ++it) { - cg_symbol const *sym = dynamic_cast<const cg_symbol *>(*it); + cg_symbol const * sym = dynamic_cast<cg_symbol const *>(*it); cg_symbol::children::const_iterator cit; cg_symbol::children::const_iterator cend = sym->callers.end(); @@ -693,7 +693,7 @@ xml_formatter::get_bfd_object(symbol_ent } void xml_formatter:: -output_the_symbol_data(ostream &out, symbol_entry const *symb, op_bfd * & abfd) +output_the_symbol_data(ostream & out, symbol_entry const * symb, op_bfd * & abfd) { string const name = symbol_names.name(symb->name); assert(name.size() > 0); @@ -734,7 +734,7 @@ output_the_symbol_data(ostream &out, sym } } -void xml_formatter::output_cg_children(ostream &out, +void xml_formatter::output_cg_children(ostream & out, cg_symbol::children const cg_symb, op_bfd * & abfd) { cg_symbol::children::const_iterator cit; @@ -748,7 +748,7 @@ void xml_formatter::output_cg_children(o map<string, size_t>::iterator sd_it = symbol_data_table.find(qname); if (sd_it != symbol_data_table.end()) { - symbol_entry const *child = &(*cit); + symbol_entry const * child = &(*cit); output_the_symbol_data(out, child, abfd); } } @@ -978,7 +978,7 @@ output_symbol_core(ostream & out, cg_sym string const symqname = module + ":" + symname; // Find any self references and handle - if ((symname == selfname) && (tag == CALLEES)) { + if ((symname == selfname) && (tag == CALLEES)) { self = true; indx = xml_get_symbol_index(qname); } else { Index: format_output.h =================================================================== RCS file: /cvsroot/oprofile/oprofile/libpp/format_output.h,v retrieving revision 1.26 retrieving revision 1.27 diff -u -p -d -r1.26 -r1.27 --- format_output.h 15 Nov 2007 19:44:25 -0000 1.26 +++ format_output.h 21 Jan 2008 21:35:17 -0000 1.27 @@ -289,10 +289,10 @@ private: /// only if necessary bool get_bfd_object(symbol_entry const * symb, op_bfd * & abfd) const; - void output_the_symbol_data(std::ostream &out, symbol_entry const *symb, - op_bfd * & abfd); + void output_the_symbol_data(std::ostream & out, + symbol_entry const * symb, op_bfd * & abfd); - void output_cg_children(std::ostream &out, + void output_cg_children(std::ostream & out, cg_symbol::children const cg_symb, op_bfd * & abfd); }; Index: image_errors.cpp =================================================================== RCS file: /cvsroot/oprofile/oprofile/libpp/image_errors.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -p -d -r1.7 -r1.8 --- image_errors.cpp 29 Oct 2007 19:40:22 -0000 1.7 +++ image_errors.cpp 21 Jan 2008 21:35:17 -0000 1.8 @@ -83,5 +83,5 @@ void report_image_errors(list<inverted_p list<inverted_profile>::const_iterator const end = plist.end(); for (; it != end; ++it) - report_image_error(*it, false, extra); + report_image_error(*it, false, extra); } Index: parse_filename.cpp =================================================================== RCS file: /cvsroot/oprofile/oprofile/libpp/parse_filename.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -u -p -d -r1.9 -r1.10 --- parse_filename.cpp 2 Feb 2007 18:13:14 -0000 1.9 +++ parse_filename.cpp 21 Jan 2008 21:35:17 -0000 1.10 @@ -78,8 +78,10 @@ void remove_base_dir(vector<string> & pa string const parse_anon(string const & str, string const & str2) { string name = str2; - name.erase(0,6); // Get rid of "{anon: - name.erase(name.size() - 1,1); // Get rid of the trailing '}' + // Get rid of "{anon: + name.erase(0, 6); + // Get rid of the trailing '}' + name.erase(name.size() - 1, 1); vector<string> parts = separate_token(str, '.'); if (parts.size() != 3) throw invalid_argument("parse_anon() invalid name: " + str); @@ -155,7 +157,7 @@ parsed_filename parse_filename(string co filename); } - bool anon = path[i].find("{anon:" ,0) == 0; + bool anon = path[i].find("{anon:", 0) == 0; // skip "{root}", "{kern}" or "{anon:.*}" ++i; @@ -185,7 +187,7 @@ parsed_filename parse_filename(string co } // skip "{root}", "{kern}" or "{anon}" - anon = (path[i].find("{anon",0) == 0); + anon = (path[i].find("{anon", 0) == 0); ++i; if (anon) { Index: populate.cpp =================================================================== RCS file: /cvsroot/oprofile/oprofile/libpp/populate.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -u -p -d -r1.13 -r1.14 --- populate.cpp 15 Nov 2007 15:45:01 -0000 1.13 +++ populate.cpp 21 Jan 2008 21:35:17 -0000 1.14 @@ -72,7 +72,7 @@ populate_for_image(profile_container & s ip.error = image_format_failure; if (ip.error == image_format_failure) - report_image_error(ip, false, samples.extra_found_images); + report_image_error(ip, false, samples.extra_found_images); opd_header header; Index: populate_for_spu.cpp =================================================================== RCS file: /cvsroot/oprofile/oprofile/libpp/populate_for_spu.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -p -d -r1.6 -r1.7 --- populate_for_spu.cpp 15 Nov 2007 15:45:01 -0000 1.6 +++ populate_for_spu.cpp 21 Jan 2008 21:35:17 -0000 1.7 @@ -132,17 +132,16 @@ bool is_spu_profile(inverted_profile con if (!ip.groups.size()) return false; - for (size_t i = 0; i < ip.groups.size(); ++i) { - list<image_set>::const_iterator grp_it - = ip.groups[i].begin(); - list<image_set>::const_iterator const grp_end - = ip.groups[i].end(); - + for (size_t i = 0; i < ip.groups.size(); ++i) { + list<image_set>::const_iterator grp_it + = ip.groups[i].begin(); + list<image_set>::const_iterator const grp_end + = ip.groups[i].end(); - for (; grp_it != grp_end; ++grp_it) { - list<profile_sample_files>::const_iterator sfiles_it = + for (; grp_it != grp_end; ++grp_it) { + list<profile_sample_files>::const_iterator sfiles_it = grp_it->files.begin(); - list<profile_sample_files>::const_iterator sfiles_end = + list<profile_sample_files>::const_iterator sfiles_end = grp_it->files.end(); for (; sfiles_it != sfiles_end; ++sfiles_it) { if (!sfiles_it->sample_filename.empty()) { @@ -155,7 +154,7 @@ bool is_spu_profile(inverted_profile con goto out; do_check: - spu_profile = profile_t::is_spu_sample_file(sfname); + spu_profile = profile_t::is_spu_sample_file(sfname); if (spu_profile == cell_spu_profile) retval = true; Index: xml_utils.cpp =================================================================== RCS file: /cvsroot/oprofile/oprofile/libpp/xml_utils.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -u -p -d -r1.12 -r1.13 --- xml_utils.cpp 3 Nov 2007 12:54:57 -0000 1.12 +++ xml_utils.cpp 21 Jan 2008 21:35:17 -0000 1.13 @@ -615,9 +615,8 @@ void binary_info::close_binary(sym_itera void binary_info::dump() { cverb << vxml << "app_name=" << name << endl; - if (begin != (sym_iterator)0) { + if (begin != (sym_iterator)0) dump_symbols(" ", begin, end); - } for (size_t i = 0; i < nr_modules; ++i) my_modules[i].dump(); |