RFR: 8080947: Add uint as a valid VM flag type

David Lindholm david.lindholm at oracle.com
Wed Jun 3 08:51:01 UTC 2015


Hi David,

Thanks for looking at this. I have a few places where I convert uint and 
int to Java types, besides management.cpp also whitebox.cpp/java and 
VM.java . After discussing with several people we though it was most 
correct to go with JLONG as java type for both int and uint, since it is 
not certain that an uint will fit in a JINT and I wanted the same java 
type for both int and uint.

I don't think the C spec specifies the size of int (please correct me if 
I'm wrong), so having JLONG as type for int and uint is safer than JINT.

But I can change to JINT if you think that is better.


Thanks,
David

On 2015-06-03 10:01, David Holmes wrote:
> Hi David,
>
> On 28/05/2015 9:28 PM, David Lindholm wrote:
>> Hi,
>>
>> Please review this patch that adds uint and int as valid VM flag types.
>> This patch adds the possibility to specify VM flags with types int and
>> uint, it does not change the type of any flags.
>>
>>
>> Webrev: http://cr.openjdk.java.net/~david/JDK-8080947/webrev.hotspot.00/
>> Webrev: http://cr.openjdk.java.net/~david/JDK-8080947/webrev.jdk.00/
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8080947
>
> src/share/vm/services/management.cpp
>
> +   } else if (flag->is_int()) {
> +     global->value.j = (jlong)flag->get_int();
> +     global->type = JMM_VMGLOBAL_TYPE_JLONG;
> +   } else if (flag->is_uint()) {
> +     global->value.j = (jlong)flag->get_uint();
> +     global->type = JMM_VMGLOBAL_TYPE_JLONG;
>
> These should be JINT types not JLONG.
>
> Cheers,
> David H.
> -------
>
>>
>> Testing: Passed JPRT
>>
>>
>> Thanks,
>> David



More information about the hotspot-dev mailing list