RFR: 8290464: Optimize ResourceArea zapping on ResourceMark release

Ioi Lam iklam at openjdk.org
Mon Jul 18 22:00:04 UTC 2022


On Mon, 18 Jul 2022 18:29:13 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> See the rationale in the bug.
> 
> Additional testing:
>  - [x] Linux x86_64 fastdebug, `FieldSetAccessibleTest` (~10% faster)
>  - [x] Linux x86_64 release, `FieldSetAccessibleTest` (no regressions)
>  - [x] Linux x86_64 fastdebug, `hotspot:tier1` (~5% faster)
>  - [x] Linux x86_64 release, `hotspot:tier1` (no regressions)
>  - [x] Linux x86_64 fastdebug, `tier1` (~2% faster)
>  - [ ] Linux x86_64 release, `tier1` (no regressions)

I think the placement of ResourceMark should be moved as well (maybe in a separate PR). I wonder if we have more cases like the one you found inside `Method::can_be_statically_bound`. Maybe we can use a new macro like this to allocate the ResourceMark only when the test fails:


assert_with_resource(is_nonv == is_static() || is_nonv == is_private(),
             "nonvirtual unexpected for non-static, non-private: %s",
             name_and_sig_as_C_string());

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

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


More information about the hotspot-runtime-dev mailing list