RFR: 8081833: Clean up JVMFlag getter/setter code [v2]
Gerard Ziemski
gziemski at openjdk.java.net
Thu Sep 17 16:21:22 UTC 2020
On Thu, 17 Sep 2020 01:01:54 GMT, Ioi Lam <iklam at openjdk.org> wrote:
>> src/hotspot/share/prims/whitebox.cpp line 1423:
>>
>>> 1421: {
>>> 1422: ThreadInVMfromNative ttvfn(thread); // back to VM
>>> 1423: needFree = SetVMFlag <JVM_FLAG_TYPE(ccstr)> (thread, env, name, &ccstrResult);
>>
>> I wonder if these whitebox methods could be rewritten as macros, like the jni.cpp methods, like: DEFINE_GETFIELD, etc,
>> in a future RFE.
>
> I am not quite sure. On the one hand I like code reduction, but on the other hand macro-generated code will be
> difficult to debug.
I was unsure here whether to suggest the same change, and decided against. It's a fine line...
-------------
PR: https://git.openjdk.java.net/jdk/pull/163
More information about the hotspot-dev
mailing list