Skip to content

Commit 8edc2f0

Browse files
committedOct 19, 2020
8254912: ZGC: Change ZCollectionInterval type to double
Reviewed-by: pliden, ayang
1 parent 672f566 commit 8edc2f0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
 

‎src/hotspot/share/gc/z/zDirector.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ void ZDirector::sample_allocation_rate() const {
4848
}
4949

5050
bool ZDirector::rule_timer() const {
51-
if (ZCollectionInterval == 0) {
51+
if (ZCollectionInterval <= 0) {
5252
// Rule disabled
5353
return false;
5454
}
@@ -57,7 +57,7 @@ bool ZDirector::rule_timer() const {
5757
const double time_since_last_gc = ZStatCycle::time_since_last();
5858
const double time_until_gc = ZCollectionInterval - time_since_last_gc;
5959

60-
log_debug(gc, director)("Rule: Timer, Interval: %us, TimeUntilGC: %.3fs",
60+
log_debug(gc, director)("Rule: Timer, Interval: %.3fs, TimeUntilGC: %.3fs",
6161
ZCollectionInterval, time_until_gc);
6262

6363
return time_until_gc <= 0;

‎src/hotspot/share/gc/z/z_globals.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"Maximum number of bytes allocated for mark stacks") \
4343
range(32*M, 1024*G) \
4444
\
45-
product(uint, ZCollectionInterval, 0, \
45+
product(double, ZCollectionInterval, 0, \
4646
"Force GC at a fixed time interval (in seconds)") \
4747
\
4848
product(bool, ZProactive, true, \

0 commit comments

Comments
 (0)
Please sign in to comment.