--- old/src/hotspot/share/include/cds.h 2019-07-08 22:26:40.362695920 -0700 +++ new/src/hotspot/share/include/cds.h 2019-07-08 22:26:40.063667585 -0700 @@ -33,12 +33,14 @@ // // Also, this is a C header file. Do not use C++ here. -#define NUM_CDS_REGIONS 9 +#define NUM_CDS_REGIONS 8 // this must be the same as MetaspaceShared::n_regions #define CDS_ARCHIVE_MAGIC 0xf00baba2 #define CDS_DYNAMIC_ARCHIVE_MAGIC 0xf00baba8 -#define CURRENT_CDS_ARCHIVE_VERSION 5 +#define CURRENT_CDS_ARCHIVE_VERSION 6 #define INVALID_CDS_ARCHIVE_VERSION -1 +#define JVM_IDENT_MAX 256 + struct CDSFileMapRegion { int _crc; // crc checksum of the current space size_t _file_offset; // sizeof(this) rounded to vm page size @@ -55,9 +57,10 @@ }; struct CDSFileMapHeaderBase { - unsigned int _magic; // identify file type - int _crc; // header crc checksum - int _version; // must be CURRENT_CDS_ARCHIVE_VERSION + unsigned int _magic; // identify file type + int _crc; // header crc checksum + int _version; // must be CURRENT_CDS_ARCHIVE_VERSION + char _jvm_ident[JVM_IDENT_MAX]; // identifier of the JVM with which this archive was generated struct CDSFileMapRegion _space[NUM_CDS_REGIONS]; };