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

Side by Side Diff: runtime/vm/dart_api_impl.cc

Issue 1584003002: Re-enable Dart_Api Timeline tracing (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | runtime/vm/timeline.h » ('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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 "include/dart_api.h" 5 #include "include/dart_api.h"
6 #include "include/dart_mirrors_api.h" 6 #include "include/dart_mirrors_api.h"
7 #include "include/dart_native_api.h" 7 #include "include/dart_native_api.h"
8 8
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "vm/class_finalizer.h" 10 #include "vm/class_finalizer.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 70
71 71
72 const char* CanonicalFunction(const char* func) { 72 const char* CanonicalFunction(const char* func) {
73 if (strncmp(func, "dart::", 6) == 0) { 73 if (strncmp(func, "dart::", 6) == 0) {
74 return func + 6; 74 return func + 6;
75 } else { 75 } else {
76 return func; 76 return func;
77 } 77 }
78 } 78 }
79 79
80 #if 0
81 #define API_TIMELINE_DURATION \ 80 #define API_TIMELINE_DURATION \
82 TimelineDurationScope tds(Thread::Current(), \ 81 TimelineDurationScope tds(Thread::Current(), \
83 Timeline::GetVMApiStream(), \ 82 Timeline::GetVMApiStream(), \
84 CURRENT_FUNC) 83 CURRENT_FUNC)
85 84
86 #define API_TIMELINE_BEGIN_END \ 85 #define API_TIMELINE_BEGIN_END \
87 TimelineBeginEndScope tbes(Thread::Current(), \ 86 TimelineBeginEndScope tbes(Thread::Current(), \
88 Timeline::GetVMApiStream(), \ 87 Timeline::GetVMApiStream(), \
89 CURRENT_FUNC) 88 CURRENT_FUNC)
90 #else 89
91 #define API_TIMELINE_DURATION ASSERT(true)
92 #define API_TIMELINE_BEGIN_END ASSERT(true)
93 #endif
94 90
95 #if defined(DEBUG) 91 #if defined(DEBUG)
96 // An object visitor which will iterate over all the function objects in the 92 // An object visitor which will iterate over all the function objects in the
97 // heap and check if the result type and parameter types are canonicalized 93 // heap and check if the result type and parameter types are canonicalized
98 // or not. An assertion is raised if a type is not canonicalized. 94 // or not. An assertion is raised if a type is not canonicalized.
99 class FunctionVisitor : public ObjectVisitor { 95 class FunctionVisitor : public ObjectVisitor {
100 public: 96 public:
101 explicit FunctionVisitor(Thread* thread) : 97 explicit FunctionVisitor(Thread* thread) :
102 ObjectVisitor(thread->isolate()), 98 ObjectVisitor(thread->isolate()),
103 classHandle_(Class::Handle(thread->zone())), 99 classHandle_(Class::Handle(thread->zone())),
(...skipping 5874 matching lines...) Expand 10 before | Expand all | Expand 10 after
5978 return Api::Success(); 5974 return Api::Success();
5979 } 5975 }
5980 #endif // DART_PRECOMPILED 5976 #endif // DART_PRECOMPILED
5981 5977
5982 5978
5983 DART_EXPORT bool Dart_IsRunningPrecompiledCode() { 5979 DART_EXPORT bool Dart_IsRunningPrecompiledCode() {
5984 return Dart::IsRunningPrecompiledCode(); 5980 return Dart::IsRunningPrecompiledCode();
5985 } 5981 }
5986 5982
5987 } // namespace dart 5983 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/timeline.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698