| 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 "vm/allocation.h" | 8 #include "vm/allocation.h" |
| 9 #include "vm/bitfield.h" | 9 #include "vm/bitfield.h" |
| 10 #include "vm/os.h" | 10 #include "vm/os.h" |
| (...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 thread->isolate()->GetCompilerStream(), \ | 355 thread->isolate()->GetCompilerStream(), \ |
| 356 "Compile" suffix); \ | 356 "Compile" suffix); \ |
| 357 if (tds.enabled()) { \ | 357 if (tds.enabled()) { \ |
| 358 tds.SetNumArguments(1); \ | 358 tds.SetNumArguments(1); \ |
| 359 tds.CopyArgument( \ | 359 tds.CopyArgument( \ |
| 360 0, \ | 360 0, \ |
| 361 "function", \ | 361 "function", \ |
| 362 function.ToLibNamePrefixedQualifiedCString()); \ | 362 function.ToLibNamePrefixedQualifiedCString()); \ |
| 363 } | 363 } |
| 364 #else | 364 #else |
| 365 #define TIMELINE_FUNCTION_COMPILATION_DURATION(thread, suffix, function) \ | 365 #define TIMELINE_FUNCTION_COMPILATION_DURATION(thread, suffix, function) |
| 366 do { } while (false); | |
| 367 #endif // !PRODUCT | 366 #endif // !PRODUCT |
| 368 | 367 |
| 369 // See |TimelineDurationScope| and |TimelineBeginEndScope|. | 368 // See |TimelineDurationScope| and |TimelineBeginEndScope|. |
| 370 class TimelineEventScope : public StackResource { | 369 class TimelineEventScope : public StackResource { |
| 371 public: | 370 public: |
| 372 bool enabled() const { | 371 bool enabled() const { |
| 373 return enabled_; | 372 return enabled_; |
| 374 } | 373 } |
| 375 | 374 |
| 376 void SetNumArguments(intptr_t length); | 375 void SetNumArguments(intptr_t length); |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 765 | 764 |
| 766 private: | 765 private: |
| 767 TimelineEventBlock* current_; | 766 TimelineEventBlock* current_; |
| 768 TimelineEventRecorder* recorder_; | 767 TimelineEventRecorder* recorder_; |
| 769 }; | 768 }; |
| 770 | 769 |
| 771 | 770 |
| 772 } // namespace dart | 771 } // namespace dart |
| 773 | 772 |
| 774 #endif // VM_TIMELINE_H_ | 773 #endif // VM_TIMELINE_H_ |
| OLD | NEW |