| Modifier and Type | Field and Description |
|---|---|
| public static final Map | |
| public static final Map | instantiatedObjects
Instantiated objects must be traced using their identities as their hashCode may change during the execution. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private static StackTraceElement[] | Returns: a stack trace that led to erroneous situationIf the stack trace contains class initializaiton, returns the stack frames up to the last initialization. |
| public static void | reportClassInitialized(Class<?> clazz, StackTraceElement[] stackTrace)
This method is called from the native-image diagnostics agent to report class initialization. |
| public static void | reportObjectInstantiated(Object o, StackTraceElement[] stackTrace)
This method is called from the native-image-diagnostics agent to report object instantiation. |
| initializedClasses | back to summary |
|---|---|
| public static final Map<Class<?>, StackTraceElement[]> initializedClasses | |
| instantiatedObjects | back to summary |
|---|---|
| public static final Map<Object, StackTraceElement[]> instantiatedObjects Instantiated objects must be traced using their identities as their hashCode may change during the execution. We also want two objects of the same class that have the same hash and are equal to be mapped as two distinct entries. | |
| ClassInitializationTracking | back to summary |
|---|---|
| public ClassInitializationTracking() | |
| relevantStackTrace | back to summary |
|---|---|
| private static StackTraceElement[] relevantStackTrace(StackTraceElement[] stack) If the stack trace contains class initializaiton, returns the stack frames up to the last initialization. Otherwise returns the whole stack trace. The method never returns the stack from the instrumented part. This method can be refined on a case-by-case basis to print nicer traces.
| |
| reportClassInitialized | back to summary |
|---|---|
| public static void reportClassInitialized(Class<?> clazz, StackTraceElement[] stackTrace) This method is called from the native-image diagnostics agent to report class initialization.
| |
| reportObjectInstantiated | back to summary |
|---|---|
| public static void reportObjectInstantiated(Object o, StackTraceElement[] stackTrace) This method is called from the native-image-diagnostics agent to report object instantiation.
| |