<p dir="ltr">Also this bit should be using rss in L72-73</p>
<p dir="ltr">System.out.print("Remaining stack size " + rss + ": ");<br>
72 if ( fss < sso * 0.8 || fss > sso * 1.2 ) {<br>
73 throw new RuntimeException("getThreadRemainingStackSize value [" + fss + "] should be within 80%..120% of the value returned by HotSpotDiagnosticMXBean");<br>
74 } else {<br>
75 System.out.println("OK");<br>
76 }</p>
<p dir="ltr">Sent from my phone</p>
<div class="gmail_quote">On Feb 4, 2014 7:46 PM, "David Holmes" <<a href="mailto:david.holmes@oracle.com">david.holmes@oracle.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Not a full review but in the test:<br>
<br>
45 static void recursive(long n) {<br>
46 try {<br>
47 recursive(n + 1);<br>
48 } catch ( StackOverflowError e ) {<br>
49 throw new SOE(wb.<u></u>getThreadRemainingStackSize())<u></u>;<br>
50 }<br>
51 }<br>
<br>
If the call at 47 triggers SOE there is a reasonable chance that the call to wb.<u></u>getThreadRemainingStackSize() will also trigger SOE, as might the "new" and invocation of the constructor. So this seems very fragile.<br>
<br>
David<br>
<br>
On 5/02/2014 12:15 AM, Kirill Shirokov wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
Please review following webrev, which adds stack size checking methods<br>
to WhiteBox API:<br>
<br>
<a href="http://cr.openjdk.java.net/~iignatyev/kshirokov/8032970/webrev.00/" target="_blank">http://cr.openjdk.java.net/~<u></u>iignatyev/kshirokov/8032970/<u></u>webrev.00/</a><br>
<<a href="http://cr.openjdk.java.net/%7Eiignatyev/kshirokov/8032970/webrev.00/" target="_blank">http://cr.openjdk.java.net/%<u></u>7Eiignatyev/kshirokov/8032970/<u></u>webrev.00/</a>><br>
<br>
Thank you,<br>
Kirill<br>
<br>
p.s.<br>
JPRT build:<br>
<a href="http://bus2001067.us.oracle.com/archives/2014/01/2014-01-29-142054.iignatye.8032970/JobStatus.txt" target="_blank">http://bus2001067.us.oracle.<u></u>com/archives/2014/01/2014-01-<u></u>29-142054.iignatye.8032970/<u></u>JobStatus.txt</a><br>
</blockquote>
</blockquote></div>