[crac] RFR: X11 CRaC reinitializing on CheckpointRestore [v2]
Kuznetsov Ilya Alexandrovich
duke at openjdk.org
Mon Sep 12 07:37:50 UTC 2022
> Allows CRaC to perform a CheckpointRestore operation for applications using GUI (Swing, AWT) and X11 connection.
>
> Resources are registered only if the application uses the GUI. The order in which resources are reinitialized matters: Toolkit should be cleared before reference handling for a proper garbage collection, and GraphicsEnvironment after handling for a correct X11 disconnection. Some resources restore lazily.
>
> The `beforeCheckpoint()` operation dispose necessary toolkit and connection resources and disconnects from X11. This allows CRaC to perform a Checkpoint since there is no external connection.
> The `afterRestore()` operations reconnect to X11 and then restore necessary connection and toolkit resources.
>
> Thus, after the Restore operation, we have a clean X11 connection. It is ready to restore the original GUI state.
Kuznetsov Ilya Alexandrovich has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 74 additional commits since the last revision:
- Minimize changes
- Merge remote-tracking branch 'origin/x11-dev' into remote-x11-dev
- Reduce public interfaces using AWTAccessor and package-private, made some code and docs improvements
Signed-off-by: kznts9v-1lya <kuznetsov.ilya.alexandrovich at gmail.com>
- Change AWT part of reinitialization using AWTAccessor
Signed-off-by: kznts9v-1lya <kuznetsov.ilya.alexandrovich at gmail.com>
- Change Disposer reinitialization using AWTAccessor
Signed-off-by: kznts9v-1lya <kuznetsov.ilya.alexandrovich at gmail.com>
- Disposer reinitialization using SharedSecrets
Signed-off-by: kznts9v-1lya <kuznetsov.ilya.alexandrovich at gmail.com>
- Fix in tests
Signed-off-by: kznts9v-1lya <kuznetsov.ilya.alexandrovich at gmail.com>
- Made some fixes
Signed-off-by: kznts9v-1lya <kuznetsov.ilya.alexandrovich at gmail.com>
- Merge remote-tracking branch 'upstream2/refqueue-2' into x11-dev
# Conflicts:
# src/java.base/share/classes/jdk/internal/crac/JDKResource.java
- Make jdk.crac.Misc final
- ... and 64 more: https://git.openjdk.org/crac/compare/aa7fa48d...2f8751d1
-------------
Changes:
- all: https://git.openjdk.org/crac/pull/19/files
- new: https://git.openjdk.org/crac/pull/19/files/494e482d..2f8751d1
Webrevs:
- full: https://webrevs.openjdk.org/?repo=crac&pr=19&range=01
- incr: https://webrevs.openjdk.org/?repo=crac&pr=19&range=00-01
Stats: 1145 lines in 28 files changed: 588 ins; 412 del; 145 mod
Patch: https://git.openjdk.org/crac/pull/19.diff
Fetch: git fetch https://git.openjdk.org/crac pull/19/head:pull/19
PR: https://git.openjdk.org/crac/pull/19
More information about the crac-dev
mailing list