Controlling Profiling Session
After you run the profiling session, dotMemory will open the new Analysis tab and launch the profiled application.
To control the profiling process, use the following buttons on the top of the page :
- Force GC: forces full garbage collection in the application.
- Kill Process: kills the currently selected process of the application.
- Kill All Processes*: kills all processes of the application.
- Detach**: detaches the profiler from the application but keeps the application running.
- Collect Allocations: enables and disables collecting memory allocation data.
Use this option to reduce the profiler overhead and collect allocation data only when it is needed (for example, only when working with app functionality you want to profile). Note that memory traffic data will be incomplete in case you turn off collecting allocations at least once during the profiling. Learn more in Analyzing Memory Traffic.
- Get Snapshot by Condition: opens the Get Snapshot by Condition window. Using this window, you can configure dotMemory to automatically get snapshots when a particular condition takes place. Learn more in Getting Snapshots by Condition.
- Get Snapshot: gets a memory snapshot for the process selected in the list of processes *. The snapshot is added to the collected snapshot area . Getting a snapshot does not interrupt the profiling process, allowing you to get another snapshot (which, for example, can be compared with the first one later). After you finish capturing snapshots, you can proceed to analyzing profiling results.
Profiling multi-process applications
If your standalone or .NET Core application runs more than one process, you can take a memory snapshot of a particular process.
To get a snapshot of a particular process
- Start profiling with the enabled Profile child processes profiling option.
- After the profiling session starts, select the desired process from the drop-down list .
- Click Get Snapshot.
Viewing real-time profiling data
The timeline graph shows how your app consumes memory in real time. The timeline consists of a number of charts showing:
- Unmanaged memory: an instant size of unmanaged memory. To add this chart, select the Show unmanaged memory check box in .
- Heap generation 0, 1, 2, Large Object Heap (LOH): instant sizes of Gen0, Gen1, Gen2 heaps and Large Object Heap.
- Allocated in LOH since GC: an instant size of objects that have been allocated to Large Object Heap since the last Garbage Collection (after each GC, the chart restarts from zero). Use this chart to understand when LOH allocations happen (on application startup, during some work, etc.) and how intense they are (e.g. the app can have some significant LOH memory traffic that doesn't change the LOH size).
Showing profiling controls in a separate window
You can detach the profiling controls to a separate Profiling Controller window by clicking the button in . The controller window is always shown on top of other windows, which is especially helpful on desktops with only one monitor.