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

Side by Side Diff: runtime/vm/code_patcher.h

Issue 24744002: Pattern match on generated code to find edge counters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Incorporated review comments. Created 7 years, 2 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/block_scheduler.cc ('k') | runtime/vm/code_patcher_arm.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 // Class for patching compiled code. 4 // Class for patching compiled code.
5 5
6 #ifndef VM_CODE_PATCHER_H_ 6 #ifndef VM_CODE_PATCHER_H_
7 #define VM_CODE_PATCHER_H_ 7 #define VM_CODE_PATCHER_H_
8 8
9 #include "vm/allocation.h" 9 #include "vm/allocation.h"
10 10
11 namespace dart { 11 namespace dart {
12 12
13 // Forward declaration. 13 // Forward declaration.
14 class Array; 14 class Array;
15 class Code; 15 class Code;
16 class ExternalLabel; 16 class ExternalLabel;
17 class Function; 17 class Function;
18 class ICData; 18 class ICData;
19 class RawArray; 19 class RawArray;
20 class RawFunction; 20 class RawFunction;
21 class RawICData; 21 class RawICData;
22 class RawObject;
22 class String; 23 class String;
23 24
24 class CodePatcher : public AllStatic { 25 class CodePatcher : public AllStatic {
25 public: 26 public:
26 // Dart static calls have a distinct, machine-dependent code pattern. 27 // Dart static calls have a distinct, machine-dependent code pattern.
27 28
28 // Patch static call before return_address in given code to the new target. 29 // Patch static call before return_address in given code to the new target.
29 static void PatchStaticCallAt(uword return_address, 30 static void PatchStaticCallAt(uword return_address,
30 const Code& code, 31 const Code& code,
31 uword new_target_address); 32 uword new_target_address);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 ICData* ic_data); 64 ICData* ic_data);
64 65
65 // Return the arguments descriptor array of the closure call 66 // Return the arguments descriptor array of the closure call
66 // before the given return address. 67 // before the given return address.
67 static RawArray* GetClosureArgDescAt(uword return_address, 68 static RawArray* GetClosureArgDescAt(uword return_address,
68 const Code& code); 69 const Code& code);
69 70
70 static intptr_t InstanceCallSizeInBytes(); 71 static intptr_t InstanceCallSizeInBytes();
71 72
72 static void InsertCallAt(uword start, uword target); 73 static void InsertCallAt(uword start, uword target);
74
75 static RawObject* GetEdgeCounterAt(uword pc, const Code& code);
73 }; 76 };
74 77
75 } // namespace dart 78 } // namespace dart
76 79
77 #endif // VM_CODE_PATCHER_H_ 80 #endif // VM_CODE_PATCHER_H_
OLDNEW
« no previous file with comments | « runtime/vm/block_scheduler.cc ('k') | runtime/vm/code_patcher_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698