Skip to content

CAUTION: This site hosts draft documentation for the next release. For published content of the latest release, visit eclipse.dev/openj9/docs

-XX:[+|-]UseDebugLocalMap

This option is used to enable or disable the use of the debug version of the stack local mapper.

Note: This option is intended for debugging and diagnostic purposes only and not for usage in production environments.

Syntax

    -XX:[+|-]UseDebugLocalMap
Setting Effect Default
-XX:+UseDebugLocalMap Enable
-XX:-UseDebugLocalMap Disable yes

Explanation

The Eclipse OpenJ9™ virtual machine (VM) has two versions of the stack local mapper, the default and the debug version. These mappers track local variables on the Java stack during the program execution and help the garbage collector (GC) to identify the objects that are no longer needed and hence can be reclaimed to improve performance.

With the default mapper, the objects might be collected too early from a debugging perspective. In certain scenarios, such as when investigating a memory leak or finalization issues, the objects must be kept reachable even if they might not be used again. The debug local mapper helps to keep the objects reachable longer.

Earlier the debug local mapper was enabled only by running the entire VM in debug mode which significantly impacted performance. With the -XX:+UseDebugLocalMap option, you can enable the debug local mapper without running the entire VM in debug mode to investigate memory leak or finalization issues.

To disable the debug local mapper, set the -XX:-UseDebugLocalMap option on the command line.

See also