PPC/s390: [debug] Untangle DebugInfo from break point support
Port d3371c23cb
Original Commit Message:
DebugInfo was very closely tied to break point support:
* It contained only information relevant to break points.
* It was created and freed by break point implementation.
* Existence of a DebugInfo on the shared function info implied existence of
break points.
This CL is a step towards making DebugInfo usable by other debugging
functionality such as block coverage by decoupling it from break point support,
which is now only one kind of information stored on the DebugInfo object.
R=jgruber@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=v8:6000
LOG=N
Review-Url: https://codereview.chromium.org/2927813004
Cr-Commit-Position: refs/heads/master@{#45796}
This commit is contained in:
parent
381f7da02c
commit
39e42b5ef0
@ -1085,20 +1085,15 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
|
|||||||
|
|
||||||
// Get the bytecode array from the function object (or from the DebugInfo if
|
// Get the bytecode array from the function object (or from the DebugInfo if
|
||||||
// it is present) and load it into kInterpreterBytecodeArrayRegister.
|
// it is present) and load it into kInterpreterBytecodeArrayRegister.
|
||||||
|
Label maybe_load_debug_bytecode_array, bytecode_array_loaded;
|
||||||
__ LoadP(r3, FieldMemOperand(r4, JSFunction::kSharedFunctionInfoOffset));
|
__ LoadP(r3, FieldMemOperand(r4, JSFunction::kSharedFunctionInfoOffset));
|
||||||
Label array_done;
|
|
||||||
Register debug_info = r5;
|
|
||||||
DCHECK(!debug_info.is(r3));
|
|
||||||
__ LoadP(debug_info,
|
|
||||||
FieldMemOperand(r3, SharedFunctionInfo::kDebugInfoOffset));
|
|
||||||
// Load original bytecode array or the debug copy.
|
// Load original bytecode array or the debug copy.
|
||||||
__ LoadP(kInterpreterBytecodeArrayRegister,
|
__ LoadP(kInterpreterBytecodeArrayRegister,
|
||||||
FieldMemOperand(r3, SharedFunctionInfo::kFunctionDataOffset));
|
FieldMemOperand(r3, SharedFunctionInfo::kFunctionDataOffset));
|
||||||
__ TestIfSmi(debug_info, r0);
|
__ LoadP(r5, FieldMemOperand(r3, SharedFunctionInfo::kDebugInfoOffset));
|
||||||
__ beq(&array_done, cr0);
|
__ TestIfSmi(r5, r0);
|
||||||
__ LoadP(kInterpreterBytecodeArrayRegister,
|
__ bne(&maybe_load_debug_bytecode_array, cr0);
|
||||||
FieldMemOperand(debug_info, DebugInfo::kDebugBytecodeArrayOffset));
|
__ bind(&bytecode_array_loaded);
|
||||||
__ bind(&array_done);
|
|
||||||
|
|
||||||
// Check whether we should continue to use the interpreter.
|
// Check whether we should continue to use the interpreter.
|
||||||
// TODO(rmcilroy) Remove self healing once liveedit only has to deal with
|
// TODO(rmcilroy) Remove self healing once liveedit only has to deal with
|
||||||
@ -1192,6 +1187,20 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
|
|||||||
LeaveInterpreterFrame(masm, r5);
|
LeaveInterpreterFrame(masm, r5);
|
||||||
__ blr();
|
__ blr();
|
||||||
|
|
||||||
|
// Load debug copy of the bytecode array if it exists.
|
||||||
|
// kInterpreterBytecodeArrayRegister is already loaded with
|
||||||
|
// SharedFunctionInfo::kFunctionDataOffset.
|
||||||
|
Label done;
|
||||||
|
__ bind(&maybe_load_debug_bytecode_array);
|
||||||
|
__ LoadP(ip, FieldMemOperand(r5, DebugInfo::kFlagsOffset));
|
||||||
|
__ SmiUntag(ip);
|
||||||
|
__ andi(r0, ip, Operand(DebugInfo::kHasBreakInfo));
|
||||||
|
__ beq(&done, cr0);
|
||||||
|
__ LoadP(kInterpreterBytecodeArrayRegister,
|
||||||
|
FieldMemOperand(r5, DebugInfo::kDebugBytecodeArrayOffset));
|
||||||
|
__ bind(&done);
|
||||||
|
__ b(&bytecode_array_loaded);
|
||||||
|
|
||||||
// If the shared code is no longer this entry trampoline, then the underlying
|
// If the shared code is no longer this entry trampoline, then the underlying
|
||||||
// function has been switched to a different kind of code and we heal the
|
// function has been switched to a different kind of code and we heal the
|
||||||
// closure by switching the code entry field over to the new code as well.
|
// closure by switching the code entry field over to the new code as well.
|
||||||
|
@ -1077,20 +1077,16 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
|
|||||||
|
|
||||||
// Get the bytecode array from the function object (or from the DebugInfo if
|
// Get the bytecode array from the function object (or from the DebugInfo if
|
||||||
// it is present) and load it into kInterpreterBytecodeArrayRegister.
|
// it is present) and load it into kInterpreterBytecodeArrayRegister.
|
||||||
|
Label maybe_load_debug_bytecode_array, bytecode_array_loaded;
|
||||||
__ LoadP(r2, FieldMemOperand(r3, JSFunction::kSharedFunctionInfoOffset));
|
__ LoadP(r2, FieldMemOperand(r3, JSFunction::kSharedFunctionInfoOffset));
|
||||||
Label array_done;
|
|
||||||
Register debug_info = r4;
|
|
||||||
DCHECK(!debug_info.is(r2));
|
|
||||||
__ LoadP(debug_info,
|
|
||||||
FieldMemOperand(r2, SharedFunctionInfo::kDebugInfoOffset));
|
|
||||||
// Load original bytecode array or the debug copy.
|
// Load original bytecode array or the debug copy.
|
||||||
__ LoadP(kInterpreterBytecodeArrayRegister,
|
__ LoadP(kInterpreterBytecodeArrayRegister,
|
||||||
FieldMemOperand(r2, SharedFunctionInfo::kFunctionDataOffset));
|
FieldMemOperand(r2, SharedFunctionInfo::kFunctionDataOffset));
|
||||||
__ TestIfSmi(debug_info);
|
__ LoadP(r4, FieldMemOperand(r2, SharedFunctionInfo::kDebugInfoOffset));
|
||||||
__ beq(&array_done);
|
|
||||||
__ LoadP(kInterpreterBytecodeArrayRegister,
|
__ TestIfSmi(r4);
|
||||||
FieldMemOperand(debug_info, DebugInfo::kDebugBytecodeArrayOffset));
|
__ bne(&maybe_load_debug_bytecode_array);
|
||||||
__ bind(&array_done);
|
__ bind(&bytecode_array_loaded);
|
||||||
|
|
||||||
// Check whether we should continue to use the interpreter.
|
// Check whether we should continue to use the interpreter.
|
||||||
// TODO(rmcilroy) Remove self healing once liveedit only has to deal with
|
// TODO(rmcilroy) Remove self healing once liveedit only has to deal with
|
||||||
@ -1183,6 +1179,20 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
|
|||||||
LeaveInterpreterFrame(masm, r4);
|
LeaveInterpreterFrame(masm, r4);
|
||||||
__ Ret();
|
__ Ret();
|
||||||
|
|
||||||
|
// Load debug copy of the bytecode array if it exists.
|
||||||
|
// kInterpreterBytecodeArrayRegister is already loaded with
|
||||||
|
// SharedFunctionInfo::kFunctionDataOffset.
|
||||||
|
Label done;
|
||||||
|
__ bind(&maybe_load_debug_bytecode_array);
|
||||||
|
__ LoadP(ip, FieldMemOperand(r4, DebugInfo::kFlagsOffset));
|
||||||
|
__ SmiUntag(ip);
|
||||||
|
__ tmll(ip, Operand(DebugInfo::kHasBreakInfo));
|
||||||
|
__ beq(&done);
|
||||||
|
__ LoadP(kInterpreterBytecodeArrayRegister,
|
||||||
|
FieldMemOperand(r4, DebugInfo::kDebugBytecodeArrayOffset));
|
||||||
|
__ bind(&done);
|
||||||
|
__ b(&bytecode_array_loaded);
|
||||||
|
|
||||||
// If the shared code is no longer this entry trampoline, then the underlying
|
// If the shared code is no longer this entry trampoline, then the underlying
|
||||||
// function has been switched to a different kind of code and we heal the
|
// function has been switched to a different kind of code and we heal the
|
||||||
// closure by switching the code entry field over to the new code as well.
|
// closure by switching the code entry field over to the new code as well.
|
||||||
|
Loading…
Reference in New Issue
Block a user