<div class="__aliyun_email_body_block"><div  style="line-height:1.7;font-family:Microsoft Yahei;font-size:14.0px;color:#000000;"><div  style="clear:both;">Any Thoughts?</div><div  style="clear:both;"><br /></div><blockquote  style="margin-right:0;margin-top:0;margin-bottom:0;font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;"><div  style="clear:both;">------------------------------------------------------------------</div><div  style="clear:both;">From:董登辉(卓昂) <denghui.ddh@alibaba-inc.com></div><div  style="clear:both;">Send Time:2023年11月17日(星期五) 01:31</div><div  style="clear:both;">To:hotspot-gc-dev <hotspot-gc-dev@openjdk.org>; hotspot-runtime-dev <hotspot-runtime-dev@openjdk.org></div><div  style="clear:both;">Subject:Limit the number of heap dumps generated by HeapDumpBeforeFullGC/AfterFullGC</div><div  style="clear:both;"><br /></div><div  class=" __aliyun_node_has_color" style="line-height:1.7;font-family:Microsoft Yahei;font-size:14.0px;color:#000000;"><div  style="clear:both;"><span >Hi team,</span></div><div  style="clear:both;"><br ><div  style="clear:both;">HeapDumpBeforeFullGC/AfterFullGC are the two flags that are commonly used by developers when analyzing FGC problems.</div><div  style="clear:both;"><br ></div><div  style="clear:both;">The current implementation of these two flags is triggering a heap dump when every FGC happens.</div><div  style="clear:both;">Although these two flags can be turned off through jinfo, this behavior may still bring trouble(make the disk full) when FGC continuously occurs</div><div  style="clear:both;"><br ></div><div  style="clear:both;">Unklie HeapDumpBeforeFullGC/AfterFullGC, HeapDumpOnOutOfMemoryError will only generate one dump.</div><div  style="clear:both;"><br ></div><div  style="clear:both;">IMHO, we should improve the implementation.(e.g. Introducing a counter or interval to limit the number).</div><div  style="clear:both;"><br ></div><div  style="clear:both;">What do you think?</div><div  style="clear:both;"><br ></div><div  style="clear:both;">I'm sorry in advance if this issue has ever been discussed.</div><div  style="clear:both;"><br ></div><div  style="clear:both;">Thanks,</div><span >Denghui</span></div></div></blockquote></div></div>