diff --git a/agent/src/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java b/agent/src/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java index 8da90314005b81c7a5fa82b223f94d5bfb257657..f1e9c5dd95f284565e8d92475a5bf59aaf09e34e 100644 --- a/agent/src/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java +++ b/agent/src/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -746,7 +746,7 @@ public class HeapHprofBinWriter extends AbstractHeapGraphWriter { out.writeByte((byte)kind); if (ik != null) { // static field - writeField(field, ik); + writeField(field, ik.getJavaMirror()); } } } diff --git a/src/cpu/sparc/vm/c1_CodeStubs_sparc.cpp b/src/cpu/sparc/vm/c1_CodeStubs_sparc.cpp index dee553bdf10b49fc90255cfbc5319a1e4f486b31..f1f359987552e0e75e740059b99e6693c6c16536 100644 --- a/src/cpu/sparc/vm/c1_CodeStubs_sparc.cpp +++ b/src/cpu/sparc/vm/c1_CodeStubs_sparc.cpp @@ -301,7 +301,7 @@ void PatchingStub::emit_code(LIR_Assembler* ce) { // thread. assert(_obj != noreg, "must be a valid register"); assert(_oop_index >= 0, "must have oop index"); - __ ld_ptr(_obj, java_lang_Class::klass_offset_in_bytes(), G3); + __ load_heap_oop(_obj, java_lang_Class::klass_offset_in_bytes(), G3); __ ld_ptr(G3, instanceKlass::init_thread_offset_in_bytes() + sizeof(klassOopDesc), G3); __ cmp(G2_thread, G3); __ br(Assembler::notEqual, false, Assembler::pn, call_patch); diff --git a/src/cpu/x86/vm/c1_CodeStubs_x86.cpp b/src/cpu/x86/vm/c1_CodeStubs_x86.cpp index 36b35e89cca08cca07273bcfd5c59e3814117e4d..3603831155a588b5e1fc2bc94877d56c82764d2e 100644 --- a/src/cpu/x86/vm/c1_CodeStubs_x86.cpp +++ b/src/cpu/x86/vm/c1_CodeStubs_x86.cpp @@ -316,7 +316,7 @@ void PatchingStub::emit_code(LIR_Assembler* ce) { Register tmp2 = rbx; __ push(tmp); __ push(tmp2); - __ movptr(tmp2, Address(_obj, java_lang_Class::klass_offset_in_bytes())); + __ load_heap_oop(tmp2, Address(_obj, java_lang_Class::klass_offset_in_bytes())); __ get_thread(tmp); __ cmpptr(tmp, Address(tmp2, instanceKlass::init_thread_offset_in_bytes() + sizeof(klassOopDesc))); __ pop(tmp2);