<div dir="ltr"><br><div>Hi,</div><div><br></div><div>Last September, Volker shared the observation that we have Hotspot-internal MBeans in sun.management which are strongly encapsulated and not used internally by OpenJDK besides their unit tests:</div><div><br></div><div><a href="https://www.mail-archive.com/core-libs-dev@openjdk.org/msg19878.html" target="_blank">https://www.mail-archive.com/core-libs-dev@openjdk.org/msg19878.html</a><br></div><div><br></div><div>A summary of the email thread:</div><div><br></div><div>Mandy pointed out:</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">We added these HotSpot internal MBeans in JDK 5 to expose the internal metrics.  Most of these internal metrics are exposed via jstat tool too.   We didn't receive much feedback regarding these HotSpot internal MBeans.    Removing them is fine and good cleanup effort.</blockquote><div><br></div><div>Alan made a similar point:</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">It's left over from experiments on exposing some internal metrics, I think during JDK 5. It's code that should probably have been removed a long time ago.</blockquote><div><br></div><div>Kirk P raised a concern:</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">It would be a shame to lose these metrics because many of them have been very<br> useful over time and some would be even more useful with some modifications.<br></blockquote><div> </div><div>To which Mandy responded:</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">What we're referring to is to remove sun.management.Hotspot*, the internal MBeans which are never exposed and registered in the platform MBeanServer.   The internal metrics in HotSpot VM should be retained as they are exposed through other ways like jstat, GC logs, etc.</blockquote><div><br></div><div>The email thread seems to have ended here without further action taken. </div><div><br></div><div>My interpretation of the above is that we have a consensus that these Hotspot-internal MBeans can be removed. Since I was not part of the initial discussion and some time has passed, I'd like some confirmation that my interpretation is correct.</div><div><br></div><div>Would a PR to remove these APIs be welcome?</div><div><br></div><div>(This would remove HotspotInternalMBean, HotspotMemoryMBean, HotspotRuntimeMBean, HotspotThreadMBean, with associated implementation, factory methods, tests and probably also some native code in libmanagement. Details can be discussed in a PR)</div><div><br></div><div>Cheers,</div><div>Eirik.</div><div><br></div></div>