Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1504)

Unified Diff: runtime/vm/debugger_x64.cc

Issue 339183010: Specialize breakpoint stubs by set of live registers of the stubs they are intercepting. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/debugger_mips.cc ('k') | runtime/vm/flow_graph_compiler_arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/debugger_x64.cc
diff --git a/runtime/vm/debugger_x64.cc b/runtime/vm/debugger_x64.cc
index 97fd052747934dc1345567bf570b14778d2f5184..b76469edd206ef1ea71911bc2c5227c5692c94d9 100644
--- a/runtime/vm/debugger_x64.cc
+++ b/runtime/vm/debugger_x64.cc
@@ -55,15 +55,33 @@ void CodeBreakpoint::PatchCode() {
WritableInstructionsScope writable(instrs.EntryPoint(), instrs.size());
switch (breakpoint_kind_) {
case RawPcDescriptors::kIcCall:
- case RawPcDescriptors::kUnoptStaticCall:
- case RawPcDescriptors::kRuntimeCall:
+ case RawPcDescriptors::kUnoptStaticCall: {
+ int32_t offset = CodePatcher::GetPoolOffsetAt(pc_);
+ ASSERT((offset > 0) && ((offset % 8) == 7));
+ saved_value_ = static_cast<uword>(offset);
+ const uint32_t stub_offset =
+ InstructionPattern::OffsetFromPPIndex(
+ Assembler::kICCallBreakpointCPIndex);
+ CodePatcher::SetPoolOffsetAt(pc_, stub_offset);
+ break;
+ }
case RawPcDescriptors::kClosureCall: {
int32_t offset = CodePatcher::GetPoolOffsetAt(pc_);
ASSERT((offset > 0) && ((offset % 8) == 7));
saved_value_ = static_cast<uword>(offset);
const uint32_t stub_offset =
InstructionPattern::OffsetFromPPIndex(
- Assembler::kBreakpointRuntimeCPIndex);
+ Assembler::kClosureCallBreakpointCPIndex);
+ CodePatcher::SetPoolOffsetAt(pc_, stub_offset);
+ break;
+ }
+ case RawPcDescriptors::kRuntimeCall: {
+ int32_t offset = CodePatcher::GetPoolOffsetAt(pc_);
+ ASSERT((offset > 0) && ((offset % 8) == 7));
+ saved_value_ = static_cast<uword>(offset);
+ const uint32_t stub_offset =
+ InstructionPattern::OffsetFromPPIndex(
+ Assembler::kRuntimeCallBreakpointCPIndex);
CodePatcher::SetPoolOffsetAt(pc_, stub_offset);
break;
}
« no previous file with comments | « runtime/vm/debugger_mips.cc ('k') | runtime/vm/flow_graph_compiler_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698