|
From: <fa...@ca...> - 2004-07-14 16:00:48
|
Avery Pennarun wrote:=20 > in the postscript output, don"t chop function names so much. =20 > It"s okay in C, but terrible in C++. Several of my biggest=20 > memory users are of the form "x81161ECD:MySillyClassNa",=20 > which is too vague for my purposes :) I agree with this.=20 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.=20 Anyone have a better idea? - Matt |
|
From: Nicholas N. <nj...@ca...> - 2004-07-14 16:09:53
|
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. N |
|
From: Avery P. <ape...@ni...> - 2004-07-14 17:03:14
|
On Wed, Jul 14, 2004 at 05:09:27PM +0100, Nicholas Nethercote wrote:
> 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.
There two ways I can think of:
1. Remove the first part of the name, instead of the last part
2. "Squeeze" the name into a smaller number of characters by removing the
most common letters from the middle (ie. MySillyClassNa -> MySlyClsNm).
I wrote a program for this one time, and the hardest part was really the
letter-frequency table. Although I doubt you want to use a method
that's quite this weird, I can send you the source if you want :)
Have fun,
Avery
|
|
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 > |