--- old/src/share/vm/gc_implementation/g1/g1Allocator.hpp 2014-12-15 12:59:11.232729040 +0100 +++ new/src/share/vm/gc_implementation/g1/g1Allocator.hpp 2014-12-15 12:59:11.173727271 +0100 @@ -27,29 +27,9 @@ #include "gc_implementation/g1/g1AllocationContext.hpp" #include "gc_implementation/g1/g1AllocRegion.hpp" +#include "gc_implementation/g1/g1InCSetState.hpp" #include "gc_implementation/shared/parGCAllocBuffer.hpp" -typedef int8_t in_cset_state_t; - -// Helper class used to examine in_cset_t values. -class InCSetState : AllStatic { -public: - enum { - // Values <0 mean the region is a humongous region. - NotInCSet = 0, // The region is not in the collection set. - Young = 1, // The region is in the collection set and a young region. - Old = 2, // The region is in the collection set and an old region. - Num - }; - - static in_cset_state_t humongous() { return -1; } - - static bool is_not_in_cset(in_cset_state_t state) { return state == NotInCSet; } - static bool is_in_cset_or_humongous(in_cset_state_t state) { return state != NotInCSet; } - static bool is_in_cset(in_cset_state_t state) { return state > NotInCSet; } - static bool is_humongous(in_cset_state_t state) { return state < NotInCSet; } -}; - // Base class for G1 allocators. class G1Allocator : public CHeapObj { friend class VMStructs;