RFR (XS): 8150725 JDWP specification: referenceTypeID size needs clarification

serguei.spitsyn at oracle.com serguei.spitsyn at oracle.com
Thu Apr 28 07:13:17 UTC 2016


Dmitry,

On 4/28/16 00:04, Dmitry Samersoff wrote:
> Serguei,
>
> Should "same as objectID" be replaced to explicit size?

No, it is VM implementation dependent.
Please, see the following statement in the spec:
   "Object ids, reference type ids, field ids, method ids, and frame ids 
may be sized differently in different target VM implementations."


>
> Looks good for me.

Thank you for the quick review!
Serguei

>
> -Dmitry
>
>
> On 2016-04-28 10:00, serguei.spitsyn at oracle.com wrote:
>> Please, review the JDWP spec change in the pubs repository.
>>
>> This is the jdwp-spec.html patch:
>>
>> diff -r 419446ca4a1b docs/technotes/guides/jpda/jdwp-spec.html
>> --- a/docs/technotes/guides/jpda/jdwp-spec.html Thu Apr 21 13:37:56 2016
>> -0700
>> +++ b/docs/technotes/guides/jpda/jdwp-spec.html Wed Apr 27 20:02:12 2016
>> -0700
>> @@ -277,6 +277,12 @@
>>   is a value.</td>
>>   </tr>
>>   <tr>
>> +<td><code>moduleID</code></td>
>> +<td>same as objectID</td>
>> +<td>Uniquely identifies an object in the target VM that is known to
>> +be a module object</td>
>> +</tr>
>> +<tr>
>>   <td><code>classLoaderID</code></td>
>>   <td>same as objectID</td>
>>   <td>Uniquely identifies an object in the target VM that is known to
>> @@ -296,7 +302,7 @@
>>   </tr>
>>   <tr>
>>   <td><code>referenceTypeID</code></td>
>> -<td>same as objectID</td>
>> +<td>Target VM-specific, up to 8 bytes (see below)</td>
>>   <td>Uniquely identifies a reference type in the target VM. It
>>   should not be assumed that for a particular class, the
>>   <code>classObjectID</code> and the <code>referenceTypeID</code> are
>>
>>
>> Summary:
>>
>>    JDWP specification at
>> https://docs.oracle.com/javase/8/docs/technotes/guides/jpda/jdwp-spec.html
>> says:
>>    Name               Size
>>    referenceTypeID  | same as objectID | ...
>>
>>    While the text at the bottom of the page is calling out
>> referenceTypeID as being sized independently (along with objectID,
>> fieidID, etc):
>>    "Object ids, reference type ids, field ids, method ids, and frame ids
>> may be sized differently in different target VM implementations"
>>    IDSizes JDWP command also specifies referenceTypeID size.
>>
>>    The referenceTypeID "Size" column should say: "Target VM-specific, up
>> to 8 bytes (see below)".
>>
>>    Also, the push of the "JDK-8049365: Update JDI and JDWP for modules"
>> missed to update
>>    the jdwp-spec.html with introduction of the moduleID type:
>>
>> Name        Size                Description
>> ----------+-------------------+-----------------------------------------------
>>
>> moduleID  | same as objectID  | Uniquely identifies an object in the
>> target VM that is known to be a module object.
>>
>>
>> Testing:
>>
>>     Checked the jdwp-spec.html in the browser window.
>>     No other testing is needed.
>>
>>
>> Thanks,
>> Serguei
>>
>>
>>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20160428/8ff01f8a/attachment.html>


More information about the serviceability-dev mailing list