Mercurial > hg > graal-jvmci-8
changeset 18391:810222d74f7c
When deoptimizing on unwind, revoke biases instead of calling deoptimize_frame before returning deopt continuation
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Mon, 17 Nov 2014 14:58:39 +0100 |
parents | ce15cc6af5fe |
children | 3ad5d7a6adb5 |
files | src/share/vm/runtime/deoptimization.hpp src/share/vm/runtime/sharedRuntime.cpp |
diffstat | 2 files changed, 7 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/vm/runtime/deoptimization.hpp Mon Nov 17 11:51:08 2014 +0100 +++ b/src/share/vm/runtime/deoptimization.hpp Mon Nov 17 14:58:39 2014 +0100 @@ -130,13 +130,13 @@ static void deoptimize(JavaThread* thread, frame fr, RegisterMap *reg_map); static void deoptimize(JavaThread* thread, frame fr, RegisterMap *reg_map, DeoptReason reason); + // Helper function to revoke biases of all monitors in frame if UseBiasedLocking + // is enabled + static void revoke_biases_of_monitors(JavaThread* thread, frame fr, RegisterMap* map); + private: // Does the actual work for deoptimizing a single frame static void deoptimize_single_frame(JavaThread* thread, frame fr, DeoptReason reason); - - // Helper function to revoke biases of all monitors in frame if UseBiasedLocking - // is enabled - static void revoke_biases_of_monitors(JavaThread* thread, frame fr, RegisterMap* map); // Helper function to revoke biases of all monitors in frames // executing in a particular CodeBlob if UseBiasedLocking is enabled static void revoke_biases_of_monitors(CodeBlob* cb);
--- a/src/share/vm/runtime/sharedRuntime.cpp Mon Nov 17 11:51:08 2014 +0100 +++ b/src/share/vm/runtime/sharedRuntime.cpp Mon Nov 17 14:58:39 2014 +0100 @@ -663,7 +663,9 @@ RegisterMap reg_map(thread); frame runtime_frame = thread->last_frame(); frame caller_frame = runtime_frame.sender(®_map); - Deoptimization::deoptimize_frame(thread, caller_frame.id(), Deoptimization::Reason_not_compiled_exception_handler); + assert(caller_frame.is_compiled_frame() && !caller_frame.is_deoptimized_frame(),"should be called by compiled frame"); + Deoptimization::revoke_biases_of_monitors(thread, caller_frame, ®_map); + return SharedRuntime::deopt_blob()->unpack_with_exception_in_tls(); } }