Integrated: 8261759: ZGC: ZWorker Threads Continue Marking After System.exit() called

Per Liden pliden at openjdk.java.net
Mon Apr 26 12:18:28 UTC 2021


On Tue, 13 Apr 2021 07:03:10 GMT, Per Liden <pliden at openjdk.org> wrote:

> During JVM termination, ZCollectedHeap::stop() currently only returns once any ongoing GC cycle has completed. However, waiting for a GC cycle to complete can take awhile, so the JVM might not terminate as promptly as one might expect.
> 
> This patch adds abortion checks to workers doing marking and relocation to allow ZWorker threads to terminate promptly. In addition, before and after concurrent phases, the ZDriver thread checks if `should_terminate()` is true and prematurely terminates the GC cycle if that's the case.
> 
> Testing:
>  * Tier1-7 on Linux.
>  * SPECjbb2015, comparing score and marking times against baseline (5 iterations each), no difference observed.
>  * Ad-hoc programs calling System.exit() during marking/relocation.
>  * Manual Ctrl-C testing.

This pull request has now been integrated.

Changeset: c3ac6900
Author:    Per Liden <pliden at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/c3ac6900
Stats:     193 lines in 10 files changed: 176 ins; 2 del; 15 mod

8261759: ZGC: ZWorker Threads Continue Marking After System.exit() called

Reviewed-by: sjohanss, ayang

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

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



More information about the hotspot-gc-dev mailing list