From 54b74b8e85c8ca5827d4116a3943d95755a888bd Mon Sep 17 00:00:00 2001 From: "yangguo@chromium.org" Date: Wed, 13 Jun 2012 14:07:50 +0000 Subject: [PATCH] Remove faster ticks for debug mode. This solves the problem that code runs very slow when the debugger is enabled. BUG=v8:2179 TEST= Review URL: https://chromiumcodereview.appspot.com/10544135 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@11802 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- deps/v8/src/arm/full-codegen-arm.cc | 2 +- deps/v8/src/ia32/full-codegen-ia32.cc | 4 ---- deps/v8/src/mips/full-codegen-mips.cc | 2 +- deps/v8/src/x64/full-codegen-x64.cc | 4 ---- 4 files changed, 2 insertions(+), 10 deletions(-) diff --git a/deps/v8/src/arm/full-codegen-arm.cc b/deps/v8/src/arm/full-codegen-arm.cc index ff7c3c139e5..30c131c6445 100644 --- a/deps/v8/src/arm/full-codegen-arm.cc +++ b/deps/v8/src/arm/full-codegen-arm.cc @@ -328,7 +328,7 @@ void FullCodeGenerator::EmitProfilingCounterReset() { } if (isolate()->IsDebuggerActive()) { // Detect debug break requests as soon as possible. - reset_value = 10; + reset_value = FLAG_interrupt_budget >> 4; } __ mov(r2, Operand(profiling_counter_)); __ mov(r3, Operand(Smi::FromInt(reset_value))); diff --git a/deps/v8/src/ia32/full-codegen-ia32.cc b/deps/v8/src/ia32/full-codegen-ia32.cc index 5a513fd483a..77c095ad1ca 100644 --- a/deps/v8/src/ia32/full-codegen-ia32.cc +++ b/deps/v8/src/ia32/full-codegen-ia32.cc @@ -317,10 +317,6 @@ void FullCodeGenerator::EmitProfilingCounterReset() { // Self-optimization is a one-off thing: if it fails, don't try again. reset_value = Smi::kMaxValue; } - if (isolate()->IsDebuggerActive()) { - // Detect debug break requests as soon as possible. - reset_value = 10; - } __ mov(ebx, Immediate(profiling_counter_)); __ mov(FieldOperand(ebx, JSGlobalPropertyCell::kValueOffset), Immediate(Smi::FromInt(reset_value))); diff --git a/deps/v8/src/mips/full-codegen-mips.cc b/deps/v8/src/mips/full-codegen-mips.cc index 263656ea01f..9013860013a 100644 --- a/deps/v8/src/mips/full-codegen-mips.cc +++ b/deps/v8/src/mips/full-codegen-mips.cc @@ -332,7 +332,7 @@ void FullCodeGenerator::EmitProfilingCounterReset() { } if (isolate()->IsDebuggerActive()) { // Detect debug break requests as soon as possible. - reset_value = 10; + reset_value = FLAG_interrupt_budget >> 4; } __ li(a2, Operand(profiling_counter_)); __ li(a3, Operand(Smi::FromInt(reset_value))); diff --git a/deps/v8/src/x64/full-codegen-x64.cc b/deps/v8/src/x64/full-codegen-x64.cc index a3e42eb5059..1e2afeb6825 100644 --- a/deps/v8/src/x64/full-codegen-x64.cc +++ b/deps/v8/src/x64/full-codegen-x64.cc @@ -310,10 +310,6 @@ void FullCodeGenerator::EmitProfilingCounterReset() { // Self-optimization is a one-off thing; if it fails, don't try again. reset_value = Smi::kMaxValue; } - if (isolate()->IsDebuggerActive()) { - // Detect debug break requests as soon as possible. - reset_value = 10; - } __ movq(rbx, profiling_counter_, RelocInfo::EMBEDDED_OBJECT); __ movq(kScratchRegister, reinterpret_cast(Smi::FromInt(reset_value)),