| 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 #include <cstdlib> | 5 #include <cstdlib> |
| 6 | 6 |
| 7 #include "vm/atomic.h" | 7 #include "vm/atomic.h" |
| 8 #include "vm/isolate.h" | 8 #include "vm/isolate.h" |
| 9 #include "vm/json_stream.h" | 9 #include "vm/json_stream.h" |
| 10 #include "vm/lockers.h" | 10 #include "vm/lockers.h" |
| (...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1114 if (time_high_micros_ < micros) { | 1114 if (time_high_micros_ < micros) { |
| 1115 time_high_micros_ = micros; | 1115 time_high_micros_ = micros; |
| 1116 } | 1116 } |
| 1117 if (time_low_micros_ > micros) { | 1117 if (time_low_micros_ > micros) { |
| 1118 time_low_micros_ = micros; | 1118 time_low_micros_ = micros; |
| 1119 } | 1119 } |
| 1120 } | 1120 } |
| 1121 | 1121 |
| 1122 | 1122 |
| 1123 int64_t TimelineEventRecorder::TimeOriginMicros() const { | 1123 int64_t TimelineEventRecorder::TimeOriginMicros() const { |
| 1124 if (time_high_micros_ == 0) { |
| 1125 return 0; |
| 1126 } |
| 1124 return time_low_micros_; | 1127 return time_low_micros_; |
| 1125 } | 1128 } |
| 1126 | 1129 |
| 1127 | 1130 |
| 1128 int64_t TimelineEventRecorder::TimeExtentMicros() const { | 1131 int64_t TimelineEventRecorder::TimeExtentMicros() const { |
| 1132 if (time_high_micros_ == 0) { |
| 1133 return 0; |
| 1134 } |
| 1129 return time_high_micros_ - time_low_micros_; | 1135 return time_high_micros_ - time_low_micros_; |
| 1130 } | 1136 } |
| 1131 | 1137 |
| 1132 | 1138 |
| 1133 void TimelineEventRecorder::ThreadBlockCompleteEvent(TimelineEvent* event) { | 1139 void TimelineEventRecorder::ThreadBlockCompleteEvent(TimelineEvent* event) { |
| 1134 if (event == NULL) { | 1140 if (event == NULL) { |
| 1135 return; | 1141 return; |
| 1136 } | 1142 } |
| 1137 // Grab the current thread. | 1143 // Grab the current thread. |
| 1138 OSThread* thread = OSThread::Current(); | 1144 OSThread* thread = OSThread::Current(); |
| (...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1688 TimelineEventBlock* TimelineEventBlockIterator::Next() { | 1694 TimelineEventBlock* TimelineEventBlockIterator::Next() { |
| 1689 ASSERT(current_ != NULL); | 1695 ASSERT(current_ != NULL); |
| 1690 TimelineEventBlock* r = current_; | 1696 TimelineEventBlock* r = current_; |
| 1691 current_ = current_->next(); | 1697 current_ = current_->next(); |
| 1692 return r; | 1698 return r; |
| 1693 } | 1699 } |
| 1694 | 1700 |
| 1695 #endif // !PRODUCT | 1701 #endif // !PRODUCT |
| 1696 | 1702 |
| 1697 } // namespace dart | 1703 } // namespace dart |
| OLD | NEW |