Page 1 of 1

How do I view call stacks of allocations

Posted: Wed Sep 03, 2014 7:53 pm
by dsemc
I cannot figure out how to view call stacks of allocations in the .NET Memory Profiler. I'm currently using 4.6 but I was never able to figure this out with earlier editions, around a year ago when we first purchased this tool.

While in a profiling session, after taking a couple memory snapshots, I see a menu item under View called "Call stack functions" but it is grayed out and disabled. I saw the documentation topic called "Call stacks view" but it doesn't explain how to actually get there. Viewing call stacks is the most important feature to me, to be able to figure out the code path which is actually causing the leak. I was disappointed with the tool that it is so hard to figure out.

I also am using a different .NET profiler product which shows the call stacks of allocations (sortable by # and total amount of allocations) and I was able to find it without even looking at the documentation, so I know this can be done. Unfortunately that other tool doesn't handle attaching to a service process which is what I need now, which the .NET Memory Profiler seems to handle well.

Thanks

Re: How do I view call stacks of allocations

Posted: Thu Sep 04, 2014 10:34 am
by Andreas Suurkuusk
.NET Memory Profiler is not able to collect allocation call stacks when attaching to a process. This is a limitation in the profiling API provided by the .NET runtime.

To get allocation call stack information you need to start the profiled process from the profiler, e.g. by using the Profile application command.