Mercurial > hg > truffle
comparison src/share/vm/opto/runtime.cpp @ 1213:6deeaebad47a
6902182: 4/4 Starting with jdwp agent should not incur performance penalty
Summary: Rename can_post_exceptions support to can_post_on_exceptions. Add support for should_post_on_exceptions flag to permit per JavaThread optimizations.
Reviewed-by: never, kvn, dcubed
Contributed-by: tom.deneau@amd.com
author | dcubed |
---|---|
date | Mon, 01 Feb 2010 17:35:05 -0700 |
parents | 7b0e9cba0307 |
children | 7f8790caccb0 |
comparison
equal
deleted
inserted
replaced
1196:f3345b7b01b4 | 1213:6deeaebad47a |
---|---|
1 /* | 1 /* |
2 * Copyright 1998-2009 Sun Microsystems, Inc. All Rights Reserved. | 2 * Copyright 1998-2010 Sun Microsystems, Inc. All Rights Reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
808 fatal("Native mathod should not have path to exception handling"); | 808 fatal("Native mathod should not have path to exception handling"); |
809 } else { | 809 } else { |
810 // we are switching to old paradigm: search for exception handler in caller_frame | 810 // we are switching to old paradigm: search for exception handler in caller_frame |
811 // instead in exception handler of caller_frame.sender() | 811 // instead in exception handler of caller_frame.sender() |
812 | 812 |
813 if (JvmtiExport::can_post_exceptions()) { | 813 if (JvmtiExport::can_post_on_exceptions()) { |
814 // "Full-speed catching" is not necessary here, | 814 // "Full-speed catching" is not necessary here, |
815 // since we're notifying the VM on every catch. | 815 // since we're notifying the VM on every catch. |
816 // Force deoptimization and the rest of the lookup | 816 // Force deoptimization and the rest of the lookup |
817 // will be fine. | 817 // will be fine. |
818 deoptimize_caller_frame(thread, true); | 818 deoptimize_caller_frame(thread, true); |
973 RegisterMap reg_map(thread); | 973 RegisterMap reg_map(thread); |
974 frame stub_frame = thread->last_frame(); | 974 frame stub_frame = thread->last_frame(); |
975 assert(stub_frame.is_runtime_frame() || exception_blob()->contains(stub_frame.pc()), "sanity check"); | 975 assert(stub_frame.is_runtime_frame() || exception_blob()->contains(stub_frame.pc()), "sanity check"); |
976 frame caller_frame = stub_frame.sender(®_map); | 976 frame caller_frame = stub_frame.sender(®_map); |
977 | 977 |
978 VM_DeoptimizeFrame deopt(thread, caller_frame.id()); | 978 // bypass VM_DeoptimizeFrame and deoptimize the frame directly |
979 VMThread::execute(&deopt); | 979 Deoptimization::deoptimize_frame(thread, caller_frame.id()); |
980 } | 980 } |
981 } | 981 } |
982 | 982 |
983 | 983 |
984 const TypeFunc *OptoRuntime::register_finalizer_Type() { | 984 const TypeFunc *OptoRuntime::register_finalizer_Type() { |