On Thu, 29 Aug 2024 18:50:42 GMT, Coleen Phillimore <cole...@openjdk.org> wrote:
>> Move JVM implementation access flags that are not specified by the classfile >> format into Klass so we can shrink AccessFlags to u2 in a future change. >> >> Tested with tier1-7. >> >> NOTE: there are arm, ppc and s390 changes to this that are just a guess. >> Also, graal changes. > > Coleen Phillimore has updated the pull request incrementally with one > additional commit since the last revision: > > Add in graal flags and a comment. src/hotspot/share/ci/ciKlass.cpp line 231: > 229: // ------------------------------------------------------------------ > 230: // ciKlass::misc_flags > 231: jint ciKlass::misc_flags() { Suggestion: u1 ciKlass::misc_flags() { I think this should match what misc_flags() returns. Ideally, I think it should be a typedef like KlassFlags_t so we don't have to make a lot of changes if grows to u2. src/hotspot/share/ci/ciKlass.hpp line 125: > 123: > 124: // Fetch Klass::misc_flags. > 125: jint misc_flags(); Suggestion: KlassFlags_t misc_flags(); src/hotspot/share/oops/klass.hpp line 436: > 434: #endif > 435: static ByteSize bitmap_offset() { return > byte_offset_of(Klass, _bitmap); } > 436: static ByteSize misc_flags_offset() { return > byte_offset_of(Klass, _misc_flags); } Suggestion: static ByteSize misc_flags_offset() { return byte_offset_of(Klass, _misc_flags._flags); } src/hotspot/share/oops/klassFlags.hpp line 56: > 54: // These flags are write-once before the class is published and then > read-only > 55: // so don't require atomic updates. > 56: u1 _flags; Suggestion: typedef u1 KlassFlags_t; KlassFlags_t _flags; Can we have a typedef so C++ code that doesn't care about the size doesn't need to change if we later make it u2 or u4? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/20719#discussion_r1737291678 PR Review Comment: https://git.openjdk.org/jdk/pull/20719#discussion_r1737299082 PR Review Comment: https://git.openjdk.org/jdk/pull/20719#discussion_r1737303285 PR Review Comment: https://git.openjdk.org/jdk/pull/20719#discussion_r1737294456