comparison src/share/vm/memory/universe.cpp @ 8003:3c9bc17b9403

Merge
author bpittore
date Thu, 07 Feb 2013 16:05:48 -0500
parents 10d5f25a7c67 8391fdd36e1f
children c3657d00e343 eac371996b44
comparison
equal deleted inserted replaced
7989:454d7cc622ab 8003:3c9bc17b9403
68 #include "services/memoryService.hpp" 68 #include "services/memoryService.hpp"
69 #include "utilities/copy.hpp" 69 #include "utilities/copy.hpp"
70 #include "utilities/events.hpp" 70 #include "utilities/events.hpp"
71 #include "utilities/hashtable.inline.hpp" 71 #include "utilities/hashtable.inline.hpp"
72 #include "utilities/preserveException.hpp" 72 #include "utilities/preserveException.hpp"
73 #ifndef SERIALGC 73 #include "utilities/macros.hpp"
74 #if INCLUDE_ALL_GCS
74 #include "gc_implementation/concurrentMarkSweep/cmsAdaptiveSizePolicy.hpp" 75 #include "gc_implementation/concurrentMarkSweep/cmsAdaptiveSizePolicy.hpp"
75 #include "gc_implementation/concurrentMarkSweep/cmsCollectorPolicy.hpp" 76 #include "gc_implementation/concurrentMarkSweep/cmsCollectorPolicy.hpp"
76 #include "gc_implementation/g1/g1CollectedHeap.inline.hpp" 77 #include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
77 #include "gc_implementation/g1/g1CollectorPolicy.hpp" 78 #include "gc_implementation/g1/g1CollectorPolicy.hpp"
78 #include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp" 79 #include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp"
79 #endif 80 #endif // INCLUDE_ALL_GCS
80 81
81 // Known objects 82 // Known objects
82 Klass* Universe::_boolArrayKlassObj = NULL; 83 Klass* Universe::_boolArrayKlassObj = NULL;
83 Klass* Universe::_byteArrayKlassObj = NULL; 84 Klass* Universe::_byteArrayKlassObj = NULL;
84 Klass* Universe::_charArrayKlassObj = NULL; 85 Klass* Universe::_charArrayKlassObj = NULL;
756 } 757 }
757 758
758 jint Universe::initialize_heap() { 759 jint Universe::initialize_heap() {
759 760
760 if (UseParallelGC) { 761 if (UseParallelGC) {
761 #ifndef SERIALGC 762 #if INCLUDE_ALL_GCS
762 Universe::_collectedHeap = new ParallelScavengeHeap(); 763 Universe::_collectedHeap = new ParallelScavengeHeap();
763 #else // SERIALGC 764 #else // INCLUDE_ALL_GCS
764 fatal("UseParallelGC not supported in this VM."); 765 fatal("UseParallelGC not supported in this VM.");
765 #endif // SERIALGC 766 #endif // INCLUDE_ALL_GCS
766 767
767 } else if (UseG1GC) { 768 } else if (UseG1GC) {
768 #ifndef SERIALGC 769 #if INCLUDE_ALL_GCS
769 G1CollectorPolicy* g1p = new G1CollectorPolicy(); 770 G1CollectorPolicy* g1p = new G1CollectorPolicy();
770 G1CollectedHeap* g1h = new G1CollectedHeap(g1p); 771 G1CollectedHeap* g1h = new G1CollectedHeap(g1p);
771 Universe::_collectedHeap = g1h; 772 Universe::_collectedHeap = g1h;
772 #else // SERIALGC 773 #else // INCLUDE_ALL_GCS
773 fatal("UseG1GC not supported in java kernel vm."); 774 fatal("UseG1GC not supported in java kernel vm.");
774 #endif // SERIALGC 775 #endif // INCLUDE_ALL_GCS
775 776
776 } else { 777 } else {
777 GenCollectorPolicy *gc_policy; 778 GenCollectorPolicy *gc_policy;
778 779
779 if (UseSerialGC) { 780 if (UseSerialGC) {
780 gc_policy = new MarkSweepPolicy(); 781 gc_policy = new MarkSweepPolicy();
781 } else if (UseConcMarkSweepGC) { 782 } else if (UseConcMarkSweepGC) {
782 #ifndef SERIALGC 783 #if INCLUDE_ALL_GCS
783 if (UseAdaptiveSizePolicy) { 784 if (UseAdaptiveSizePolicy) {
784 gc_policy = new ASConcurrentMarkSweepPolicy(); 785 gc_policy = new ASConcurrentMarkSweepPolicy();
785 } else { 786 } else {
786 gc_policy = new ConcurrentMarkSweepPolicy(); 787 gc_policy = new ConcurrentMarkSweepPolicy();
787 } 788 }
788 #else // SERIALGC 789 #else // INCLUDE_ALL_GCS
789 fatal("UseConcMarkSweepGC not supported in this VM."); 790 fatal("UseConcMarkSweepGC not supported in this VM.");
790 #endif // SERIALGC 791 #endif // INCLUDE_ALL_GCS
791 } else { // default old generation 792 } else { // default old generation
792 gc_policy = new MarkSweepPolicy(); 793 gc_policy = new MarkSweepPolicy();
793 } 794 }
794 795
795 Universe::_collectedHeap = new GenCollectedHeap(gc_policy); 796 Universe::_collectedHeap = new GenCollectedHeap(gc_policy);