| 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 // Some value smaller than the object ring, so requesting a large array | 7 // Some value smaller than the object ring, so requesting a large array |
| 8 // doesn't result in an expired ref because the elements lapped it in the | 8 // doesn't result in an expired ref because the elements lapped it in the |
| 9 // object ring. | 9 // object ring. |
| 10 const int kDefaultFieldLimit = 100; | 10 const int kDefaultFieldLimit = 100; |
| (...skipping 2468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2479 final AllocationCount accumulated = new AllocationCount(); | 2479 final AllocationCount accumulated = new AllocationCount(); |
| 2480 final AllocationCount current = new AllocationCount(); | 2480 final AllocationCount current = new AllocationCount(); |
| 2481 | 2481 |
| 2482 void update(List stats) { | 2482 void update(List stats) { |
| 2483 accumulated.instances = stats[ACCUMULATED]; | 2483 accumulated.instances = stats[ACCUMULATED]; |
| 2484 accumulated.bytes = stats[ACCUMULATED_SIZE]; | 2484 accumulated.bytes = stats[ACCUMULATED_SIZE]; |
| 2485 current.instances = stats[LIVE_AFTER_GC] + stats[ALLOCATED_SINCE_GC]; | 2485 current.instances = stats[LIVE_AFTER_GC] + stats[ALLOCATED_SINCE_GC]; |
| 2486 current.bytes = stats[LIVE_AFTER_GC_SIZE] + stats[ALLOCATED_SINCE_GC_SIZE]; | 2486 current.bytes = stats[LIVE_AFTER_GC_SIZE] + stats[ALLOCATED_SINCE_GC_SIZE]; |
| 2487 } | 2487 } |
| 2488 | 2488 |
| 2489 void combine(Iterable<Allocations> allocations) { |
| 2490 accumulated.instances = |
| 2491 allocations.fold(0, (v, a) => v + a.accumulated.instances); |
| 2492 accumulated.bytes = allocations.fold(0, (v, a) => v + a.accumulated.bytes); |
| 2493 current.instances = allocations.fold(0, (v, a) => v + a.current.instances); |
| 2494 current.bytes = allocations.fold(0, (v, a) => v + a.current.bytes); |
| 2495 } |
| 2496 |
| 2489 bool get empty => accumulated.empty && current.empty; | 2497 bool get empty => accumulated.empty && current.empty; |
| 2490 bool get notEmpty => accumulated.notEmpty || current.notEmpty; | 2498 bool get notEmpty => accumulated.notEmpty || current.notEmpty; |
| 2491 } | 2499 } |
| 2492 | 2500 |
| 2493 class Class extends HeapObject implements M.Class { | 2501 class Class extends HeapObject implements M.Class { |
| 2494 Library library; | 2502 Library library; |
| 2495 | 2503 |
| 2496 bool isAbstract; | 2504 bool isAbstract; |
| 2497 bool isConst; | 2505 bool isConst; |
| 2498 bool isFinalized; | 2506 bool isFinalized; |
| (...skipping 2203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4702 final String alias; | 4710 final String alias; |
| 4703 final String method; | 4711 final String method; |
| 4704 final String service; | 4712 final String service; |
| 4705 | 4713 |
| 4706 Service(this.alias, this.method, this.service) { | 4714 Service(this.alias, this.method, this.service) { |
| 4707 assert(this.alias != null); | 4715 assert(this.alias != null); |
| 4708 assert(this.method != null); | 4716 assert(this.method != null); |
| 4709 assert(this.service != null); | 4717 assert(this.service != null); |
| 4710 } | 4718 } |
| 4711 } | 4719 } |
| OLD | NEW |