Add flag trap_on_stub_deopt. We want to be able to trap on hydrogen stub bailouts.

BUG=
R=svenpanne@chromium.org, verwaest@chromium.org

Review URL: https://codereview.chromium.org/22593003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16121 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
mvstanton@chromium.org 2013-08-09 08:24:29 +00:00
parent f0305bd83e
commit ab066fae6f
6 changed files with 11 additions and 4 deletions

View File

@ -811,7 +811,7 @@ void LCodeGen::DeoptimizeIf(Condition cc,
return;
}
if (FLAG_trap_on_deopt && info()->IsOptimizing()) {
if (info()->ShouldTrapOnDeopt()) {
__ stop("trap_on_deopt", cc);
}

View File

@ -199,6 +199,11 @@ class CompilationInfo {
return IsCompilingForDebugging::decode(flags_);
}
bool ShouldTrapOnDeopt() const {
return (FLAG_trap_on_deopt && IsOptimizing()) ||
(FLAG_trap_on_stub_deopt && IsStub());
}
bool has_global_object() const {
return !closure().is_null() &&
(closure()->context()->global_object() != NULL);

View File

@ -264,6 +264,8 @@ DEFINE_int(deopt_every_n_garbage_collections,
"deoptimize every n garbage collections")
DEFINE_bool(print_deopt_stress, false, "print number of possible deopt points")
DEFINE_bool(trap_on_deopt, false, "put a break point before deoptimizing")
DEFINE_bool(trap_on_stub_deopt, false,
"put a break point before deoptimizing a stub")
DEFINE_bool(deoptimize_uncommon_cases, true, "deoptimize uncommon cases")
DEFINE_bool(polymorphic_inlining, true, "polymorphic inlining")
DEFINE_bool(use_osr, true, "use on-stack replacement")

View File

@ -1010,7 +1010,7 @@ void LCodeGen::DeoptimizeIf(Condition cc,
__ bind(&done);
}
if (FLAG_trap_on_deopt && info()->IsOptimizing()) {
if (info()->ShouldTrapOnDeopt()) {
Label done;
if (cc != no_condition) __ j(NegateCondition(cc), &done, Label::kNear);
__ int3();

View File

@ -787,7 +787,7 @@ void LCodeGen::DeoptimizeIf(Condition cc,
return;
}
if (FLAG_trap_on_deopt && info()->IsOptimizing()) {
if (info()->ShouldTrapOnDeopt()) {
Label skip;
if (cc != al) {
__ Branch(&skip, NegateCondition(cc), src1, src2);

View File

@ -693,7 +693,7 @@ void LCodeGen::DeoptimizeIf(Condition cc,
ASSERT(FLAG_deopt_every_n_times == 0); // Not yet implemented on x64.
if (FLAG_trap_on_deopt && info()->IsOptimizing()) {
if (info()->ShouldTrapOnDeopt()) {
Label done;
if (cc != no_condition) {
__ j(NegateCondition(cc), &done, Label::kNear);