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

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

Issue 1814813003: Collect samples for background threads. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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 | « runtime/vm/profiler_service.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 "include/dart_tools_api.h" 8 #include "include/dart_tools_api.h"
9 9
10 #include "vm/allocation.h" 10 #include "vm/allocation.h"
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 // the first event. 369 // the first event.
370 TimelineEvent* StartEvent(); 370 TimelineEvent* StartEvent();
371 371
372 private: 372 private:
373 const char* name_; 373 const char* name_;
374 bool enabled_; 374 bool enabled_;
375 const bool* globally_enabled_; 375 const bool* globally_enabled_;
376 }; 376 };
377 377
378 #ifndef PRODUCT 378 #ifndef PRODUCT
379 #define TIMELINE_FUNCTION_COMPILATION_DURATION(thread, suffix, function) \ 379 #define TIMELINE_FUNCTION_COMPILATION_DURATION(thread, name, function) \
380 TimelineDurationScope tds(thread, \ 380 TimelineDurationScope tds(thread, \
381 Timeline::GetCompilerStream(), \ 381 Timeline::GetCompilerStream(), \
382 "Compile" suffix); \ 382 name); \
383 if (tds.enabled()) { \ 383 if (tds.enabled()) { \
384 tds.SetNumArguments(1); \ 384 tds.SetNumArguments(1); \
385 tds.CopyArgument( \ 385 tds.CopyArgument( \
386 0, \ 386 0, \
387 "function", \ 387 "function", \
388 function.ToLibNamePrefixedQualifiedCString()); \ 388 function.ToLibNamePrefixedQualifiedCString()); \
389 } 389 }
390 #else 390 #else
391 #define TIMELINE_FUNCTION_COMPILATION_DURATION(thread, suffix, function) 391 #define TIMELINE_FUNCTION_COMPILATION_DURATION(thread, name, function)
392 #endif // !PRODUCT 392 #endif // !PRODUCT
393 393
394 // See |TimelineDurationScope| and |TimelineBeginEndScope|. 394 // See |TimelineDurationScope| and |TimelineBeginEndScope|.
395 class TimelineEventScope : public StackResource { 395 class TimelineEventScope : public StackResource {
396 public: 396 public:
397 bool enabled() const { 397 bool enabled() const {
398 return enabled_; 398 return enabled_;
399 } 399 }
400 400
401 void SetNumArguments(intptr_t length); 401 void SetNumArguments(intptr_t length);
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
794 794
795 private: 795 private:
796 TimelineEventBlock* current_; 796 TimelineEventBlock* current_;
797 TimelineEventRecorder* recorder_; 797 TimelineEventRecorder* recorder_;
798 }; 798 };
799 799
800 800
801 } // namespace dart 801 } // namespace dart
802 802
803 #endif // VM_TIMELINE_H_ 803 #endif // VM_TIMELINE_H_
OLDNEW
« no previous file with comments | « runtime/vm/profiler_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698