8201370: GC specific data is referred from common precompiled headers and defNewGeneration.cpp
Reviewed-by: stefank, shade, dholmes
Contributed-by: boris.ulasevich@bell-sw.com
--- a/src/hotspot/share/gc/serial/defNewGeneration.cpp Wed Apr 11 11:41:30 2018 +0200
+++ b/src/hotspot/share/gc/serial/defNewGeneration.cpp Wed Apr 11 13:51:33 2018 +0200
@@ -1006,9 +1006,11 @@
// have to use it here, as well.
HeapWord* result = eden()->par_allocate(word_size);
if (result != NULL) {
+#if INCLUDE_ALL_GCS
if (CMSEdenChunksRecordAlways && _old_gen != NULL) {
_old_gen->sample_eden_chunk();
}
+#endif
} else {
// If the eden is full and the last collection bailed out, we are running
// out of heap space, and we try to allocate the from-space, too.
@@ -1022,9 +1024,11 @@
HeapWord* DefNewGeneration::par_allocate(size_t word_size,
bool is_tlab) {
HeapWord* res = eden()->par_allocate(word_size);
+#if INCLUDE_ALL_GCS
if (CMSEdenChunksRecordAlways && _old_gen != NULL) {
_old_gen->sample_eden_chunk();
}
+#endif
return res;
}
--- a/src/hotspot/share/precompiled/precompiled.hpp Wed Apr 11 11:41:30 2018 +0200
+++ b/src/hotspot/share/precompiled/precompiled.hpp Wed Apr 11 13:51:33 2018 +0200
@@ -84,11 +84,6 @@
# include "compiler/disassembler.hpp"
# include "compiler/methodLiveness.hpp"
# include "compiler/oopMap.hpp"
-# include "gc/cms/allocationStats.hpp"
-# include "gc/cms/gSpaceCounters.hpp"
-# include "gc/parallel/immutableSpace.hpp"
-# include "gc/parallel/mutableSpace.hpp"
-# include "gc/parallel/spaceCounters.hpp"
# include "gc/serial/cSpaceCounters.hpp"
# include "gc/serial/defNewGeneration.hpp"
# include "gc/shared/adaptiveSizePolicy.hpp"
@@ -292,9 +287,11 @@
# include "jvmci/jvmci_globals.hpp"
#endif // INCLUDE_JVMCI
#if INCLUDE_ALL_GCS
+# include "gc/cms/allocationStats.hpp"
# include "gc/cms/compactibleFreeListSpace.hpp"
# include "gc/cms/concurrentMarkSweepGeneration.hpp"
# include "gc/cms/freeChunk.hpp"
+# include "gc/cms/gSpaceCounters.hpp"
# include "gc/cms/parOopClosures.hpp"
# include "gc/cms/promotionInfo.hpp"
# include "gc/cms/yieldingWorkgroup.hpp"
@@ -305,6 +302,8 @@
# include "gc/g1/ptrQueue.hpp"
# include "gc/g1/satbMarkQueue.hpp"
# include "gc/parallel/gcAdaptivePolicyCounters.hpp"
+# include "gc/parallel/immutableSpace.hpp"
+# include "gc/parallel/mutableSpace.hpp"
# include "gc/parallel/objectStartArray.hpp"
# include "gc/parallel/parMarkBitMap.hpp"
# include "gc/parallel/parallelScavengeHeap.hpp"
@@ -315,6 +314,7 @@
# include "gc/parallel/psOldGen.hpp"
# include "gc/parallel/psVirtualspace.hpp"
# include "gc/parallel/psYoungGen.hpp"
+# include "gc/parallel/spaceCounters.hpp"
# include "gc/shared/gcPolicyCounters.hpp"
# include "gc/shared/plab.hpp"
#endif // INCLUDE_ALL_GCS