Compare snapshots created with NmpCore

Use this forum for questions on how to use .NET Memory Profiler and how to analyse memory usage.
Post Reply
LonelyPixel
Posts: 3
Joined: Tue Apr 10, 2012 12:56 pm

Compare snapshots created with NmpCore

Post by LonelyPixel » Tue Apr 10, 2012 1:05 pm

I would like to compare two snapshots of the same application, created with NmpCore, one after the application has started, and the other when it shows a great memory consumption. I hope to find the differences so that I can find out where all the memory has gone in the meantime. But I couldn't manage to use the compare function. When I load either snapshot file, the other is closed and the compare dropdown list is always empty. How can I do that comparison?

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

Re: Compare snapshots created with NmpCore

Post by Andreas Suurkuusk » Wed Apr 11, 2012 7:17 am

You can compare snapshots from different sessions by adding them to a profiler project.
  1. Create a new profiler project using the "File->New Profiler project" command
  2. Select the process type, even if you are not planning to start any session using the project. I recommend that you select .exe and then specify some application on the next page. (In the next version of the profiler you will be able to select "None" as the process type.)
  3. Click Finish
  4. Add the sessions you have created using NmpCore using the "Add session" command.
  5. Select the two snapshots you want to compare and click the "Compare snapshots" command. For more information, see http://memprofiler.com/OnlineDocs/compa ... plorer.htm.
However, if you are comparing snapshots from the same application run, I highly recommend that you try to collect both snapshots within the same session, as that will give you much better information.
Best regards,

Andreas Suurkuusk
SciTech Software AB

LonelyPixel
Posts: 3
Joined: Tue Apr 10, 2012 12:56 pm

Re: Compare snapshots created with NmpCore

Post by LonelyPixel » Wed Apr 11, 2012 7:37 am

How can I put them in the same session? When I specify the same session file name, a #2, #3 and so on are automatically appended and thus it seems different sessions are generated.

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

Re: Compare snapshots created with NmpCore

Post by Andreas Suurkuusk » Thu Apr 12, 2012 3:16 pm

To get multiple snapshots in the same session file you must collect the snapshots in the same profiling session, there's no way of merging session files. I don't know how you run NmpCore, but in your case you should probably not use the collect and stop command line argument (/cs). If you omit the /cs argument, you will get a control panel that you can use to manually collect snapshots. When you have collected the needed snapshots, you can stop the session and then you will get a single session file with all collected snapshots.
Best regards,

Andreas Suurkuusk
SciTech Software AB

Post Reply

Who is online

Users browsing this forum: No registered users and 29 guests