Import Memory Dump Files
(Professional and Enterprise 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.
The following steps should be performed to attach the profiler to a running process:
Obtain one or more memory dump files for the process you want to investigate. One way of obtaining a memory dump file is to create a memory dump in the Windows Task manager. A dump file can be created by right-clicking on a process and select Create dump file.
Another option is to use the ProcDump utility, which can be downloaded from https://technet.microsoft.com/en-us/sysinternals/dd996900.aspx.
For example, the command
procdump -ma myapp.exe
will create memory dump files for all processes that are named myapp.exe.
Select the Import Memory Dump command from the File menu or the Profiler menu if running under Visual Studio.
The “Import Memory Dump” wizard appears.
Use the Browse button or the drop-down list to select the memory dump file to import.
If you want to import using the default instance data collection settings, click Start to start importing the dump file.
Alternatively, you can click Next if you want to modify the instance data collection settings.
When you have decided on the settings, click Start to start importing the dump file.
The .NET runtime data access library (e.g. mscordacwks.dll) is needed to import the memory dump. If the correct version of the data access library cannot be found on the computer, 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. Otherwise it is possible to specify the data access library explicitly, e.g. by copying it from the computer where the memory dump was created.
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.