[eclipseoprofile-cvs] org.eclipse.cdt.oprofile/org.eclipse.cdt.oprofile.core.linux/src ChangeLog,1.9
Brought to you by:
jhandcock
From: Jeremy H. <jha...@us...> - 2006-05-18 04:56:16
|
Update of /cvsroot/eclipseoprofile/org.eclipse.cdt.oprofile/org.eclipse.cdt.oprofile.core.linux/src In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv16594/org.eclipse.cdt.oprofile.core.linux/src Modified Files: ChangeLog profileimage.cc Log Message: Adding patch from Keith Seitz Index: profileimage.cc =================================================================== RCS file: /cvsroot/eclipseoprofile/org.eclipse.cdt.oprofile/org.eclipse.cdt.oprofile.core.linux/src/profileimage.cc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** profileimage.cc 14 Apr 2005 18:42:34 -0000 1.4 --- profileimage.cc 18 May 2006 04:56:07 -0000 1.5 *************** *** 124,146 **** operator<< (ostream& os, profileimage* image) { ! // HACK ALERT! It would be nice to fix this in add_dependencies, ! // but we end up with a memory leak because we don't know what to do ! // with the image passed (we need to prevent its samplefile from being deleted ! // by profileimage::~profileimage). Sigh. ! // If "--separate=none" is used, we could end up with a ! // a top-level image which is a dependency of itself. ! // Goofy, but that's what oprofile does: it marks the executable ! // as a dependency of itself. keiths-20050406 ! if (!image->get_samplefile ()->has_samplefile ()) { list<profileimage*>* deps = image->get_dependencies (); ! image = deps->front (); } - os << startt ("image") << attrt ("name", image->get_name ()) - << image->get_header () - << image->get_samplefile (); - // Output dependent images list<profileimage*>* deps = image->get_dependencies (); --- 124,143 ---- operator<< (ostream& os, profileimage* image) { ! os << startt ("image") << attrt ("name", image->get_name ()); ! if (image->get_samplefile ()->has_samplefile ()) { + os << image->get_header () + << image->get_samplefile (); + } + else + { + // If this image does not have a samplefile (i.e., it is a "fake" + // one generated because it has no samples but has dependencies which do) + // then output the header for a dependency with no samples. list<profileimage*>* deps = image->get_dependencies (); ! os << deps->front ()->get_header (); } // Output dependent images list<profileimage*>* deps = image->get_dependencies (); Index: ChangeLog =================================================================== RCS file: /cvsroot/eclipseoprofile/org.eclipse.cdt.oprofile/org.eclipse.cdt.oprofile.core.linux/src/ChangeLog,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ChangeLog 2 May 2006 01:37:25 -0000 1.9 --- ChangeLog 18 May 2006 04:56:07 -0000 1.10 *************** *** 1,2 **** --- 1,8 ---- + 2006-05-08 Keith Seitz <ke...@re...> + + * procfileimage.cc (operator<<): When outputting an image + with only dependencies, only output the first dependency's header. Then + loop through the dependencies. + 2006-04-28 Keith Seitz <ke...@re...> |