From: Maynard J. <may...@us...> - 2009-10-28 16:43:44
|
Update of /cvsroot/oprofile/oprofile/libpp In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv30783/libpp Modified Files: format_output.cpp format_output.h xml_utils.cpp Log Message: Fix regression in XML callgraph output and other XML fixes and schema version bump Index: format_output.cpp =================================================================== RCS file: /cvsroot/oprofile/oprofile/libpp/format_output.cpp,v retrieving revision 1.45 retrieving revision 1.46 diff -u -p -d -r1.45 -r1.46 --- format_output.cpp 18 Jun 2009 20:38:45 -0000 1.45 +++ format_output.cpp 28 Oct 2009 16:43:34 -0000 1.46 @@ -941,8 +941,8 @@ xml_cg_formatter(callgraph_container con void xml_cg_formatter:: output_symbol_core(ostream & out, cg_symbol::children const cg_symb, - string const selfname, string const qname, - bool is_module, tag_t tag) + string const selfname, string const qname, + size_t lo, size_t hi, bool is_module, tag_t tag) { cg_symbol::children::const_iterator cit; cg_symbol::children::const_iterator cend = cg_symb.end(); @@ -954,6 +954,10 @@ output_symbol_core(ostream & out, cg_sym ostringstream str; size_t indx; + // output symbol's summary data for each profile class + for (size_t p = lo; p <= hi; ++p) + xml_support->output_summary_data(str, cit->sample.counts, p); + if (cverb << vxml) out << "<!-- symbol_ref=" << symbol_names.name(cit->name) << " -->" << endl; @@ -995,13 +999,16 @@ output_symbol_core(ostream & out, cg_sym void xml_cg_formatter:: output_symbol(ostream & out, - symbol_entry const * symb, size_t lo __attribute__ ((unused)), - size_t hi __attribute__ ((unused)), bool is_module) + symbol_entry const * symb, size_t lo, size_t hi, bool is_module) { cg_symbol const * cg_symb = dynamic_cast<cg_symbol const *>(symb); ostringstream str; size_t indx; + // output symbol's summary data for each profile class + for (size_t p = lo; p <= hi; ++p) + xml_support->output_summary_data(str, symb->sample.counts, p); + if (cverb << vxml) out << "<!-- symbol_ref=" << symbol_names.name(symb->name) << " -->" << endl; @@ -1025,12 +1032,12 @@ output_symbol(ostream & out, out << open_element(CALLERS); if (cg_symb) - output_symbol_core(out, cg_symb->callers, selfname, qname, is_module, CALLERS); + output_symbol_core(out, cg_symb->callers, selfname, qname, lo, hi, is_module, CALLERS); out << close_element(CALLERS); out << open_element(CALLEES); if (cg_symb) - output_symbol_core(out, cg_symb->callees, selfname, qname, is_module, CALLEES); + output_symbol_core(out, cg_symb->callees, selfname, qname, lo, hi, is_module, CALLEES); out << close_element(CALLEES); Index: format_output.h =================================================================== RCS file: /cvsroot/oprofile/oprofile/libpp/format_output.h,v retrieving revision 1.28 retrieving revision 1.29 diff -u -p -d -r1.28 -r1.29 --- format_output.h 18 Jun 2009 20:38:45 -0000 1.28 +++ format_output.h 28 Oct 2009 16:43:34 -0000 1.29 @@ -315,7 +315,7 @@ private: void output_symbol_core(std::ostream & out, cg_symbol::children const cg_symb, std::string const selfname, std::string const qname, - bool is_module, tag_t tag); + size_t lo, size_t hi, bool is_module, tag_t tag); }; } // namespace format_output Index: xml_utils.cpp =================================================================== RCS file: /cvsroot/oprofile/oprofile/libpp/xml_utils.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -u -p -d -r1.15 -r1.16 --- xml_utils.cpp 15 Apr 2009 19:09:45 -0000 1.15 +++ xml_utils.cpp 28 Oct 2009 16:43:34 -0000 1.16 @@ -249,7 +249,7 @@ void xml_utils::output_xml_header(string // both here and in the schema file when major changes are made to // the schema. changes to opreport, or minor changes to the schema // can be indicated by changes to the fraction part. - string const schema_version = "2.0"; + string const schema_version = "3.0"; // This is the XML version, not schema version. string const xml_header = "<?xml version=\"1.0\" ?>"; |