< prev index next >

src/hotspot/share/gc/shared/vmStructs_gc.hpp

Print this page




  30 #include "gc/shared/cardTableRS.hpp"
  31 #include "gc/shared/collectedHeap.hpp"
  32 #include "gc/shared/genCollectedHeap.hpp"
  33 #include "gc/shared/generation.hpp"
  34 #include "gc/shared/generationSpec.hpp"
  35 #include "gc/shared/oopStorage.hpp"
  36 #include "gc/shared/space.hpp"
  37 #if INCLUDE_CMSGC
  38 #include "gc/cms/vmStructs_cms.hpp"
  39 #endif
  40 #if INCLUDE_G1GC
  41 #include "gc/g1/vmStructs_g1.hpp"
  42 #endif
  43 #if INCLUDE_PARALLELGC
  44 #include "gc/parallel/vmStructs_parallelgc.hpp"
  45 #endif
  46 #if INCLUDE_SERIALGC
  47 #include "gc/serial/defNewGeneration.hpp"
  48 #include "gc/serial/vmStructs_serial.hpp"
  49 #endif



  50 
  51 #define VM_STRUCTS_GC(nonstatic_field,                                                                                               \
  52                       volatile_nonstatic_field,                                                                                      \
  53                       static_field,                                                                                                  \
  54                       unchecked_nonstatic_field)                                                                                     \
  55   CMSGC_ONLY(VM_STRUCTS_CMSGC(nonstatic_field,                                                                                       \
  56                               volatile_nonstatic_field,                                                                              \
  57                               static_field))                                                                                         \
  58   G1GC_ONLY(VM_STRUCTS_G1GC(nonstatic_field,                                                                                         \
  59                             volatile_nonstatic_field,                                                                                \
  60                             static_field))                                                                                           \
  61   PARALLELGC_ONLY(VM_STRUCTS_PARALLELGC(nonstatic_field,                                                                             \
  62                                         volatile_nonstatic_field,                                                                    \
  63                                         static_field))                                                                               \
  64   SERIALGC_ONLY(VM_STRUCTS_SERIALGC(nonstatic_field,                                                                                 \
  65                                     volatile_nonstatic_field,                                                                        \
  66                                     static_field))                                                                                   \




  67   /**********************************************************************************/                                               \
  68   /* Generation and Space hierarchies                                               */                                               \
  69   /**********************************************************************************/                                               \
  70                                                                                                                                      \
  71   unchecked_nonstatic_field(AgeTable,          sizes,                                         sizeof(AgeTable::sizes))               \
  72                                                                                                                                      \
  73   nonstatic_field(BarrierSet,                  _fake_rtti,                                    BarrierSet::FakeRtti)                  \
  74                                                                                                                                      \
  75   nonstatic_field(BarrierSet::FakeRtti,        _concrete_tag,                                 BarrierSet::Name)                      \
  76                                                                                                                                      \
  77   nonstatic_field(BlockOffsetTable,            _bottom,                                       HeapWord*)                             \
  78   nonstatic_field(BlockOffsetTable,            _end,                                          HeapWord*)                             \
  79                                                                                                                                      \
  80   nonstatic_field(BlockOffsetSharedArray,      _reserved,                                     MemRegion)                             \
  81   nonstatic_field(BlockOffsetSharedArray,      _end,                                          HeapWord*)                             \
  82   nonstatic_field(BlockOffsetSharedArray,      _vs,                                           VirtualSpace)                          \
  83   nonstatic_field(BlockOffsetSharedArray,      _offset_array,                                 u_char*)                               \
  84                                                                                                                                      \
  85   nonstatic_field(BlockOffsetArray,            _array,                                        BlockOffsetSharedArray*)               \
  86   nonstatic_field(BlockOffsetArray,            _sp,                                           Space*)                                \


 145   nonstatic_field(OffsetTableContigSpace,      _offsets,                                      BlockOffsetArray)                      \
 146                                                                                                                                      \
 147   nonstatic_field(Space,                       _bottom,                                       HeapWord*)                             \
 148   nonstatic_field(Space,                       _end,                                          HeapWord*)
 149 
 150 #define VM_TYPES_GC(declare_type,                                         \
 151                     declare_toplevel_type,                                \
 152                     declare_integer_type)                                 \
 153   CMSGC_ONLY(VM_TYPES_CMSGC(declare_type,                                 \
 154                             declare_toplevel_type,                        \
 155                             declare_integer_type))                        \
 156   G1GC_ONLY(VM_TYPES_G1GC(declare_type,                                   \
 157                           declare_toplevel_type,                          \
 158                           declare_integer_type))                          \
 159   PARALLELGC_ONLY(VM_TYPES_PARALLELGC(declare_type,                       \
 160                                       declare_toplevel_type,              \
 161                                       declare_integer_type))              \
 162   SERIALGC_ONLY(VM_TYPES_SERIALGC(declare_type,                           \
 163                                   declare_toplevel_type,                  \
 164                                   declare_integer_type))                  \




 165   /******************************************/                            \
 166   /* Generation and space hierarchies       */                            \
 167   /* (needed for run-time type information) */                            \
 168   /******************************************/                            \
 169                                                                           \
 170   declare_toplevel_type(CollectedHeap)                                    \
 171            declare_type(GenCollectedHeap,             CollectedHeap)      \
 172   declare_toplevel_type(Generation)                                       \
 173            declare_type(CardGeneration,               Generation)         \
 174   declare_toplevel_type(Space)                                            \
 175            declare_type(CompactibleSpace,             Space)              \
 176            declare_type(ContiguousSpace,              CompactibleSpace)   \
 177            declare_type(OffsetTableContigSpace,       ContiguousSpace)    \
 178   declare_toplevel_type(BarrierSet)                                       \
 179            declare_type(ModRefBarrierSet,             BarrierSet)         \
 180            declare_type(CardTableBarrierSet,          ModRefBarrierSet)   \
 181   declare_toplevel_type(CardTable)                                        \
 182            declare_type(CardTableRS, CardTable)                           \
 183   declare_toplevel_type(BarrierSet::Name)                                 \
 184   declare_toplevel_type(BlockOffsetSharedArray)                           \


 214   declare_toplevel_type(GenerationSpec**)                                 \
 215   declare_toplevel_type(HeapWord*)                                        \
 216   declare_toplevel_type(HeapWord* volatile)                               \
 217   declare_toplevel_type(MemRegion*)                                       \
 218   declare_toplevel_type(OffsetTableContigSpace*)                          \
 219   declare_toplevel_type(Space*)                                           \
 220   declare_toplevel_type(ThreadLocalAllocBuffer*)                          \
 221                                                                           \
 222   declare_toplevel_type(BarrierSet::FakeRtti)
 223 
 224 #define VM_INT_CONSTANTS_GC(declare_constant,                               \
 225                             declare_constant_with_value)                    \
 226   CMSGC_ONLY(VM_INT_CONSTANTS_CMSGC(declare_constant,                       \
 227                                     declare_constant_with_value))           \
 228   G1GC_ONLY(VM_INT_CONSTANTS_G1GC(declare_constant,                         \
 229                                   declare_constant_with_value))             \
 230   PARALLELGC_ONLY(VM_INT_CONSTANTS_PARALLELGC(declare_constant,             \
 231                                               declare_constant_with_value)) \
 232   SERIALGC_ONLY(VM_INT_CONSTANTS_SERIALGC(declare_constant,                 \
 233                                           declare_constant_with_value))     \


 234                                                                             \
 235   /********************************************/                            \
 236   /* Generation and Space Hierarchy Constants */                            \
 237   /********************************************/                            \
 238                                                                             \
 239   declare_constant(AgeTable::table_size)                                    \
 240                                                                             \
 241   declare_constant(BarrierSet::ModRef)                                      \
 242   declare_constant(BarrierSet::CardTableBarrierSet)                         \
 243                                                                             \
 244   declare_constant(BOTConstants::LogN)                                      \
 245   declare_constant(BOTConstants::LogN_words)                                \
 246   declare_constant(BOTConstants::N_bytes)                                   \
 247   declare_constant(BOTConstants::N_words)                                   \
 248   declare_constant(BOTConstants::LogBase)                                   \
 249   declare_constant(BOTConstants::Base)                                      \
 250   declare_constant(BOTConstants::N_powers)                                  \
 251                                                                             \
 252   declare_constant(CardTable::clean_card)                                   \
 253   declare_constant(CardTable::last_card)                                    \


 257   declare_constant(CardTable::card_shift)                                   \
 258   declare_constant(CardTable::card_size)                                    \
 259   declare_constant(CardTable::card_size_in_words)                           \
 260                                                                             \
 261   declare_constant(CardTableRS::youngergen_card)                            \
 262                                                                             \
 263   declare_constant(CollectedHeap::Serial)                                   \
 264   declare_constant(CollectedHeap::Parallel)                                 \
 265   declare_constant(CollectedHeap::CMS)                                      \
 266   declare_constant(CollectedHeap::G1)                                       \
 267                                                                             \
 268   /* constants from Generation::Name enum */                                \
 269                                                                             \
 270   declare_constant(Generation::DefNew)                                      \
 271   declare_constant(Generation::MarkSweepCompact)                            \
 272   declare_constant(Generation::Other)                                       \
 273                                                                             \
 274   declare_constant(Generation::LogOfGenGrain)                               \
 275   declare_constant(Generation::GenGrain)                                    \
 276 


 277 
 278 #endif // SHARE_GC_SHARED_VMSTRUCTS_GC_HPP


  30 #include "gc/shared/cardTableRS.hpp"
  31 #include "gc/shared/collectedHeap.hpp"
  32 #include "gc/shared/genCollectedHeap.hpp"
  33 #include "gc/shared/generation.hpp"
  34 #include "gc/shared/generationSpec.hpp"
  35 #include "gc/shared/oopStorage.hpp"
  36 #include "gc/shared/space.hpp"
  37 #if INCLUDE_CMSGC
  38 #include "gc/cms/vmStructs_cms.hpp"
  39 #endif
  40 #if INCLUDE_G1GC
  41 #include "gc/g1/vmStructs_g1.hpp"
  42 #endif
  43 #if INCLUDE_PARALLELGC
  44 #include "gc/parallel/vmStructs_parallelgc.hpp"
  45 #endif
  46 #if INCLUDE_SERIALGC
  47 #include "gc/serial/defNewGeneration.hpp"
  48 #include "gc/serial/vmStructs_serial.hpp"
  49 #endif
  50 #if INCLUDE_ZGC
  51 #include "gc/z/vmStructs_z.hpp"
  52 #endif
  53 
  54 #define VM_STRUCTS_GC(nonstatic_field,                                                                                               \
  55                       volatile_nonstatic_field,                                                                                      \
  56                       static_field,                                                                                                  \
  57                       unchecked_nonstatic_field)                                                                                     \
  58   CMSGC_ONLY(VM_STRUCTS_CMSGC(nonstatic_field,                                                                                       \
  59                               volatile_nonstatic_field,                                                                              \
  60                               static_field))                                                                                         \
  61   G1GC_ONLY(VM_STRUCTS_G1GC(nonstatic_field,                                                                                         \
  62                             volatile_nonstatic_field,                                                                                \
  63                             static_field))                                                                                           \
  64   PARALLELGC_ONLY(VM_STRUCTS_PARALLELGC(nonstatic_field,                                                                             \
  65                                         volatile_nonstatic_field,                                                                    \
  66                                         static_field))                                                                               \
  67   SERIALGC_ONLY(VM_STRUCTS_SERIALGC(nonstatic_field,                                                                                 \
  68                                     volatile_nonstatic_field,                                                                        \
  69                                     static_field))                                                                                   \
  70   ZGC_ONLY(VM_STRUCTS_ZGC(nonstatic_field,                                                                                           \
  71                           volatile_nonstatic_field,                                                                                  \
  72                           static_field))                                                                                             \
  73                                                                                                                                      \
  74   /**********************************************************************************/                                               \
  75   /* Generation and Space hierarchies                                               */                                               \
  76   /**********************************************************************************/                                               \
  77                                                                                                                                      \
  78   unchecked_nonstatic_field(AgeTable,          sizes,                                         sizeof(AgeTable::sizes))               \
  79                                                                                                                                      \
  80   nonstatic_field(BarrierSet,                  _fake_rtti,                                    BarrierSet::FakeRtti)                  \
  81                                                                                                                                      \
  82   nonstatic_field(BarrierSet::FakeRtti,        _concrete_tag,                                 BarrierSet::Name)                      \
  83                                                                                                                                      \
  84   nonstatic_field(BlockOffsetTable,            _bottom,                                       HeapWord*)                             \
  85   nonstatic_field(BlockOffsetTable,            _end,                                          HeapWord*)                             \
  86                                                                                                                                      \
  87   nonstatic_field(BlockOffsetSharedArray,      _reserved,                                     MemRegion)                             \
  88   nonstatic_field(BlockOffsetSharedArray,      _end,                                          HeapWord*)                             \
  89   nonstatic_field(BlockOffsetSharedArray,      _vs,                                           VirtualSpace)                          \
  90   nonstatic_field(BlockOffsetSharedArray,      _offset_array,                                 u_char*)                               \
  91                                                                                                                                      \
  92   nonstatic_field(BlockOffsetArray,            _array,                                        BlockOffsetSharedArray*)               \
  93   nonstatic_field(BlockOffsetArray,            _sp,                                           Space*)                                \


 152   nonstatic_field(OffsetTableContigSpace,      _offsets,                                      BlockOffsetArray)                      \
 153                                                                                                                                      \
 154   nonstatic_field(Space,                       _bottom,                                       HeapWord*)                             \
 155   nonstatic_field(Space,                       _end,                                          HeapWord*)
 156 
 157 #define VM_TYPES_GC(declare_type,                                         \
 158                     declare_toplevel_type,                                \
 159                     declare_integer_type)                                 \
 160   CMSGC_ONLY(VM_TYPES_CMSGC(declare_type,                                 \
 161                             declare_toplevel_type,                        \
 162                             declare_integer_type))                        \
 163   G1GC_ONLY(VM_TYPES_G1GC(declare_type,                                   \
 164                           declare_toplevel_type,                          \
 165                           declare_integer_type))                          \
 166   PARALLELGC_ONLY(VM_TYPES_PARALLELGC(declare_type,                       \
 167                                       declare_toplevel_type,              \
 168                                       declare_integer_type))              \
 169   SERIALGC_ONLY(VM_TYPES_SERIALGC(declare_type,                           \
 170                                   declare_toplevel_type,                  \
 171                                   declare_integer_type))                  \
 172   ZGC_ONLY(VM_TYPES_ZGC(declare_type,                                     \
 173                         declare_toplevel_type,                            \
 174                         declare_integer_type))                            \
 175                                                                           \
 176   /******************************************/                            \
 177   /* Generation and space hierarchies       */                            \
 178   /* (needed for run-time type information) */                            \
 179   /******************************************/                            \
 180                                                                           \
 181   declare_toplevel_type(CollectedHeap)                                    \
 182            declare_type(GenCollectedHeap,             CollectedHeap)      \
 183   declare_toplevel_type(Generation)                                       \
 184            declare_type(CardGeneration,               Generation)         \
 185   declare_toplevel_type(Space)                                            \
 186            declare_type(CompactibleSpace,             Space)              \
 187            declare_type(ContiguousSpace,              CompactibleSpace)   \
 188            declare_type(OffsetTableContigSpace,       ContiguousSpace)    \
 189   declare_toplevel_type(BarrierSet)                                       \
 190            declare_type(ModRefBarrierSet,             BarrierSet)         \
 191            declare_type(CardTableBarrierSet,          ModRefBarrierSet)   \
 192   declare_toplevel_type(CardTable)                                        \
 193            declare_type(CardTableRS, CardTable)                           \
 194   declare_toplevel_type(BarrierSet::Name)                                 \
 195   declare_toplevel_type(BlockOffsetSharedArray)                           \


 225   declare_toplevel_type(GenerationSpec**)                                 \
 226   declare_toplevel_type(HeapWord*)                                        \
 227   declare_toplevel_type(HeapWord* volatile)                               \
 228   declare_toplevel_type(MemRegion*)                                       \
 229   declare_toplevel_type(OffsetTableContigSpace*)                          \
 230   declare_toplevel_type(Space*)                                           \
 231   declare_toplevel_type(ThreadLocalAllocBuffer*)                          \
 232                                                                           \
 233   declare_toplevel_type(BarrierSet::FakeRtti)
 234 
 235 #define VM_INT_CONSTANTS_GC(declare_constant,                               \
 236                             declare_constant_with_value)                    \
 237   CMSGC_ONLY(VM_INT_CONSTANTS_CMSGC(declare_constant,                       \
 238                                     declare_constant_with_value))           \
 239   G1GC_ONLY(VM_INT_CONSTANTS_G1GC(declare_constant,                         \
 240                                   declare_constant_with_value))             \
 241   PARALLELGC_ONLY(VM_INT_CONSTANTS_PARALLELGC(declare_constant,             \
 242                                               declare_constant_with_value)) \
 243   SERIALGC_ONLY(VM_INT_CONSTANTS_SERIALGC(declare_constant,                 \
 244                                           declare_constant_with_value))     \
 245   ZGC_ONLY(VM_INT_CONSTANTS_ZGC(declare_constant,                           \
 246                                 declare_constant_with_value))               \
 247                                                                             \
 248   /********************************************/                            \
 249   /* Generation and Space Hierarchy Constants */                            \
 250   /********************************************/                            \
 251                                                                             \
 252   declare_constant(AgeTable::table_size)                                    \
 253                                                                             \
 254   declare_constant(BarrierSet::ModRef)                                      \
 255   declare_constant(BarrierSet::CardTableBarrierSet)                         \
 256                                                                             \
 257   declare_constant(BOTConstants::LogN)                                      \
 258   declare_constant(BOTConstants::LogN_words)                                \
 259   declare_constant(BOTConstants::N_bytes)                                   \
 260   declare_constant(BOTConstants::N_words)                                   \
 261   declare_constant(BOTConstants::LogBase)                                   \
 262   declare_constant(BOTConstants::Base)                                      \
 263   declare_constant(BOTConstants::N_powers)                                  \
 264                                                                             \
 265   declare_constant(CardTable::clean_card)                                   \
 266   declare_constant(CardTable::last_card)                                    \


 270   declare_constant(CardTable::card_shift)                                   \
 271   declare_constant(CardTable::card_size)                                    \
 272   declare_constant(CardTable::card_size_in_words)                           \
 273                                                                             \
 274   declare_constant(CardTableRS::youngergen_card)                            \
 275                                                                             \
 276   declare_constant(CollectedHeap::Serial)                                   \
 277   declare_constant(CollectedHeap::Parallel)                                 \
 278   declare_constant(CollectedHeap::CMS)                                      \
 279   declare_constant(CollectedHeap::G1)                                       \
 280                                                                             \
 281   /* constants from Generation::Name enum */                                \
 282                                                                             \
 283   declare_constant(Generation::DefNew)                                      \
 284   declare_constant(Generation::MarkSweepCompact)                            \
 285   declare_constant(Generation::Other)                                       \
 286                                                                             \
 287   declare_constant(Generation::LogOfGenGrain)                               \
 288   declare_constant(Generation::GenGrain)                                    \
 289 
 290 #define VM_LONG_CONSTANTS_GC(declare_constant)                              \
 291   ZGC_ONLY(VM_LONG_CONSTANTS_ZGC(declare_constant))
 292 
 293 #endif // SHARE_GC_SHARED_VMSTRUCTS_GC_HPP
< prev index next >