8075247: Cleanup specialized_oop_closures.hpp

Reviewed-by: mgerdin, brutisso, tschatzl
This commit is contained in:
Stefan Karlsson 2015-03-17 14:18:52 +01:00
parent 426a345fec
commit 366bf9ff09
16 changed files with 43 additions and 57 deletions

View File

@ -109,6 +109,18 @@ protected:
template <class T> void do_klass_barrier(T* p, oop new_obj);
};
enum G1Barrier {
G1BarrierNone,
G1BarrierEvac,
G1BarrierKlass
};
enum G1Mark {
G1MarkNone,
G1MarkFromRoot,
G1MarkPromotedFromRoot
};
template <G1Barrier barrier, G1Mark do_mark_object>
class G1ParCopyClosure : public G1ParCopyHelper {
private:

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -30,23 +30,8 @@
// non-virtually, using a mechanism defined in this file. Extend these
// macros in the obvious way to add specializations for new closures.
enum G1Barrier {
G1BarrierNone,
G1BarrierEvac,
G1BarrierKlass
};
enum G1Mark {
G1MarkNone,
G1MarkFromRoot,
G1MarkPromotedFromRoot
};
// Forward declarations.
template<G1Barrier barrier, G1Mark do_mark_object>
class G1ParCopyClosure;
class G1ParScanClosure;
class G1ParPushHeapRSClosure;
@ -61,26 +46,16 @@ class G1TriggerClosure;
class G1InvokeIfNotTriggeredClosure;
class G1UpdateRSOrPushRefOopClosure;
#ifdef FURTHER_SPECIALIZED_OOP_OOP_ITERATE_CLOSURES
#error "FURTHER_SPECIALIZED_OOP_OOP_ITERATE_CLOSURES already defined."
#endif
#define FURTHER_SPECIALIZED_OOP_OOP_ITERATE_CLOSURES(f) \
f(G1ParScanClosure,_nv) \
f(G1ParPushHeapRSClosure,_nv) \
f(FilterIntoCSClosure,_nv) \
f(FilterOutOfRegionClosure,_nv) \
f(G1CMOopClosure,_nv) \
f(G1RootRegionScanClosure,_nv) \
f(G1Mux2Closure,_nv) \
f(G1TriggerClosure,_nv) \
f(G1InvokeIfNotTriggeredClosure,_nv) \
#define SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_G1(f) \
f(G1ParScanClosure,_nv) \
f(G1ParPushHeapRSClosure,_nv) \
f(FilterIntoCSClosure,_nv) \
f(FilterOutOfRegionClosure,_nv) \
f(G1CMOopClosure,_nv) \
f(G1RootRegionScanClosure,_nv) \
f(G1Mux2Closure,_nv) \
f(G1TriggerClosure,_nv) \
f(G1InvokeIfNotTriggeredClosure,_nv) \
f(G1UpdateRSOrPushRefOopClosure,_nv)
#ifdef FURTHER_SPECIALIZED_SINCE_SAVE_MARKS_CLOSURES
#error "FURTHER_SPECIALIZED_SINCE_SAVE_MARKS_CLOSURES already defined."
#endif
#define FURTHER_SPECIALIZED_SINCE_SAVE_MARKS_CLOSURES(f)
#endif // SHARE_VM_GC_IMPLEMENTATION_G1_G1_SPECIALIZED_OOP_CLOSURES_HPP

View File

@ -27,7 +27,6 @@
#include "gc_implementation/g1/g1AllocationContext.hpp"
#include "gc_implementation/g1/g1BlockOffsetTable.hpp"
#include "gc_implementation/g1/g1_specialized_oop_closures.hpp"
#include "gc_implementation/g1/heapRegionType.hpp"
#include "gc_implementation/g1/survRateGroup.hpp"
#include "gc_implementation/shared/ageTable.hpp"

View File

@ -69,12 +69,6 @@ class NoHeaderExtendedOopClosure;
// This is split into several because of a Visual C++ 6.0 compiler bug
// where very long macros cause the compiler to crash
// Some other heap might define further specialized closures.
#ifndef FURTHER_SPECIALIZED_OOP_OOP_ITERATE_CLOSURES
#define FURTHER_SPECIALIZED_OOP_OOP_ITERATE_CLOSURES(f) \
/* None */
#endif
#define SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_S(f) \
f(ScanClosure,_nv) \
f(FastScanClosure,_nv) \
@ -94,7 +88,7 @@ class NoHeaderExtendedOopClosure;
SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_P(f)
#if INCLUDE_ALL_GCS
#define SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_2(f) \
#define SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_CMS(f) \
f(MarkRefsIntoAndScanClosure,_nv) \
f(Par_MarkRefsIntoAndScanClosure,_nv) \
f(PushAndMarkClosure,_nv) \
@ -102,8 +96,13 @@ class NoHeaderExtendedOopClosure;
f(PushOrMarkClosure,_nv) \
f(Par_PushOrMarkClosure,_nv) \
f(CMSKeepAliveClosure,_nv) \
f(CMSInnerParMarkAndPushClosure,_nv) \
FURTHER_SPECIALIZED_OOP_OOP_ITERATE_CLOSURES(f)
f(CMSInnerParMarkAndPushClosure,_nv)
#endif
#if INCLUDE_ALL_GCS
#define SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_2(f) \
SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_CMS(f) \
SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_G1(f)
#else // INCLUDE_ALL_GCS
#define SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_2(f)
#endif // INCLUDE_ALL_GCS
@ -144,13 +143,6 @@ class NoHeaderExtendedOopClosure;
// The "root_class" is the most general class to define; this may be
// "OopClosure" in some applications and "OopsInGenClosure" in others.
// Some other heap might define further specialized closures.
#ifndef FURTHER_SPECIALIZED_SINCE_SAVE_MARKS_CLOSURES
#define FURTHER_SPECIALIZED_SINCE_SAVE_MARKS_CLOSURES(f) \
/* None */
#endif
#define SPECIALIZED_SINCE_SAVE_MARKS_CLOSURES_YOUNG_S(f) \
f(ScanClosure,_nv) \
f(FastScanClosure,_nv)
@ -158,8 +150,7 @@ class NoHeaderExtendedOopClosure;
#if INCLUDE_ALL_GCS
#define SPECIALIZED_SINCE_SAVE_MARKS_CLOSURES_YOUNG_P(f) \
f(ParScanWithBarrierClosure,_nv) \
f(ParScanWithoutBarrierClosure,_nv) \
FURTHER_SPECIALIZED_SINCE_SAVE_MARKS_CLOSURES(f)
f(ParScanWithoutBarrierClosure,_nv)
#else // INCLUDE_ALL_GCS
#define SPECIALIZED_SINCE_SAVE_MARKS_CLOSURES_YOUNG_P(f)
#endif // INCLUDE_ALL_GCS

View File

@ -30,6 +30,7 @@
#include "memory/genOopClosures.inline.hpp"
#include "memory/iterator.inline.hpp"
#include "memory/oopFactory.hpp"
#include "memory/specialized_oop_closures.hpp"
#include "oops/instanceKlass.hpp"
#include "oops/instanceClassLoaderKlass.hpp"
#include "oops/instanceMirrorKlass.hpp"

View File

@ -25,6 +25,7 @@
#ifndef SHARE_VM_OOPS_INSTANCECLASSLOADERKLASS_HPP
#define SHARE_VM_OOPS_INSTANCECLASSLOADERKLASS_HPP
#include "memory/specialized_oop_closures.hpp"
#include "oops/instanceKlass.hpp"
#include "utilities/macros.hpp"

View File

@ -38,6 +38,7 @@
#include "memory/iterator.inline.hpp"
#include "memory/metadataFactory.hpp"
#include "memory/oopFactory.hpp"
#include "memory/specialized_oop_closures.hpp"
#include "oops/fieldStreams.hpp"
#include "oops/instanceClassLoaderKlass.hpp"
#include "oops/instanceKlass.hpp"

View File

@ -27,6 +27,7 @@
#include "classfile/classLoaderData.hpp"
#include "memory/referenceType.hpp"
#include "memory/specialized_oop_closures.hpp"
#include "oops/annotations.hpp"
#include "oops/constMethod.hpp"
#include "oops/fieldInfo.hpp"

View File

@ -30,6 +30,7 @@
#include "memory/genOopClosures.inline.hpp"
#include "memory/iterator.inline.hpp"
#include "memory/oopFactory.hpp"
#include "memory/specialized_oop_closures.hpp"
#include "oops/instanceKlass.hpp"
#include "oops/instanceMirrorKlass.hpp"
#include "oops/instanceOop.hpp"

View File

@ -26,6 +26,7 @@
#define SHARE_VM_OOPS_INSTANCEMIRRORKLASS_HPP
#include "classfile/systemDictionary.hpp"
#include "memory/specialized_oop_closures.hpp"
#include "oops/instanceKlass.hpp"
#include "runtime/handles.hpp"
#include "utilities/macros.hpp"

View File

@ -30,6 +30,7 @@
#include "gc_interface/collectedHeap.inline.hpp"
#include "memory/genCollectedHeap.hpp"
#include "memory/genOopClosures.inline.hpp"
#include "memory/specialized_oop_closures.hpp"
#include "oops/instanceRefKlass.hpp"
#include "oops/oop.inline.hpp"
#include "utilities/preserveException.hpp"

View File

@ -25,6 +25,7 @@
#ifndef SHARE_VM_OOPS_INSTANCEREFKLASS_HPP
#define SHARE_VM_OOPS_INSTANCEREFKLASS_HPP
#include "memory/specialized_oop_closures.hpp"
#include "oops/instanceKlass.hpp"
#include "utilities/macros.hpp"

View File

@ -32,6 +32,7 @@
#include "memory/iterator.inline.hpp"
#include "memory/metadataFactory.hpp"
#include "memory/resourceArea.hpp"
#include "memory/specialized_oop_closures.hpp"
#include "memory/universe.inline.hpp"
#include "oops/instanceKlass.hpp"
#include "oops/klass.inline.hpp"

View File

@ -23,6 +23,7 @@
*/
#include "precompiled.hpp"
#include "memory/specialized_oop_closures.hpp"
#include "oops/objArrayKlass.hpp"
#include "oops/objArrayOop.hpp"
#include "oops/oop.inline.hpp"

View File

@ -25,6 +25,7 @@
#ifndef SHARE_VM_OOPS_OBJARRAYOOP_HPP
#define SHARE_VM_OOPS_OBJARRAYOOP_HPP
#include "memory/specialized_oop_closures.hpp"
#include "oops/arrayOop.hpp"
// An objArrayOop is an array containing oops.

View File

@ -136,7 +136,6 @@
# include "memory/sharedHeap.hpp"
# include "memory/space.hpp"
# include "memory/space.inline.hpp"
# include "memory/specialized_oop_closures.hpp"
# include "memory/threadLocalAllocBuffer.hpp"
# include "memory/threadLocalAllocBuffer.inline.hpp"
# include "memory/universe.hpp"
@ -310,7 +309,6 @@
# include "gc_implementation/g1/g1BlockOffsetTable.inline.hpp"
# include "gc_implementation/g1/g1OopClosures.hpp"
# include "gc_implementation/g1/g1_globals.hpp"
# include "gc_implementation/g1/g1_specialized_oop_closures.hpp"
# include "gc_implementation/g1/ptrQueue.hpp"
# include "gc_implementation/g1/satbQueue.hpp"
# include "gc_implementation/parNew/parOopClosures.hpp"