< prev index next >

src/hotspot/share/code/compiledMethod.cpp

Print this page

        

*** 35,78 **** #include "logging/log.hpp" #include "logging/logTag.hpp" #include "memory/resourceArea.hpp" #include "oops/methodData.hpp" #include "oops/method.inline.hpp" #include "prims/methodHandles.hpp" #include "runtime/deoptimization.hpp" #include "runtime/handles.inline.hpp" #include "runtime/mutexLocker.hpp" #include "runtime/sharedRuntime.hpp" CompiledMethod::CompiledMethod(Method* method, const char* name, CompilerType type, const CodeBlobLayout& layout, int frame_complete_offset, int frame_size, ImmutableOopMapSet* oop_maps, ! bool caller_must_gc_arguments) ! : CodeBlob(name, type, layout, frame_complete_offset, frame_size, oop_maps, caller_must_gc_arguments), _mark_for_deoptimization_status(not_marked), _method(method), ! _gc_data(NULL) { init_defaults(); } CompiledMethod::CompiledMethod(Method* method, const char* name, CompilerType type, int size, int header_size, CodeBuffer* cb, int frame_complete_offset, int frame_size, ! OopMapSet* oop_maps, bool caller_must_gc_arguments) : CodeBlob(name, type, CodeBlobLayout((address) this, size, header_size, cb), cb, ! frame_complete_offset, frame_size, oop_maps, caller_must_gc_arguments), _mark_for_deoptimization_status(not_marked), _method(method), ! _gc_data(NULL) { init_defaults(); } void CompiledMethod::init_defaults() { _has_unsafe_access = 0; _has_method_handle_invokes = 0; _lazy_critical_native = 0; _has_wide_vectors = 0; } bool CompiledMethod::is_method_handle_return(address return_pc) { if (!has_method_handle_invokes()) return false; PcDesc* pd = pc_desc_at(return_pc); --- 35,83 ---- #include "logging/log.hpp" #include "logging/logTag.hpp" #include "memory/resourceArea.hpp" #include "oops/methodData.hpp" #include "oops/method.inline.hpp" + #include "oops/weakHandle.inline.hpp" #include "prims/methodHandles.hpp" #include "runtime/deoptimization.hpp" + #include "runtime/jniHandles.inline.hpp" #include "runtime/handles.inline.hpp" #include "runtime/mutexLocker.hpp" #include "runtime/sharedRuntime.hpp" CompiledMethod::CompiledMethod(Method* method, const char* name, CompilerType type, const CodeBlobLayout& layout, int frame_complete_offset, int frame_size, ImmutableOopMapSet* oop_maps, ! bool caller_must_gc_arguments, bool compiled) ! : CodeBlob(name, type, layout, frame_complete_offset, frame_size, oop_maps, caller_must_gc_arguments, compiled), _mark_for_deoptimization_status(not_marked), _method(method), ! _gc_data(NULL), ! _keepalive(NULL) { init_defaults(); } CompiledMethod::CompiledMethod(Method* method, const char* name, CompilerType type, int size, int header_size, CodeBuffer* cb, int frame_complete_offset, int frame_size, ! OopMapSet* oop_maps, bool caller_must_gc_arguments, bool compiled) : CodeBlob(name, type, CodeBlobLayout((address) this, size, header_size, cb), cb, ! frame_complete_offset, frame_size, oop_maps, caller_must_gc_arguments, compiled), _mark_for_deoptimization_status(not_marked), _method(method), ! _gc_data(NULL), ! _keepalive(NULL) { init_defaults(); } void CompiledMethod::init_defaults() { _has_unsafe_access = 0; _has_method_handle_invokes = 0; _lazy_critical_native = 0; _has_wide_vectors = 0; + _has_monitors = 0; } bool CompiledMethod::is_method_handle_return(address return_pc) { if (!has_method_handle_invokes()) return false; PcDesc* pd = pc_desc_at(return_pc);
*** 710,714 **** --- 715,727 ---- _method->signature()->as_C_string(), compile_id()); } return check_evol.has_evol_dependency(); } + + bool CompiledMethod::is_on_continuation_stack() { + if (_keepalive != NULL) { + WeakHandle<vm_nmethod_keepalive_data> wh = WeakHandle<vm_nmethod_keepalive_data>::from_raw(_keepalive); + return wh.resolve() != NULL; + } + return false; + }
< prev index next >