Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/shared/vmGCOperations.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 | bf9e50c573ad |
children | 52b4284cb496 2c6ef90f030a |
comparison
equal
deleted
inserted
replaced
17875:cb1b723cbca8 | 17876:9c3dc501b5eb |
---|---|
101 bool VM_GC_Operation::doit_prologue() { | 101 bool VM_GC_Operation::doit_prologue() { |
102 assert(Thread::current()->is_Java_thread(), "just checking"); | 102 assert(Thread::current()->is_Java_thread(), "just checking"); |
103 assert(((_gc_cause != GCCause::_no_gc) && | 103 assert(((_gc_cause != GCCause::_no_gc) && |
104 (_gc_cause != GCCause::_no_cause_specified)), "Illegal GCCause"); | 104 (_gc_cause != GCCause::_no_cause_specified)), "Illegal GCCause"); |
105 | 105 |
106 // To be able to handle a GC the VM initialization needs to be completed. | |
107 if (!is_init_completed()) { | |
108 vm_exit_during_initialization( | |
109 err_msg("GC triggered before VM initialization completed. Try increasing " | |
110 "NewSize, current value " UINTX_FORMAT "%s.", | |
111 byte_size_in_proper_unit(NewSize), | |
112 proper_unit_for_byte_size(NewSize))); | |
113 } | |
114 | |
106 acquire_pending_list_lock(); | 115 acquire_pending_list_lock(); |
107 // If the GC count has changed someone beat us to the collection | 116 // If the GC count has changed someone beat us to the collection |
108 // Get the Heap_lock after the pending_list_lock. | 117 // Get the Heap_lock after the pending_list_lock. |
109 Heap_lock->lock(); | 118 Heap_lock->lock(); |
110 | 119 |