RFR JDK-8046282: SA update

A. Sundararajan sundararajan.athijegannathan at oracle.com
Mon Jun 9 05:08:41 UTC 2014


The pattern of enum within a class and toString helper to return string 
description of it -- is used for many cases.

Why not use enums with String accepting constructor and toString (or new 
method called "toDescription()) override? You could have add "Unknown" 
in these enums to map to an option that is available in VM -- but not in SA.

Since it is a debugger it is expected to work with incomplete info.. so 
whereever you map a VM data structure element to java enum, you can map 
unknown enum constants to "Unknown" on Java side.  Of course, if there 
is a sentinel element defined in VM side, you could use that itself - no 
need for "Unknown" in such cases.

It'd nice to simplify that class-within-enum pattern...

-Sundar

On Saturday 07 June 2014 02:48 PM, Poonam Bajaj wrote:
> Hi,
>
> Please review these changes for the bug 8046282 for JDK 9.  These 
> changes add some definitions on the SA side and the supporting code on 
> the hotspot side.
>
> Webrev: http://cr.openjdk.java.net/~poonam/8046282/webrev.00/
> Bug: https://bugs.openjdk.java.net/browse/JDK-8046282
>
> Thanks,
> Poonam
>



More information about the serviceability-dev mailing list