| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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/utils.h" | 5 #include "platform/utils.h" |
| 6 | 6 |
| 7 #include "vm/allocation.h" | 7 #include "vm/allocation.h" |
| 8 #include "vm/atomic.h" | 8 #include "vm/atomic.h" |
| 9 #include "vm/code_patcher.h" | 9 #include "vm/code_patcher.h" |
| 10 #include "vm/isolate.h" | 10 #include "vm/isolate.h" |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 ThreadInterrupter::Unregister(); | 166 ThreadInterrupter::Unregister(); |
| 167 } | 167 } |
| 168 | 168 |
| 169 | 169 |
| 170 class ScopeStopwatch : public ValueObject { | 170 class ScopeStopwatch : public ValueObject { |
| 171 public: | 171 public: |
| 172 explicit ScopeStopwatch(const char* name) : name_(name) { | 172 explicit ScopeStopwatch(const char* name) : name_(name) { |
| 173 start_ = FLAG_trace_profiled_isolates ? OS::GetCurrentTimeMillis() : 0; | 173 start_ = FLAG_trace_profiled_isolates ? OS::GetCurrentTimeMillis() : 0; |
| 174 } | 174 } |
| 175 | 175 |
| 176 intptr_t GetElapsed() const { | 176 int64_t GetElapsed() const { |
| 177 intptr_t end = OS::GetCurrentTimeMillis(); | 177 int64_t end = OS::GetCurrentTimeMillis(); |
| 178 ASSERT(end >= start_); | 178 ASSERT(end >= start_); |
| 179 return end - start_; | 179 return end - start_; |
| 180 } | 180 } |
| 181 | 181 |
| 182 ~ScopeStopwatch() { | 182 ~ScopeStopwatch() { |
| 183 if (FLAG_trace_profiled_isolates) { | 183 if (FLAG_trace_profiled_isolates) { |
| 184 intptr_t elapsed = GetElapsed(); | 184 int64_t elapsed = GetElapsed(); |
| 185 OS::Print("%s took %" Pd " millis.\n", name_, elapsed); | 185 OS::Print("%s took %" Pd64 " millis.\n", name_, elapsed); |
| 186 } | 186 } |
| 187 } | 187 } |
| 188 | 188 |
| 189 private: | 189 private: |
| 190 const char* name_; | 190 const char* name_; |
| 191 intptr_t start_; | 191 int64_t start_; |
| 192 }; | 192 }; |
| 193 | 193 |
| 194 | 194 |
| 195 struct AddressEntry { | 195 struct AddressEntry { |
| 196 uword pc; | 196 uword pc; |
| 197 intptr_t exclusive_ticks; | 197 intptr_t exclusive_ticks; |
| 198 intptr_t inclusive_ticks; | 198 intptr_t inclusive_ticks; |
| 199 | 199 |
| 200 void tick(bool exclusive) { | 200 void tick(bool exclusive) { |
| 201 if (exclusive) { | 201 if (exclusive) { |
| (...skipping 1876 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2078 stack_upper, | 2078 stack_upper, |
| 2079 state.pc, | 2079 state.pc, |
| 2080 state.fp, | 2080 state.fp, |
| 2081 state.sp); | 2081 state.sp); |
| 2082 stackWalker.walk(); | 2082 stackWalker.walk(); |
| 2083 } | 2083 } |
| 2084 } | 2084 } |
| 2085 } | 2085 } |
| 2086 | 2086 |
| 2087 } // namespace dart | 2087 } // namespace dart |
| OLD | NEW |