src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ui/MonitorCacheDumpPanel.java
changeset 54609 04857e2cd509
parent 47216 71c04702a3d5
equal deleted inserted replaced
54608:c604234be658 54609:04857e2cd509
     1 /*
     1 /*
     2  * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2002, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    81                         "'s stack space");
    81                         "'s stack space");
    82           }
    82           }
    83         }
    83         }
    84       }
    84       }
    85     }
    85     }
    86     tty.println("  _count: " + mon.count());
    86     tty.println("  _contentions: " + mon.contentions());
    87     tty.println("  _waiters: " + mon.waiters());
    87     tty.println("  _waiters: " + mon.waiters());
    88     tty.println("  _recursions: " + mon.recursions());
    88     tty.println("  _recursions: " + mon.recursions());
    89   }
    89   }
    90 
    90 
    91   private void dumpOn(PrintStream tty) {
    91   private void dumpOn(PrintStream tty) {
    96       return;
    96       return;
    97     }
    97     }
    98     ObjectMonitor mon;
    98     ObjectMonitor mon;
    99     while (i.hasNext()) {
    99     while (i.hasNext()) {
   100       mon = (ObjectMonitor)i.next();
   100       mon = (ObjectMonitor)i.next();
   101       if (mon.count() != 0 || mon.waiters() != 0 || mon.owner() != null) {
   101       if (mon.contentions() != 0 || mon.waiters() != 0 || mon.owner() != null) {
   102         OopHandle object = mon.object();
   102         OopHandle object = mon.object();
   103         if (object == null) {
   103         if (object == null) {
   104           dumpMonitor(tty, mon, true);
   104           dumpMonitor(tty, mon, true);
   105         } else {
   105         } else {
   106           dumpMonitor(tty, mon, false);
   106           dumpMonitor(tty, mon, false);