[crac] RFR: X11 CRaC reinitializing on CheckpointRestore

Kuznetsov Ilya Alexandrovich duke at openjdk.java.net
Tue May 31 14:19:47 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.

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

Commit messages:
 - Whitespace fix attempt
 - Merge remote-tracking branch 'origin/crac' into crac
 - X11 CRaC reinitializing on CheckpointRestore
 - X11 reinitializing on CheckpointRestore

Changes: https://git.openjdk.java.net/crac/pull/19/files
 Webrev: https://webrevs.openjdk.java.net/?repo=crac&pr=19&range=00
  Stats: 573 lines in 20 files changed: 530 ins; 8 del; 35 mod
  Patch: https://git.openjdk.java.net/crac/pull/19.diff
  Fetch: git fetch https://git.openjdk.java.net/crac pull/19/head:pull/19

PR: https://git.openjdk.java.net/crac/pull/19


More information about the crac-dev mailing list