mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8040977: G1 crashes when run with -XX:-G1DeferredRSUpdate
When G1 is run with -XX:-G1DeferredRSUpdate, the VM crashes because of wrong initialization order of member variables. The change makes the initalization explicit, not relying on initialization order any more. Reviewed-by: brutisso, mgerdin
This commit is contained in:
parent
b4e0c547b8
commit
aec070cb69
4 changed files with 106 additions and 10 deletions
|
@ -30,10 +30,6 @@
|
|||
#include "oops/oop.pcgc.inline.hpp"
|
||||
#include "runtime/prefetch.inline.hpp"
|
||||
|
||||
#ifdef _MSC_VER // the use of 'this' below gets a warning, make it go away
|
||||
#pragma warning( disable:4355 ) // 'this' : used in base member initializer list
|
||||
#endif // _MSC_VER
|
||||
|
||||
G1ParScanThreadState::G1ParScanThreadState(G1CollectedHeap* g1h, uint queue_num, ReferenceProcessor* rp)
|
||||
: _g1h(g1h),
|
||||
_refs(g1h->task_queue(queue_num)),
|
||||
|
@ -44,9 +40,10 @@ G1ParScanThreadState::G1ParScanThreadState(G1CollectedHeap* g1h, uint queue_num,
|
|||
_term_attempts(0),
|
||||
_surviving_alloc_buffer(g1h->desired_plab_sz(GCAllocForSurvived)),
|
||||
_tenured_alloc_buffer(g1h->desired_plab_sz(GCAllocForTenured)),
|
||||
_age_table(false), _scanner(g1h, this, rp),
|
||||
_age_table(false), _scanner(g1h, rp),
|
||||
_strong_roots_time(0), _term_time(0),
|
||||
_alloc_buffer_waste(0), _undo_waste(0) {
|
||||
_scanner.set_par_scan_thread_state(this);
|
||||
// we allocate G1YoungSurvRateNumRegions plus one entries, since
|
||||
// we "sacrifice" entry 0 to keep track of surviving bytes for
|
||||
// non-young regions (where the age is -1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue