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

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

Issue 100103011: Changes to support dprof and Observatory profiler UIs (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 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/bin/vmservice/client/pubspec.yaml ('k') | runtime/vm/code_patcher.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
(...skipping 24 matching lines...) Expand all
35 static void PatchInstanceCallAt(uword return_address, 35 static void PatchInstanceCallAt(uword return_address,
36 const Code& code, 36 const Code& code,
37 uword new_target_address); 37 uword new_target_address);
38 38
39 // Patch entry point with a jump as specified in the code's patch region. 39 // Patch entry point with a jump as specified in the code's patch region.
40 static void PatchEntry(const Code& code); 40 static void PatchEntry(const Code& code);
41 41
42 // Restore entry point with original code (i.e., before patching). 42 // Restore entry point with original code (i.e., before patching).
43 static void RestoreEntry(const Code& code); 43 static void RestoreEntry(const Code& code);
44 44
45 // Has the entry been patched?
46 static bool IsEntryPatched(const Code& code);
47
45 // Returns true if the code can be patched with a jump at beginning (checks 48 // Returns true if the code can be patched with a jump at beginning (checks
46 // that there are no conflicts with object pointers). Used in ASSERTs. 49 // that there are no conflicts with object pointers). Used in ASSERTs.
47 static bool CodeIsPatchable(const Code& code); 50 static bool CodeIsPatchable(const Code& code);
48 51
49 // Return the target address of the static call before return_address 52 // Return the target address of the static call before return_address
50 // in given code. 53 // in given code.
51 static uword GetStaticCallTargetAt(uword return_address, const Code& code); 54 static uword GetStaticCallTargetAt(uword return_address, const Code& code);
52 55
53 // Get instance call information. Returns the call target and sets each 56 // Get instance call information. Returns the call target and sets each
54 // of the output parameters ic_data and arguments_descriptor if they are 57 // of the output parameters ic_data and arguments_descriptor if they are
(...skipping 16 matching lines...) Expand all
71 static intptr_t InstanceCallSizeInBytes(); 74 static intptr_t InstanceCallSizeInBytes();
72 75
73 static void InsertCallAt(uword start, uword target); 76 static void InsertCallAt(uword start, uword target);
74 77
75 static RawObject* GetEdgeCounterAt(uword pc, const Code& code); 78 static RawObject* GetEdgeCounterAt(uword pc, const Code& code);
76 }; 79 };
77 80
78 } // namespace dart 81 } // namespace dart
79 82
80 #endif // VM_CODE_PATCHER_H_ 83 #endif // VM_CODE_PATCHER_H_
OLDNEW
« no previous file with comments | « runtime/bin/vmservice/client/pubspec.yaml ('k') | runtime/vm/code_patcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698