src/share/vm/memory/genCollectedHeap.cpp

changeset 4544
3c9bc17b9403
parent 4542
db9981fd3124
child 4784
79af1312fc2c
     1.1 --- a/src/share/vm/memory/genCollectedHeap.cpp	Wed Feb 06 15:22:32 2013 -0800
     1.2 +++ b/src/share/vm/memory/genCollectedHeap.cpp	Thu Feb 07 16:05:48 2013 -0500
     1.3 @@ -51,10 +51,11 @@
     1.4  #include "services/memoryService.hpp"
     1.5  #include "utilities/vmError.hpp"
     1.6  #include "utilities/workgroup.hpp"
     1.7 -#ifndef SERIALGC
     1.8 +#include "utilities/macros.hpp"
     1.9 +#if INCLUDE_ALL_GCS
    1.10  #include "gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp"
    1.11  #include "gc_implementation/concurrentMarkSweep/vmCMSOperations.hpp"
    1.12 -#endif
    1.13 +#endif // INCLUDE_ALL_GCS
    1.14  
    1.15  GenCollectedHeap* GenCollectedHeap::_gch;
    1.16  NOT_PRODUCT(size_t GenCollectedHeap::_skip_header_HeapWords = 0;)
    1.17 @@ -141,14 +142,14 @@
    1.18    }
    1.19    clear_incremental_collection_failed();
    1.20  
    1.21 -#ifndef SERIALGC
    1.22 +#if INCLUDE_ALL_GCS
    1.23    // If we are running CMS, create the collector responsible
    1.24    // for collecting the CMS generations.
    1.25    if (collector_policy()->is_concurrent_mark_sweep_policy()) {
    1.26      bool success = create_cms_collector();
    1.27      if (!success) return JNI_ENOMEM;
    1.28    }
    1.29 -#endif // SERIALGC
    1.30 +#endif // INCLUDE_ALL_GCS
    1.31  
    1.32    return JNI_OK;
    1.33  }
    1.34 @@ -686,12 +687,12 @@
    1.35  
    1.36  void GenCollectedHeap::collect(GCCause::Cause cause) {
    1.37    if (should_do_concurrent_full_gc(cause)) {
    1.38 -#ifndef SERIALGC
    1.39 +#if INCLUDE_ALL_GCS
    1.40      // mostly concurrent full collection
    1.41      collect_mostly_concurrent(cause);
    1.42 -#else  // SERIALGC
    1.43 +#else  // INCLUDE_ALL_GCS
    1.44      ShouldNotReachHere();
    1.45 -#endif // SERIALGC
    1.46 +#endif // INCLUDE_ALL_GCS
    1.47    } else {
    1.48  #ifdef ASSERT
    1.49      if (cause == GCCause::_scavenge_alot) {
    1.50 @@ -736,7 +737,7 @@
    1.51    }
    1.52  }
    1.53  
    1.54 -#ifndef SERIALGC
    1.55 +#if INCLUDE_ALL_GCS
    1.56  bool GenCollectedHeap::create_cms_collector() {
    1.57  
    1.58    assert(((_gens[1]->kind() == Generation::ConcurrentMarkSweep) ||
    1.59 @@ -772,7 +773,7 @@
    1.60      VMThread::execute(&op);
    1.61    }
    1.62  }
    1.63 -#endif // SERIALGC
    1.64 +#endif // INCLUDE_ALL_GCS
    1.65  
    1.66  void GenCollectedHeap::do_full_collection(bool clear_all_soft_refs) {
    1.67     do_full_collection(clear_all_soft_refs, _n_gens - 1);
    1.68 @@ -1116,22 +1117,22 @@
    1.69    if (workers() != NULL) {
    1.70      workers()->threads_do(tc);
    1.71    }
    1.72 -#ifndef SERIALGC
    1.73 +#if INCLUDE_ALL_GCS
    1.74    if (UseConcMarkSweepGC) {
    1.75      ConcurrentMarkSweepThread::threads_do(tc);
    1.76    }
    1.77 -#endif // SERIALGC
    1.78 +#endif // INCLUDE_ALL_GCS
    1.79  }
    1.80  
    1.81  void GenCollectedHeap::print_gc_threads_on(outputStream* st) const {
    1.82 -#ifndef SERIALGC
    1.83 +#if INCLUDE_ALL_GCS
    1.84    if (UseParNewGC) {
    1.85      workers()->print_worker_threads_on(st);
    1.86    }
    1.87    if (UseConcMarkSweepGC) {
    1.88      ConcurrentMarkSweepThread::print_all_on(st);
    1.89    }
    1.90 -#endif // SERIALGC
    1.91 +#endif // INCLUDE_ALL_GCS
    1.92  }
    1.93  
    1.94  void GenCollectedHeap::print_tracing_info() const {

mercurial