RFR: 8183569: Remove duplicated flag limits in parse_xss and globals.hpp [v3]

Ioi Lam iklam at openjdk.java.net
Mon Mar 1 22:07:07 UTC 2021


> 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;

Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:

  @kimbarrett comments

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/2688/files
  - new: https://git.openjdk.java.net/jdk/pull/2688/files/8c4b5cd9..b99d99ed

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=2688&range=02
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=2688&range=01-02

  Stats: 6 lines in 2 files changed: 3 ins; 0 del; 3 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2688.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2688/head:pull/2688

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


More information about the hotspot-runtime-dev mailing list