Show Type details only for Delta comparison

Use this forum for questions on how to use .NET Memory Profiler and how to analyse memory usage.
Post Reply
ilan
Posts: 2
Joined: Tue Aug 26, 2014 1:41 pm

Show Type details only for Delta comparison

Post by ilan » Tue Aug 26, 2014 1:48 pm

Hi, When i compare between 2 snapshots, There is the Tab "Type details" and i see the list of all Live Instances.
it display it is showing only 2,000 instances of 202,652.

I would like to know how i can display only the Delta instances in this list - So i could track down their source.
I want to see in the list only 107 Instances.
Thanks.
Attachments
Capture.PNG

Andreas Suurkuusk
Posts: 1005
Joined: Wed Mar 02, 2005 7:53 pm

Re: Show Type details only for Delta comparison

Post by Andreas Suurkuusk » Tue Aug 26, 2014 8:41 pm

You can select to show only new instances by clicking on the "New instance" column in the top filter row (see screenshot).

It's not possible to show only the delta instances, since the profiler cannot distinguish between a new instance and a "replaced instance".
ShowNewInstances.png
In the next version of the profiler (v5.0), all instances will be included in the Instances list, not just the top 2000.
Best regards,

Andreas Suurkuusk
SciTech Software AB

ilan
Posts: 2
Joined: Tue Aug 26, 2014 1:41 pm

Re: Show Type details only for Delta comparison

Post by ilan » Wed Aug 27, 2014 5:54 am

Hi thank you very much for the answer, Why is it not possible for the profiler to do so ?
The profiler only has the count of the instances, is there a timestamp for each instance in the operation system ? which the instance has been created ?

Andreas Suurkuusk
Posts: 1005
Joined: Wed Mar 02, 2005 7:53 pm

Re: Show Type details only for Delta comparison

Post by Andreas Suurkuusk » Wed Aug 27, 2014 2:32 pm

No, there's no timestamp for an instance, but the profiler can detect that the instance was created between the comparison snapshot and the selected snapshot, and mark the instance as new. However, since instances can also be collected between the snapshot, there might be fewer delta instances than new instances.

Consider the case where a List is expanded. A new buffer is allocated, and the reference to the old buffer will be overwritten by the reference to the new buffer. The old buffer will then be garbage collected. If you collect a snapshot, the snapshot will have one new instance, but the delta instances count will be zero, since the new instance "replaced" the old instance.
Best regards,

Andreas Suurkuusk
SciTech Software AB

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest