| OLD | NEW |
| 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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 TimelineDurationScope tds(thread, \ | 380 TimelineDurationScope tds(thread, \ |
| 381 Timeline::GetCompilerStream(), \ | 381 Timeline::GetCompilerStream(), \ |
| 382 name); \ | 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 |
| 391 #define TIMELINE_FUNCTION_GC_DURATION(thread, name) \ |
| 392 TimelineDurationScope tds(thread, Timeline::GetGCStream(), name); |
| 390 #else | 393 #else |
| 391 #define TIMELINE_FUNCTION_COMPILATION_DURATION(thread, name, function) | 394 #define TIMELINE_FUNCTION_COMPILATION_DURATION(thread, name, function) |
| 395 #define TIMELINE_FUNCTION_GC_DURATION(thread, name) |
| 392 #endif // !PRODUCT | 396 #endif // !PRODUCT |
| 393 | 397 |
| 394 // See |TimelineDurationScope| and |TimelineBeginEndScope|. | 398 // See |TimelineDurationScope| and |TimelineBeginEndScope|. |
| 395 class TimelineEventScope : public StackResource { | 399 class TimelineEventScope : public StackResource { |
| 396 public: | 400 public: |
| 397 bool enabled() const { | 401 bool enabled() const { |
| 398 return enabled_; | 402 return enabled_; |
| 399 } | 403 } |
| 400 | 404 |
| 401 void SetNumArguments(intptr_t length); | 405 void SetNumArguments(intptr_t length); |
| (...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 794 | 798 |
| 795 private: | 799 private: |
| 796 TimelineEventBlock* current_; | 800 TimelineEventBlock* current_; |
| 797 TimelineEventRecorder* recorder_; | 801 TimelineEventRecorder* recorder_; |
| 798 }; | 802 }; |
| 799 | 803 |
| 800 | 804 |
| 801 } // namespace dart | 805 } // namespace dart |
| 802 | 806 |
| 803 #endif // VM_TIMELINE_H_ | 807 #endif // VM_TIMELINE_H_ |
| OLD | NEW |