src/hotspot/share/gc/cms/vmStructs_cms.hpp
branchaefimov-dns-client-branch
changeset 59099 fcdb8e7ead8f
parent 58984 15e026239a6c
parent 59075 355f4f42dda5
child 59100 b92aac38b046
equal deleted inserted replaced
58984:15e026239a6c 59099:fcdb8e7ead8f
     1 /*
       
     2  * Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved.
       
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       
     4  *
       
     5  * This code is free software; you can redistribute it and/or modify it
       
     6  * under the terms of the GNU General Public License version 2 only, as
       
     7  * published by the Free Software Foundation.
       
     8  *
       
     9  * This code is distributed in the hope that it will be useful, but WITHOUT
       
    10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
       
    11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
       
    12  * version 2 for more details (a copy is included in the LICENSE file that
       
    13  * accompanied this code).
       
    14  *
       
    15  * You should have received a copy of the GNU General Public License version
       
    16  * 2 along with this work; if not, write to the Free Software Foundation,
       
    17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
       
    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_GC_CMS_VMSTRUCTS_CMS_HPP
       
    26 #define SHARE_GC_CMS_VMSTRUCTS_CMS_HPP
       
    27 
       
    28 #include "gc/cms/cmsHeap.hpp"
       
    29 #include "gc/cms/compactibleFreeListSpace.hpp"
       
    30 #include "gc/cms/concurrentMarkSweepGeneration.hpp"
       
    31 #include "gc/cms/concurrentMarkSweepThread.hpp"
       
    32 #include "gc/cms/parNewGeneration.hpp"
       
    33 
       
    34 #define VM_STRUCTS_CMSGC(nonstatic_field,                                                                                            \
       
    35                          volatile_nonstatic_field,                                                                                   \
       
    36                          static_field)                                                                                               \
       
    37   nonstatic_field(CompactibleFreeListSpace,    _collector,                                    CMSCollector*)                         \
       
    38   nonstatic_field(CompactibleFreeListSpace,    _bt,                                           BlockOffsetArrayNonContigSpace)        \
       
    39      static_field(CompactibleFreeListSpace,    _min_chunk_size_in_bytes,                      size_t)                                \
       
    40   nonstatic_field(CMSBitMap,                   _bmStartWord,                                  HeapWord*)                             \
       
    41   nonstatic_field(CMSBitMap,                   _bmWordSize,                                   size_t)                                \
       
    42   nonstatic_field(CMSBitMap,                   _shifter,                                      const int)                             \
       
    43   nonstatic_field(CMSBitMap,                   _bm,                                           BitMapView)                            \
       
    44   nonstatic_field(CMSBitMap,                   _virtual_space,                                VirtualSpace)                          \
       
    45   nonstatic_field(CMSCollector,                _markBitMap,                                   CMSBitMap)                             \
       
    46   nonstatic_field(ConcurrentMarkSweepGeneration, _cmsSpace,                                   CompactibleFreeListSpace*)             \
       
    47      static_field(ConcurrentMarkSweepThread,   _collector,                                    CMSCollector*)                         \
       
    48   nonstatic_field(LinearAllocBlock,            _word_size,                                    size_t)                                \
       
    49   nonstatic_field(AFLBinaryTreeDictionary,     _total_size,                                   size_t)                                \
       
    50   nonstatic_field(CompactibleFreeListSpace,    _dictionary,                                   AFLBinaryTreeDictionary*)              \
       
    51   nonstatic_field(CompactibleFreeListSpace,    _indexedFreeList[0],                           AdaptiveFreeList<FreeChunk>)           \
       
    52   nonstatic_field(CompactibleFreeListSpace,    _smallLinearAllocBlock,                        LinearAllocBlock)                      \
       
    53   volatile_nonstatic_field(FreeChunk,          _size,                                         size_t)                                \
       
    54   nonstatic_field(FreeChunk,                   _next,                                         FreeChunk*)                            \
       
    55   nonstatic_field(FreeChunk,                   _prev,                                         FreeChunk*)                            \
       
    56   nonstatic_field(AdaptiveFreeList<FreeChunk>, _size,                                         size_t)                                \
       
    57   nonstatic_field(AdaptiveFreeList<FreeChunk>, _count,                                        ssize_t)
       
    58 
       
    59 
       
    60 
       
    61 #define VM_TYPES_CMSGC(declare_type,                                      \
       
    62                        declare_toplevel_type,                             \
       
    63                        declare_integer_type)                              \
       
    64                                                                           \
       
    65            declare_type(CMSHeap,                      GenCollectedHeap)   \
       
    66            declare_type(ConcurrentMarkSweepGeneration,CardGeneration)     \
       
    67            declare_type(ParNewGeneration,             DefNewGeneration)   \
       
    68            declare_type(CompactibleFreeListSpace,     CompactibleSpace)   \
       
    69            declare_type(ConcurrentMarkSweepThread,    NamedThread)        \
       
    70   declare_toplevel_type(CMSCollector)                                     \
       
    71   declare_toplevel_type(CMSBitMap)                                        \
       
    72   declare_toplevel_type(FreeChunk)                                        \
       
    73   declare_toplevel_type(metaspace::Metablock)                             \
       
    74   declare_toplevel_type(ConcurrentMarkSweepThread*)                       \
       
    75   declare_toplevel_type(ConcurrentMarkSweepGeneration*)                   \
       
    76   declare_toplevel_type(CompactibleFreeListSpace*)                        \
       
    77   declare_toplevel_type(CMSCollector*)                                    \
       
    78   declare_toplevel_type(AFLBinaryTreeDictionary)                          \
       
    79   declare_toplevel_type(LinearAllocBlock)                                 \
       
    80   declare_toplevel_type(FreeChunk*)                                       \
       
    81   declare_toplevel_type(AdaptiveFreeList<FreeChunk>*)                     \
       
    82   declare_toplevel_type(AdaptiveFreeList<FreeChunk>)
       
    83 
       
    84 
       
    85 #define VM_INT_CONSTANTS_CMSGC(declare_constant,                          \
       
    86                                declare_constant_with_value)               \
       
    87   declare_constant(CompactibleFreeListSpace::IndexSetSize)                \
       
    88   declare_constant(Generation::ConcurrentMarkSweep)                       \
       
    89   declare_constant(Generation::ParNew)
       
    90 
       
    91 #endif // SHARE_GC_CMS_VMSTRUCTS_CMS_HPP