RFR: 8274910: Compile in G1 evacuation failure injection code based on define

Thomas Schatzl tschatzl at openjdk.java.net
Tue Oct 12 13:14:50 UTC 2021


On Thu, 7 Oct 2021 14:25:04 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

> Hi all,
> 
>   can I have reviews for this change that simplifies performance work with evacuation failure handling a little? In particular, it adds a define called `EVAC_FAILURE_INJECTOR` (on by default in non-product builds) that allows to compile in/out the relevant injector code also in product mode (if manually enabled).
> 
> Actually, this PR suggests two variants for this: one that also automatically enables flags when `EVAC_FAILURE_INJECTOR` is selected (beaa6c3), and one that requires the developer also change the options from develop/notproduct to product to be available (9f07ffd).
> 
> The first is maybe makes the change a bit too hacky in `g1_globals.hpp` (unless there are ways to do that better, i.e. I could move the `GC_G1_EVACUATION_FAILURE_FLAGS` somewhere, or there is a much better preprocessor trick here, so I would like to have you decide.
> 
> Testing: gha, manual checking that in product mode by default no evacuation failure handling is in, but with the flag, and otherwise the same as before, tier1-5
> 
> Thanks,
>   Thomas

Fwiw, the reason to do performance work for evacuation failure handling is that we are going to use evacuation failure handling code for region pinning work.
However, since region pinning itself is not in the code (and even that would require some patches), it is easier to do performance work by inducing evacuation failure.

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

PR: https://git.openjdk.java.net/jdk/pull/5851



More information about the hotspot-gc-dev mailing list