NmpCore and allocation stacks

Use this forum to discuss subjects that don't belong in the other forums.
Post Reply
Posts: 19
Joined: Thu May 05, 2011 4:18 pm

NmpCore and allocation stacks

Post by orangy » Wed Jan 18, 2012 9:10 am

Is it possible to collect allocation stacks using NmpCore?
I need to cover memory traffic collection on client site, much like described here (http://confluence.jetbrains.net/display ... structions) in the Advanced Snapshots section. I would like to do it with NmpCore. Thanks.

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

Re: NmpCore and allocation stacks

Post by Andreas Suurkuusk » Thu Jan 19, 2012 8:14 am

Yes, if you are able to start the profiled process from NmpCore, you will be able to collect allocation stacks similar to you Advanced snapshots scenario.

You can use the command line below to start profiling DevEnv.exe using NmpCore and bring up the NmpCore control panel. The control panel can then be used to manually collect snapshots and stop the profiling session.

Code: Select all

NmpCore /iid- /dt- /cr- /sf "full-path-to-snapshot-file.prfsession" "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe"
The /iid-, /dt-, and /cr-, arguments will disable instance data collection, the dispose tracker, and the real-time data collection, which will give the same settings as your "Advanced snapshots" settings. At least almost. There's currently no command line option to disable the stack reducer, but we will probably add support for this in the next release of NmpCore and .NET Memory Profiler.

Another option is to create a profiler project file containing the wanted settings, and then start profiling using the project file.E.g. using the command line below:

Code: Select all

NmpCore /prj NmpCoreProj.prfproj /sf "full-path-to-snapshot-file.prfsession" "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe"
The session file path and application path can also be included in the project, but it's probably better to supply them as command line arguments to avoid hard coded paths.
Best regards,

Andreas Suurkuusk
SciTech Software AB

Post Reply

Who is online

Users browsing this forum: No registered users and 15 guests