RFR: 8264016: [JVMCI] add some thread local fields for use by JVMCI

Coleen Phillimore coleenp at openjdk.java.net
Wed Mar 24 19:22:39 UTC 2021


On Wed, 24 Mar 2021 19:15:01 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> No the C++ compiler just emits them in the declared order.  Since we group the field declarations by their relatedness it's not easy to get a completely good overall packing.  There's actually less direct waste than I expected in 17, though there are lots of cases where int are used to stored bools.  clang doesn't appear to optimize the storage for enums so there are lots of small enums stored in ints instead of bytes.  I believe gcc will use the smallest storage available.  There's also dubious stuff like the ``char[64]`` in the HandshakeState and lots of statistics that could live elsewhere.  Is there a bug I could attach my observations to?  It's nothing earth shattering but the clang reported layout is interesting to see.
>
> I have a fix for the Mutex in HandshakeState.  Here's a bug for you to fill in. That would be great.
> https://bugs.openjdk.java.net/browse/JDK-8264145

One of the things we've talked about is making the hierarchy be something like:
Thread
NamedThread
    ->  WatcherThread
SafepointAwareThread
    ->  CompilerThread
    -> JavaThread

So that CompilerThread isn't a JavaThread.  But we're not going to do that very soon.

-------------

PR: https://git.openjdk.java.net/jdk/pull/3147


More information about the hotspot-dev mailing list