RFR: 8247281: migrate ObjectMonitor::_object to OopStorage [v2]
Erik Österlund
eosterlund at openjdk.java.net
Mon Sep 14 14:40:18 UTC 2020
On Mon, 14 Sep 2020 02:01:58 GMT, David Holmes <dholmes at openjdk.org> wrote:
> Not sure about the JVM TI changes!
Here is a generic comment. You mention that the specification doesn't make it clear whether the roots reported are
strong or weak. This is true. There is no mention about roots being strong or weak here. Notably, all listed roots, are
strong though. I believe that with the chosen interpretation of "root", it is implied that it is strong, and hence why
strong vs weak roots is not discussed. According to the memory management glossary
(https://www.memorymanagement.org/glossary/r.html#glossary-r), this is the definition of a root: "In tracing garbage
collection, a root holds a reference or set of references to objects that are a priori reachable. The root set is used
as the starting point in determining all reachable data." Note that, this definition of root makes it implicit that it
is also strong. And after a long discussion with GC nerds in Stockholm, this is in fact also why we have IN_NATIVE oop
accesses, rather than IN_ROOT oop accesses. Because the opinions differed too much about what a "root" is. But to me it
really does look like the JVMTI interpretation of a root, is a strong root, and hence that this is precisely what the
text is talking about when mentioning roots, and hence also why all the enumerated roots, are indeed strong roots. Same
comments for the HPROF_GC_ROOT_* discussion, as for the JVMTI_HEAP_ROOT_* discussion. That is also why I think it is
now a bug to report them, as they are no longer "roots" in the JVMTI/HPROF sense. But you are right, filing a CSR for
the behavioural change is probably a good idea.
-------------
PR: https://git.openjdk.java.net/jdk/pull/135
More information about the hotspot-runtime-dev
mailing list