Visual Studio 2013 can show a column for inclusive size (which includes size of child objects) - http://blogs.msdn.com/b/visualstudioalm/archive/2013/10/16/net-memory-analysis-enhancements-in-visual-studio-2013.aspx
DebugDiag's memory analysis reports currently only shows object size without including child objects. Is there a way to make DebugDiag include size of child objects in its report?
What do you suggest is a good way to generate such a report for .NET 4.0 since Visual Studio only supports analyzing .NET 4.5 crash dumps
DebugDiag
DebugDiag 2 has totally been rewritten and is now a set of executables (EXE and DLL). It is no longer a set of scripts which you could easily modify to include additional information that you want to be there.
The output of DebugDiag is simiar to what you see in WinDbg+SOS's
!dumpheap -stat
output:Other approaches
SOS
!do <address>
gives only the size without children, but there is SOS!objsize <address>
, which seems to include children (can't cross check with Visual Studio 2013, only have 2012):To do that for all objects on the heap, you can execute
!objsize
for each object in a loop:The only command I know that lists property values recursively is SOSEX's
!mdt <address> -r
, but it will not output the size.Analyzing root objects only with Pykd
Starting point for a Pykd script:
Press Enter after
...
appears. Note that[34:50]
this might need to be adapter for 32 bit.