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
Since the JDK 11 already had a way to monitor object allocations (https://openjdk.java.net/jeps/331), what's the new feature the allocation-instrumenter can provide?
Thanks!
The text was updated successfully, but these errors were encountered:
Note that both this tool and JEP-331 came from the same team, and that this tool predates JEP-331 by about a decade. We developed that JEP because we couldn't do everything we wanted with this instrumenter.
That said, we find that this tool still has two meaningful use cases:
This lets you write the callbacks directly in Java without trampolining through native code. This is the biggest difference: many people don't want to deal with native code if they can avoid it, and it means developers can easily use Java logic their application already depends upon (e.g., logging) if they want. There's a performance penalty, but many folks are happy to take the tradeoff.
When instrumenting constructors, you can restrict which classes get instrumented, which allows a lightweight way of tracking instantiations of particular types.
Hello,
Since the JDK 11 already had a way to monitor object allocations (https://openjdk.java.net/jeps/331), what's the new feature the allocation-instrumenter can provide?
Thanks!
The text was updated successfully, but these errors were encountered: