8214946: G1: Initialize all class members on construction
authorlkorinth
Mon, 17 Dec 2018 11:37:40 +0100
changeset 53034 de99beff5c0e
parent 53033 dcbb71b9e7c0
child 53035 0e5c83bf4ff7
8214946: G1: Initialize all class members on construction Reviewed-by: kbarrett, tschatzl
src/hotspot/share/gc/g1/dirtyCardQueue.cpp
src/hotspot/share/gc/g1/g1CardCounts.cpp
src/hotspot/share/gc/g1/g1CollectedHeap.cpp
src/hotspot/share/gc/g1/g1HeapVerifier.cpp
src/hotspot/share/gc/g1/g1YoungRemSetSamplingThread.cpp
src/hotspot/share/gc/g1/heapRegion.cpp
--- a/src/hotspot/share/gc/g1/dirtyCardQueue.cpp	Fri Dec 14 16:52:17 2018 -0800
+++ b/src/hotspot/share/gc/g1/dirtyCardQueue.cpp	Mon Dec 17 11:37:40 2018 +0100
@@ -137,7 +137,9 @@
   PtrQueueSet(notify_when_complete),
   _shared_dirty_card_queue(this, true /* permanent */),
   _free_ids(NULL),
-  _processed_buffers_mut(0), _processed_buffers_rs_thread(0)
+  _processed_buffers_mut(0),
+  _processed_buffers_rs_thread(0),
+  _cur_par_buffer_node(NULL)
 {
   _all_active = true;
 }
--- a/src/hotspot/share/gc/g1/g1CardCounts.cpp	Fri Dec 14 16:52:17 2018 -0800
+++ b/src/hotspot/share/gc/g1/g1CardCounts.cpp	Mon Dec 17 11:37:40 2018 +0100
@@ -58,7 +58,7 @@
 }
 
 G1CardCounts::G1CardCounts(G1CollectedHeap *g1h):
-  _listener(), _g1h(g1h), _card_counts(NULL), _reserved_max_card_num(0) {
+  _listener(), _g1h(g1h), _ct(NULL), _card_counts(NULL), _reserved_max_card_num(0), _ct_bot(NULL) {
   _listener.set_cardcounts(this);
 }
 
--- a/src/hotspot/share/gc/g1/g1CollectedHeap.cpp	Fri Dec 14 16:52:17 2018 -0800
+++ b/src/hotspot/share/gc/g1/g1CollectedHeap.cpp	Mon Dec 17 11:37:40 2018 +0100
@@ -4287,7 +4287,7 @@
  public:
 
   G1FreeHumongousRegionClosure(FreeRegionList* free_region_list) :
-    _free_region_list(free_region_list), _humongous_objects_reclaimed(0), _humongous_regions_reclaimed(0), _freed_bytes(0) {
+    _free_region_list(free_region_list), _proxy_set(NULL), _humongous_objects_reclaimed(0), _humongous_regions_reclaimed(0), _freed_bytes(0) {
   }
 
   virtual bool do_heap_region(HeapRegion* r) {
--- a/src/hotspot/share/gc/g1/g1HeapVerifier.cpp	Fri Dec 14 16:52:17 2018 -0800
+++ b/src/hotspot/share/gc/g1/g1HeapVerifier.cpp	Mon Dec 17 11:37:40 2018 +0100
@@ -337,10 +337,6 @@
 }
 
 class VerifyArchivePointerRegionClosure: public HeapRegionClosure {
-private:
-  G1CollectedHeap* _g1h;
-public:
-  VerifyArchivePointerRegionClosure(G1CollectedHeap* g1h) { }
   virtual bool do_heap_region(HeapRegion* r) {
    if (r->is_archive()) {
       VerifyObjectInArchiveRegionClosure verify_oop_pointers(r, false);
@@ -352,7 +348,7 @@
 
 void G1HeapVerifier::verify_archive_regions() {
   G1CollectedHeap*  g1h = G1CollectedHeap::heap();
-  VerifyArchivePointerRegionClosure cl(NULL);
+  VerifyArchivePointerRegionClosure cl;
   g1h->heap_region_iterate(&cl);
 }
 
--- a/src/hotspot/share/gc/g1/g1YoungRemSetSamplingThread.cpp	Fri Dec 14 16:52:17 2018 -0800
+++ b/src/hotspot/share/gc/g1/g1YoungRemSetSamplingThread.cpp	Mon Dec 17 11:37:40 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,7 +40,8 @@
              "G1YoungRemSetSamplingThread monitor",
              true,
              Monitor::_safepoint_check_never),
-    _last_periodic_gc_attempt_s(os::elapsedTime()) {
+    _last_periodic_gc_attempt_s(os::elapsedTime()),
+    _vtime_accum(0) {
   set_name("G1 Young RemSet Sampling");
   create_and_start();
 }
--- a/src/hotspot/share/gc/g1/heapRegion.cpp	Fri Dec 14 16:52:17 2018 -0800
+++ b/src/hotspot/share/gc/g1/heapRegion.cpp	Mon Dec 17 11:37:40 2018 +0100
@@ -877,8 +877,10 @@
 }
 
 G1ContiguousSpace::G1ContiguousSpace(G1BlockOffsetTable* bot) :
+  _top(NULL),
   _bot_part(bot, this),
-  _par_alloc_lock(Mutex::leaf, "OffsetTableContigSpace par alloc lock", true)
+  _par_alloc_lock(Mutex::leaf, "OffsetTableContigSpace par alloc lock", true),
+  _pre_dummy_top(NULL)
 {
 }