[crac] RFR: Allow users to pass new properties on restore [v9]

Ashutosh Mehra duke at openjdk.java.net
Wed May 25 14:52:17 UTC 2022


> VM changes: To identify properties that can be modified on restore,
> added a new bool field SystemProperty::_modifiable_on_restore.
> All the jdk related properties are marked unmodifiable. Rest of the
> properties are considered modifiable.
> When the JVM is launched with -XX:CRaCRestoreFrom option, then the
> properties prefixed with "-D" are maintained in a separate list in
> Arguments::_system_properties_for_restore. This list is passed to the JVM
> being restored by writing to a shared memory object.
> When the JVM is restored, it reads the new properties from shared memory
> object and updates its existing list of properties maintained in
> Arguments::_system_properties.
> 
> JDK changes: System::props needs to be updated on restore to account for
> new system properties. For this purpose j.l.System registers a new
> JDKResource which queries new properties from the VM in afterRestore()
> notification and updates System::props. The JDKResource registered by
> j.l.System is given highest priority so it is the first resource to get
> afterRestore() notification.
> 
> Signed-off-by: Ashutosh Mehra <asmehra at redhat.com>

Ashutosh Mehra has updated the pull request incrementally with one additional commit since the last revision:

  Rename VM_CracRestoreParameters to CracRestoreParameters
  
  Signed-off-by: Ashutosh Mehra <asmehra at redhat.com>

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

Changes:
  - all: https://git.openjdk.java.net/crac/pull/21/files
  - new: https://git.openjdk.java.net/crac/pull/21/files/6356599f..7cdd91b0

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=crac&pr=21&range=08
 - incr: https://webrevs.openjdk.java.net/?repo=crac&pr=21&range=07-08

  Stats: 10 lines in 1 file changed: 0 ins; 0 del; 10 mod
  Patch: https://git.openjdk.java.net/crac/pull/21.diff
  Fetch: git fetch https://git.openjdk.java.net/crac pull/21/head:pull/21

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


More information about the crac-dev mailing list