hotspot/agent/src/share/classes/sun/jvm/hotspot/code/MonitorValue.java
changeset 3171 aa289b22b577
parent 1 489c9b5090e2
child 3261 c7d5aae8d3f7
equal deleted inserted replaced
2880:c2974244a496 3171:aa289b22b577
    27 import java.io.*;
    27 import java.io.*;
    28 
    28 
    29 public class MonitorValue {
    29 public class MonitorValue {
    30   private ScopeValue owner;
    30   private ScopeValue owner;
    31   private Location   basicLock;
    31   private Location   basicLock;
       
    32   private boolean    eliminated;
    32 
    33 
    33   // FIXME: not useful yet
    34   // FIXME: not useful yet
    34   //  MonitorValue(ScopeValue* owner, Location basic_lock);
    35   //  MonitorValue(ScopeValue* owner, Location basic_lock);
    35 
    36 
    36   public MonitorValue(DebugInfoReadStream stream) {
    37   public MonitorValue(DebugInfoReadStream stream) {
    37     basicLock = new Location(stream);
    38     basicLock = new Location(stream);
    38     owner     = ScopeValue.readFrom(stream);
    39     owner     = ScopeValue.readFrom(stream);
       
    40     eliminated= stream.readBoolean();
    39   }
    41   }
    40 
    42 
    41   public ScopeValue owner()     { return owner; }
    43   public ScopeValue owner()     { return owner; }
    42   public Location   basicLock() { return basicLock; }
    44   public Location   basicLock() { return basicLock; }
       
    45   public boolean   eliminated() { return eliminated; }
    43 
    46 
    44   // FIXME: not yet implementable
    47   // FIXME: not yet implementable
    45   //  void write_on(DebugInfoWriteStream* stream);
    48   //  void write_on(DebugInfoWriteStream* stream);
    46 
    49 
    47   public void printOn(PrintStream tty) {
    50   public void printOn(PrintStream tty) {
    48     tty.print("monitor{");
    51     tty.print("monitor{");
    49     owner().printOn(tty);
    52     owner().printOn(tty);
    50     tty.print(",");
    53     tty.print(",");
    51     basicLock().printOn(tty);
    54     basicLock().printOn(tty);
    52     tty.print("}");
    55     tty.print("}");
       
    56     if (eliminated) {
       
    57       tty.print(" (eliminated)");
       
    58     }
    53   }
    59   }
    54 }
    60 }