VG2.4.0: massif versus /proc/pid/status

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

VG2.4.0: massif versus /proc/pid/status

peter.soetens (Bugzilla)-2
Hi,  
 
In my console program (C++), massif reports a top usage of 350KB heap+stack  
and a steady-state usage of only 50KB.  
( See <http://people.mech.kuleuven.ac.be/~psoetens/tmp/massif.17647.ps> )  
 
 But looking at /proc/pid/status, I get :  
Name:   taskintro  
State:  S (sleeping)  
SleepAVG:       58%  
Tgid:   18314  
Pid:    18314  
PPid:   5599  
TracerPid:      0  
Uid:    1000    1000    1000    1000  
Gid:    1000    1000    1000    1000  
FDSize: 256  
Groups: 6 24 25 29 33 44 100 101 103 108 1000  
VmSize:    41832 kB  
VmLck:     41832 kB  
VmRSS:     41828 kB  
VmData:    33240 kB  
VmStk:        84 kB  
VmExe:      2020 kB  
VmLib:      5440 kB  
VmPTE:        68 kB  
Threads:        5  
...  
 
Is it possible that massif does not check all threads ? From the manual I  
understood that massif reports every byte (approximately) heaped and  
alloced, but VmData is supposed to be the apps' allocated data. So what
explains the difference ? Is the memory still present  
in a std::allocator or so ? Is there a better metric ?
 
Could not find this on the website/faq or in the archive.  
 
Peter Soetens  
 



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Valgrind-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-users
Reply | Threaded
Open this post in threaded view
|

Re: VG2.4.0: massif versus /proc/pid/status

njn (Bugzilla)-2
On Fri, 17 Jun 2005, Peter Soetens wrote:

> In my console program (C++), massif reports a top usage of 350KB heap+stack
> and a steady-state usage of only 50KB.
> ( See <http://people.mech.kuleuven.ac.be/~psoetens/tmp/massif.17647.ps> )
>
> But looking at /proc/pid/status, I get :
> Name:   taskintro
> State:  S (sleeping)
> SleepAVG:       58%
> Tgid:   18314
> Pid:    18314
> PPid:   5599
> TracerPid:      0
> Uid:    1000    1000    1000    1000
> Gid:    1000    1000    1000    1000
> FDSize: 256
> Groups: 6 24 25 29 33 44 100 101 103 108 1000
> VmSize:    41832 kB
> VmLck:     41832 kB
> VmRSS:     41828 kB
> VmData:    33240 kB
> VmStk:        84 kB
> VmExe:      2020 kB
> VmLib:      5440 kB
> VmPTE:        68 kB
> Threads:        5
> ...
>
> Is it possible that massif does not check all threads ? From the manual I
> understood that massif reports every byte (approximately) heaped and
> alloced, but VmData is supposed to be the apps' allocated data. So what
> explains the difference ? Is the memory still present
> in a std::allocator or so ? Is there a better metric ?

Memory consumption can be broadly categorised as heap + stack + static.
Massif only reports heap + stack.  Static includes almost everything that
gets mmap'd in, including all code segments and static data segments.
That explains the difference.

Why doesn't Massif measure the static memory?  It did, early on, but the
figures are difficult to interpret because static memory can be shared
between multiple processes on the same machine.

Nick


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Valgrind-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-users