This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 5/7] Add line map statistics to -fmem-report output


On 09/16/2011 04:13 AM, Dodji Seketeli wrote:
It seems odd to add in the locations size here since it's also printed
separately.
I wanted macro_maps_used_size to really reflect the total used size
for macro maps, without having to mentally do the addition of its two
components.  But at the same time, I was interested in seeing how much
memory were the locations taking inside the macro map memory.  As I
was suspecting them to take a lot of memory.

Right. I suppose my complaint is that the information is oddly redundant. If you have two quantities A and B, is it more useful to print A and B, or A+B and B? I don't object to printing the total of the memory used by the maps and the locations, but I think all the components should be printed as well.


It's hard to compare macro_maps_allocated_size with macro_maps_used_size since you have to do subtraction to discover both values from what is printed.

And do the addition in dump_line_table_statistics rather than store sums in linemap_stats.

Also, linemap_stats and linemap_get_statistics need comments.

+/* Display an integer amount as multiple of 1K or 1M (in base 2Ã).

No UTF-8.


Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]