This page describes how to configure and use object instance tracking for Java applications. For more information about why you may need to configure this, see Java Memory Thrash

When object instance tracking is enabled, tracks the top 20 application classes in the heap by default. You can also track specific classes.

Activating object instance tracking increases the amount of information captured by the agents, resulting in additional overhead. recommends using object instance tracking only while troubleshooting potential memory leaks. It does not normally need to be enabled during normal operation. 

You need the Configure Agent Properties permission to set object instance tracking. You need the Configure Memory Monitoring permission to configure the custom classes to track. See Manage Custom Roles for Cisco AppDynamics.

Prerequisites for Object Instance Tracking

jdk.jcmd is no longer a required module for the custom runtime. However, it is required for the proper functioning of object instance tracking.

Specify the Classpath

When using the JDK runtime environment, set the classpath using the -classpath option for the application. For example:

Enable Object Instance Tracking

To start an object instance tracking session, follow these steps:

  1. In the left navigation pane, click Tiers & Nodes
  2. In the right pane, expand the tier node and open the Node Dashboard for the node on which you want to enable object instance tracking. 
  3. Click the Memory tab.
  4. Click the Object Instance Tracking subtab.
  5. Click ON.

Tracked classes now appear in the Object Instance Tracking table. You can drill down to the tracked classes to see details. 

Track Specific Classes

For performance reasons, only the top 20 application classes in the heap are tracked automatically. 

Use the Configure Custom Classes to Track option on the Object Instance Tracking subtab to specify instances of specific classes to track. Note that the classes you configure here are tracked only if their instance count is among the top 1000 instance counts in the JVM. 

To track instances of custom classes:

  1. On the Object Instance Tracking tab, click Configure Custom Classes to Track.
  2. On the Instrumentation page that displays, click the tier you want to customize. 
  3. In the Object Instance Tracking section for the tier, click Add
  4. Enter the fully-qualified class name of the class to track and click Save.

The class you added is now tracked during object instance tracking sessions.