RFR: 8264285: Clean the modification of ccstr JVM flags [v2]

Coleen Phillimore coleenp at openjdk.java.net
Thu Apr 1 00:29:19 UTC 2021


On Wed, 31 Mar 2021 19:01:48 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> There are two versions of JVMFlagAccess::ccstrAtPut() for modifying JVM flags of the ccstr type (i.e., strings).
>> 
>> - One version requires the caller to free the old value, but some callers don't do that (writeableFlags.cpp).
>> - The other version frees the old value on behalf of the caller. However, this version is accessible only via FLAG_SET_XXX macros and is currently unused. So it's unclear whether it actually works.
>> 
>> We should combine these two versions into a single function, fix problems in the callers, and add test cases. The old value should be freed automatically, because typically the caller isn't interested in the old value.
>> 
>> Note that the FLAG_SET_XXX macros do not return the old value. Requiring the caller of FLAG_SET_XXX to free the old value would be tedious and error prone.
>
> Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
> 
>   relax flag attributions (ala JDK-7123237)

Marked as reviewed by coleenp (Reviewer).

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

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


More information about the serviceability-dev mailing list