Mercurial > hg > graal-compiler
comparison src/share/vm/opto/parse2.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 | b2b6a9bf6238 |
children | c18cbe5936b8 ab102d5d923e |
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. |
2077 | 2077 |
2078 case Bytecodes::_athrow: | 2078 case Bytecodes::_athrow: |
2079 // null exception oop throws NULL pointer exception | 2079 // null exception oop throws NULL pointer exception |
2080 do_null_check(peek(), T_OBJECT); | 2080 do_null_check(peek(), T_OBJECT); |
2081 if (stopped()) return; | 2081 if (stopped()) return; |
2082 if (env()->jvmti_can_post_exceptions()) { | |
2083 // "Full-speed throwing" is not necessary here, | |
2084 // since we're notifying the VM on every throw. | |
2085 uncommon_trap(Deoptimization::Reason_unhandled, | |
2086 Deoptimization::Action_none); | |
2087 return; | |
2088 } | |
2089 // Hook the thrown exception directly to subsequent handlers. | 2082 // Hook the thrown exception directly to subsequent handlers. |
2090 if (BailoutToInterpreterForThrows) { | 2083 if (BailoutToInterpreterForThrows) { |
2091 // Keep method interpreted from now on. | 2084 // Keep method interpreted from now on. |
2092 uncommon_trap(Deoptimization::Reason_unhandled, | 2085 uncommon_trap(Deoptimization::Reason_unhandled, |
2093 Deoptimization::Action_make_not_compilable); | 2086 Deoptimization::Action_make_not_compilable); |
2094 return; | 2087 return; |
2095 } | 2088 } |
2089 if (env()->jvmti_can_post_on_exceptions()) { | |
2090 // check if we must post exception events, take uncommon trap if so (with must_throw = false) | |
2091 uncommon_trap_if_should_post_on_exceptions(Deoptimization::Reason_unhandled, false); | |
2092 } | |
2093 // Here if either can_post_on_exceptions or should_post_on_exceptions is false | |
2096 add_exception_state(make_exception_state(peek())); | 2094 add_exception_state(make_exception_state(peek())); |
2097 break; | 2095 break; |
2098 | 2096 |
2099 case Bytecodes::_goto: // fall through | 2097 case Bytecodes::_goto: // fall through |
2100 case Bytecodes::_goto_w: { | 2098 case Bytecodes::_goto_w: { |