< prev index next >
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/z/ZAddress.java
Print this page
rev 48261 : imported patch sa-diff
@@ -23,12 +23,14 @@
*/
package sun.jvm.hotspot.gc.z;
import sun.jvm.hotspot.debugger.Address;
+import sun.jvm.hotspot.runtime.VM;
class ZAddress {
+
static long as_long(Address value) {
if (value == null) {
return 0;
}
return value.asLongValue();
@@ -53,12 +55,18 @@
static long offset(Address address) {
return as_long(address) & ZGlobals.ZAddressOffsetMask;
}
static Address address(long value) {
- // TODO: Linux-specific - We don't use a heap base on Linux
- return ZOop.to_address(value);
+ Address result = ZOop.to_address(value);
+ VM vm = VM.getVM();
+
+ if (vm.getOS().equals("solaris") && vm.getCPU().equals("sparc")) {
+ result.orWithMask(ZGlobals.ZAddressSpaceStart);
+ }
+
+ return result;
}
static Address good(Address value) {
return address(offset(value) | ZGlobals.ZAddressGoodMask());
}
< prev index next >