| 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 RUNTIME_VM_TIMELINE_H_ | 5 #ifndef RUNTIME_VM_TIMELINE_H_ |
| 6 #define RUNTIME_VM_TIMELINE_H_ | 6 #define RUNTIME_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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 | 311 |
| 312 const char* GetSerializedJSON() const; | 312 const char* GetSerializedJSON() const; |
| 313 | 313 |
| 314 void set_owns_label(bool owns_label) { | 314 void set_owns_label(bool owns_label) { |
| 315 state_ = OwnsLabelBit::update(owns_label, state_); | 315 state_ = OwnsLabelBit::update(owns_label, state_); |
| 316 } | 316 } |
| 317 | 317 |
| 318 // Returns the number of bytes written into |buffer|. | 318 // Returns the number of bytes written into |buffer|. |
| 319 intptr_t PrintSystrace(char* buffer, intptr_t buffer_size); | 319 intptr_t PrintSystrace(char* buffer, intptr_t buffer_size); |
| 320 | 320 |
| 321 #if defined(HOST_OS_FUCHSIA) |
| 322 void EmitFuchsiaEvent(); |
| 323 #endif |
| 324 |
| 321 private: | 325 private: |
| 322 void FreeArguments(); | 326 void FreeArguments(); |
| 323 | 327 |
| 324 void StreamInit(TimelineStream* stream); | 328 void StreamInit(TimelineStream* stream); |
| 325 void Init(EventType event_type, const char* label); | 329 void Init(EventType event_type, const char* label); |
| 326 | 330 |
| 327 void set_event_type(EventType event_type) { | 331 void set_event_type(EventType event_type) { |
| 328 // We only reserve 4 bits to hold the event type. | 332 // We only reserve 4 bits to hold the event type. |
| 329 COMPILE_ASSERT(kNumEventTypes < 16); | 333 COMPILE_ASSERT(kNumEventTypes < 16); |
| 330 state_ = EventTypeField::update(event_type, state_); | 334 state_ = EventTypeField::update(event_type, state_); |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 TimelineEventScope(TimelineStream* stream, const char* label); | 430 TimelineEventScope(TimelineStream* stream, const char* label); |
| 427 | 431 |
| 428 TimelineEventScope(Thread* thread, TimelineStream* stream, const char* label); | 432 TimelineEventScope(Thread* thread, TimelineStream* stream, const char* label); |
| 429 | 433 |
| 430 bool ShouldEmitEvent() const { return enabled_; } | 434 bool ShouldEmitEvent() const { return enabled_; } |
| 431 | 435 |
| 432 void set_enabled(bool enabled) { enabled_ = enabled; } | 436 void set_enabled(bool enabled) { enabled_ = enabled; } |
| 433 | 437 |
| 434 const char* label() const { return label_; } | 438 const char* label() const { return label_; } |
| 435 | 439 |
| 440 TimelineEventArgument* arguments() const { return arguments_; } |
| 441 |
| 442 intptr_t arguments_length() const { return arguments_length_; } |
| 443 |
| 436 TimelineStream* stream() const { return stream_; } | 444 TimelineStream* stream() const { return stream_; } |
| 437 | 445 |
| 438 virtual ~TimelineEventScope(); | 446 virtual ~TimelineEventScope(); |
| 439 | 447 |
| 440 void StealArguments(TimelineEvent* event); | 448 void StealArguments(TimelineEvent* event); |
| 441 | 449 |
| 442 private: | 450 private: |
| 443 void Init(); | 451 void Init(); |
| 444 void FreeArguments(); | 452 void FreeArguments(); |
| 445 | 453 |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 820 | 828 |
| 821 private: | 829 private: |
| 822 TimelineEventBlock* current_; | 830 TimelineEventBlock* current_; |
| 823 TimelineEventRecorder* recorder_; | 831 TimelineEventRecorder* recorder_; |
| 824 }; | 832 }; |
| 825 | 833 |
| 826 | 834 |
| 827 } // namespace dart | 835 } // namespace dart |
| 828 | 836 |
| 829 #endif // RUNTIME_VM_TIMELINE_H_ | 837 #endif // RUNTIME_VM_TIMELINE_H_ |
| OLD | NEW |