[crac] RFR: 8321660: [CRaC] Trim native heap before checkpoint to decrease image size

Volker Simonis simonis at openjdk.org
Sun Dec 10 18:51:56 UTC 2023


Before checkpointing, we should trim the native C-heap in order to decrease the size of the generated CRaC image.

Without C-heap trimming, the size of a HelloWorld image is ~32m and the one for SpringPetclinic ~209m. If we trim the C-heap before checkpointin, the image size decreses to ~30m for HelloWorld and 170m for SpringPetclinic.

I've also added a new logging tag `crac` because I think it would be nice to log more CRaC details/internals in universal logging.  

Please let me know what you think?

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

Commit messages:
 - 8321660: [CRaC] Trim native heap before checkpoint to decrease image size

Changes: https://git.openjdk.org/crac/pull/148/files
 Webrev: https://webrevs.openjdk.org/?repo=crac&pr=148&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8321660
  Stats: 13 lines in 2 files changed: 13 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/crac/pull/148.diff
  Fetch: git fetch https://git.openjdk.org/crac.git pull/148/head:pull/148

PR: https://git.openjdk.org/crac/pull/148


More information about the crac-dev mailing list