< prev index next >

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

Print this page
rev 8362 : 8079792: GC directory structure cleanup
Reviewed-by:


   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_IMPLEMENTATION_SHARED_VMGCOPERATIONS_HPP
  26 #define SHARE_VM_GC_IMPLEMENTATION_SHARED_VMGCOPERATIONS_HPP
  27 
  28 #include "gc_interface/collectedHeap.hpp"
  29 #include "memory/heapInspection.hpp"

  30 #include "runtime/handles.hpp"
  31 #include "runtime/jniHandles.hpp"
  32 #include "runtime/synchronizer.hpp"
  33 #include "runtime/vm_operations.hpp"
  34 #include "prims/jvmtiExport.hpp"
  35 
  36 // The following class hierarchy represents
  37 // a set of operations (VM_Operation) related to GC.
  38 //
  39 //  VM_Operation
  40 //      VM_GC_Operation
  41 //          VM_GC_HeapInspection
  42 //          VM_GenCollectFull
  43 //          VM_GenCollectFullConcurrent
  44 //          VM_ParallelGCSystemGC
  45 //          VM_CollectForAllocation
  46 //              VM_GenCollectForAllocation
  47 //              VM_ParallelGCFailedAllocation
  48 //  VM_GC_Operation
  49 //   - implements methods common to all classes in the hierarchy:
  50 //     prevents multiple gc requests and manages lock on heap;
  51 //
  52 //  VM_GC_HeapInspection
  53 //   - prints class histogram on SIGBREAK if PrintClassHistogram
  54 //     is specified; and also the attach "inspectheap" operation


 226   MetaWord* result() const       { return _result; }
 227 
 228   bool initiate_concurrent_GC();
 229 };
 230 
 231 class SvcGCMarker : public StackObj {
 232  private:
 233   JvmtiGCMarker _jgcm;
 234  public:
 235   typedef enum { MINOR, FULL, OTHER } reason_type;
 236 
 237   SvcGCMarker(reason_type reason ) {
 238     VM_GC_Operation::notify_gc_begin(reason == FULL);
 239   }
 240 
 241   ~SvcGCMarker() {
 242     VM_GC_Operation::notify_gc_end();
 243   }
 244 };
 245 
 246 #endif // SHARE_VM_GC_IMPLEMENTATION_SHARED_VMGCOPERATIONS_HPP


   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_VMGCOPERATIONS_HPP
  26 #define SHARE_VM_GC_SHARED_VMGCOPERATIONS_HPP
  27 
  28 #include "gc/shared/collectedHeap.hpp"
  29 #include "memory/heapInspection.hpp"
  30 #include "prims/jvmtiExport.hpp"
  31 #include "runtime/handles.hpp"
  32 #include "runtime/jniHandles.hpp"
  33 #include "runtime/synchronizer.hpp"
  34 #include "runtime/vm_operations.hpp"

  35 
  36 // The following class hierarchy represents
  37 // a set of operations (VM_Operation) related to GC.
  38 //
  39 //  VM_Operation
  40 //      VM_GC_Operation
  41 //          VM_GC_HeapInspection
  42 //          VM_GenCollectFull
  43 //          VM_GenCollectFullConcurrent
  44 //          VM_ParallelGCSystemGC
  45 //          VM_CollectForAllocation
  46 //              VM_GenCollectForAllocation
  47 //              VM_ParallelGCFailedAllocation
  48 //  VM_GC_Operation
  49 //   - implements methods common to all classes in the hierarchy:
  50 //     prevents multiple gc requests and manages lock on heap;
  51 //
  52 //  VM_GC_HeapInspection
  53 //   - prints class histogram on SIGBREAK if PrintClassHistogram
  54 //     is specified; and also the attach "inspectheap" operation


 226   MetaWord* result() const       { return _result; }
 227 
 228   bool initiate_concurrent_GC();
 229 };
 230 
 231 class SvcGCMarker : public StackObj {
 232  private:
 233   JvmtiGCMarker _jgcm;
 234  public:
 235   typedef enum { MINOR, FULL, OTHER } reason_type;
 236 
 237   SvcGCMarker(reason_type reason ) {
 238     VM_GC_Operation::notify_gc_begin(reason == FULL);
 239   }
 240 
 241   ~SvcGCMarker() {
 242     VM_GC_Operation::notify_gc_end();
 243   }
 244 };
 245 
 246 #endif // SHARE_VM_GC_SHARED_VMGCOPERATIONS_HPP
< prev index next >