RFR (S) 8185687: Fix minor bugs in jvmti specification

Daniel D. Daugherty daniel.daugherty at oracle.com
Thu Aug 24 20:25:08 UTC 2017


On 8/17/17 12:53 PM, serguei.spitsyn at oracle.com wrote:
> Please, review a fix for the bug:
> https://bugs.openjdk.java.net/browse/JDK-8185687
>
> Webrev:
> http://cr.openjdk.java.net/~sspitsyn/webrevs/2017/hotspot/8185687-jvmti-spec.1/

src/share/vm/prims/jvmti.xml
     No comments.

src/share/vm/prims/jvmti.xsl
     No comments.

Thumbs up!

Dan


>
>
> Summary:
>
>   The DocCheck utility reports 4 errors in the generated jvmti.html:
>     docs/specs/jvmti.html:38: invalid URI: java.net.URISyntaxException:
>         llegal character in fragment at index 6: #entry point
>     docs/specs/jvmti.html:29721: name already declared: 
> jvmtiEventCallbacks
>     docs/specs/jvmti.html:14895: id not found: AddModuleExports.to_modules
>     docs/specs/jvmti.html:15038: id not found: AddModuleOpens.to_modules
>
>   The fixes for the first and two last errors are trivial.
>   But the second error for the jvmtiEventCallbacks is tricky to fix.
>   I'm not sure, this small doc issue is worth introducing extra 
> complexity below to fix it.
>
> The jvmti.html is generated from jvmti.xml with the XSL/T scripts.
>   The issue is that two different elements with the same id (the 
> attributes
>   'name' and 'id' are cboth considered as ids) are generated in the 
> .html:
>     28180 <td><code>jvmtiEventCallbacks</code></td><td><a 
> name="jvmtiEventCallbacks"></a>
>     29721 <h4 id="jvmtiEventCallbacks">Event Callbacks</h4>
>
>   The matching jvmti.xml elements are:
> 13789 <basetype id="jvmtiEventCallbacks">
> 11887 <intro label="Event Callbacks" id="jvmtiEventCallbacks">
>
>   The solution is to add optional attribute 'name' to the <basetype> 
> XML element
>   and use it in the element with id="jvmtiEventCallbacks":
>     -    <basetype id="jvmtiEventCallbacks">
>     +    <basetype id="jvmtiEventCallbacks" name="eventCallbacks">
>
>   The jvmti.xsl should use the 'name' attribute value for the 
> generated element id,
>   if it is present, and use the 'id' attribute value otherwise.
>
>   One more change is that that the 'name' attribute in such generated 
> HTML elements
>   is replaced with the 'id' attribute to comply with the HTML5 format.
>
>
> Testing:
>   The nsk.jvmti and nsk.jdi tests are all passed.
>
>   (Even though this fix is for the html errors in the spec,
>    it impacts the jvmti.xml that is used to produce the sources.
>    For instance, it replaces the 'name' attribute with the 'id' 
> attribute in
>    several HTNL elements and renamed them to avoid the id duplication.)
>
>
> Thanks,
> Serguei

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


More information about the serviceability-dev mailing list