You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, JDK 21 and newer produce the following deprecation warning when visualizing recursive functions with dendroloj:
WARNING: A Java agent has been loaded dynamically (<path to agent JAR>)
WARNING: If a serviceability tool is in use, please run with -XX:+EnableDynamicAgentLoading to hide this warning
WARNING: If a serviceability tool is not in use, please run with -Djdk.instrument.traceUsage for more information
WARNING: Dynamic loading of agents will be disallowed by default in a future release
As per https://openjdk.org/jeps/451, dynamically loading agents will be disallowed by default in future JDK version.
Dendroloj uses a dynamically loaded ByteBuddy agent to instrument methods annotated with @Grow, so this will prevent using dendroloj without setting extra JVM flags in the future.
We need to figure out some path forward once using dynamically loaded agents is disallowed. Currently there seem to be 4 main possibilites:
There is some hope that the limited instrumentation API mentioned under Future Work in the JEP will be enough for us, but that is not guaranteed. It also may or may not require the user to to use the Java 9 module system, which would affect usability and require extra documentation.
It is possible for the user to manually set the -XX:+EnableDynamicAgentLoading flag, though this will affect usability of the library and will require extra documentation.
We develop a plugin for IDE-s that we want to support, which can automatically configure the relevant JVM flags. This is potentially a lot of extra work and creates a divide between supported and unsupported IDE-s. This does have an additional benefit: we can potentially use the plugin to automatically install dendroloj, which could reduce the number of manual installation steps.
We might find a different way to instrument function calls that does not depend on loading an agent. I have not found any good candidates for this, but the possibility cannot be ruled out.
TODO: Create issues and discussions in the relevant places to get feedback from other developers and maintainers on how to deal with this.
The text was updated successfully, but these errors were encountered:
Currently, JDK 21 and newer produce the following deprecation warning when visualizing recursive functions with dendroloj:
As per https://openjdk.org/jeps/451, dynamically loading agents will be disallowed by default in future JDK version.
Dendroloj uses a dynamically loaded ByteBuddy agent to instrument methods annotated with
@Grow
, so this will prevent using dendroloj without setting extra JVM flags in the future.We need to figure out some path forward once using dynamically loaded agents is disallowed. Currently there seem to be 4 main possibilites:
-XX:+EnableDynamicAgentLoading
flag, though this will affect usability of the library and will require extra documentation.TODO: Create issues and discussions in the relevant places to get feedback from other developers and maintainers on how to deal with this.
The text was updated successfully, but these errors were encountered: