On Thu, 19 Dec 2024 20:15:14 GMT, Coleen Phillimore <cole...@openjdk.org> wrote:
>> Please review this change that makes AccessFlags and modifier_flags u2 types >> and removes the last remnants of Hotspot adding internal access flags. This >> change moves AccessFlags and modifier_flags in Klass to alignment gaps >> saving 16 bytes. From pahole: so it's a bit better. >> >> before: >> >> /* size: 216, cachelines: 4, members: 25, static members: 17 */ >> /* sum members: 194, holes: 3, sum holes: 18 */ >> >> >> after: >> >> /* size: 200, cachelines: 4, members: 25, static members: 17 */ >> /* sum members: 188, holes: 4, sum holes: 12 */ >> >> >> We may eventually move the modifiers to java.lang.Class but that's WIP. >> >> Tested with tier1-7 on oracle platforms. Did test builds on other platforms >> (please try these changes ppc/arm32 and s390). Also requires minor Graal >> changes. > > Coleen Phillimore has updated the pull request with a new target base due to > a merge or a rebase. The incremental webrev excludes the unrelated changes > brought in by the merge/rebase. The pull request contains eight additional > commits since the last revision: > > - Fixed bug. > - Fix merge and compilation errors. > - Merge branch 'master' into access-flags > - Renamed AccessFlags.as_int() to as_unsigned_short(), moved masks for > method, field and class modifiers into AccessFlags. Change ciFlags to use > AccessFlags. > - Update src/hotspot/cpu/ppc/templateInterpreterGenerator_ppc.cpp > > Co-authored-by: David Holmes > <62092539+dholmes-...@users.noreply.github.com> > - Update src/hotspot/share/opto/library_call.cpp > > Co-authored-by: David Holmes > <62092539+dholmes-...@users.noreply.github.com> > - Remove JVM_ACC_WRITTEN_FLAGS because they are all written in the classfile > now. > - 8339113: AccessFlags can be u2 in metadata I didn't really like that name since it's the name of the type rather than more of a description of the type returned. I was able to reduce the number of these by adding some helper functions in AccessFlags. ------------- PR Comment: https://git.openjdk.org/jdk/pull/22246#issuecomment-2555868918