Analyze Process Dumps
Sometimes, for example, in the case of a production web server, it may not be possible to install a profiler on a computer and get a regular memory snapshot. Typically, your last resort in such a case is a raw memory dump. dotMemory lets you import and analyze the dumps as regular snapshots: involving all product features like automatic inspections and retention diagrams.
Supported frameworks | Supported OSs |
---|---|
|
|
Get a process memory dump
You can get a memory dump with a number of tools. The two most popular ones are Task Manager (comes with the operating system) and Process Explorer.
Important: When getting a dump of a 32-bit application with Task Manager, make sure you use a 32-bit version of the tool. You can find it in C:\Windows\SysWOW64\taskmgr.exe.
dotMemory supports memory dumps created using the
gcore
anddotnet-dump
tools. For example, to get a dump of a process with the 1234 PID:sudo gcore 1234or
dotnet-dump collect -p 1234
Import a process memory dump
On the Home page, on the left panel, click Import Process Dump.
In the opened dialog, select the desired workspace file and click Open.
After this, the imported dump will be converted into a regular dotMemory workspace.
Unreachable objects
Before taking a memory snapshot, dotMemory forces full garbage collection. In contrast, garbage collection is not performed when you get a memory dump with Task Manager or another tool. As a result, the memory dump will contain objects that aren't reachable from GC roots. Typically, these objects were already prepared for garbage collection but haven't been collected. In some cases, they may be of interest for analysis. dotMemory lets you open such objects as a separate object set.
To open a set of unreachable objects
Import and open a memory dump.
Open the Inspections view.
In the Heap Fragmentation section, click the link unreachable objects.