<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi Per,<div><br></div><div>I do not know this code but your need to call heapIterationFractionUpdate seems to be a code smell that something else could be fixed, no?</div><div><br></div><div>Your webrev looks fine to me if I ignore the code smell that comes from having to call the update call:</div><div><br></div><div>When I look at src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/HSDB.java, the reason it requires that first call is, like you said, that the frame is created only at the first heapIterationFractionUpdate. However, could we not test frame and if it is not created, don't try to remove it?</div><div><br></div><div>Thanks,<br></div><div>Jc</div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Sep 12, 2018 at 1:25 AM Per Liden <<a href="mailto:per.liden@oracle.com" target="_blank">per.liden@oracle.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This patch avoids an assertion, and instead prints a warning, when <br>
trying to show the "Object Histogram" when using ZGC. I also had to add <br>
a call to heapIterationFractionUpdate() so that the update progress <br>
frame is properly created, even when there are not heap regions to walk <br>
over. Without this, you only get a call to heapIterationCompleted(), <br>
with a null frame, which throws a NullPointerException. Always making a <br>
call to heapIterationFractionUpdate(0.0) in the prologue avoids this by <br>
making sure we always created the frame, even if no more fraction <br>
updates will happen.<br>
<br>
Bug: <a href="https://bugs.openjdk.java.net/browse/JDK-8209163" rel="noreferrer" target="_blank">https://bugs.openjdk.java.net/browse/JDK-8209163</a><br>
Webrev: <a href="http://cr.openjdk.java.net/~pliden/8209163/webrev.0" rel="noreferrer" target="_blank">http://cr.openjdk.java.net/~pliden/8209163/webrev.0</a><br>
<br>
/Per<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="m_-2425050652416457791gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><br></div>Thanks,<div>Jc</div></div></div>