Mercurial > hg > graal-jvmci-8
comparison agent/src/share/classes/sun/jvm/hotspot/memory/Universe.java @ 22841:f9d003ea9023
8046282: SA update
8049881: jstack not working on core files
Summary: These changes add some definitions on the SA side and the supporting code on the hotspot side.
Reviewed-by: sla, dsamersoff, mgronlun
author | poonam |
---|---|
date | Tue, 17 Feb 2015 19:59:05 -0800 |
parents | 8e47bac5643a |
children |
comparison
equal
deleted
inserted
replaced
22840:ec3982ff3fed | 22841:f9d003ea9023 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2000, 2015, 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. |
54 private static AddressField narrowOopBaseField; | 54 private static AddressField narrowOopBaseField; |
55 private static CIntegerField narrowOopShiftField; | 55 private static CIntegerField narrowOopShiftField; |
56 private static AddressField narrowKlassBaseField; | 56 private static AddressField narrowKlassBaseField; |
57 private static CIntegerField narrowKlassShiftField; | 57 private static CIntegerField narrowKlassShiftField; |
58 | 58 |
59 public enum NARROW_OOP_MODE { | |
60 UnscaledNarrowOop, | |
61 ZeroBasedNarrowOop, | |
62 HeapBasedNarrowOop | |
63 } | |
64 | |
59 static { | 65 static { |
60 VM.registerVMInitializedObserver(new Observer() { | 66 VM.registerVMInitializedObserver(new Observer() { |
61 public void update(Observable o, Object data) { | 67 public void update(Observable o, Object data) { |
62 initialize(VM.getVM().getTypeDataBase()); | 68 initialize(VM.getVM().getTypeDataBase()); |
63 } | 69 } |
92 narrowKlassShiftField = type.getCIntegerField("_narrow_klass._shift"); | 98 narrowKlassShiftField = type.getCIntegerField("_narrow_klass._shift"); |
93 } | 99 } |
94 | 100 |
95 public Universe() { | 101 public Universe() { |
96 } | 102 } |
97 | 103 public static String narrowOopModeToString(NARROW_OOP_MODE mode) { |
104 switch (mode) { | |
105 case UnscaledNarrowOop: | |
106 return "32-bits Oops"; | |
107 case ZeroBasedNarrowOop: | |
108 return "zero based Compressed Oops"; | |
109 case HeapBasedNarrowOop: | |
110 return "Compressed Oops with base"; | |
111 } | |
112 return ""; | |
113 } | |
98 public CollectedHeap heap() { | 114 public CollectedHeap heap() { |
99 try { | 115 try { |
100 return (CollectedHeap) heapConstructor.instantiateWrapperFor(collectedHeapField.getValue()); | 116 return (CollectedHeap) heapConstructor.instantiateWrapperFor(collectedHeapField.getValue()); |
101 } catch (WrongTypeException e) { | 117 } catch (WrongTypeException e) { |
102 return new CollectedHeap(collectedHeapField.getValue()); | 118 return new CollectedHeap(collectedHeapField.getValue()); |