Mercurial > hg > truffle
comparison src/share/vm/memory/universe.cpp @ 8002:8391fdd36e1f
Merge
author | dlong |
---|---|
date | Sun, 27 Jan 2013 01:07:09 -0800 |
parents | 203f64878aab db9981fd3124 |
children | 3c9bc17b9403 |
comparison
equal
deleted
inserted
replaced
7946:6fbe8a57549d | 8002:8391fdd36e1f |
---|---|
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; |
738 } | 739 } |
739 | 740 |
740 jint Universe::initialize_heap() { | 741 jint Universe::initialize_heap() { |
741 | 742 |
742 if (UseParallelGC) { | 743 if (UseParallelGC) { |
743 #ifndef SERIALGC | 744 #if INCLUDE_ALL_GCS |
744 Universe::_collectedHeap = new ParallelScavengeHeap(); | 745 Universe::_collectedHeap = new ParallelScavengeHeap(); |
745 #else // SERIALGC | 746 #else // INCLUDE_ALL_GCS |
746 fatal("UseParallelGC not supported in this VM."); | 747 fatal("UseParallelGC not supported in this VM."); |
747 #endif // SERIALGC | 748 #endif // INCLUDE_ALL_GCS |
748 | 749 |
749 } else if (UseG1GC) { | 750 } else if (UseG1GC) { |
750 #ifndef SERIALGC | 751 #if INCLUDE_ALL_GCS |
751 G1CollectorPolicy* g1p = new G1CollectorPolicy(); | 752 G1CollectorPolicy* g1p = new G1CollectorPolicy(); |
752 G1CollectedHeap* g1h = new G1CollectedHeap(g1p); | 753 G1CollectedHeap* g1h = new G1CollectedHeap(g1p); |
753 Universe::_collectedHeap = g1h; | 754 Universe::_collectedHeap = g1h; |
754 #else // SERIALGC | 755 #else // INCLUDE_ALL_GCS |
755 fatal("UseG1GC not supported in java kernel vm."); | 756 fatal("UseG1GC not supported in java kernel vm."); |
756 #endif // SERIALGC | 757 #endif // INCLUDE_ALL_GCS |
757 | 758 |
758 } else { | 759 } else { |
759 GenCollectorPolicy *gc_policy; | 760 GenCollectorPolicy *gc_policy; |
760 | 761 |
761 if (UseSerialGC) { | 762 if (UseSerialGC) { |
762 gc_policy = new MarkSweepPolicy(); | 763 gc_policy = new MarkSweepPolicy(); |
763 } else if (UseConcMarkSweepGC) { | 764 } else if (UseConcMarkSweepGC) { |
764 #ifndef SERIALGC | 765 #if INCLUDE_ALL_GCS |
765 if (UseAdaptiveSizePolicy) { | 766 if (UseAdaptiveSizePolicy) { |
766 gc_policy = new ASConcurrentMarkSweepPolicy(); | 767 gc_policy = new ASConcurrentMarkSweepPolicy(); |
767 } else { | 768 } else { |
768 gc_policy = new ConcurrentMarkSweepPolicy(); | 769 gc_policy = new ConcurrentMarkSweepPolicy(); |
769 } | 770 } |
770 #else // SERIALGC | 771 #else // INCLUDE_ALL_GCS |
771 fatal("UseConcMarkSweepGC not supported in this VM."); | 772 fatal("UseConcMarkSweepGC not supported in this VM."); |
772 #endif // SERIALGC | 773 #endif // INCLUDE_ALL_GCS |
773 } else { // default old generation | 774 } else { // default old generation |
774 gc_policy = new MarkSweepPolicy(); | 775 gc_policy = new MarkSweepPolicy(); |
775 } | 776 } |
776 | 777 |
777 Universe::_collectedHeap = new GenCollectedHeap(gc_policy); | 778 Universe::_collectedHeap = new GenCollectedHeap(gc_policy); |