src/hotspot/share/gc/cms/allocationStats.cpp
changeset 48157 7c4d43c26352
parent 47216 71c04702a3d5
--- a/src/hotspot/share/gc/cms/allocationStats.cpp	Wed Nov 29 18:43:35 2017 -0800
+++ b/src/hotspot/share/gc/cms/allocationStats.cpp	Tue Nov 28 21:43:45 2017 +0100
@@ -30,3 +30,20 @@
 // Technically this should be derived from machine speed, and
 // ideally it would be dynamically adjusted.
 float AllocationStats::_threshold = ((float)CMS_SweepTimerThresholdMillis)/1000;
+
+void AllocationStats::initialize(bool split_birth)   {
+  AdaptivePaddedAverage* dummy =
+    new (&_demand_rate_estimate) AdaptivePaddedAverage(CMS_FLSWeight,
+                                                       CMS_FLSPadding);
+  _desired = 0;
+  _coal_desired = 0;
+  _surplus = 0;
+  _bfr_surp = 0;
+  _prev_sweep = 0;
+  _before_sweep = 0;
+  _coal_births = 0;
+  _coal_deaths = 0;
+  _split_births = (split_birth ? 1 : 0);
+  _split_deaths = 0;
+  _returned_bytes = 0;
+}