author | kvn |
Tue, 09 Jun 2009 16:19:10 -0700 | |
changeset 3171 | aa289b22b577 |
parent 1 | 489c9b5090e2 |
child 3261 | c7d5aae8d3f7 |
permissions | -rw-r--r-- |
1 | 1 |
/* |
2 |
* Copyright 2001 Sun Microsystems, Inc. All Rights Reserved. |
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
|
4 |
* |
|
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 |
|
7 |
* published by the Free Software Foundation. |
|
8 |
* |
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
13 |
* accompanied this code). |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License version |
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 |
* |
|
19 |
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
|
20 |
* CA 95054 USA or visit www.sun.com if you need additional information or |
|
21 |
* have any questions. |
|
22 |
* |
|
23 |
*/ |
|
24 |
||
25 |
package sun.jvm.hotspot.code; |
|
26 |
||
27 |
import java.io.*; |
|
28 |
||
29 |
public class MonitorValue { |
|
30 |
private ScopeValue owner; |
|
31 |
private Location basicLock; |
|
3171
aa289b22b577
6837472: com/sun/jdi/MonitorFrameInfo.java fails with AggressiveOpts in 6u14
kvn
parents:
1
diff
changeset
|
32 |
private boolean eliminated; |
1 | 33 |
|
34 |
// FIXME: not useful yet |
|
35 |
// MonitorValue(ScopeValue* owner, Location basic_lock); |
|
36 |
||
37 |
public MonitorValue(DebugInfoReadStream stream) { |
|
38 |
basicLock = new Location(stream); |
|
39 |
owner = ScopeValue.readFrom(stream); |
|
3171
aa289b22b577
6837472: com/sun/jdi/MonitorFrameInfo.java fails with AggressiveOpts in 6u14
kvn
parents:
1
diff
changeset
|
40 |
eliminated= stream.readBoolean(); |
1 | 41 |
} |
42 |
||
43 |
public ScopeValue owner() { return owner; } |
|
44 |
public Location basicLock() { return basicLock; } |
|
3171
aa289b22b577
6837472: com/sun/jdi/MonitorFrameInfo.java fails with AggressiveOpts in 6u14
kvn
parents:
1
diff
changeset
|
45 |
public boolean eliminated() { return eliminated; } |
1 | 46 |
|
47 |
// FIXME: not yet implementable |
|
48 |
// void write_on(DebugInfoWriteStream* stream); |
|
49 |
||
50 |
public void printOn(PrintStream tty) { |
|
51 |
tty.print("monitor{"); |
|
52 |
owner().printOn(tty); |
|
53 |
tty.print(","); |
|
54 |
basicLock().printOn(tty); |
|
55 |
tty.print("}"); |
|
3171
aa289b22b577
6837472: com/sun/jdi/MonitorFrameInfo.java fails with AggressiveOpts in 6u14
kvn
parents:
1
diff
changeset
|
56 |
if (eliminated) { |
aa289b22b577
6837472: com/sun/jdi/MonitorFrameInfo.java fails with AggressiveOpts in 6u14
kvn
parents:
1
diff
changeset
|
57 |
tty.print(" (eliminated)"); |
aa289b22b577
6837472: com/sun/jdi/MonitorFrameInfo.java fails with AggressiveOpts in 6u14
kvn
parents:
1
diff
changeset
|
58 |
} |
1 | 59 |
} |
60 |
} |