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

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

Issue 27226002: Add back native tracing to optimized code. Tracing natives is an important part of perfromance anal… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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 | « no previous file | no next file » | 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 4
5 #ifndef VM_NATIVE_ARGUMENTS_H_ 5 #ifndef VM_NATIVE_ARGUMENTS_H_
6 #define VM_NATIVE_ARGUMENTS_H_ 6 #define VM_NATIVE_ARGUMENTS_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/globals.h" 9 #include "vm/globals.h"
10 #include "vm/handles_impl.h" 10 #include "vm/handles_impl.h"
(...skipping 30 matching lines...) Expand all
41 uword current_sp = func(); \ 41 uword current_sp = func(); \
42 ASSERT(Utils::IsAligned(current_sp, OS::ActivationFrameAlignment())); \ 42 ASSERT(Utils::IsAligned(current_sp, OS::ActivationFrameAlignment())); \
43 } 43 }
44 #endif 44 #endif
45 45
46 #define VERIFY_ON_TRANSITION \ 46 #define VERIFY_ON_TRANSITION \
47 if (FLAG_verify_on_transition) { \ 47 if (FLAG_verify_on_transition) { \
48 VerifyPointersVisitor::VerifyPointers(); \ 48 VerifyPointersVisitor::VerifyPointers(); \
49 Isolate::Current()->heap()->Verify(); \ 49 Isolate::Current()->heap()->Verify(); \
50 } 50 }
51 #define TRACE_NATIVE_CALL(format, name) \
52 if (FLAG_trace_natives) { \
53 OS::Print("Calling native: " format "\n", name); \
54 }
55 #define DEOPTIMIZE_ALOT \ 51 #define DEOPTIMIZE_ALOT \
56 if (FLAG_deoptimize_alot) { \ 52 if (FLAG_deoptimize_alot) { \
57 DeoptimizeAll(); \ 53 DeoptimizeAll(); \
58 } 54 }
59 55
60 #else 56 #else
61 57
62 #define CHECK_STACK_ALIGNMENT { } 58 #define CHECK_STACK_ALIGNMENT { }
63 #define VERIFY_ON_TRANSITION { } 59 #define VERIFY_ON_TRANSITION { }
64 #define TRACE_NATIVE_CALL(format, name) { }
65 #define DEOPTIMIZE_ALOT { } 60 #define DEOPTIMIZE_ALOT { }
66 61
67 #endif 62 #endif
68 63
64 #define TRACE_NATIVE_CALL(format, name) \
65 if (FLAG_trace_natives) { \
66 OS::Print("Calling native: " format "\n", name); \
67 }
68
69 69
70 // Class NativeArguments is used to access arguments passed in from 70 // Class NativeArguments is used to access arguments passed in from
71 // generated dart code to a runtime function or a dart library native 71 // generated dart code to a runtime function or a dart library native
72 // function. It is also used to set the return value if any at the slot 72 // function. It is also used to set the return value if any at the slot
73 // reserved for return values. 73 // reserved for return values.
74 // All runtime function/dart library native functions have the 74 // All runtime function/dart library native functions have the
75 // following signature: 75 // following signature:
76 // void function_name(NativeArguments arguments); 76 // void function_name(NativeArguments arguments);
77 // Inside the function, arguments are accessed as follows: 77 // Inside the function, arguments are accessed as follows:
78 // const Instance& arg0 = Instance::CheckedHandle(arguments.ArgAt(0)); 78 // const Instance& arg0 = Instance::CheckedHandle(arguments.ArgAt(0));
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 208
209 Isolate* isolate_; // Current isolate pointer. 209 Isolate* isolate_; // Current isolate pointer.
210 int argc_tag_; // Encodes argument count and invoked native call type. 210 int argc_tag_; // Encodes argument count and invoked native call type.
211 RawObject*(*argv_)[]; // Pointer to an array of arguments to runtime call. 211 RawObject*(*argv_)[]; // Pointer to an array of arguments to runtime call.
212 RawObject** retval_; // Pointer to the return value area. 212 RawObject** retval_; // Pointer to the return value area.
213 }; 213 };
214 214
215 } // namespace dart 215 } // namespace dart
216 216
217 #endif // VM_NATIVE_ARGUMENTS_H_ 217 #endif // VM_NATIVE_ARGUMENTS_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698