On Wed, 24 Mar 2021 02:45:29 GMT, David Holmes <[email protected]> wrote:
>> This change removes the TRAPS parameter from compute_modifier_flags(),
>> lookup_instance_method_in_klasses and nest_host_error.
>>
>> There's a progressive effort to remove cases where the last parameter of a
>> function is THREAD, and it's unclear why it is ignoring an exception or
>> whether an exception is expected, if it doesn't subsequently have a check
>> for HAS_PENDING_EXCEPTION.
>>
>> Tested locally with tier1 tests and tier1 tests on 4 Oracle platforms in
>> progress.
>
> src/hotspot/share/oops/instanceKlass.hpp line 468:
>
>> 466: void set_nest_host_index(u2 i) { _nest_host_index = i; }
>> 467: // dynamic nest member support
>> 468: void set_nest_host(InstanceKlass* host, JavaThread* current);
>
> I think we should drop the thread parameter for this method and
> nest_host_error and avoid the tramp data. We only need the current thread for
> a ResourceMark in a logging clause in set_nest_host, and for a
> ConstantPoolHandle in nest_host_error. Neither of these codepaths are hot so
> we can just manifest Thread::current() when needed there.
> Then you can also remove the thread parameter from print_nest_host_error_on.
You're right. I can remove a lot of thread arguments this way.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3157