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

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

Issue 1276903004: Add timeline stream control and trace retrieval to the dart embedder api. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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
« runtime/include/dart_tools_api.h ('K') | « runtime/vm/json_stream.cc ('k') | 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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_TIMELINE_H_ 5 #ifndef VM_TIMELINE_H_
6 #define VM_TIMELINE_H_ 6 #define VM_TIMELINE_H_
7 7
8 #include "vm/bitfield.h" 8 #include "vm/bitfield.h"
9 9
10 namespace dart { 10 namespace dart {
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 V(API, false) \ 176 V(API, false) \
177 V(Compiler, false) \ 177 V(Compiler, false) \
178 V(Embedder, false) \ 178 V(Embedder, false) \
179 V(GC, false) \ 179 V(GC, false) \
180 V(Isolate, false) \ 180 V(Isolate, false) \
181 181
182 182
183 #define TIMELINE_FUNCTION_COMPILATION_DURATION(isolate, suffix, function) \ 183 #define TIMELINE_FUNCTION_COMPILATION_DURATION(isolate, suffix, function) \
184 TimelineDurationScope tds(isolate, \ 184 TimelineDurationScope tds(isolate, \
185 isolate->GetCompilerStream(), \ 185 isolate->GetCompilerStream(), \
186 "Compile"#suffix); \ 186 "Compile" suffix); \
187 if (tds.enabled()) { \ 187 if (tds.enabled()) { \
188 tds.SetNumArguments(1); \ 188 tds.SetNumArguments(1); \
189 tds.CopyArgument( \ 189 tds.CopyArgument( \
190 0, \ 190 0, \
191 "function", \ 191 "function", \
192 const_cast<char*>(function.QualifiedUserVisibleNameCString())); \ 192 const_cast<char*>(function.QualifiedUserVisibleNameCString())); \
193 } 193 }
194 194
195 class TimelineDurationScope : public StackResource { 195 class TimelineDurationScope : public StackResource {
196 public: 196 public:
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 TimelineEventBlock* GetNewBlockLocked(); 404 TimelineEventBlock* GetNewBlockLocked();
405 void PrintJSONEvents(JSONArray* array) const; 405 void PrintJSONEvents(JSONArray* array) const;
406 406
407 Mutex lock_; 407 Mutex lock_;
408 TimelineEventBlock* head_; 408 TimelineEventBlock* head_;
409 }; 409 };
410 410
411 } // namespace dart 411 } // namespace dart
412 412
413 #endif // VM_TIMELINE_H_ 413 #endif // VM_TIMELINE_H_
OLDNEW
« runtime/include/dart_tools_api.h ('K') | « runtime/vm/json_stream.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698