0

I have several .dmp files containing the memory captured from our .NET application that is hosted in IIS, and I want to run them through some kind of analyzer that will tell me which methods are contributing to unexplained high memory utilization by our application.

I have tried DebugDiag analysis as well as the tools that come with Visual Studio. I can manage to produce a list of objects in memory, but I have no idea which method is generating the objects.

Can anyone direct me to an application that can easily help me figure this out, or possibly even instruct me on how to use DebugDiag or Visual Studio to do this?

I have already hit up Google as much as possible, but I have simply not been successful at finding the answers I am looking for. I am willing to purchase a tool if that is what it takes, but I would like some confirmation that whatever is purchased will actually be able to answer my questions.

Thomas Weller
  • 55,411
  • 20
  • 125
  • 222
Eric
  • 2,120
  • 1
  • 17
  • 34
  • This borders on a software recommendation, which is frowned upon in stackoverflow, although I think this is a good question. I have used `windbg` to troubleshoot deadlocks before, but not for this. Although I believe it should give you some insights into your memory trouble. I believe it is distributed with the Windows SDK. The Ants profiler can also be used to diagnose memory leaks, again I have never used it. – Nameless One Jul 21 '15 at 21:32
  • It may also help to have a look at http://stackoverflow.com/q/3927/2420536 – Nameless One Jul 22 '15 at 00:12
  • I just created a similar question on [Software Recommendations](http://softwarerecs.stackexchange.com/questions/24581/standalone-net-memory-profiler). I think such question are off-topic here. You can follow my question or ask a new questions with your specific requirements. – Thomas Weller Sep 04 '15 at 21:41

1 Answers1

0

TL;DR: It's not possible to do this from dump files.

A good dump will contain the .NET objects, so you can see which types are increasing, but an object does not have a call stack attached.

In the native world (C++), there is a feature of the heap manager to attach a call stack to an object. It's called Create user stack database and can be enabled with the GFlags tool, which is part of the Debugging Tools for Windows.

Such a flag does IMHO not exist in .NET and since .NET comes with its own heap manager, enabling the native flag does not help.

Therefore, the only approach you can take with the dump files is:

  • find the type of objects that are increasing
  • search your source code for creations of such objects

You could use a memory profiler, but in that case, the dump files are useless and you need to re-run your application with the profiler attached.

Community
  • 1
  • 1
Thomas Weller
  • 55,411
  • 20
  • 125
  • 222