8215548: G1PeriodicGCSystemLoadThreshold needs to be a double
Change G1PeriodicGCSystemLoadThreshold to be a double to allow better granularity in determining idleness Reviewed-by: sjohanss, sangheki
This commit is contained in:
parent
d62b658ffc
commit
1a1369d270
@ -71,9 +71,9 @@ bool G1YoungRemSetSamplingThread::should_start_periodic_gc() {
|
||||
|
||||
// Check if load is lower than max.
|
||||
double recent_load;
|
||||
if ((G1PeriodicGCSystemLoadThreshold > 0) &&
|
||||
if ((G1PeriodicGCSystemLoadThreshold > 0.0f) &&
|
||||
(os::loadavg(&recent_load, 1) == -1 || recent_load > G1PeriodicGCSystemLoadThreshold)) {
|
||||
log_debug(gc, periodic)("Load %1.2f is higher than threshold " UINTX_FORMAT ". Skipping.",
|
||||
log_debug(gc, periodic)("Load %1.2f is higher than threshold %1.2f. Skipping.",
|
||||
recent_load, G1PeriodicGCSystemLoadThreshold);
|
||||
return false;
|
||||
}
|
||||
|
@ -311,10 +311,11 @@
|
||||
"perform a concurrent GC as periodic GC, otherwise use a STW " \
|
||||
"Full GC.") \
|
||||
\
|
||||
manageable(uintx, G1PeriodicGCSystemLoadThreshold, 0, \
|
||||
"Maximum recent system wide system load as returned by the 1m " \
|
||||
"value of getloadavg() at which G1 triggers a periodic GC. A " \
|
||||
"load above this value cancels a given periodic GC. A value of " \
|
||||
"zero disables this check.") \
|
||||
manageable(double, G1PeriodicGCSystemLoadThreshold, 0.0, \
|
||||
"Maximum recent system wide load as returned by the 1m value " \
|
||||
"of getloadavg() at which G1 triggers a periodic GC. A load " \
|
||||
"above this value cancels a given periodic GC. A value of zero " \
|
||||
"disables this check.") \
|
||||
range(0.0, (double)max_uintx) \
|
||||
|
||||
#endif // SHARE_VM_GC_G1_G1_GLOBALS_HPP
|
||||
|
Loading…
Reference in New Issue
Block a user