< prev index next >

src/share/vm/memory/cardTableRS.hpp

Print this page
rev 8333 : 8077842: Remove the level parameter passed around in GenCollectedHeap
Reviewed-by:
   1 /*
   2  * Copyright (c) 2001, 2013, 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  *


  59   virtual void younger_refs_in_space_iterate(Space* sp, OopsInGenClosure* cl);
  60 
  61   void verify_space(Space* s, HeapWord* gen_start);
  62 
  63   enum ExtendedCardValue {
  64     youngergen_card   = CardTableModRefBS::CT_MR_BS_last_reserved + 1,
  65     // These are for parallel collection.
  66     // There are three P (parallel) youngergen card values.  In general, this
  67     // needs to be more than the number of generations (including the perm
  68     // gen) that might have younger_refs_do invoked on them separately.  So
  69     // if we add more gens, we have to add more values.
  70     youngergenP1_card  = CardTableModRefBS::CT_MR_BS_last_reserved + 2,
  71     youngergenP2_card  = CardTableModRefBS::CT_MR_BS_last_reserved + 3,
  72     youngergenP3_card  = CardTableModRefBS::CT_MR_BS_last_reserved + 4,
  73     cur_youngergen_and_prev_nonclean_card =
  74       CardTableModRefBS::CT_MR_BS_last_reserved + 5
  75   };
  76 
  77   // An array that contains, for each generation, the card table value last
  78   // used as the current value for a younger_refs_do iteration of that
  79   // portion of the table.  (The perm gen is index 0; other gens are at
  80   // their level plus 1.  They youngest gen is in the table, but will
  81   // always have the value "clean_card".)
  82   jbyte* _last_cur_val_in_gen;
  83 
  84   jbyte _cur_youngergen_card_val;
  85 
  86   // Number of generations, plus one for lingering PermGen issues in CardTableRS.
  87   static const int _regions_to_iterate = 3;
  88 
  89   jbyte cur_youngergen_card_val() {
  90     return _cur_youngergen_card_val;
  91   }
  92   void set_cur_youngergen_card_val(jbyte v) {
  93     _cur_youngergen_card_val = v;
  94   }
  95   bool is_prev_youngergen_card_val(jbyte v) {
  96     return
  97       youngergen_card <= v &&
  98       v < cur_youngergen_and_prev_nonclean_card &&
  99       v != _cur_youngergen_card_val;
 100   }
 101   // Return a youngergen_card_value that is not currently in use.


   1 /*
   2  * Copyright (c) 2001, 2015, 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  *


  59   virtual void younger_refs_in_space_iterate(Space* sp, OopsInGenClosure* cl);
  60 
  61   void verify_space(Space* s, HeapWord* gen_start);
  62 
  63   enum ExtendedCardValue {
  64     youngergen_card   = CardTableModRefBS::CT_MR_BS_last_reserved + 1,
  65     // These are for parallel collection.
  66     // There are three P (parallel) youngergen card values.  In general, this
  67     // needs to be more than the number of generations (including the perm
  68     // gen) that might have younger_refs_do invoked on them separately.  So
  69     // if we add more gens, we have to add more values.
  70     youngergenP1_card  = CardTableModRefBS::CT_MR_BS_last_reserved + 2,
  71     youngergenP2_card  = CardTableModRefBS::CT_MR_BS_last_reserved + 3,
  72     youngergenP3_card  = CardTableModRefBS::CT_MR_BS_last_reserved + 4,
  73     cur_youngergen_and_prev_nonclean_card =
  74       CardTableModRefBS::CT_MR_BS_last_reserved + 5
  75   };
  76 
  77   // An array that contains, for each generation, the card table value last
  78   // used as the current value for a younger_refs_do iteration of that
  79   // portion of the table. The perm gen is index 0. The young gen is index 1,
  80   // but will always have the value "clean_card". The old gen is index 2.

  81   jbyte* _last_cur_val_in_gen;
  82 
  83   jbyte _cur_youngergen_card_val;
  84 
  85   // Number of generations, plus one for lingering PermGen issues in CardTableRS.
  86   static const int _regions_to_iterate = 3;
  87 
  88   jbyte cur_youngergen_card_val() {
  89     return _cur_youngergen_card_val;
  90   }
  91   void set_cur_youngergen_card_val(jbyte v) {
  92     _cur_youngergen_card_val = v;
  93   }
  94   bool is_prev_youngergen_card_val(jbyte v) {
  95     return
  96       youngergen_card <= v &&
  97       v < cur_youngergen_and_prev_nonclean_card &&
  98       v != _cur_youngergen_card_val;
  99   }
 100   // Return a youngergen_card_value that is not currently in use.


< prev index next >