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

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

Issue 137483010: Add more timing information in the VM to track time spent is dart code Vs native code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 10 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
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 #ifndef VM_NATIVE_ENTRY_H_ 5 #ifndef VM_NATIVE_ENTRY_H_
6 #define VM_NATIVE_ENTRY_H_ 6 #define VM_NATIVE_ENTRY_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/code_generator.h" 10 #include "vm/code_generator.h"
(...skipping 22 matching lines...) Expand all
33 #else 33 #else
34 #define SET_NATIVE_RETVAL(arguments, value) \ 34 #define SET_NATIVE_RETVAL(arguments, value) \
35 arguments->SetReturnUnsafe(value); 35 arguments->SetReturnUnsafe(value);
36 #endif 36 #endif
37 37
38 #define DEFINE_NATIVE_ENTRY(name, argument_count) \ 38 #define DEFINE_NATIVE_ENTRY(name, argument_count) \
39 static RawObject* DN_Helper##name(Isolate* isolate, \ 39 static RawObject* DN_Helper##name(Isolate* isolate, \
40 NativeArguments* arguments); \ 40 NativeArguments* arguments); \
41 void NATIVE_ENTRY_FUNCTION(name)(Dart_NativeArguments args) { \ 41 void NATIVE_ENTRY_FUNCTION(name)(Dart_NativeArguments args) { \
42 CHECK_STACK_ALIGNMENT; \ 42 CHECK_STACK_ALIGNMENT; \
43 NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args); \
44 DartToVmTimerScope timer(arguments->isolate()); \
43 VERIFY_ON_TRANSITION; \ 45 VERIFY_ON_TRANSITION; \
44 NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args); \
45 ASSERT(arguments->NativeArgCount() == argument_count); \ 46 ASSERT(arguments->NativeArgCount() == argument_count); \
46 TRACE_NATIVE_CALL("%s", ""#name); \ 47 TRACE_NATIVE_CALL("%s", ""#name); \
47 { \ 48 { \
48 StackZone zone(arguments->isolate()); \ 49 StackZone zone(arguments->isolate()); \
49 SET_NATIVE_RETVAL(arguments, \ 50 SET_NATIVE_RETVAL(arguments, \
50 DN_Helper##name(arguments->isolate(), arguments)); \ 51 DN_Helper##name(arguments->isolate(), arguments)); \
51 DEOPTIMIZE_ALOT; \ 52 DEOPTIMIZE_ALOT; \
52 } \ 53 } \
53 VERIFY_ON_TRANSITION; \ 54 VERIFY_ON_TRANSITION; \
54 } \ 55 } \
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 int number_of_arguments, 97 int number_of_arguments,
97 bool* auto_setup_scope); 98 bool* auto_setup_scope);
98 static void NativeCallWrapper(Dart_NativeArguments args, 99 static void NativeCallWrapper(Dart_NativeArguments args,
99 Dart_NativeFunction func); 100 Dart_NativeFunction func);
100 static const ExternalLabel& NativeCallWrapperLabel(); 101 static const ExternalLabel& NativeCallWrapperLabel();
101 }; 102 };
102 103
103 } // namespace dart 104 } // namespace dart
104 105
105 #endif // VM_NATIVE_ENTRY_H_ 106 #endif // VM_NATIVE_ENTRY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698