Hi John,<div><br></div><div>If you prefer JConsole for testing interactively, you can explicitly subscribe/unsubscribe to a GarbageCollector notification, like this:</div><div><a href="http://rednaxelafx.iteye.com/upload/picture/pic/96172/7ad699e0-c8aa-3cce-ad92-0f0226c98fd6.png" target="_blank">http://rednaxelafx.iteye.com/upload/picture/pic/96172/7ad699e0-c8aa-3cce-ad92-0f0226c98fd6.png</a></div>

<div>1. Select the MBeans tab, then select a java.lang.GarbageCollector</div><div>2. Click "Notifications" under the GarbageCollector</div><div>3. Click the "Subscribe" button on the bottom right</div>

<div>and then sun.management.GarbageCollectorImpl.addNotificationListener() will be invoked, which in turn will set SetGCNotificationEnabled to true. Unsubscribing is similar.</div><div><br></div><div>The notification code was added in this rev (or somewhere close...):</div>

<div><a href="http://hg.openjdk.java.net/jdk7/hotspot/jdk/rev/5b38ed5f5eb4" target="_blank">http://hg.openjdk.java.net/jdk7/hotspot/jdk/rev/5b38ed5f5eb4</a><br><br></div><div>Regards,</div><div>Kris Mok</div><div><br><div class="gmail_quote">

On Fri, Aug 5, 2011 at 6:12 AM, John Cuthbertson <span dir="ltr"><<a href="mailto:john.cuthbertson@oracle.com" target="_blank">john.cuthbertson@oracle.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi Everyone,<br>
<br>
After investigating an issue that was reported while running a fairly substantial application, I believe I have found naked oop in the GC notification code which I think is the cause of the problem The oop in question is the muKlass oop in createGCInfo in gcNotifier.cpp. This code is executed by the ServiceThread as part of the sendNotification routine which pulls items from some request queue. The items on this queue seem to be added as a result of GC end events being pushed by the MemoryManagerService if the routine GCMemoryManager::is_<u></u>notification_enabled() returns true. This field is set to true by the routine jmm_SetGCNotificationEnabled in management.cpp. Can anyone tell me how I can explicitly exercise this code? I have tried some things in jconsole and jvisualvm but have so far been unsuccessful.<br>


<br>
Thanks,<br>
<br>
JohnC<br>
</blockquote></div><br></div>