| 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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 | 323 |
| 324 #define TIMELINE_FUNCTION_COMPILATION_DURATION(thread, suffix, function) \ | 324 #define TIMELINE_FUNCTION_COMPILATION_DURATION(thread, suffix, function) \ |
| 325 TimelineDurationScope tds(thread, \ | 325 TimelineDurationScope tds(thread, \ |
| 326 thread->isolate()->GetCompilerStream(), \ | 326 thread->isolate()->GetCompilerStream(), \ |
| 327 "Compile" suffix); \ | 327 "Compile" suffix); \ |
| 328 if (tds.enabled()) { \ | 328 if (tds.enabled()) { \ |
| 329 tds.SetNumArguments(1); \ | 329 tds.SetNumArguments(1); \ |
| 330 tds.CopyArgument( \ | 330 tds.CopyArgument( \ |
| 331 0, \ | 331 0, \ |
| 332 "function", \ | 332 "function", \ |
| 333 const_cast<char*>(function.ToLibNamePrefixedQualifiedCString())); \ | 333 function.ToLibNamePrefixedQualifiedCString()); \ |
| 334 } | 334 } |
| 335 | 335 |
| 336 | 336 |
| 337 // See |TimelineDurationScope| and |TimelineBeginEndScope|. | 337 // See |TimelineDurationScope| and |TimelineBeginEndScope|. |
| 338 class TimelineEventScope : public StackResource { | 338 class TimelineEventScope : public StackResource { |
| 339 public: | 339 public: |
| 340 bool enabled() const { | 340 bool enabled() const { |
| 341 return enabled_; | 341 return enabled_; |
| 342 } | 342 } |
| 343 | 343 |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 705 | 705 |
| 706 private: | 706 private: |
| 707 TimelineEventBlock* current_; | 707 TimelineEventBlock* current_; |
| 708 TimelineEventRecorder* recorder_; | 708 TimelineEventRecorder* recorder_; |
| 709 }; | 709 }; |
| 710 | 710 |
| 711 | 711 |
| 712 } // namespace dart | 712 } // namespace dart |
| 713 | 713 |
| 714 #endif // VM_TIMELINE_H_ | 714 #endif // VM_TIMELINE_H_ |
| OLD | NEW |