Integrated: 8183569: Assert the same limits are used in parse_xss and globals.hpp

Ioi Lam iklam at openjdk.java.net
Wed Mar 3 03:02:43 UTC 2021


On Tue, 23 Feb 2021 07:55:38 GMT, Ioi Lam <iklam at openjdk.org> wrote:

> We have the following in Arguments::parse_xss():
> 
>   const julong min_ThreadStackSize = 0;
>   const julong max_ThreadStackSize = 1 * M;
>   const julong min_size = min_ThreadStackSize * K;
>   const julong max_size = max_ThreadStackSize * K;
> 
> which duplicates the min/max range specified in globals.hpp:
> 
>   product_pd(intx, ThreadStackSize, \
>           "Thread Stack Size (in Kbytes)") \
>           range(0, 1 * M) \
> 
> I added an API to query the min/max range of a flag, so parse_xss can be rewritten as
> 
>   const JVMTypedFlagLimit<intx>* limit = 
>     JVMFlagLimit::get_range_at(FLAG_MEMBER_ENUM(ThreadStackSize))->cast<intx>();
>   const julong min_size = limit->min() * K;
>   const julong max_size = limit->max() * K;

This pull request has now been integrated.

Changeset: 044e2a2a
Author:    Ioi Lam <iklam at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/044e2a2a
Stats:     58 lines in 4 files changed: 43 ins; 0 del; 15 mod

8183569: Assert the same limits are used in parse_xss and globals.hpp

Reviewed-by: stuefe, kbarrett

-------------

PR: https://git.openjdk.java.net/jdk/pull/2688


More information about the hotspot-runtime-dev mailing list