< prev index next >

src/share/vm/gc/shared/genRemSet.hpp

Print this page
rev 8362 : 8079792: GC directory structure cleanup
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  *
  23  */
  24 
  25 #ifndef SHARE_VM_MEMORY_GENREMSET_HPP
  26 #define SHARE_VM_MEMORY_GENREMSET_HPP
  27 
  28 #include "oops/oop.hpp"
  29 
  30 // A GenRemSet provides ways of iterating over pointers across generations.
  31 // (This is especially useful for older-to-younger.)
  32 
  33 class Generation;
  34 class BarrierSet;
  35 class OopsInGenClosure;
  36 class CardTableRS;
  37 
  38 // Helper to remember modified oops in all klasses.
  39 class KlassRemSet {
  40   bool _accumulate_modified_oops;
  41  public:
  42   KlassRemSet() : _accumulate_modified_oops(false) {}
  43   void set_accumulate_modified_oops(bool value) { _accumulate_modified_oops = value; }
  44   bool accumulate_modified_oops() { return _accumulate_modified_oops; }
  45   bool mod_union_is_clear();
  46   void clear_mod_union();


 114 
 115   // Informs the RS that there are no references to generations
 116   // younger than gen from generations gen and older.
 117   // The parameter clear_perm indicates if the perm_gen's
 118   // remembered set should also be processed/cleared.
 119   virtual void clear_into_younger(Generation* old_gen) = 0;
 120 
 121   // Informs the RS that refs in the given "mr" may have changed
 122   // arbitrarily, and therefore may contain old-to-young pointers.
 123   // If "whole heap" is true, then this invalidation is part of an
 124   // invalidation of the whole heap, which an implementation might
 125   // handle differently than that of a sub-part of the heap.
 126   virtual void invalidate(MemRegion mr, bool whole_heap = false) = 0;
 127 
 128   // Informs the RS that refs in this generation
 129   // may have changed arbitrarily, and therefore may contain
 130   // old-to-young pointers in arbitrary locations.
 131   virtual void invalidate_or_clear(Generation* old_gen) = 0;
 132 };
 133 
 134 #endif // SHARE_VM_MEMORY_GENREMSET_HPP
   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  *
  23  */
  24 
  25 #ifndef SHARE_VM_GC_SHARED_GENREMSET_HPP
  26 #define SHARE_VM_GC_SHARED_GENREMSET_HPP
  27 
  28 #include "oops/oop.hpp"
  29 
  30 // A GenRemSet provides ways of iterating over pointers across generations.
  31 // (This is especially useful for older-to-younger.)
  32 
  33 class Generation;
  34 class BarrierSet;
  35 class OopsInGenClosure;
  36 class CardTableRS;
  37 
  38 // Helper to remember modified oops in all klasses.
  39 class KlassRemSet {
  40   bool _accumulate_modified_oops;
  41  public:
  42   KlassRemSet() : _accumulate_modified_oops(false) {}
  43   void set_accumulate_modified_oops(bool value) { _accumulate_modified_oops = value; }
  44   bool accumulate_modified_oops() { return _accumulate_modified_oops; }
  45   bool mod_union_is_clear();
  46   void clear_mod_union();


 114 
 115   // Informs the RS that there are no references to generations
 116   // younger than gen from generations gen and older.
 117   // The parameter clear_perm indicates if the perm_gen's
 118   // remembered set should also be processed/cleared.
 119   virtual void clear_into_younger(Generation* old_gen) = 0;
 120 
 121   // Informs the RS that refs in the given "mr" may have changed
 122   // arbitrarily, and therefore may contain old-to-young pointers.
 123   // If "whole heap" is true, then this invalidation is part of an
 124   // invalidation of the whole heap, which an implementation might
 125   // handle differently than that of a sub-part of the heap.
 126   virtual void invalidate(MemRegion mr, bool whole_heap = false) = 0;
 127 
 128   // Informs the RS that refs in this generation
 129   // may have changed arbitrarily, and therefore may contain
 130   // old-to-young pointers in arbitrary locations.
 131   virtual void invalidate_or_clear(Generation* old_gen) = 0;
 132 };
 133 
 134 #endif // SHARE_VM_GC_SHARED_GENREMSET_HPP
< prev index next >