[10] RFR for JDK-8170299: Debugger does not stop inside the low memory notifications code [internal]

mandy chung mandy.chung at oracle.com
Wed Dec 13 18:33:00 UTC 2017



On 12/13/17 2:23 AM, Shafi Ahmad wrote:
>
> Thank you Mandy and David for review comments.
>
> Please find updated webrev: 
> http://cr.openjdk.java.net/~shshahma/8170299/webrev.03/ 
> <http://cr.openjdk.java.net/%7Eshshahma/8170299/webrev.03/>
>
> I have modify the code to use Emitter class rather than Broadcaster.
>

It's good that this version does not need the new public API.

The thread factory can be lazily created in the first time to handle a 
notification.  I think this fix can be made simpler for example, you can 
add a ListenerInfo::handle method to replace SendNotifJob and the new 
protected handleNotification method.

             if (li.filter == null || 
li.filter.isNotificationEnabled(notification)) {
                 NotificationThread.execute(() -> li.handle(notification));
             }

The static Executor field can be moved to NotificationThread (was 
NotificationThreadFactory) class so that it will be lazily initialized 
only when there is a notification.

Mandy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20171213/1bff07d0/attachment.html>


More information about the serviceability-dev mailing list