| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 #include "platform/globals.h" | 5 #include "platform/globals.h" |
| 6 #if defined(HOST_OS_MACOS) && !defined(PRODUCT) | 6 #if defined(HOST_OS_MACOS) && !defined(PRODUCT) |
| 7 | 7 |
| 8 #include "vm/timeline.h" | 8 #include "vm/timeline.h" |
| 9 | 9 |
| 10 namespace dart { | 10 namespace dart { |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 const char* TimelineEventPlatformRecorder::name() const { | 26 const char* TimelineEventPlatformRecorder::name() const { |
| 27 return "Systrace"; | 27 return "Systrace"; |
| 28 } | 28 } |
| 29 | 29 |
| 30 TimelineEventBlock* TimelineEventPlatformRecorder::GetNewBlockLocked() { | 30 TimelineEventBlock* TimelineEventPlatformRecorder::GetNewBlockLocked() { |
| 31 // TODO(johnmccutchan): This function should only hand out blocks | 31 // TODO(johnmccutchan): This function should only hand out blocks |
| 32 // which have been marked as finished. | 32 // which have been marked as finished. |
| 33 if (block_cursor_ == num_blocks_) { | 33 if (block_cursor_ == num_blocks_) { |
| 34 block_cursor_ = 0; | 34 block_cursor_ = 0; |
| 35 } | 35 } |
| 36 TimelineEventBlock* block = blocks_[block_cursor_++]; | 36 TimelineEventBlock* block = &blocks_[block_cursor_++]; |
| 37 block->Reset(); | 37 block->Reset(); |
| 38 block->Open(); | 38 block->Open(); |
| 39 return block; | 39 return block; |
| 40 } | 40 } |
| 41 | 41 |
| 42 void TimelineEventPlatformRecorder::CompleteEvent(TimelineEvent* event) { | 42 void TimelineEventPlatformRecorder::CompleteEvent(TimelineEvent* event) { |
| 43 if (event == NULL) { | 43 if (event == NULL) { |
| 44 return; | 44 return; |
| 45 } | 45 } |
| 46 ThreadBlockCompleteEvent(event); | 46 ThreadBlockCompleteEvent(event); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 const char* category, | 78 const char* category, |
| 79 const char* name, | 79 const char* name, |
| 80 const char* args) { | 80 const char* args) { |
| 81 DartCommonTimelineEventHelpers::ReportInstantEvent(thread, zone, event, start, | 81 DartCommonTimelineEventHelpers::ReportInstantEvent(thread, zone, event, start, |
| 82 category, name, args); | 82 category, name, args); |
| 83 } | 83 } |
| 84 | 84 |
| 85 } // namespace dart | 85 } // namespace dart |
| 86 | 86 |
| 87 #endif // defined(HOST_OS_MACOS) && !defined(PRODUCT) | 87 #endif // defined(HOST_OS_MACOS) && !defined(PRODUCT) |
| OLD | NEW |