src/share/vm/memory/genRemSet.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/memory

src/share/vm/memory/genRemSet.cpp

Print this page




  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 #include "precompiled.hpp"
  26 #include "classfile/classLoaderData.hpp"
  27 #include "memory/cardTableRS.hpp"
  28 #include "memory/genRemSet.hpp"
  29 
  30 // This kind of "BarrierSet" allows a "CollectedHeap" to detect and
  31 // enumerate ref fields that have been modified (since the last
  32 // enumeration.)
  33 
  34 uintx GenRemSet::max_alignment_constraint(Name nm) {
  35   switch (nm) {
  36   case GenRemSet::CardTable:
  37     return CardTableRS::ct_max_alignment_constraint();
  38   default:
  39     guarantee(false, "Unrecognized GenRemSet type.");
  40     return (0); // Make Windows compiler happy
  41   }
  42 }
  43 
  44 class HasAccumulatedModifiedOopsClosure : public KlassClosure {
  45   bool _found;
  46  public:
  47   HasAccumulatedModifiedOopsClosure() : _found(false) {}
  48   void do_klass(Klass* klass) {
  49     if (_found) {
  50       return;
  51     }
  52 
  53     if (klass->has_accumulated_modified_oops()) {
  54       _found = true;
  55     }
  56   }
  57   bool found() {
  58     return _found;
  59   }
  60 };
  61 




  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 #include "precompiled.hpp"
  26 #include "classfile/classLoaderData.hpp"
  27 #include "memory/cardTableRS.hpp"
  28 #include "memory/genRemSet.hpp"
  29 
  30 // This kind of "BarrierSet" allows a "CollectedHeap" to detect and
  31 // enumerate ref fields that have been modified (since the last
  32 // enumeration.)
  33 
  34 uintx GenRemSet::max_alignment_constraint(Name nm) {
  35   assert(nm == GenRemSet::CardTable, "Unrecognized GenRemSet type.");

  36   return CardTableRS::ct_max_alignment_constraint();




  37 }
  38 
  39 class HasAccumulatedModifiedOopsClosure : public KlassClosure {
  40   bool _found;
  41  public:
  42   HasAccumulatedModifiedOopsClosure() : _found(false) {}
  43   void do_klass(Klass* klass) {
  44     if (_found) {
  45       return;
  46     }
  47 
  48     if (klass->has_accumulated_modified_oops()) {
  49       _found = true;
  50     }
  51   }
  52   bool found() {
  53     return _found;
  54   }
  55 };
  56 


src/share/vm/memory/genRemSet.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File