< prev index

src/share/vm/gc_implementation/concurrentMarkSweep/vmCMSOperations.hpp

Print this page
rev 7780 : imported patch 8072621
   1 /*
   2  * Copyright (c) 2005, 2011, 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  *


 112  public:
 113   VM_CMS_Final_Remark(CMSCollector* _collector) :
 114     VM_CMS_Operation(_collector) {}
 115   virtual VMOp_Type type() const { return VMOp_CMS_Final_Remark; }
 116   virtual void doit();
 117 
 118   virtual const CMSCollector::CollectorState legal_state() const {
 119     return CMSCollector::FinalMarking;
 120   }
 121 
 122   virtual const bool needs_pll() const {
 123     return true;
 124   }
 125 };
 126 
 127 
 128 // VM operation to invoke a concurrent collection of the heap as a
 129 // GenCollectedHeap heap.
 130 class VM_GenCollectFullConcurrent: public VM_GC_Operation {
 131  public:
 132   VM_GenCollectFullConcurrent(unsigned int gc_count_before,
 133                               unsigned int full_gc_count_before,
 134                               GCCause::Cause gc_cause)
 135     : VM_GC_Operation(gc_count_before, gc_cause, full_gc_count_before, true /* full */)
 136   {
 137     assert(FullGCCount_lock != NULL, "Error");
 138     assert(UseAsyncConcMarkSweepGC, "Else will hang caller");
 139   }
 140   ~VM_GenCollectFullConcurrent() {}
 141   virtual VMOp_Type type() const { return VMOp_GenCollectFullConcurrent; }
 142   virtual void doit();
 143   virtual void doit_epilogue();
 144   virtual bool is_cheap_allocated() const { return false; }
 145   virtual bool evaluate_at_safepoint() const;
 146 };
 147 
 148 #endif // SHARE_VM_GC_IMPLEMENTATION_CONCURRENTMARKSWEEP_VMCMSOPERATIONS_HPP
   1 /*
   2  * Copyright (c) 2005, 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  *


 112  public:
 113   VM_CMS_Final_Remark(CMSCollector* _collector) :
 114     VM_CMS_Operation(_collector) {}
 115   virtual VMOp_Type type() const { return VMOp_CMS_Final_Remark; }
 116   virtual void doit();
 117 
 118   virtual const CMSCollector::CollectorState legal_state() const {
 119     return CMSCollector::FinalMarking;
 120   }
 121 
 122   virtual const bool needs_pll() const {
 123     return true;
 124   }
 125 };
 126 
 127 
 128 // VM operation to invoke a concurrent collection of the heap as a
 129 // GenCollectedHeap heap.
 130 class VM_GenCollectFullConcurrent: public VM_GC_Operation {
 131  public:
 132   VM_GenCollectFullConcurrent(uint gc_count_before,
 133                               uint full_gc_count_before,
 134                               GCCause::Cause gc_cause)
 135     : VM_GC_Operation(gc_count_before, gc_cause, full_gc_count_before, true /* full */)
 136   {
 137     assert(FullGCCount_lock != NULL, "Error");
 138     assert(UseAsyncConcMarkSweepGC, "Else will hang caller");
 139   }
 140   ~VM_GenCollectFullConcurrent() {}
 141   virtual VMOp_Type type() const { return VMOp_GenCollectFullConcurrent; }
 142   virtual void doit();
 143   virtual void doit_epilogue();
 144   virtual bool is_cheap_allocated() const { return false; }
 145   virtual bool evaluate_at_safepoint() const;
 146 };
 147 
 148 #endif // SHARE_VM_GC_IMPLEMENTATION_CONCURRENTMARKSWEEP_VMCMSOPERATIONS_HPP
< prev index