src/hotspot/share/gc/g1/g1CardCounts.hpp
changeset 49164 7e958a8ebcd3
parent 47216 71c04702a3d5
child 49455 848864ed9b17
equal deleted inserted replaced
49163:580bb0b85f63 49164:7e958a8ebcd3
     1 /*
     1 /*
     2  * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     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
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    23  */
    23  */
    24 
    24 
    25 #ifndef SHARE_VM_GC_G1_G1CARDCOUNTS_HPP
    25 #ifndef SHARE_VM_GC_G1_G1CARDCOUNTS_HPP
    26 #define SHARE_VM_GC_G1_G1CARDCOUNTS_HPP
    26 #define SHARE_VM_GC_G1_G1CARDCOUNTS_HPP
    27 
    27 
       
    28 #include "gc/g1/g1CardTable.hpp"
    28 #include "gc/g1/g1RegionToSpaceMapper.hpp"
    29 #include "gc/g1/g1RegionToSpaceMapper.hpp"
    29 #include "memory/allocation.hpp"
    30 #include "memory/allocation.hpp"
    30 #include "memory/virtualspace.hpp"
    31 #include "memory/virtualspace.hpp"
    31 #include "utilities/globalDefinitions.hpp"
    32 #include "utilities/globalDefinitions.hpp"
    32 
    33 
    54 
    55 
    55 class G1CardCounts: public CHeapObj<mtGC> {
    56 class G1CardCounts: public CHeapObj<mtGC> {
    56   G1CardCountsMappingChangedListener _listener;
    57   G1CardCountsMappingChangedListener _listener;
    57 
    58 
    58   G1CollectedHeap* _g1h;
    59   G1CollectedHeap* _g1h;
       
    60   G1CardTable*     _ct;
    59 
    61 
    60   // The table of counts
    62   // The table of counts
    61   jubyte* _card_counts;
    63   jubyte* _card_counts;
    62 
    64 
    63   // Max capacity of the reserved space for the counts table
    65   // Max capacity of the reserved space for the counts table
    64   size_t _reserved_max_card_num;
    66   size_t _reserved_max_card_num;
    65 
    67 
    66   // CardTable bottom.
    68   // CardTable bottom.
    67   const jbyte* _ct_bot;
    69   const jbyte* _ct_bot;
    68 
       
    69   // Barrier set
       
    70   CardTableModRefBS* _ct_bs;
       
    71 
    70 
    72   // Returns true if the card counts table has been reserved.
    71   // Returns true if the card counts table has been reserved.
    73   bool has_reserved_count_table() { return _card_counts != NULL; }
    72   bool has_reserved_count_table() { return _card_counts != NULL; }
    74 
    73 
    75   // Returns true if the card counts table has been reserved and committed.
    74   // Returns true if the card counts table has been reserved and committed.