src/hotspot/share/gc/shared/vmStructs_gc.hpp
changeset 49982 9042ffe5b7fe
parent 49754 ee93c1087584
child 50523 7b7c75d87f9b
child 56576 92316ff16d5c
equal deleted inserted replaced
49981:bd0a95bec96b 49982:9042ffe5b7fe
    23  */
    23  */
    24 
    24 
    25 #ifndef SHARE_GC_SHARED_VMSTRUCTS_GC_HPP
    25 #ifndef SHARE_GC_SHARED_VMSTRUCTS_GC_HPP
    26 #define SHARE_GC_SHARED_VMSTRUCTS_GC_HPP
    26 #define SHARE_GC_SHARED_VMSTRUCTS_GC_HPP
    27 
    27 
       
    28 #include "gc/shared/ageTable.hpp"
    28 #include "gc/shared/cardGeneration.hpp"
    29 #include "gc/shared/cardGeneration.hpp"
    29 #include "gc/shared/cardTableRS.hpp"
    30 #include "gc/shared/cardTableRS.hpp"
    30 #include "gc/shared/collectedHeap.hpp"
    31 #include "gc/shared/collectedHeap.hpp"
    31 #include "gc/shared/genCollectedHeap.hpp"
    32 #include "gc/shared/genCollectedHeap.hpp"
    32 #include "gc/shared/generation.hpp"
    33 #include "gc/shared/generation.hpp"
    33 #include "gc/shared/generationSpec.hpp"
    34 #include "gc/shared/generationSpec.hpp"
    34 #include "gc/shared/oopStorage.hpp"
    35 #include "gc/shared/oopStorage.hpp"
    35 #include "gc/shared/space.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
    36 #include "gc/serial/defNewGeneration.hpp"
    47 #include "gc/serial/defNewGeneration.hpp"
    37 #include "gc/serial/vmStructs_serial.hpp"
    48 #include "gc/serial/vmStructs_serial.hpp"
    38 #if INCLUDE_ALL_GCS
       
    39 #include "gc/cms/vmStructs_cms.hpp"
       
    40 #include "gc/g1/vmStructs_g1.hpp"
       
    41 #include "gc/parallel/vmStructs_parallelgc.hpp"
       
    42 #endif
    49 #endif
    43 
    50 
    44 #define VM_STRUCTS_GC(nonstatic_field,                                                                                               \
    51 #define VM_STRUCTS_GC(nonstatic_field,                                                                                               \
    45                       volatile_nonstatic_field,                                                                                      \
    52                       volatile_nonstatic_field,                                                                                      \
    46                       static_field,                                                                                                  \
    53                       static_field,                                                                                                  \
    47                       unchecked_nonstatic_field)                                                                                     \
    54                       unchecked_nonstatic_field)                                                                                     \
    48   ALL_GCS_ONLY(VM_STRUCTS_CMSGC(nonstatic_field,                                                                                     \
    55   CMSGC_ONLY(VM_STRUCTS_CMSGC(nonstatic_field,                                                                                       \
    49                                 volatile_nonstatic_field,                                                                            \
    56                               volatile_nonstatic_field,                                                                              \
    50                                 static_field))                                                                                       \
    57                               static_field))                                                                                         \
    51   ALL_GCS_ONLY(VM_STRUCTS_G1GC(nonstatic_field,                                                                                      \
    58   G1GC_ONLY(VM_STRUCTS_G1GC(nonstatic_field,                                                                                         \
    52                                volatile_nonstatic_field,                                                                             \
    59                             volatile_nonstatic_field,                                                                                \
    53                                static_field))                                                                                        \
    60                             static_field))                                                                                           \
    54   ALL_GCS_ONLY(VM_STRUCTS_PARALLELGC(nonstatic_field,                                                                                \
    61   PARALLELGC_ONLY(VM_STRUCTS_PARALLELGC(nonstatic_field,                                                                             \
    55                                      volatile_nonstatic_field,                                                                       \
    62                                         volatile_nonstatic_field,                                                                    \
    56                                      static_field))                                                                                  \
    63                                         static_field))                                                                               \
    57   VM_STRUCTS_SERIALGC(nonstatic_field,                                                                                               \
    64   SERIALGC_ONLY(VM_STRUCTS_SERIALGC(nonstatic_field,                                                                                 \
    58                       volatile_nonstatic_field,                                                                                      \
    65                                     volatile_nonstatic_field,                                                                        \
    59                       static_field)                                                                                                  \
    66                                     static_field))                                                                                   \
    60   /**********************************************************************************/                                               \
    67   /**********************************************************************************/                                               \
    61   /* Generation and Space hierarchies                                               */                                               \
    68   /* Generation and Space hierarchies                                               */                                               \
    62   /**********************************************************************************/                                               \
    69   /**********************************************************************************/                                               \
    63                                                                                                                                      \
    70                                                                                                                                      \
    64   unchecked_nonstatic_field(AgeTable,          sizes,                                         sizeof(AgeTable::sizes))               \
    71   unchecked_nonstatic_field(AgeTable,          sizes,                                         sizeof(AgeTable::sizes))               \
   112                                                                                                                                      \
   119                                                                                                                                      \
   113   nonstatic_field(ContiguousSpace,             _top,                                          HeapWord*)                             \
   120   nonstatic_field(ContiguousSpace,             _top,                                          HeapWord*)                             \
   114   nonstatic_field(ContiguousSpace,             _concurrent_iteration_safe_limit,              HeapWord*)                             \
   121   nonstatic_field(ContiguousSpace,             _concurrent_iteration_safe_limit,              HeapWord*)                             \
   115   nonstatic_field(ContiguousSpace,             _saved_mark_word,                              HeapWord*)                             \
   122   nonstatic_field(ContiguousSpace,             _saved_mark_word,                              HeapWord*)                             \
   116                                                                                                                                      \
   123                                                                                                                                      \
   117   nonstatic_field(DefNewGeneration,            _old_gen,                                      Generation*)                           \
       
   118   nonstatic_field(DefNewGeneration,            _tenuring_threshold,                           uint)                                  \
       
   119   nonstatic_field(DefNewGeneration,            _age_table,                                    AgeTable)                              \
       
   120   nonstatic_field(DefNewGeneration,            _eden_space,                                   ContiguousSpace*)                      \
       
   121   nonstatic_field(DefNewGeneration,            _from_space,                                   ContiguousSpace*)                      \
       
   122   nonstatic_field(DefNewGeneration,            _to_space,                                     ContiguousSpace*)                      \
       
   123                                                                                                                                      \
       
   124   nonstatic_field(Generation,                  _reserved,                                     MemRegion)                             \
   124   nonstatic_field(Generation,                  _reserved,                                     MemRegion)                             \
   125   nonstatic_field(Generation,                  _virtual_space,                                VirtualSpace)                          \
   125   nonstatic_field(Generation,                  _virtual_space,                                VirtualSpace)                          \
   126   nonstatic_field(Generation,                  _stat_record,                                  Generation::StatRecord)                \
   126   nonstatic_field(Generation,                  _stat_record,                                  Generation::StatRecord)                \
   127                                                                                                                                      \
   127                                                                                                                                      \
   128   nonstatic_field(Generation::StatRecord,      invocations,                                   int)                                   \
   128   nonstatic_field(Generation::StatRecord,      invocations,                                   int)                                   \
   148   nonstatic_field(Space,                       _end,                                          HeapWord*)
   148   nonstatic_field(Space,                       _end,                                          HeapWord*)
   149 
   149 
   150 #define VM_TYPES_GC(declare_type,                                         \
   150 #define VM_TYPES_GC(declare_type,                                         \
   151                     declare_toplevel_type,                                \
   151                     declare_toplevel_type,                                \
   152                     declare_integer_type)                                 \
   152                     declare_integer_type)                                 \
   153   ALL_GCS_ONLY(VM_TYPES_CMSGC(declare_type,                               \
   153   CMSGC_ONLY(VM_TYPES_CMSGC(declare_type,                                 \
   154                              declare_toplevel_type,                       \
   154                             declare_toplevel_type,                        \
   155                              declare_integer_type))                       \
   155                             declare_integer_type))                        \
   156   ALL_GCS_ONLY(VM_TYPES_G1GC(declare_type,                                \
   156   G1GC_ONLY(VM_TYPES_G1GC(declare_type,                                   \
   157                              declare_toplevel_type,                       \
   157                           declare_toplevel_type,                          \
   158                              declare_integer_type))                       \
   158                           declare_integer_type))                          \
   159   ALL_GCS_ONLY(VM_TYPES_PARALLELGC(declare_type,                          \
   159   PARALLELGC_ONLY(VM_TYPES_PARALLELGC(declare_type,                       \
   160                                    declare_toplevel_type,                 \
   160                                       declare_toplevel_type,              \
   161                                    declare_integer_type))                 \
   161                                       declare_integer_type))              \
   162   VM_TYPES_SERIALGC(declare_type,                                         \
   162   SERIALGC_ONLY(VM_TYPES_SERIALGC(declare_type,                           \
   163                     declare_toplevel_type,                                \
   163                                   declare_toplevel_type,                  \
   164                     declare_integer_type)                                 \
   164                                   declare_integer_type))                  \
   165   /******************************************/                            \
   165   /******************************************/                            \
   166   /* Generation and space hierarchies       */                            \
   166   /* Generation and space hierarchies       */                            \
   167   /* (needed for run-time type information) */                            \
   167   /* (needed for run-time type information) */                            \
   168   /******************************************/                            \
   168   /******************************************/                            \
   169                                                                           \
   169                                                                           \
   170   declare_toplevel_type(CollectedHeap)                                    \
   170   declare_toplevel_type(CollectedHeap)                                    \
   171            declare_type(GenCollectedHeap,             CollectedHeap)      \
   171            declare_type(GenCollectedHeap,             CollectedHeap)      \
   172   declare_toplevel_type(Generation)                                       \
   172   declare_toplevel_type(Generation)                                       \
   173            declare_type(DefNewGeneration,             Generation)         \
       
   174            declare_type(CardGeneration,               Generation)         \
   173            declare_type(CardGeneration,               Generation)         \
   175   declare_toplevel_type(Space)                                            \
   174   declare_toplevel_type(Space)                                            \
   176            declare_type(CompactibleSpace,             Space)              \
   175            declare_type(CompactibleSpace,             Space)              \
   177            declare_type(ContiguousSpace,              CompactibleSpace)   \
   176            declare_type(ContiguousSpace,              CompactibleSpace)   \
   178            declare_type(OffsetTableContigSpace,       ContiguousSpace)    \
   177            declare_type(OffsetTableContigSpace,       ContiguousSpace)    \
   222                                                                           \
   221                                                                           \
   223   declare_toplevel_type(BarrierSet::FakeRtti)
   222   declare_toplevel_type(BarrierSet::FakeRtti)
   224 
   223 
   225 #define VM_INT_CONSTANTS_GC(declare_constant,                               \
   224 #define VM_INT_CONSTANTS_GC(declare_constant,                               \
   226                             declare_constant_with_value)                    \
   225                             declare_constant_with_value)                    \
   227   ALL_GCS_ONLY(VM_INT_CONSTANTS_CMSGC(declare_constant,                     \
   226   CMSGC_ONLY(VM_INT_CONSTANTS_CMSGC(declare_constant,                       \
   228                                       declare_constant_with_value))         \
   227                                     declare_constant_with_value))           \
   229   ALL_GCS_ONLY(VM_INT_CONSTANTS_G1GC(declare_constant,                      \
   228   G1GC_ONLY(VM_INT_CONSTANTS_G1GC(declare_constant,                         \
   230                                      declare_constant_with_value))          \
   229                                   declare_constant_with_value))             \
   231   ALL_GCS_ONLY(VM_INT_CONSTANTS_PARALLELGC(declare_constant,                \
   230   PARALLELGC_ONLY(VM_INT_CONSTANTS_PARALLELGC(declare_constant,             \
   232                                            declare_constant_with_value))    \
   231                                               declare_constant_with_value)) \
   233   VM_INT_CONSTANTS_SERIALGC(declare_constant,                               \
   232   SERIALGC_ONLY(VM_INT_CONSTANTS_SERIALGC(declare_constant,                 \
   234                             declare_constant_with_value)                    \
   233                                           declare_constant_with_value))     \
   235                                                                             \
   234                                                                             \
   236   /********************************************/                            \
   235   /********************************************/                            \
   237   /* Generation and Space Hierarchy Constants */                            \
   236   /* Generation and Space Hierarchy Constants */                            \
   238   /********************************************/                            \
   237   /********************************************/                            \
   239                                                                             \
   238                                                                             \