Integrated: 8290464: Optimize ResourceArea zapping on ResourceMark release

Aleksey Shipilev shade at openjdk.org
Fri Jul 22 11:16:07 UTC 2022


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

> We have `ResourceMark` scopes where we either do not resource-allocate at all (see the bug for the example), or we do not allocate a lot in the arena. Still, in debug builds, we are zapping the entirety of `ResourceArea` chunk in those cases. This wastes testing cycles unnecessarily. Doing this in a bit smarter way -- zapping only the parts that were actually allocated in the chunk -- makes testing significantly faster.
> 
> Linux x86_64 fastdebug, `tier1`:
> 
> 
> # Before
> real 26m33.621s
> user 1156m56.676s
> sys 52m18.291s
> 
> # After
> real 25m29.573s  ; -4.0%
> user 1089m27.179s ; -5.8%
> sys 52m17.630s
> 
> 
> Additional testing:
>  - [x] Linux x86_64 fastdebug, `FieldSetAccessibleTest` (~12% faster)
>  - [x] Linux x86_64 release, `FieldSetAccessibleTest` (no regressions)
>  - [x] Linux x86_64 fastdebug, `hotspot:tier1` (~6% faster)
>  - [x] Linux x86_64 release, `hotspot:tier1` (no regressions)
>  - [x] Linux x86_64 fastdebug, `tier1` (~4% faster)
>  - [x] Linux x86_64 release, `tier1` (no regressions)

This pull request has now been integrated.

Changeset: 7841e5cc
Author:    Aleksey Shipilev <shade at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/7841e5cc387ba595f73f40b3a0d00d7e36df15ea
Stats:     28 lines in 1 file changed: 21 ins; 3 del; 4 mod

8290464: Optimize ResourceArea zapping on ResourceMark release

Reviewed-by: stuefe, zgu, coleenp

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

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


More information about the hotspot-runtime-dev mailing list