stellar2012wxg / gperftools

Automatically exported from code.google.com/p/gperftools
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

[feature suggestion] perftools should be able to show cumulative memory of the process #538

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Currenlty, perftools keeps track of the cumulatively allocated memory, and 
dumps the profile after every new gigabyte of cumulative memory allocated.

Sometimes it is useful to show only cumulative memory allocated by the certain 
point. Or allocated between the particular time points.

I have the process that isn't high in allocated memory, but is high in 
cumulatively allocated memory. (heap is low, but profiles are dumped a lot) So 
it allocates/frees a lot while it works. This isn't expected, and perftools 
could help understand the situation.

So, I suggest adding the separate environment variable:
CUMPROFILE=/tmp/cumulative

When such variable is set, perftools should write the /tmp/cumulative profile 
which will be just like the heap profile, but instead of allocated memory will 
show cumulative memory. In other words, heap profile is delta between 
cumulative profile and the aggregate of all free operations performed.

This feature will allow some better insight into the process memory allocation.

Original issue reported on code.google.com by yuriv...@gmail.com on 6 Jun 2013 at 5:16

GoogleCodeExporter commented 9 years ago
A patch would be awesome.

Original comment by alkondratenko on 6 Jul 2013 at 11:16