| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 "vm/class_table.h" | 5 #include "vm/class_table.h" |
| 6 #include "vm/flags.h" | 6 #include "vm/flags.h" |
| 7 #include "vm/freelist.h" | 7 #include "vm/freelist.h" |
| 8 #include "vm/heap.h" | 8 #include "vm/heap.h" |
| 9 #include "vm/object.h" | 9 #include "vm/object.h" |
| 10 #include "vm/raw_object.h" | 10 #include "vm/raw_object.h" |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 | 326 |
| 327 | 327 |
| 328 void ClassTable::AllocationProfilePrintJSON(JSONStream* stream) { | 328 void ClassTable::AllocationProfilePrintJSON(JSONStream* stream) { |
| 329 Isolate* isolate = Isolate::Current(); | 329 Isolate* isolate = Isolate::Current(); |
| 330 ASSERT(isolate != NULL); | 330 ASSERT(isolate != NULL); |
| 331 Heap* heap = isolate->heap(); | 331 Heap* heap = isolate->heap(); |
| 332 ASSERT(heap != NULL); | 332 ASSERT(heap != NULL); |
| 333 JSONObject obj(stream); | 333 JSONObject obj(stream); |
| 334 obj.AddProperty("type", "AllocationProfile"); | 334 obj.AddProperty("type", "AllocationProfile"); |
| 335 obj.AddProperty("id", "allocationprofile"); | 335 obj.AddProperty("id", "allocationprofile"); |
| 336 obj.AddPropertyF( |
| 337 "dateLastAccumulatorReset", |
| 338 "%" Pd64 "", |
| 339 isolate->last_allocationprofile_accumulator_reset_timestamp()); |
| 340 obj.AddPropertyF( |
| 341 "dateLastServiceGC", |
| 342 "%" Pd64 "", |
| 343 isolate->last_allocationprofile_gc_timestamp()); |
| 344 |
| 336 { | 345 { |
| 337 JSONObject heaps(&obj, "heaps"); | 346 JSONObject heaps(&obj, "heaps"); |
| 338 { | 347 { |
| 339 heap->PrintToJSONObject(Heap::kNew, &heaps); | 348 heap->PrintToJSONObject(Heap::kNew, &heaps); |
| 340 } | 349 } |
| 341 { | 350 { |
| 342 heap->PrintToJSONObject(Heap::kOld, &heaps); | 351 heap->PrintToJSONObject(Heap::kOld, &heaps); |
| 343 } | 352 } |
| 344 } | 353 } |
| 345 { | 354 { |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 | 435 |
| 427 void ClassTable::UpdateLiveNew(intptr_t cid, intptr_t size) { | 436 void ClassTable::UpdateLiveNew(intptr_t cid, intptr_t size) { |
| 428 ClassHeapStats* stats = StatsAt(cid); | 437 ClassHeapStats* stats = StatsAt(cid); |
| 429 ASSERT(stats != NULL); | 438 ASSERT(stats != NULL); |
| 430 ASSERT(size >= 0); | 439 ASSERT(size >= 0); |
| 431 stats->post_gc.AddNew(size); | 440 stats->post_gc.AddNew(size); |
| 432 } | 441 } |
| 433 | 442 |
| 434 | 443 |
| 435 } // namespace dart | 444 } // namespace dart |
| OLD | NEW |