RFR: 8309751: Duplicate constant pool entries added during default method processing
David Holmes
dholmes at openjdk.org
Tue Apr 2 01:00:07 UTC 2024
On Fri, 29 Mar 2024 13:34:01 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
> This uses Ashutosh's patch to avoid adding duplicate constant pool entries during default method processing, with one change to make it conditional if not needed. I tested this locally and started writing a test, but writing a test is more difficult because duplicate constant pool entries don't actually violate the spec.
>
> Tested with tier1-4 and ran some startup performance benchmarks on the patch.
src/hotspot/share/classfile/bytecodeAssembler.hpp line 158:
> 156: u2 string(Symbol* str, TRAPS) {
> 157: u2 utf8_entry = utf8(str, CHECK_0);
> 158: return find_or_add(BytecodeCPEntry::string(utf8_entry), THREAD);
So `utf8_entry` is now unneeded.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18548#discussion_r1547019713
More information about the hotspot-runtime-dev
mailing list