RFR: 8308762: Metaspace leak with Instrumentation.retransform [v4]
Coleen Phillimore
coleenp at openjdk.org
Fri Jul 28 12:49:46 UTC 2023
On Tue, 18 Jul 2023 16:48:55 GMT, Jean-Philippe Bempel <jpbempel at openjdk.org> wrote:
>> Fix a small leak in constant pool merging during retransformation of a class. If this class has a catch block with `Throwable`, the class `Throwable` is pre-resolved in the constant pool, while all the other classes are in a unresolved state. So the constant pool merging process was considering the entry with pre-resolved class as different compared to the destination and create a new entry. We now try to consider it as equal specially for Methodref/Fieldref.
>
> Jean-Philippe Bempel has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision:
>
> Revert resolved class to unresolved for comparison
>
> remove is_unresolved_class_mismatch
src/hotspot/share/prims/jvmtiRedefineClasses.cpp line 1710:
> 1708: *merge_cp_p, scratch_i)) {
> 1709: // The mismatch in compare_entry_to() above is because of a
> 1710: // resolved versus unresolved class entry at the same index
I'm sorry for the piecemeal review. There's another comment that mentions this comment that should be removed. It starts with this:
- // The find_matching_entry() call above could fail to find a match
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14780#discussion_r1277505986
More information about the serviceability-dev
mailing list