Use the Selective Memory dashlet to create or open Selective Memory snapshots and analyze the instances in the snapshot. A selective memory dump uses memory sensor rules for instance-allocation book keeping. You get a list with all allocated instances for which you have created memory sensor rules. See Memory Diagnostics for more information.
How to create a new snapshot?
This option only appears when an agent or nothing is selected in the upper table of the dashlet. If you select an existing snapshot, an overview of the snapshot appears. If you select multiple snapshots, a chart appears that compares the overview data.
- Click Create Memory Snapshot. The Create Memory Snapshot dialog box appears.
- Click Pick Agent, and select the required agent from the list.
- If needed, select the Force Garbage Collection before creating snapshot to clean the memory up in prior to creating snapshot.
- Click OK.
Show snapshot content
Double-click a snapshot or click Show Classes to view the instances that the snapshot collects in a new dashlet.
- Class/Instances: Name of class that is monitored for instantiations. The map/collection sensor includes all classes that implement the corresponding interfaces. When you expand the class, the individual instances are grouped by their allocating class, allocating method, allocating line, and their time of allocation.
- Instances: Number of monitored class instances allocated by one method of one allocating class.
- Sum Collection Size For collections or maps, this represents the sum of the
map.size()values of all Instances. It also contains an average of the size of all Instances of this class.
- Allocating Class: Class that allocates the instance. Hidden by default.
- Allocating Method: Method that allocates the instance. Hidden by default.
- Domain: The Appdomain (only for .NET).
- File: Name of the source file of the allocating class, if available.
- Line: Line number within the source file were the allocation is performed. If allocation takes place in a native method the line number is set to a dash (-).
- Allocating Thread: Name of the thread that allocated the instance.
- Object Age: Age of the instance at the time the snapshot is created. Use this to find very long living instances.
- Allocation Time: When the Instance is allocated.
Group by allocation time
AppMon groups instances by allocating class, allocation method, allocating line and their time of allocation. If the same class/method/line, within the same second, allocates multiple instances of a class, AppMon groups them into a single node to improve visibility.
Create Method Rules from selective memory content
Use the Selective Memory Content dashlet to create include or exclude method rules to allocate methods. When you create an include rule, the corresponding method that allocates an instance is included into PurePaths. To create method rules, use the context menu of an allocating method node.
Compare selective memory snapshots
To open the Selective Snapshot Compare dashlet, select multiple snapshots and click the compare button in the overview (or use the context-menu). This dashlet compares the instance counts and collections/maps classes size of the selected snapshots. You cannot compare individual collection/map instances by size. All instances of a specific class must be aggregated.
The view includes the following columns:
- Class/Instance: Class that is compared. Expand to see the individual compared snapshots.
- Average Delta Instances per second: Average change of number instances per second for this class.
- Instance Count: Average number of instances over all snapshots for first-level entries (classes). Number of instances in this snapshot for second-level entries (snapshots).
- Average Delta Collection size: Average change of the sum of the sizes of all instances of a class for collections/maps only.
- Collection size: Sum of the size of all instances of that class for collections/maps only.