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

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, 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_arm.cc ('k') | runtime/vm/debugger_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/debugger_arm64.cc
diff --git a/runtime/vm/debugger_arm64.cc b/runtime/vm/debugger_arm64.cc
index 3fb7b88d79b586854226333044540c4723b88451..2a74ad6a53a26266ad1cfe0a315a0fe7f95200d3 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 RawPcDescriptors::kIcCall:
- case RawPcDescriptors::kUnoptStaticCall:
- case RawPcDescriptors::kRuntimeCall:
+ case RawPcDescriptors::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 RawPcDescriptors::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 RawPcDescriptors::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;
}
« no previous file with comments | « runtime/vm/debugger_arm.cc ('k') | runtime/vm/debugger_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698