RFR: 8195972: Refactor oops in JNI to use the Access API

Kim Barrett kim.barrett at oracle.com
Thu Mar 29 21:38:35 UTC 2018


> On Mar 29, 2018, at 3:49 PM, coleen.phillimore at oracle.com wrote:
> Kim's change looks correct as far as I can tell.  IN_CONCURRENT_ROOT is equivalent to IN_ROOT right now, isn't it?

No, they are not equivalent.

RootAccess<IN_CONCURRENT_ROOT>::oop_store(…) must generate the SATB pre-barrier.
RootAccess<>::oop_store(…) should not generate the SATB pre-barrier.

RootAccess<...> is just Access<IN_ROOT | …>
(Currently RootAccess is a class, in C++11 it could be a template type alias.)

I feel a bit unhappy that IN_CONCURRENT_ROOT and IN_ROOT are not mutually exclusive.  If I
recall correctly, IN_CONCURRENT_ROOT will actually default in IN_ROOT if the latter is not
present, but I might be mis-remembering.  (Or alternatively, that we don’t have a distinct name for
non-concurrent-root.)

And I have no idea what the relation between either of those and IN_ARCHIVE_ROOT might be;
the latter has no documentation (see JDK-8198381).





More information about the hotspot-dev mailing list