Mercurial > hg > truffle
comparison src/share/vm/memory/universe.cpp @ 17876:9c3dc501b5eb
8028498: runtime/SharedArchiveFile/CdsDifferentObjectAlignment.java asserts in RT_Baseline
Summary: Preventing GCs to occur before VM is completely initialized. This was previously partly done by one part of the GC locker which not was removed.
Reviewed-by: coleenp, pliden
author | sjohanss |
---|---|
date | Thu, 13 Feb 2014 10:05:03 +0100 |
parents | 62c54fcc0a35 |
children | 78bbf4d43a14 |
comparison
equal
deleted
inserted
replaced
17875:cb1b723cbca8 | 17876:9c3dc501b5eb |
---|---|
630 "LogHeapWordSize is incorrect."); | 630 "LogHeapWordSize is incorrect."); |
631 guarantee(sizeof(oop) >= sizeof(HeapWord), "HeapWord larger than oop?"); | 631 guarantee(sizeof(oop) >= sizeof(HeapWord), "HeapWord larger than oop?"); |
632 guarantee(sizeof(oop) % sizeof(HeapWord) == 0, | 632 guarantee(sizeof(oop) % sizeof(HeapWord) == 0, |
633 "oop size is not not a multiple of HeapWord size"); | 633 "oop size is not not a multiple of HeapWord size"); |
634 TraceTime timer("Genesis", TraceStartupTime); | 634 TraceTime timer("Genesis", TraceStartupTime); |
635 GC_locker::lock(); // do not allow gc during bootstrapping | |
636 JavaClasses::compute_hard_coded_offsets(); | 635 JavaClasses::compute_hard_coded_offsets(); |
637 | 636 |
638 jint status = Universe::initialize_heap(); | 637 jint status = Universe::initialize_heap(); |
639 if (status != JNI_OK) { | 638 if (status != JNI_OK) { |
640 return status; | 639 return status; |
1162 MetaspaceCounters::initialize_performance_counters(); | 1161 MetaspaceCounters::initialize_performance_counters(); |
1163 CompressedClassSpaceCounters::initialize_performance_counters(); | 1162 CompressedClassSpaceCounters::initialize_performance_counters(); |
1164 | 1163 |
1165 MemoryService::add_metaspace_memory_pools(); | 1164 MemoryService::add_metaspace_memory_pools(); |
1166 | 1165 |
1167 GC_locker::unlock(); // allow gc after bootstrapping | |
1168 | |
1169 MemoryService::set_universe_heap(Universe::_collectedHeap); | 1166 MemoryService::set_universe_heap(Universe::_collectedHeap); |
1170 return true; | 1167 return true; |
1171 } | 1168 } |
1172 | 1169 |
1173 | 1170 |