src/hotspot/share/code/debugInfo.cpp
changeset 48120 bb957f109a1f
parent 47216 71c04702a3d5
child 49192 6734eeef4283
equal deleted inserted replaced
48119:c1b46afab3ba 48120:bb957f109a1f
    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 "oops/oop.inline.hpp"
    29 #include "oops/oop.inline.hpp"
    30 #include "runtime/handles.inline.hpp"
    30 #include "runtime/handles.inline.hpp"
       
    31 #include "runtime/interfaceSupport.hpp"
       
    32 #include "runtime/thread.hpp"
    31 
    33 
    32 // Constructors
    34 // Constructors
    33 
    35 
    34 DebugInfoWriteStream::DebugInfoWriteStream(DebugInformationRecorder* recorder, int initial_size)
    36 DebugInfoWriteStream::DebugInfoWriteStream(DebugInformationRecorder* recorder, int initial_size)
    35 : CompressedWriteStream(initial_size) {
    37 : CompressedWriteStream(initial_size) {
   207 }
   209 }
   208 
   210 
   209 // ConstantOopWriteValue
   211 // ConstantOopWriteValue
   210 
   212 
   211 void ConstantOopWriteValue::write_on(DebugInfoWriteStream* stream) {
   213 void ConstantOopWriteValue::write_on(DebugInfoWriteStream* stream) {
   212   assert(JNIHandles::resolve(value()) == NULL ||
   214 #ifdef ASSERT
   213          Universe::heap()->is_in_reserved(JNIHandles::resolve(value())),
   215   {
   214          "Should be in heap");
   216     // cannot use ThreadInVMfromNative here since in case of JVMCI compiler,
       
   217     // thread is already in VM state.
       
   218     ThreadInVMfromUnknown tiv;
       
   219     assert(JNIHandles::resolve(value()) == NULL ||
       
   220            Universe::heap()->is_in_reserved(JNIHandles::resolve(value())),
       
   221            "Should be in heap");
       
   222  }
       
   223 #endif
   215   stream->write_int(CONSTANT_OOP_CODE);
   224   stream->write_int(CONSTANT_OOP_CODE);
   216   stream->write_handle(value());
   225   stream->write_handle(value());
   217 }
   226 }
   218 
   227 
   219 void ConstantOopWriteValue::print_on(outputStream* st) const {
   228 void ConstantOopWriteValue::print_on(outputStream* st) const {
       
   229   // using ThreadInVMfromUnknown here since in case of JVMCI compiler,
       
   230   // thread is already in VM state.
       
   231   ThreadInVMfromUnknown tiv;
   220   JNIHandles::resolve(value())->print_value_on(st);
   232   JNIHandles::resolve(value())->print_value_on(st);
   221 }
   233 }
   222 
   234 
   223 
   235 
   224 // ConstantOopReadValue
   236 // ConstantOopReadValue