User Manual > How to...

Import Memory Dump Files

(Professional only)

By using the Import Memory Dump command it is possible to import memory dump files as snapshots into the profiler. This is especially useful when troubleshooting memory problems in a production application, e.g. when the problem occurs on a customer’s computer and cannot be easily reproduced.

In order to import memory dumps into the profiler, Debugging Tools for Windows must be installed on the computer. These tools can be downloaded from http://www.microsoft.com/whdc/devtools/debugging.

NOTE! On a 64-bit operating system you will need to download the 32-bit debugging tools to attach to a 32-bit process and the 64-bit debugging tools to attach to a 64-bit process.

After the debugging tools have been installed, the following steps should be performed to attach the profiler to a running process:

1.   Obtain one or more memory dump files for the process you want to investigate. One way of obtaining a memory dump file is to use the “ADPlus” script that is included with Debugging Tools for Windows. For example, the command

ADPlus -hang -pn myapp.exe

will create memory dump files for all processes that are named myapp.exe.

For more information, see the knowledge base article “How to use ADPlus to troubleshoot “hangs” and “crashes”” at http://support.microsoft.com/kb/286350.

NOTE! The debugging tools do not need to be installed on the computer running the process; it is possible to just xcopy the whole debugging tools folder from another installation.

2.   Select the ImportMemoryDumpImport Memory Dump command from the File menu or the Profiler menu if running under Visual Studio.

3.   The “Import Memory Dump” wizard appears.

4.   Use the Browse button or the drop-down list to select the memory dump file to import.

5.   If you want to import using the default instance data collection settings, click Start to start importing the dump file.

6.   Alternatively, you can click Next if you want to modify the instance data collection settings.

7.   When you have decided on the settings, click Start to start importing the dump file.

8.   If Debugging Tools for Windows is not installed, a dialog will appear, instructing you to install the debugging tools.

9.   If the .NET runtime version on the computer importing the memory dump does not match the runtime on the machine where the memory dump was created, the dialog below will be shown. If you have Internet access it is recommended that the requested file be downloaded from the Microsoft symbol store. This will make sure that the correct version is available.

versionmismatch

Importing Additional Memory Dump Files

It is possible to import additional memory dump files into the same session, which enables memory dumps to be compared with each other. To import additional memory dump files, select the Import Memory Dump command or the Collect Heap Snapshot command before stopping the session. This will bring up the “Import Memory Dump” wizard again, and the dump file will be imported as an additional snapshot.

.NET Memory Profiler User Manual

© Copyright 2002-2013. SciTech Software AB.

For information about .NET Memory Profiler, see the product site at http://memprofiler.com

.NET Memory Profiler is developed by SciTech Software AB