| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 part of service; | 5 part of service; |
| 6 | 6 |
| 7 /// State for a running isolate. | 7 /// State for a running isolate. |
| 8 class Isolate extends ServiceObject { | 8 class Isolate extends ServiceObject { |
| 9 final VM vm; | 9 final VM vm; |
| 10 String get link => _id; | 10 String get link => _id; |
| (...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 | 397 |
| 398 @reflectable String formattedInclusive(Code code) { | 398 @reflectable String formattedInclusive(Code code) { |
| 399 if (code == null) { | 399 if (code == null) { |
| 400 return ''; | 400 return ''; |
| 401 } | 401 } |
| 402 var tick = code.addressTicks[address]; | 402 var tick = code.addressTicks[address]; |
| 403 if (tick == null) { | 403 if (tick == null) { |
| 404 return ''; | 404 return ''; |
| 405 } | 405 } |
| 406 var pcent = formatPercent(tick.inclusiveTicks, code.totalSamplesInProfile); | 406 var pcent = formatPercent(tick.inclusiveTicks, code.totalSamplesInProfile); |
| 407 return '${tick.inclusiveTicks} ($pcent)'; | 407 return '$pcent (${tick.inclusiveTicks})'; |
| 408 } | 408 } |
| 409 | 409 |
| 410 @reflectable String formattedExclusive(Code code) { | 410 @reflectable String formattedExclusive(Code code) { |
| 411 if (code == null) { | 411 if (code == null) { |
| 412 return ''; | 412 return ''; |
| 413 } | 413 } |
| 414 var tick = code.addressTicks[address]; | 414 var tick = code.addressTicks[address]; |
| 415 if (tick == null) { | 415 if (tick == null) { |
| 416 return ''; | 416 return ''; |
| 417 } | 417 } |
| 418 var pcent = formatPercent(tick.exclusiveTicks, code.totalSamplesInProfile); | 418 var pcent = formatPercent(tick.exclusiveTicks, code.totalSamplesInProfile); |
| 419 return '${tick.exclusiveTicks} ($pcent)'; | 419 return '$pcent (${tick.exclusiveTicks})'; |
| 420 } | 420 } |
| 421 } | 421 } |
| 422 | 422 |
| 423 class CodeKind { | 423 class CodeKind { |
| 424 final _value; | 424 final _value; |
| 425 const CodeKind._internal(this._value); | 425 const CodeKind._internal(this._value); |
| 426 String toString() => 'CodeKind.$_value'; | 426 String toString() => 'CodeKind.$_value'; |
| 427 | 427 |
| 428 static CodeKind fromString(String s) { | 428 static CodeKind fromString(String s) { |
| 429 if (s == 'Native') { | 429 if (s == 'Native') { |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 579 | 579 |
| 580 int _callCount(List<CodeCallCount> calls, Code code) { | 580 int _callCount(List<CodeCallCount> calls, Code code) { |
| 581 for (CodeCallCount caller in calls) { | 581 for (CodeCallCount caller in calls) { |
| 582 if (caller.code == code) { | 582 if (caller.code == code) { |
| 583 return caller.count; | 583 return caller.count; |
| 584 } | 584 } |
| 585 } | 585 } |
| 586 return 0; | 586 return 0; |
| 587 } | 587 } |
| 588 } | 588 } |
| OLD | NEW |