RFR: 8253030: ZGC: Change ZMarkCompleteTimeout unit to microseconds

Kim Barrett kim.barrett at oracle.com
Fri Sep 11 21:28:51 UTC 2020


> On Sep 11, 2020, at 5:52 AM, Per Lidén <pliden at openjdk.java.net> wrote:
> 
> On Fri, 11 Sep 2020 01:16:34 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
> 
>>> The ZMarkCompleteTimeout is currently specified in milliseconds, and its value is 1 (i.e. as low as it can be). In
>>> preparation for using a lower time out value than 1ms we should change the ZMarkCompleteTimeout unit to be
>>> microseconds, instead of milliseconds.
>> 
>> Change looks good.  But I wonder, why choose microseconds as the units?  That seems to be almost never used in HotSpot.
> 
> @kimbarrett Thanks for reviewing. I used micros because it seems like the natural unit to use here. Using nanos seems a
> bit overkill, as we will never need that precision and it would just add a bunch of zeros to the constant, which I'm
> not sure would help readability. What unit did you have in mind?

Nanos would have been my choice, since that's widely used. The configuration
isn't user-facing, so some extra zeros doesn't seem important to me. But I
don't feel strongly about it; it just seemed an odd choice to me, since micros are
so rarely used elsewhere in our code.

I’ll go click the reviewed button now.

> 
> -------------
> 
> PR: https://git.openjdk.java.net/jdk/pull/120





More information about the hotspot-gc-dev mailing list