< 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 // This file declares the CDS data structures that are used by the HotSpot Serviceability Agent
  29 // (see C sources inside src/jdk.hotspot.agent).
  30 //
  31 // We should use only standard C types. Do not use custom types such as bool, intx,
  32 // etc, to avoid introducing unnecessary dependencies to other HotSpot type declarations.
  33 //
  34 // Also, this is a C header file. Do not use C++ here.
  35 
  36 #define NUM_CDS_REGIONS 9
  37 #define CDS_ARCHIVE_MAGIC 0xf00baba2
  38 #define CURRENT_CDS_ARCHIVE_VERSION 4
  39 #define INVALID_CDS_ARCHIVE_VERSION -1
  40 
  41 struct CDSFileMapRegion {
  42   int        _crc;           // crc checksum of the current space
  43   size_t     _file_offset;   // sizeof(this) rounded to vm page size
  44   union {
  45     char*    _base;          // copy-on-write base address
  46     size_t   _offset;        // offset from the compressed oop encoding base, only used
  47                              // by archive heap space
  48   } _addr;
  49   size_t     _used;          // for setting space top on read
  50   int        _read_only;     // read only space?
  51   int        _allow_exec;    // executable code in space?


  52 };
  53 
  54 struct CDSFileMapHeaderBase {
  55   unsigned int _magic;           // identify file type
  56   int          _crc;             // header crc checksum
  57   int          _version;         // must be CURRENT_CDS_ARCHIVE_VERSION
  58   struct CDSFileMapRegion _space[NUM_CDS_REGIONS];
  59 };
  60 
  61 typedef struct CDSFileMapHeaderBase CDSFileMapHeaderBase;
  62 
  63 #endif // SHARE_INCLUDE_CDS_H


  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 // This file declares the CDS data structures that are used by the HotSpot Serviceability Agent
  29 // (see C sources inside src/jdk.hotspot.agent).
  30 //
  31 // We should use only standard C types. Do not use custom types such as bool, intx,
  32 // etc, to avoid introducing unnecessary dependencies to other HotSpot type declarations.
  33 //
  34 // Also, this is a C header file. Do not use C++ here.
  35 
  36 #define NUM_CDS_REGIONS 9
  37 #define CDS_ARCHIVE_MAGIC 0xf00baba2
  38 #define CURRENT_CDS_ARCHIVE_VERSION 5
  39 #define INVALID_CDS_ARCHIVE_VERSION -1
  40 
  41 struct CDSFileMapRegion {
  42   int        _crc;           // crc checksum of the current space
  43   size_t     _file_offset;   // sizeof(this) rounded to vm page size
  44   union {
  45     char*    _base;          // copy-on-write base address
  46     size_t   _offset;        // offset from the compressed oop encoding base, only used
  47                              // by archive heap space
  48   } _addr;
  49   size_t     _used;          // for setting space top on read
  50   int        _read_only;     // read only space?
  51   int        _allow_exec;    // executable code in space?
  52   void*      _oopmap;        // bitmap for relocating embedded oops
  53   size_t     _oopmap_size_in_bits;
  54 };
  55 
  56 struct CDSFileMapHeaderBase {
  57   unsigned int _magic;           // identify file type
  58   int          _crc;             // header crc checksum
  59   int          _version;         // must be CURRENT_CDS_ARCHIVE_VERSION
  60   struct CDSFileMapRegion _space[NUM_CDS_REGIONS];
  61 };
  62 
  63 typedef struct CDSFileMapHeaderBase CDSFileMapHeaderBase;
  64 
  65 #endif // SHARE_INCLUDE_CDS_H
< prev index next >