Print this page
rev 6911 : 8065305: Make it possible to extend the G1CollectorPolicy
Summary: Added a G1CollectorPolicyExt where it is possible to extend the class.
Reviewed-by: sjohanss, tschatzl

Split Split Close
Expand all
Collapse all
          --- old/hotspot/src/share/vm/memory/universe.cpp
          +++ new/hotspot/src/share/vm/memory/universe.cpp
↓ open down ↓ 70 lines elided ↑ open up ↑
  71   71  #include "services/memoryService.hpp"
  72   72  #include "utilities/copy.hpp"
  73   73  #include "utilities/events.hpp"
  74   74  #include "utilities/hashtable.inline.hpp"
  75   75  #include "utilities/preserveException.hpp"
  76   76  #include "utilities/macros.hpp"
  77   77  #if INCLUDE_ALL_GCS
  78   78  #include "gc_implementation/concurrentMarkSweep/cmsAdaptiveSizePolicy.hpp"
  79   79  #include "gc_implementation/concurrentMarkSweep/cmsCollectorPolicy.hpp"
  80   80  #include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
  81      -#include "gc_implementation/g1/g1CollectorPolicy.hpp"
       81 +#include "gc_implementation/g1/g1CollectorPolicy_ext.hpp"
  82   82  #include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp"
  83   83  #endif // INCLUDE_ALL_GCS
  84   84  
  85   85  PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
  86   86  
  87   87  // Known objects
  88   88  Klass* Universe::_boolArrayKlassObj                 = NULL;
  89   89  Klass* Universe::_byteArrayKlassObj                 = NULL;
  90   90  Klass* Universe::_charArrayKlassObj                 = NULL;
  91   91  Klass* Universe::_intArrayKlassObj                  = NULL;
↓ open down ↓ 699 lines elided ↑ open up ↑
 791  791  
 792  792    if (UseParallelGC) {
 793  793  #if INCLUDE_ALL_GCS
 794  794      Universe::_collectedHeap = new ParallelScavengeHeap();
 795  795  #else  // INCLUDE_ALL_GCS
 796  796      fatal("UseParallelGC not supported in this VM.");
 797  797  #endif // INCLUDE_ALL_GCS
 798  798  
 799  799    } else if (UseG1GC) {
 800  800  #if INCLUDE_ALL_GCS
 801      -    G1CollectorPolicy* g1p = new G1CollectorPolicy();
      801 +    G1CollectorPolicyExt* g1p = new G1CollectorPolicyExt();
 802  802      g1p->initialize_all();
 803  803      G1CollectedHeap* g1h = new G1CollectedHeap(g1p);
 804  804      Universe::_collectedHeap = g1h;
 805  805  #else  // INCLUDE_ALL_GCS
 806  806      fatal("UseG1GC not supported in java kernel vm.");
 807  807  #endif // INCLUDE_ALL_GCS
 808  808  
 809  809    } else {
 810  810      GenCollectorPolicy *gc_policy;
 811  811  
↓ open down ↓ 718 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX