RFR: 8264004: Don't use TRAPS if no exceptions are thrown [v2]
Ioi Lam
iklam at openjdk.java.net
Tue Mar 23 05:56:41 UTC 2021
On Tue, 23 Mar 2021 04:59:10 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>>
>> missed THREAD that should be CHECK_false argument.
>
> src/hotspot/share/prims/jvmtiRedefineClasses.hpp line 484:
>
>> 482: void rewrite_cp_refs_in_method(methodHandle method,
>> 483: methodHandle * new_method_p, TRAPS);
>> 484: bool rewrite_cp_refs_in_methods(InstanceKlass* scratch_class, TRAPS);
>
> This method clears any pending exception and so should not be a TRAPS method.
`VM_RedefineClasses::load_new_class_versions` also seems to never throw. These functions should be changed to take a `Thread*` parameter, and should use `HandleMark em(thread);` to guarantee that an exception never leaves the function.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3141
More information about the serviceability-dev
mailing list