Mercurial > hg > truffle
changeset 3661:d24f157f2ba8
Use write barrier in JavaAccess. Fixed thread transition bug.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Thu, 17 Nov 2011 17:45:34 +0100 |
parents | c805dfba251d |
children | e0bbc6b1c4a1 |
files | src/share/vm/graal/graalCodeInstaller.cpp src/share/vm/graal/graalEnv.cpp src/share/vm/graal/graalEnv.hpp src/share/vm/graal/graalJavaAccess.hpp |
diffstat | 4 files changed, 9 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/vm/graal/graalCodeInstaller.cpp Thu Nov 17 17:18:16 2011 +0100 +++ b/src/share/vm/graal/graalCodeInstaller.cpp Thu Nov 17 17:45:34 2011 +0100 @@ -266,10 +266,11 @@ } int stack_slots = (_frame_size / HeapWordSize) + 2; // conversion to words, need to add two slots for ret address and frame pointer - ThreadToNativeFromVM t((JavaThread*) Thread::current()); methodHandle method = getMethodFromHotSpotMethod(HotSpotTargetMethod::method(target_method)); - nm = GraalEnv::register_method(method, -1, &_offsets, _custom_stack_area_offset, &buffer, stack_slots, _debug_recorder->_oopmaps, &_exception_handler_table, - &_implicit_exception_table, GraalCompiler::instance(), _debug_recorder, _dependencies, NULL, -1, false, false, install_code); + { + nm = GraalEnv::register_method(method, -1, &_offsets, _custom_stack_area_offset, &buffer, stack_slots, _debug_recorder->_oopmaps, &_exception_handler_table, + &_implicit_exception_table, GraalCompiler::instance(), _debug_recorder, _dependencies, NULL, -1, false, false, install_code); + } method->clear_queued_for_compilation(); }
--- a/src/share/vm/graal/graalEnv.cpp Thu Nov 17 17:18:16 2011 +0100 +++ b/src/share/vm/graal/graalEnv.cpp Thu Nov 17 17:45:34 2011 +0100 @@ -424,7 +424,7 @@ // ------------------------------------------------------------------ // ciEnv::register_method -nmethod* GraalEnv::register_method(methodHandle method, +nmethod* GraalEnv::register_method(methodHandle& method, int entry_bci, CodeOffsets* offsets, int orig_pc_offset, @@ -441,7 +441,7 @@ bool has_debug_info, bool has_unsafe_access, bool install_code) { - VM_ENTRY_MARK; + EXCEPTION_CONTEXT; nmethod* nm = NULL; int comp_level = CompLevel_simple; {
--- a/src/share/vm/graal/graalEnv.hpp Thu Nov 17 17:18:16 2011 +0100 +++ b/src/share/vm/graal/graalEnv.hpp Thu Nov 17 17:45:34 2011 +0100 @@ -109,7 +109,7 @@ public: // Register the result of a compilation. - static nmethod* register_method(methodHandle target, + static nmethod* register_method(methodHandle& target, int entry_bci, CodeOffsets* offsets, int orig_pc_offset,
--- a/src/share/vm/graal/graalJavaAccess.hpp Thu Nov 17 17:18:16 2011 +0100 +++ b/src/share/vm/graal/graalJavaAccess.hpp Thu Nov 17 17:45:34 2011 +0100 @@ -265,9 +265,9 @@ instanceKlass* ik = instanceKlass::cast(klassName::klass()); \ address addr = ik->static_field_addr(_##name##_offset - instanceMirrorKlass::offset_of_static_fields()); \ if (UseCompressedOops) { \ - oopDesc::encode_store_heap_oop((narrowOop *)addr, x); \ + oop_store((narrowOop *)addr, x); \ } else { \ - oopDesc::encode_store_heap_oop((oop*)addr, x); \ + oop_store((oop*)addr, x); \ } \ } COMPILER_CLASSES_DO(START_CLASS, END_CLASS, CHAR_FIELD, INT_FIELD, BOOLEAN_FIELD, LONG_FIELD, FLOAT_FIELD, OOP_FIELD, STATIC_OOP_FIELD)