RFR: 8290495: Micro-optimize Method::can_be_statically_bound assertions

David Holmes dholmes at openjdk.org
Tue Jul 19 07:48:05 UTC 2022


On Tue, 19 Jul 2022 05:47:59 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> See the rationale in the bug.
> 
> The test time improves:
> 
> 
> # Before
> real 1m27.397s
> user 2m39.937s
> sys 0m5.966s
> 
> # After
> real 1m13.443s ; -16%
> user 2m24.238s ; -10%
> sys 0m5.885s

I'll approve just to avoid spending more cycles on this but I'd hate to see this become common place. :)

src/hotspot/share/oops/method.cpp line 811:

> 809:   if (class_access_flags.is_interface() && (is_nonv != is_static()) && (is_nonv != is_private())) {
> 810:     ResourceMark rm;
> 811:     fatal("nonvirtual unexpected for non-static, non-private: %s",

You could just move the RM and leave the assert as is.

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

Marked as reviewed by dholmes (Reviewer).

PR: https://git.openjdk.org/jdk/pull/9548


More information about the hotspot-dev mailing list