Mercurial > hg > truffle
annotate agent/src/share/classes/sun/jvm/hotspot/memory/AFLBinaryTreeDictionary.java @ 13705:ac5b0f31f7a2
Truffle API-change: FrameDescriptors are now stored in the RootNode in a final field instead of the CallTarget.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Fri, 17 Jan 2014 17:06:08 +0100 |
parents | 6cf2530f7fd3 |
children |
rev | line source |
---|---|
152
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
1 /* |
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
2 * @(#)BinaryTreeDictionary.java |
7950
6cf2530f7fd3
8005278: Serviceability Agent: jmap -heap and jstack -m fail
minqi
parents:
1552
diff
changeset
|
3 * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. |
152
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
5 * |
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
6 * This code is free software; you can redistribute it and/or modify it |
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
7 * under the terms of the GNU General Public License version 2 only, as |
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
8 * published by the Free Software Foundation. |
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
9 * |
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
10 * This code is distributed in the hope that it will be useful, but WITHOUT |
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
13 * version 2 for more details (a copy is included in the LICENSE file that |
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
14 * accompanied this code). |
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
15 * |
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
16 * You should have received a copy of the GNU General Public License version |
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
17 * 2 along with this work; if not, write to the Free Software Foundation, |
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
19 * |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
196
diff
changeset
|
20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
196
diff
changeset
|
21 * or visit www.oracle.com if you need additional information or have any |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
196
diff
changeset
|
22 * questions. |
152
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
23 * |
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
24 */ |
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
25 |
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
26 package sun.jvm.hotspot.memory; |
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
27 |
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
28 import java.util.*; |
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
29 import sun.jvm.hotspot.debugger.*; |
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
30 import sun.jvm.hotspot.types.*; |
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
31 import sun.jvm.hotspot.runtime.*; |
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
32 |
7950
6cf2530f7fd3
8005278: Serviceability Agent: jmap -heap and jstack -m fail
minqi
parents:
1552
diff
changeset
|
33 public class AFLBinaryTreeDictionary extends VMObject { |
152
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
34 static { |
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
35 VM.registerVMInitializedObserver(new Observer() { |
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
36 public void update(Observable o, Object data) { |
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
37 initialize(VM.getVM().getTypeDataBase()); |
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
38 } |
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
39 }); |
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
40 } |
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
41 |
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
42 private static synchronized void initialize(TypeDataBase db) { |
7950
6cf2530f7fd3
8005278: Serviceability Agent: jmap -heap and jstack -m fail
minqi
parents:
1552
diff
changeset
|
43 Type type = db.lookupType("AFLBinaryTreeDictionary"); |
6cf2530f7fd3
8005278: Serviceability Agent: jmap -heap and jstack -m fail
minqi
parents:
1552
diff
changeset
|
44 totalSizeField = type.getCIntegerField("_total_size"); |
152
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
45 } |
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
46 |
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
47 // Fields |
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
48 private static CIntegerField totalSizeField; |
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
49 |
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
50 // Accessors |
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
51 public long size() { |
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
52 return totalSizeField.getValue(addr); |
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
53 } |
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
54 |
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
55 // Constructor |
7950
6cf2530f7fd3
8005278: Serviceability Agent: jmap -heap and jstack -m fail
minqi
parents:
1552
diff
changeset
|
56 public AFLBinaryTreeDictionary(Address addr) { |
152
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
57 super(addr); |
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
58 } |
c70a245cad3a
6670684: 4/5 SA command universe did not print out CMS space information
dcubed
parents:
diff
changeset
|
59 } |