< prev index next >

src/hotspot/share/include/cds.h

Print this page

 18  *
 19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 20  * or visit www.oracle.com if you need additional information or have any
 21  * questions.
 22  *
 23  */
 24 
 25 #ifndef SHARE_INCLUDE_CDS_H
 26 #define SHARE_INCLUDE_CDS_H
 27 
 28 #include <stddef.h>
 29 
 30 // This file declares the CDS data structures that are used by the HotSpot Serviceability Agent
 31 // (see C sources inside src/jdk.hotspot.agent).
 32 //
 33 // We should use only standard C types. Do not use custom types such as bool, intx,
 34 // etc, to avoid introducing unnecessary dependencies to other HotSpot type declarations.
 35 //
 36 // Also, this is a C header file. Do not use C++ here.
 37 
 38 #define NUM_CDS_REGIONS 4 // this must be the same as MetaspaceShared::n_regions
 39 #define CDS_ARCHIVE_MAGIC 0xf00baba2
 40 #define CDS_DYNAMIC_ARCHIVE_MAGIC 0xf00baba8
 41 #define CDS_GENERIC_HEADER_SUPPORTED_MIN_VERSION 13
 42 #define CURRENT_CDS_ARCHIVE_VERSION 18
 43 
 44 typedef struct CDSFileMapRegion {
 45   int     _crc;               // CRC checksum of this region.
 46   int     _read_only;         // read only region?
 47   int     _allow_exec;        // executable code in this region?
 48   int     _is_heap_region;    // Used by SA and debug build.
 49   int     _is_bitmap_region;  // Relocation bitmap for RO/RW regions (used by SA and debug build).
 50   int     _mapped_from_file;  // Is this region mapped from a file?
 51                               // If false, this region was initialized using ::read().
 52   size_t  _file_offset;       // Data for this region starts at this offset in the archive file.
 53   size_t  _mapping_offset;    // This encodes the requested address for this region to be mapped at runtime.
 54                               // However, the JVM may choose to map at an alternative location (e.g., for ASLR,
 55                               // or to adapt to the available ranges in the Java heap range).
 56                               // - For an RO/RW region, the requested address is:
 57                               //     FileMapHeader::requested_base_address() + _mapping_offset
 58                               // - For a heap region, the requested address is:
 59                               //     +UseCompressedOops: /*runtime*/ CompressedOops::base() + _mapping_offset
 60                               //     -UseCompressedOops: FileMapHeader::heap_begin() + _mapping_offset
 61                               //     See FileMapInfo::heap_region_requested_address().
 62                               // - For bitmap regions, the _mapping_offset is always zero. The runtime address

 18  *
 19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 20  * or visit www.oracle.com if you need additional information or have any
 21  * questions.
 22  *
 23  */
 24 
 25 #ifndef SHARE_INCLUDE_CDS_H
 26 #define SHARE_INCLUDE_CDS_H
 27 
 28 #include <stddef.h>
 29 
 30 // This file declares the CDS data structures that are used by the HotSpot Serviceability Agent
 31 // (see C sources inside src/jdk.hotspot.agent).
 32 //
 33 // We should use only standard C types. Do not use custom types such as bool, intx,
 34 // etc, to avoid introducing unnecessary dependencies to other HotSpot type declarations.
 35 //
 36 // Also, this is a C header file. Do not use C++ here.
 37 
 38 #define NUM_CDS_REGIONS 5 // this must be the same as MetaspaceShared::n_regions
 39 #define CDS_ARCHIVE_MAGIC 0xf00baba2
 40 #define CDS_DYNAMIC_ARCHIVE_MAGIC 0xf00baba8
 41 #define CDS_GENERIC_HEADER_SUPPORTED_MIN_VERSION 13
 42 #define CURRENT_CDS_ARCHIVE_VERSION 19
 43 
 44 typedef struct CDSFileMapRegion {
 45   int     _crc;               // CRC checksum of this region.
 46   int     _read_only;         // read only region?
 47   int     _allow_exec;        // executable code in this region?
 48   int     _is_heap_region;    // Used by SA and debug build.
 49   int     _is_bitmap_region;  // Relocation bitmap for RO/RW regions (used by SA and debug build).
 50   int     _mapped_from_file;  // Is this region mapped from a file?
 51                               // If false, this region was initialized using ::read().
 52   size_t  _file_offset;       // Data for this region starts at this offset in the archive file.
 53   size_t  _mapping_offset;    // This encodes the requested address for this region to be mapped at runtime.
 54                               // However, the JVM may choose to map at an alternative location (e.g., for ASLR,
 55                               // or to adapt to the available ranges in the Java heap range).
 56                               // - For an RO/RW region, the requested address is:
 57                               //     FileMapHeader::requested_base_address() + _mapping_offset
 58                               // - For a heap region, the requested address is:
 59                               //     +UseCompressedOops: /*runtime*/ CompressedOops::base() + _mapping_offset
 60                               //     -UseCompressedOops: FileMapHeader::heap_begin() + _mapping_offset
 61                               //     See FileMapInfo::heap_region_requested_address().
 62                               // - For bitmap regions, the _mapping_offset is always zero. The runtime address
< prev index next >