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_PROFILER_SERVICE_H_ | 5 #ifndef VM_PROFILER_SERVICE_H_ |
6 #define VM_PROFILER_SERVICE_H_ | 6 #define VM_PROFILER_SERVICE_H_ |
7 | 7 |
8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
9 #include "vm/code_observers.h" | 9 #include "vm/code_observers.h" |
10 #include "vm/globals.h" | 10 #include "vm/globals.h" |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 return (kind == kExclusiveCode) || (kind == kInclusiveCode); | 293 return (kind == kExclusiveCode) || (kind == kInclusiveCode); |
294 } | 294 } |
295 | 295 |
296 static bool IsFunctionTrie(TrieKind kind) { | 296 static bool IsFunctionTrie(TrieKind kind) { |
297 return !IsCodeTrie(kind); | 297 return !IsCodeTrie(kind); |
298 } | 298 } |
299 | 299 |
300 explicit Profile(Isolate* isolate); | 300 explicit Profile(Isolate* isolate); |
301 | 301 |
302 // Build a filtered model using |filter| with the specified |tag_order|. | 302 // Build a filtered model using |filter| with the specified |tag_order|. |
303 void Build(SampleFilter* filter, TagOrder tag_order, intptr_t extra_tags = 0); | 303 void Build(Thread* thread, |
| 304 SampleFilter* filter, TagOrder tag_order, intptr_t extra_tags = 0); |
304 | 305 |
305 // After building: | 306 // After building: |
306 int64_t min_time() const { return min_time_; } | 307 int64_t min_time() const { return min_time_; } |
307 int64_t max_time() const { return max_time_; } | 308 int64_t max_time() const { return max_time_; } |
308 int64_t GetTimeSpan() const { | 309 int64_t GetTimeSpan() const { |
309 return max_time() - min_time(); | 310 return max_time() - min_time(); |
310 } | 311 } |
311 intptr_t sample_count() const { return sample_count_; } | 312 intptr_t sample_count() const { return sample_count_; } |
312 | 313 |
313 ProfileFunction* GetFunction(intptr_t index); | 314 ProfileFunction* GetFunction(intptr_t index); |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 static void PrintJSONImpl(Thread* thread, | 391 static void PrintJSONImpl(Thread* thread, |
391 JSONStream* stream, | 392 JSONStream* stream, |
392 Profile::TagOrder tag_order, | 393 Profile::TagOrder tag_order, |
393 intptr_t extra_tags, | 394 intptr_t extra_tags, |
394 SampleFilter* filter); | 395 SampleFilter* filter); |
395 }; | 396 }; |
396 | 397 |
397 } // namespace dart | 398 } // namespace dart |
398 | 399 |
399 #endif // VM_PROFILER_SERVICE_H_ | 400 #endif // VM_PROFILER_SERVICE_H_ |
OLD | NEW |