RFR: 8243208: Clean up JVMFlag implementation [v3]

Coleen Phillimore coleenp at openjdk.java.net
Wed Sep 9 14:20:02 UTC 2020


On Wed, 9 Sep 2020 06:28:59 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> The initial commit [d85cbd6](https://github.com/openjdk/jdk/commit/d85cbd638f5b87c80eee9a92d10e1ac19d9bb2f8) is the
>> same patch as
>> [8243208-cleanup-jvmflag-impl.v02](https://cr.openjdk.java.net/~iklam/jdk16/8243208-cleanup-jvmflag-impl.v02/)
>> published in
>> [hotspot-dev at openjdk.java.net](https://mail.openjdk.java.net/pipermail/hotspot-dev/2020-September/042863.html).  The
>> rest of the review will continue on GitHub. I will add new commits to respond to comments to the above e-mail.
>
> Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Fixed JVMFlag::is_writeable()

Marked as reviewed by coleenp (Reviewer).

src/hotspot/share/runtime/flags/jvmFlag.hpp line 36:

> 34: typedef const char* (*RangeStrFunc)(void);
> 35:
> 36: struct JVMFlag {

I'm still getting used to git diffs, but can you change this from struct to class?  Because it looks like it does have
private and public sections.

src/hotspot/share/runtime/flags/jvmFlagLimit.cpp line 102:

> 100:   static constexpr const JVMFlagLimit* get_limit(const JVMTypedFlagLimit<T>* p, int dummy, ConstraintMarker
> dummy2, short func, int phase, T min, T max) { 101:     return p;
> 102:   }

Instead of the 'no_limit' functions, could you have get_limit have PRODUCT_RETURN(NULL) ?  Otherwise, fine to get the
macros working.

src/hotspot/share/runtime/flags/jvmFlagLookup.hpp line 44:

> 42:     }
> 43:     return h;
> 44:   }

Can this function just call hash_code(s, strlen(s)) ?

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

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


More information about the shenandoah-dev mailing list