RFR: 8290464: Optimize ResourceArea zapping on ResourceMark release [v2]

Aleksey Shipilev shade at openjdk.org
Tue Jul 19 14:56:57 UTC 2022


> 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.
> 
> 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)
>  - [x] Linux x86_64 release, `tier1` (no regressions)

Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision:

  Review comments: simplify

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/9543/files
  - new: https://git.openjdk.org/jdk/pull/9543/files/17715c22..ece2948c

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=9543&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=9543&range=00-01

  Stats: 16 lines in 1 file changed: 4 ins; 3 del; 9 mod
  Patch: https://git.openjdk.org/jdk/pull/9543.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/9543/head:pull/9543

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


More information about the hotspot-runtime-dev mailing list