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

Side by Side Diff: runtime/vm/debugger_arm.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/assembler_x64.cc ('k') | runtime/vm/debugger_arm64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
7 7
8 #include "vm/code_patcher.h" 8 #include "vm/code_patcher.h"
9 #include "vm/cpu.h" 9 #include "vm/cpu.h"
10 #include "vm/debugger.h" 10 #include "vm/debugger.h"
(...skipping 28 matching lines...) Expand all
39 39
40 40
41 void CodeBreakpoint::PatchCode() { 41 void CodeBreakpoint::PatchCode() {
42 ASSERT(!is_enabled_); 42 ASSERT(!is_enabled_);
43 const Code& code = Code::Handle(code_); 43 const Code& code = Code::Handle(code_);
44 const Instructions& instrs = Instructions::Handle(code.instructions()); 44 const Instructions& instrs = Instructions::Handle(code.instructions());
45 { 45 {
46 WritableInstructionsScope writable(instrs.EntryPoint(), instrs.size()); 46 WritableInstructionsScope writable(instrs.EntryPoint(), instrs.size());
47 switch (breakpoint_kind_) { 47 switch (breakpoint_kind_) {
48 case RawPcDescriptors::kIcCall: 48 case RawPcDescriptors::kIcCall:
49 case RawPcDescriptors::kUnoptStaticCall: 49 case RawPcDescriptors::kUnoptStaticCall: {
50 case RawPcDescriptors::kRuntimeCall: 50 saved_value_ = CodePatcher::GetStaticCallTargetAt(pc_, code);
51 CodePatcher::PatchStaticCallAt(
52 pc_, code, StubCode::ICCallBreakpointEntryPoint());
53 break;
54 }
51 case RawPcDescriptors::kClosureCall: { 55 case RawPcDescriptors::kClosureCall: {
52 saved_value_ = CodePatcher::GetStaticCallTargetAt(pc_, code); 56 saved_value_ = CodePatcher::GetStaticCallTargetAt(pc_, code);
53 CodePatcher::PatchStaticCallAt(pc_, code, 57 CodePatcher::PatchStaticCallAt(
54 StubCode::BreakpointRuntimeEntryPoint()); 58 pc_, code, StubCode::ClosureCallBreakpointEntryPoint());
59 break;
60 }
61 case RawPcDescriptors::kRuntimeCall: {
62 saved_value_ = CodePatcher::GetStaticCallTargetAt(pc_, code);
63 CodePatcher::PatchStaticCallAt(
64 pc_, code, StubCode::RuntimeCallBreakpointEntryPoint());
55 break; 65 break;
56 } 66 }
57 default: 67 default:
58 UNREACHABLE(); 68 UNREACHABLE();
59 } 69 }
60 } 70 }
61 is_enabled_ = true; 71 is_enabled_ = true;
62 } 72 }
63 73
64 74
(...skipping 14 matching lines...) Expand all
79 default: 89 default:
80 UNREACHABLE(); 90 UNREACHABLE();
81 } 91 }
82 } 92 }
83 is_enabled_ = false; 93 is_enabled_ = false;
84 } 94 }
85 95
86 } // namespace dart 96 } // namespace dart
87 97
88 #endif // defined TARGET_ARCH_ARM 98 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/assembler_x64.cc ('k') | runtime/vm/debugger_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698