8220294: ZGC fails to build on GCC 4.4.7: Type parameter issue
Summary: Specify explicit type in the constructor
Reviewed-by: shade, pliden
--- a/src/hotspot/share/gc/z/zStat.cpp Tue Mar 12 07:17:03 2019 -0400
+++ b/src/hotspot/share/gc/z/zStat.cpp Thu Mar 07 17:34:21 2019 +0100
@@ -404,7 +404,7 @@
// Stat sampler
//
ZStatSampler::ZStatSampler(const char* group, const char* name, ZStatUnitPrinter printer) :
- ZStatIterableValue(group, name, sizeof(ZStatSamplerData)),
+ ZStatIterableValue<ZStatSampler>(group, name, sizeof(ZStatSamplerData)),
_printer(printer) {}
ZStatSamplerData* ZStatSampler::get() const {
@@ -440,7 +440,7 @@
// Stat counter
//
ZStatCounter::ZStatCounter(const char* group, const char* name, ZStatUnitPrinter printer) :
- ZStatIterableValue(group, name, sizeof(ZStatCounterData)),
+ ZStatIterableValue<ZStatCounter>(group, name, sizeof(ZStatCounterData)),
_sampler(group, name, printer) {}
ZStatCounterData* ZStatCounter::get() const {
@@ -463,7 +463,7 @@
// Stat unsampled counter
//
ZStatUnsampledCounter::ZStatUnsampledCounter(const char* name) :
- ZStatIterableValue("Unsampled", name, sizeof(ZStatCounterData)) {}
+ ZStatIterableValue<ZStatUnsampledCounter>("Unsampled", name, sizeof(ZStatCounterData)) {}
ZStatCounterData* ZStatUnsampledCounter::get() const {
return get_cpu_local<ZStatCounterData>(ZCPU::id());