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

Unified Diff: runtime/vm/debugger_arm64.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, 6 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
Index: runtime/vm/debugger_arm64.cc
diff --git a/runtime/vm/debugger_arm64.cc b/runtime/vm/debugger_arm64.cc
index 12886438be39fe474e30543d63e5bd79da714969..43fec3efe5b5ae24d984d3612b7a4d1da7aa582c 100644
--- a/runtime/vm/debugger_arm64.cc
+++ b/runtime/vm/debugger_arm64.cc
@@ -53,15 +53,33 @@ void CodeBreakpoint::PatchCode() {
WritableInstructionsScope writable(instrs.EntryPoint(), instrs.size());
switch (breakpoint_kind_) {
case PcDescriptors::kIcCall:
- case PcDescriptors::kUnoptStaticCall:
- case PcDescriptors::kRuntimeCall:
+ case PcDescriptors::kUnoptStaticCall: {
+ int32_t offset = CodePatcher::GetPoolOffsetAt(pc_);
+ ASSERT((offset > 0) && ((offset & 0x7) == 0));
+ saved_value_ = static_cast<uword>(offset);
+ const uint32_t stub_offset =
+ InstructionPattern::OffsetFromPPIndex(
+ Assembler::kICCallBreakpointCPIndex);
+ CodePatcher::SetPoolOffsetAt(pc_, stub_offset);
+ break;
+ }
case PcDescriptors::kClosureCall: {
int32_t offset = CodePatcher::GetPoolOffsetAt(pc_);
ASSERT((offset > 0) && ((offset & 0x7) == 0));
saved_value_ = static_cast<uword>(offset);
const uint32_t stub_offset =
InstructionPattern::OffsetFromPPIndex(
- Assembler::kBreakpointRuntimeCPIndex);
+ Assembler::kClosureCallBreakpointCPIndex);
+ CodePatcher::SetPoolOffsetAt(pc_, stub_offset);
+ break;
+ }
+ case PcDescriptors::kRuntimeCall: {
+ int32_t offset = CodePatcher::GetPoolOffsetAt(pc_);
+ ASSERT((offset > 0) && ((offset & 0x7) == 0));
+ saved_value_ = static_cast<uword>(offset);
+ const uint32_t stub_offset =
+ InstructionPattern::OffsetFromPPIndex(
+ Assembler::kRuntimeCallBreakpointCPIndex);
CodePatcher::SetPoolOffsetAt(pc_, stub_offset);
break;
}

Powered by Google App Engine
This is Rietveld 408576698