25 #include "precompiled.hpp" |
25 #include "precompiled.hpp" |
26 #include "code/debugInfo.hpp" |
26 #include "code/debugInfo.hpp" |
27 #include "code/debugInfoRec.hpp" |
27 #include "code/debugInfoRec.hpp" |
28 #include "code/nmethod.hpp" |
28 #include "code/nmethod.hpp" |
29 #include "runtime/handles.inline.hpp" |
29 #include "runtime/handles.inline.hpp" |
|
30 #include "runtime/interfaceSupport.hpp" |
|
31 #include "runtime/thread.hpp" |
30 |
32 |
31 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC |
33 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC |
32 |
34 |
33 // Constructors |
35 // Constructors |
34 |
36 |
202 } |
204 } |
203 |
205 |
204 // ConstantOopWriteValue |
206 // ConstantOopWriteValue |
205 |
207 |
206 void ConstantOopWriteValue::write_on(DebugInfoWriteStream* stream) { |
208 void ConstantOopWriteValue::write_on(DebugInfoWriteStream* stream) { |
207 assert(JNIHandles::resolve(value()) == NULL || |
209 #ifdef ASSERT |
208 Universe::heap()->is_in_reserved(JNIHandles::resolve(value())), |
210 { |
209 "Should be in heap"); |
211 // cannot use ThreadInVMfromNative here since in case of JVMCI compiler, |
|
212 // thread is already in VM state. |
|
213 ThreadInVMfromUnknown tiv; |
|
214 assert(JNIHandles::resolve(value()) == NULL || |
|
215 Universe::heap()->is_in_reserved(JNIHandles::resolve(value())), |
|
216 "Should be in heap"); |
|
217 } |
|
218 #endif |
210 stream->write_int(CONSTANT_OOP_CODE); |
219 stream->write_int(CONSTANT_OOP_CODE); |
211 stream->write_handle(value()); |
220 stream->write_handle(value()); |
212 } |
221 } |
213 |
222 |
214 void ConstantOopWriteValue::print_on(outputStream* st) const { |
223 void ConstantOopWriteValue::print_on(outputStream* st) const { |
|
224 // using ThreadInVMfromUnknown here since in case of JVMCI compiler, |
|
225 // thread is already in VM state. |
|
226 ThreadInVMfromUnknown tiv; |
215 JNIHandles::resolve(value())->print_value_on(st); |
227 JNIHandles::resolve(value())->print_value_on(st); |
216 } |
228 } |
217 |
229 |
218 |
230 |
219 // ConstantOopReadValue |
231 // ConstantOopReadValue |