On Tue, 23 Mar 2021 16:40:44 GMT, Coleen Phillimore <[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.

Nice cleanup Coleen!

I have a further suggested change to simplify things further - see below.

Thanks,
David

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.

-------------

Changes requested by dholmes (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/3157

Reply via email to