|
From: Jeroen N. W. <jn...@xs...> - 2004-07-14 18:26:35
|
> On Wed, 14 Jul 2004 fa...@ca... wrote: > >>> in the postscript output, don"t chop function names so much. >>> It"s okay in C, but terrible in C++. Several of my biggest >>> memory users are of the form "x81161ECD:MySillyClassNa", >>> which is too vague for my purposes :) >> >> I agree with this. > > It's bug #82871: bugs.kde.org/show_bug.cgi?id=82871 > >> One easy solution is to change the string-length (ms_main.c, line 1424: >> "16"), but this "squishes" the plot and may not help that much. >> >> Anyone have a better idea? > > Some truncation seems unavoidable, since C++ names can be 100+ characters, > when templates are heavily used. I thought of having a command line > argument to specify the truncation length, but that's pretty ugly. Also, > large values do squeeze the plot a lot; that seems to be the way hp2ps > (which was grabbed for Valgrind from elsewhere) works -- it wasn't > designed for C++ :) So I don't have a good solution for this. How about this: create a translate table between the canonical long names and unique short names. Create a short name for each canonical name by stripping everything before the final ::, if any; stripping all template arguments if any; optionally deleting some characters as suggested elsewhere; and if necessary append a sequence number to make this short name unique. Use the short names in the plot, and also print the translate table. Just my 0.02 euro. Jeroen. > > N > > > ------------------------------------------------------- > This SF.Net email sponsored by Black Hat Briefings & Training. > Attend Black Hat Briefings & Training, Las Vegas July 24-29 - > digital self defense, top technical experts, no vendor pitches, > unmatched networking opportunities. Visit www.blackhat.com > _______________________________________________ > Valgrind-users mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-users > |