< prev index next >

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

Print this page

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

133 
134   void clear_into_younger(Generation* old_gen);
135 
136   void invalidate_or_clear(Generation* old_gen);
137 
138   bool is_prev_nonclean_card_val(CardValue v) {
139     return
140       youngergen_card <= v &&
141       v <= cur_youngergen_and_prev_nonclean_card &&
142       v != _cur_youngergen_card_val;
143   }
144 
145   static bool youngergen_may_have_been_dirty(CardValue cv) {
146     return cv == CardTableRS::cur_youngergen_and_prev_nonclean_card;
147   }
148 
149   // *** Support for parallel card scanning.
150 
151   // dirty and precleaned are equivalent wrt younger_refs_iter.
152   static bool card_is_dirty_wrt_gen_iter(CardValue cv) {
153     return cv == dirty_card || cv == precleaned_card;
154   }
155 
156   // Returns "true" iff the value "cv" will cause the card containing it
157   // to be scanned in the current traversal.  May be overridden by
158   // subtypes.
159   bool card_will_be_scanned(CardValue cv);
160 
161   // Returns "true" iff the value "cv" may have represented a dirty card at
162   // some point.
163   bool card_may_have_been_dirty(CardValue cv);
164 
165   // Iterate over the portion of the card-table which covers the given
166   // region mr in the given space and apply cl to any dirty sub-regions
167   // of mr. Clears the dirty cards as they are processed.
168   void non_clean_card_iterate_possibly_parallel(Space* sp, MemRegion mr,
169                                                 OopsInGenClosure* cl, CardTableRS* ct,
170                                                 uint n_threads);
171 
172   // Work method used to implement non_clean_card_iterate_possibly_parallel()
173   // above in the parallel case.

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

133 
134   void clear_into_younger(Generation* old_gen);
135 
136   void invalidate_or_clear(Generation* old_gen);
137 
138   bool is_prev_nonclean_card_val(CardValue v) {
139     return
140       youngergen_card <= v &&
141       v <= cur_youngergen_and_prev_nonclean_card &&
142       v != _cur_youngergen_card_val;
143   }
144 
145   static bool youngergen_may_have_been_dirty(CardValue cv) {
146     return cv == CardTableRS::cur_youngergen_and_prev_nonclean_card;
147   }
148 
149   // *** Support for parallel card scanning.
150 
151   // dirty and precleaned are equivalent wrt younger_refs_iter.
152   static bool card_is_dirty_wrt_gen_iter(CardValue cv) {
153     return cv == dirty_card;
154   }
155 
156   // Returns "true" iff the value "cv" will cause the card containing it
157   // to be scanned in the current traversal.  May be overridden by
158   // subtypes.
159   bool card_will_be_scanned(CardValue cv);
160 
161   // Returns "true" iff the value "cv" may have represented a dirty card at
162   // some point.
163   bool card_may_have_been_dirty(CardValue cv);
164 
165   // Iterate over the portion of the card-table which covers the given
166   // region mr in the given space and apply cl to any dirty sub-regions
167   // of mr. Clears the dirty cards as they are processed.
168   void non_clean_card_iterate_possibly_parallel(Space* sp, MemRegion mr,
169                                                 OopsInGenClosure* cl, CardTableRS* ct,
170                                                 uint n_threads);
171 
172   // Work method used to implement non_clean_card_iterate_possibly_parallel()
173   // above in the parallel case.
< prev index next >