14 RFR (M) 8232080: jlink plugins for vendor information and run-time options
Vladimir Kozlov
vladimir.kozlov at oracle.com
Tue Oct 22 22:44:55 UTC 2019
+1
Thanks
Vladimir
> On Oct 22, 2019, at 3:42 PM, Bob Vandette <bob.vandette at oracle.com> wrote:
>
> Hotspot changes look good to me.
>
> Bob.
>
>
>> On Oct 22, 2019, at 6:36 PM, mark.reinhold at oracle.com wrote:
>>
>> 2019/10/22 12:43:42 -0700, bob.vandette at oracle.com:
>>>>> On Oct 22, 2019, at 3:22 PM, mark.reinhold at oracle.com wrote:
>>>>> 2019/10/22 10:31:55 -0700, bob.vandette at oracle.com:
>>>>> In arguments.cpp, could you use a new JVMFlag to declare options
>>>>> that came from this resource as RESOURCE?
>>>>>
>>>>> - jint result = parse_each_vm_init_arg(vm_options_args, &patch_mod_javabase, JVMFlag::INTERNAL);
>>>>> + jint result = parse_each_vm_init_arg(vm_options_args, &patch_mod_javabase, JVMFlag::RESOURCE);
>>>>>
>>>>> This will require some minor changes to jvmFlags.hpp
>>>>>
>>>>> ...
>>>>
>>>> Yes, that’d make sense, in which case I’d also change JVMFlag::print_origin
>>>> to handle the RESOURCE case (which is easy).
>>>>
>>>> Is “RESOURCE” the best name here? Sounds awfully generic. How about
>>>> “JIMAGE” or “JIMAGE_RESOURCE”?
>>>
>>> JIMAGE_RESOURCE or VM_OPTIONS_RESOURCE works for me.
>>
>> JIMAGE_RESOURCE it is, then. Relative patch below; original webrev
>> updated in place (https://cr.openjdk.java.net/~mr/rev/8232080/).
>>
>> - Mark
>>
>>
>> ----
>>
>> # HG changeset patch
>> # Parent efca1844245ad7351418ef41efc86c5055ac3edf
>> Addendum 1 (JVMFlags): 8232080: jlink plugins for vendor information and run-time options
>>
>> diff --git a/src/hotspot/share/runtime/arguments.cpp b/src/hotspot/share/runtime/arguments.cpp
>> --- a/src/hotspot/share/runtime/arguments.cpp
>> +++ b/src/hotspot/share/runtime/arguments.cpp
>> @@ -2203,7 +2203,7 @@
>> set_mode_flags(_mixed);
>>
>> // Parse args structure generated from java.base vm options resource
>> - jint result = parse_each_vm_init_arg(vm_options_args, &patch_mod_javabase, JVMFlag::INTERNAL);
>> + jint result = parse_each_vm_init_arg(vm_options_args, &patch_mod_javabase, JVMFlag::JIMAGE_RESOURCE);
>> if (result != JNI_OK) {
>> return result;
>> }
>> diff --git a/src/hotspot/share/runtime/flags/jvmFlag.cpp b/src/hotspot/share/runtime/flags/jvmFlag.cpp
>> --- a/src/hotspot/share/runtime/flags/jvmFlag.cpp
>> +++ b/src/hotspot/share/runtime/flags/jvmFlag.cpp
>> @@ -697,6 +697,8 @@
>> st->print("attach"); break;
>> case INTERNAL:
>> st->print("internal"); break;
>> + case JIMAGE_RESOURCE:
>> + st->print("jimage"); break;
>> }
>> st->print("}");
>> }
>> diff --git a/src/hotspot/share/runtime/flags/jvmFlag.hpp b/src/hotspot/share/runtime/flags/jvmFlag.hpp
>> --- a/src/hotspot/share/runtime/flags/jvmFlag.hpp
>> +++ b/src/hotspot/share/runtime/flags/jvmFlag.hpp
>> @@ -44,8 +44,9 @@
>> ERGONOMIC = 5,
>> ATTACH_ON_DEMAND = 6,
>> INTERNAL = 7,
>> + JIMAGE_RESOURCE = 8,
>>
>> - LAST_VALUE_ORIGIN = INTERNAL,
>> + LAST_VALUE_ORIGIN = JIMAGE_RESOURCE,
>> VALUE_ORIGIN_BITS = 4,
>> VALUE_ORIGIN_MASK = right_n_bits(VALUE_ORIGIN_BITS),
>>
>
More information about the hotspot-dev
mailing list