RFR: 8306851: Move Method access flags

David Holmes dholmes at openjdk.org
Thu Apr 27 05:01:23 UTC 2023


On Thu, 27 Apr 2023 04:49:10 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> This change moves the flags from AccessFlags to either ConstMethodFlags or MethodFlags, depending on whether they are set at class file parse time, which makes them essentially const, or at runtime, which makes them needing atomic access.
>> 
>> This leaves AccessFlags int size because Klass still has JVM flags that are more work to move, but this change doesn't increase Method size.  I didn't remove JVM_RECOGNIZED_METHOD_MODIFIERS with this change since there are several of these in other places, and with this change the code is benign.
>> 
>> Tested with tier1-6, and some manual verification of printing.
>
> src/hotspot/share/oops/method.hpp line 871:
> 
>> 869:   void clear_not_c2_compilable()              {       set_not_c2_compilable(false); }
>> 870: 
>> 871:   bool    is_not_c1_osr_compilable() const    { return not_c1_compilable(); }  // don't waste a flags bit
> 
> Again inconsistent naming with `is` but also `osr` in this case. I would expect being compilable to be quite different to being "osr compilable".

Ah I get this bit now - but the comment didn't make it clear. For C1 compilable and osr-compilable are considered the same.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13654#discussion_r1178623386


More information about the serviceability-dev mailing list