Debugger: prepare code for debugging on a per-function basis.
authoryangguo <yangguo@chromium.org>
Mon, 20 Jul 2015 14:53:28 +0000 (07:53 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 20 Jul 2015 14:53:37 +0000 (14:53 +0000)
commit35c28ce0a742e58346d2dea009428cacd442040d
treea4f3e94ca45716e7f71338efd77a6a53d8674888
parent8019833da7c0cd8f6056e9fe8670e5cadce4b6ce
Debugger: prepare code for debugging on a per-function basis.

Prior to this patch, we enter a global debug mode whenever a break point
is set. By entering this mode, all code is deoptimized and activated
frames are recompiled and redirected to newly compiled debug code.

After this patch, we only deoptimize/redirect for functions we want to
debug. Trigger for this is Debug::EnsureDebugInfo, and having DebugInfo
object attached to the SFI prevents optimization/inlining.

The result is that we can have optimized code for functions without break
points alongside functions that do have break points, which are not
optimized.

R=mstarzinger@chromium.org, ulan@chromium.org
BUG=v8:4132
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#29758}
25 files changed:
src/arm/assembler-arm-inl.h
src/arm64/assembler-arm64-inl.h
src/background-parsing-task.cc
src/bailout-reason.h
src/compiler.cc
src/compiler.h
src/compiler/js-inlining.cc
src/debug.cc
src/debug.h
src/heap/mark-compact.cc
src/hydrogen.cc
src/ia32/assembler-ia32-inl.h
src/ic/ic.cc
src/liveedit.cc
src/mips/assembler-mips-inl.h
src/mips64/assembler-mips64-inl.h
src/objects-inl.h
src/objects.cc
src/objects.h
src/runtime/runtime-debug.cc
src/x64/assembler-x64-inl.h
test/cctest/test-debug.cc
test/cctest/test-func-name-inference.cc
test/mjsunit/debug-evaluate.js
test/mjsunit/debug-optimize.js [new file with mode: 0644]