RFR: 8272093: Extract evacuation failure injection from G1CollectedHeap
Stefan Johansson
sjohanss at openjdk.java.net
Mon Aug 30 12:30:27 UTC 2021
On Mon, 9 Aug 2021 09:25:30 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:
> Hi all,
>
> can I have reviews for this change that extracts out the evacuation failure injection mechanism from `G1CollectedHeap` into its own class?
> This reduces the amount of code in `G1CollectedHeap` a bit, moving somewhat uninteresting but somewhat important (testing) code out from there. Also documented it a bit. The other reason was that imho it stuck out a bit due to the ifdef's in `G1CollectedHeap`.
>
> I checked that gcc does compile out the call to `evacuation_should_fail()` in `G1ParScanThreadState` in product mode.
>
> Testing: tier1, local testing
>
> Thanks,
> Thomas
Looks good, but I think the members should be left out in product builds.
src/hotspot/share/gc/g1/g1YoungGCEvacFailureInjector.hpp line 49:
> 47:
> 48: // The number of evacuations between induced failures.
> 49: volatile size_t _evacuation_failure_object_count;
Any reason to not guard these with `#ifndef PRODUCT`?
-------------
Marked as reviewed by sjohanss (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/5047
More information about the hotspot-gc-dev
mailing list