On Mon, 9 Nov 2020 15:43:09 GMT, Frederic Parain <fpar...@openjdk.org> wrote:
> Please review this small cleanup code, removing the now unused allocation > type from the fieldInfo structure. > > Tested with Mach5, tiers 1 to 3 and locally by running > test/hotspot/jtreg/serviceability/sa tests. > > Thank you, > > Fred Nice cleanup! src/hotspot/share/classfile/classFileParser.cpp line 1708: > 1706: > 1707: // Remember how many oops we encountered and compute allocation type > 1708: const FieldAllocationType atype = fac->update(is_static, type); The returned `FieldAllocationType` is never used at either call-site, so maybe the `update` method can be simplified, too? (It seems all `update` does is increment a per-type counter, so the name is a bit surprising) src/hotspot/share/runtime/vmStructs.cpp line 2261: > 2259: declare_preprocessor_constant("FIELDINFO_TAG_SIZE", > FIELDINFO_TAG_SIZE) \ > 2260: declare_preprocessor_constant("FIELDINFO_TAG_OFFSET", > FIELDINFO_TAG_OFFSET) \ > 2261: declare_preprocessor_constant("FIELDINFO_TAG_CONTENDED", > FIELDINFO_TAG_CONTENDED) \ Not sure it's necessary to add this with no usage? ------------- Marked as reviewed by redestad (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/1130