Should optimizations be observable for JVMTI agents?
Reingruber, Richard
richard.reingruber at sap.com
Tue Sep 24 21:28:57 UTC 2019
Hi,
I would like to get comments on the following questions:
1. Should optimizations be observable for JVMTI agents in general?
2. Should in particular optimzations based on escape analysis be observable?
(a) Should GetOwnedMonitorInfo() exclude objects with eliminated locking?
Currently it does [1]
(b) Should GetLocalObject() return null for scalar replaced objects?
Currently it does not. EA is disabled if agents can access locals.
(c) Should scalar replaced objects be omitted when agents iterate the heap / traverse the
object graph.
Currently they are omitted [2]
(d) Should memory optimizations (caching of reads) be observable?
Eg. should field modifications of a NoEscape object O by a JVMTI agent have an effect in
a compiled method that optimized field accesses based on EA?
Currently memory optimizations can be observed, if the agent uses heap functions only to
acquire a reference to the local object, which was not scalar replaced.
...and in the end hopefully an agreement :)
2a was discussed in the code review of JDK-8230677 [3]. David Holmes wished to generalize the
discussion and to draw more attention to it to get answers we can rely on.
Thanks, Richard.
[1] https://bugs.openjdk.java.net/browse/JDK-8230677
[2] https://bugs.openjdk.java.net/browse/JDK-8230956
[3] Prev. discussion
https://mail.openjdk.java.net/pipermail/serviceability-dev/2019-September/029224.html
More information about the serviceability-dev
mailing list