8075803: Fix GC includes and forward declarations

Reviewed-by: pliden, mgerdin
This commit is contained in:
Stefan Karlsson 2015-03-24 11:21:21 +01:00
parent 8efb3ab7c1
commit 0c57e77d43
15 changed files with 37 additions and 23 deletions

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2001, 2014, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -36,7 +36,9 @@
// space, in this case a CompactibleFreeListSpace. // space, in this case a CompactibleFreeListSpace.
// Forward declarations // Forward declarations
class CMSCollector;
class CompactibleFreeListSpace; class CompactibleFreeListSpace;
class ConcurrentMarkSweepGeneration;
class BlkClosure; class BlkClosure;
class BlkClosureCareful; class BlkClosureCareful;
class FreeChunk; class FreeChunk;

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2001, 2014, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,6 +25,7 @@
#ifndef SHARE_VM_GC_IMPLEMENTATION_CONCURRENTMARKSWEEP_CONCURRENTMARKSWEEPGENERATION_HPP #ifndef SHARE_VM_GC_IMPLEMENTATION_CONCURRENTMARKSWEEP_CONCURRENTMARKSWEEPGENERATION_HPP
#define SHARE_VM_GC_IMPLEMENTATION_CONCURRENTMARKSWEEP_CONCURRENTMARKSWEEPGENERATION_HPP #define SHARE_VM_GC_IMPLEMENTATION_CONCURRENTMARKSWEEP_CONCURRENTMARKSWEEPGENERATION_HPP
#include "gc_implementation/concurrentMarkSweep/cmsOopClosures.hpp"
#include "gc_implementation/shared/gcHeapSummary.hpp" #include "gc_implementation/shared/gcHeapSummary.hpp"
#include "gc_implementation/shared/gSpaceCounters.hpp" #include "gc_implementation/shared/gSpaceCounters.hpp"
#include "gc_implementation/shared/gcStats.hpp" #include "gc_implementation/shared/gcStats.hpp"
@ -55,6 +56,7 @@
// means of a sliding mark-compact. // means of a sliding mark-compact.
class AdaptiveSizePolicy; class AdaptiveSizePolicy;
class CMSCollector;
class CMSConcMarkingTask; class CMSConcMarkingTask;
class CMSGCAdaptivePolicyCounters; class CMSGCAdaptivePolicyCounters;
class CMSTracer; class CMSTracer;
@ -64,6 +66,7 @@ class ConcurrentMarkSweepPolicy;
class ConcurrentMarkSweepThread; class ConcurrentMarkSweepThread;
class CompactibleFreeListSpace; class CompactibleFreeListSpace;
class FreeChunk; class FreeChunk;
class ParNewGeneration;
class PromotionInfo; class PromotionInfo;
class ScanMarkedObjectsAgainCarefullyClosure; class ScanMarkedObjectsAgainCarefullyClosure;
class TenuredGeneration; class TenuredGeneration;

View file

@ -34,6 +34,7 @@
class G1CollectedHeap; class G1CollectedHeap;
class CMBitMap; class CMBitMap;
class CMTask; class CMTask;
class ConcurrentMark;
typedef GenericTaskQueue<oop, mtGC> CMTaskQueue; typedef GenericTaskQueue<oop, mtGC> CMTaskQueue;
typedef GenericTaskQueueSet<CMTaskQueue, mtGC> CMTaskQueueSet; typedef GenericTaskQueueSet<CMTaskQueue, mtGC> CMTaskQueueSet;

View file

@ -56,6 +56,7 @@ class HRRSCleanupTask;
class GenerationSpec; class GenerationSpec;
class OopsInHeapRegionClosure; class OopsInHeapRegionClosure;
class G1KlassScanClosure; class G1KlassScanClosure;
class G1ParScanThreadState;
class ObjectClosure; class ObjectClosure;
class SpaceClosure; class SpaceClosure;
class CompactibleSpaceClosure; class CompactibleSpaceClosure;

View file

@ -25,6 +25,7 @@
#ifndef SHARE_VM_GC_IMPLEMENTATION_PARNEW_PARNEWGENERATION_HPP #ifndef SHARE_VM_GC_IMPLEMENTATION_PARNEW_PARNEWGENERATION_HPP
#define SHARE_VM_GC_IMPLEMENTATION_PARNEW_PARNEWGENERATION_HPP #define SHARE_VM_GC_IMPLEMENTATION_PARNEW_PARNEWGENERATION_HPP
#include "gc_implementation/parNew/parOopClosures.hpp"
#include "gc_implementation/shared/gcTrace.hpp" #include "gc_implementation/shared/gcTrace.hpp"
#include "gc_implementation/shared/parGCAllocBuffer.hpp" #include "gc_implementation/shared/parGCAllocBuffer.hpp"
#include "gc_implementation/shared/copyFailedInfo.hpp" #include "gc_implementation/shared/copyFailedInfo.hpp"

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -29,6 +29,7 @@
#include "gc_implementation/parNew/parOopClosures.hpp" #include "gc_implementation/parNew/parOopClosures.hpp"
#include "memory/cardTableRS.hpp" #include "memory/cardTableRS.hpp"
#include "memory/genCollectedHeap.hpp" #include "memory/genCollectedHeap.hpp"
#include "memory/genOopClosures.inline.hpp"
template <class T> inline void ParScanWeakRefClosure::do_oop_work(T* p) { template <class T> inline void ParScanWeakRefClosure::do_oop_work(T* p) {
assert (!oopDesc::is_null(*p), "null weak reference?"); assert (!oopDesc::is_null(*p), "null weak reference?");

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,6 +25,7 @@
#include "precompiled.hpp" #include "precompiled.hpp"
#include "classfile/systemDictionary.hpp" #include "classfile/systemDictionary.hpp"
#include "code/codeCache.hpp" #include "code/codeCache.hpp"
#include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp"
#include "gc_implementation/parallelScavenge/pcTasks.hpp" #include "gc_implementation/parallelScavenge/pcTasks.hpp"
#include "gc_implementation/parallelScavenge/psParallelCompact.hpp" #include "gc_implementation/parallelScavenge/psParallelCompact.hpp"
#include "gc_implementation/shared/gcTimer.hpp" #include "gc_implementation/shared/gcTimer.hpp"

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2001, 2013, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,7 +26,7 @@
#define SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSMARKSWEEP_HPP #define SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSMARKSWEEP_HPP
#include "gc_implementation/shared/collectorCounters.hpp" #include "gc_implementation/shared/collectorCounters.hpp"
#include "gc_implementation/shared/markSweep.inline.hpp" #include "gc_implementation/shared/markSweep.hpp"
#include "utilities/stack.hpp" #include "utilities/stack.hpp"
class PSAdaptiveSizePolicy; class PSAdaptiveSizePolicy;

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -29,7 +29,6 @@
#include "gc_implementation/parallelScavenge/parMarkBitMap.hpp" #include "gc_implementation/parallelScavenge/parMarkBitMap.hpp"
#include "gc_implementation/parallelScavenge/psCompactionManager.hpp" #include "gc_implementation/parallelScavenge/psCompactionManager.hpp"
#include "gc_implementation/shared/collectorCounters.hpp" #include "gc_implementation/shared/collectorCounters.hpp"
#include "gc_implementation/shared/markSweep.hpp"
#include "gc_implementation/shared/mutableSpace.hpp" #include "gc_implementation/shared/mutableSpace.hpp"
#include "memory/sharedHeap.hpp" #include "memory/sharedHeap.hpp"
#include "oops/oop.hpp" #include "oops/oop.hpp"

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -84,6 +84,14 @@ MarkSweep::FollowStackClosure MarkSweep::follow_stack_closure;
void MarkSweep::FollowStackClosure::do_void() { follow_stack(); } void MarkSweep::FollowStackClosure::do_void() { follow_stack(); }
void PreservedMark::adjust_pointer() {
MarkSweep::adjust_pointer(&_obj);
}
void PreservedMark::restore() {
_obj->set_mark(_mark);
}
// We preserve the mark which should be replaced at the end and the location // We preserve the mark which should be replaced at the end and the location
// that it will go. Note that the object that this markOop belongs to isn't // that it will go. Note that the object that this markOop belongs to isn't
// currently at that address but it will be after phase4 // currently at that address but it will be after phase4

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,7 +26,8 @@
#define SHARE_VM_GC_IMPLEMENTATION_SHARED_MARKSWEEP_HPP #define SHARE_VM_GC_IMPLEMENTATION_SHARED_MARKSWEEP_HPP
#include "gc_interface/collectedHeap.hpp" #include "gc_interface/collectedHeap.hpp"
#include "memory/universe.hpp" #include "memory/genOopClosures.hpp"
#include "memory/iterator.hpp"
#include "oops/markOop.hpp" #include "oops/markOop.hpp"
#include "oops/oop.hpp" #include "oops/oop.hpp"
#include "runtime/timer.hpp" #include "runtime/timer.hpp"
@ -182,13 +183,8 @@ public:
_mark = mark; _mark = mark;
} }
void adjust_pointer() { void adjust_pointer();
MarkSweep::adjust_pointer(&_obj); void restore();
}
void restore() {
_obj->set_mark(_mark);
}
}; };
#endif // SHARE_VM_GC_IMPLEMENTATION_SHARED_MARKSWEEP_HPP #endif // SHARE_VM_GC_IMPLEMENTATION_SHARED_MARKSWEEP_HPP

View file

@ -29,11 +29,14 @@
#include "gc_implementation/shared/cSpaceCounters.hpp" #include "gc_implementation/shared/cSpaceCounters.hpp"
#include "gc_implementation/shared/generationCounters.hpp" #include "gc_implementation/shared/generationCounters.hpp"
#include "gc_implementation/shared/copyFailedInfo.hpp" #include "gc_implementation/shared/copyFailedInfo.hpp"
#include "memory/generation.hpp"
#include "utilities/stack.hpp" #include "utilities/stack.hpp"
class ContiguousSpace; class ContiguousSpace;
class ScanClosure; class ScanClosure;
class STWGCTimer; class STWGCTimer;
class CSpaceCounters;
class ScanWeakRefClosure;
// DefNewGeneration is a young generation containing eden, from- and // DefNewGeneration is a young generation containing eden, from- and
// to-space. // to-space.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2001, 2010, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,8 +25,10 @@
#ifndef SHARE_VM_MEMORY_DEFNEWGENERATION_INLINE_HPP #ifndef SHARE_VM_MEMORY_DEFNEWGENERATION_INLINE_HPP
#define SHARE_VM_MEMORY_DEFNEWGENERATION_INLINE_HPP #define SHARE_VM_MEMORY_DEFNEWGENERATION_INLINE_HPP
#include "gc_interface/collectedHeap.hpp"
#include "memory/cardTableRS.hpp" #include "memory/cardTableRS.hpp"
#include "memory/defNewGeneration.hpp" #include "memory/defNewGeneration.hpp"
#include "memory/genOopClosures.inline.hpp"
#include "memory/space.hpp" #include "memory/space.hpp"
// Methods of protected closure types // Methods of protected closure types

View file

@ -26,7 +26,6 @@
#include "classfile/systemDictionary.hpp" #include "classfile/systemDictionary.hpp"
#include "classfile/vmSymbols.hpp" #include "classfile/vmSymbols.hpp"
#include "gc_implementation/shared/liveRange.hpp" #include "gc_implementation/shared/liveRange.hpp"
#include "gc_implementation/shared/markSweep.hpp"
#include "gc_implementation/shared/spaceDecorator.hpp" #include "gc_implementation/shared/spaceDecorator.hpp"
#include "gc_interface/collectedHeap.inline.hpp" #include "gc_interface/collectedHeap.inline.hpp"
#include "memory/blockOffsetTable.inline.hpp" #include "memory/blockOffsetTable.inline.hpp"

View file

@ -35,9 +35,6 @@
#include "runtime/handles.inline.hpp" #include "runtime/handles.inline.hpp"
#include "runtime/orderAccess.inline.hpp" #include "runtime/orderAccess.inline.hpp"
#include "utilities/macros.hpp" #include "utilities/macros.hpp"
#if INCLUDE_ALL_GCS
# include "gc_implementation/parallelScavenge/psPromotionManager.hpp"
#endif // INCLUDE_ALL_GCS
PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC