Request for review: JDK-8032970: stack size check methods for WhiteBox API

Vitaly Davidovich vitalyd at gmail.com
Tue Feb 4 17:38:03 PST 2014


Also this bit should be using rss in L72-73

System.out.print("Remaining stack size " + rss + ": ");
  72         if ( fss < sso * 0.8 || fss > sso * 1.2 ) {
  73             throw new RuntimeException("getThreadRemainingStackSize
value [" + fss + "] should be within 80%..120% of the value returned by
HotSpotDiagnosticMXBean");
  74         } else {
  75             System.out.println("OK");
  76         }

Sent from my phone
On Feb 4, 2014 7:46 PM, "David Holmes" <david.holmes at oracle.com> wrote:

> Not a full review but in the test:
>
>   45     static void recursive(long n) {
>   46         try {
>   47             recursive(n + 1);
>   48         } catch ( StackOverflowError e ) {
>   49             throw new SOE(wb.getThreadRemainingStackSize());
>   50         }
>   51     }
>
> If the call at 47 triggers SOE there is a reasonable chance that the call
> to wb.getThreadRemainingStackSize() will also trigger SOE, as might the
> "new" and invocation of the constructor. So this seems very fragile.
>
> David
>
> On 5/02/2014 12:15 AM, Kirill Shirokov wrote:
>
>> Hi,
>>
>> Please review following webrev, which adds stack size checking methods
>> to WhiteBox API:
>>
>> http://cr.openjdk.java.net/~iignatyev/kshirokov/8032970/webrev.00/
>> <http://cr.openjdk.java.net/%7Eiignatyev/kshirokov/8032970/webrev.00/>
>>
>> Thank you,
>> Kirill
>>
>> p.s.
>> JPRT build:
>> http://bus2001067.us.oracle.com/archives/2014/01/2014-01-
>> 29-142054.iignatye.8032970/JobStatus.txt
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/attachments/20140204/8197be0e/attachment.html 


More information about the hotspot-runtime-dev mailing list