Chromium Code Reviews| 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 | 6 |
| 7 #include "vm/atomic.h" | 7 #include "vm/atomic.h" |
| 8 #include "vm/flags.h" | 8 #include "vm/flags.h" |
| 9 #include "vm/freelist.h" | 9 #include "vm/freelist.h" |
| 10 #include "vm/growable_array.h" | 10 #include "vm/growable_array.h" |
| (...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 514 void ClassTable::AllocationProfilePrintJSON(JSONStream* stream) { | 514 void ClassTable::AllocationProfilePrintJSON(JSONStream* stream) { |
| 515 if (!FLAG_support_service) { | 515 if (!FLAG_support_service) { |
| 516 return; | 516 return; |
| 517 } | 517 } |
| 518 Isolate* isolate = Isolate::Current(); | 518 Isolate* isolate = Isolate::Current(); |
| 519 ASSERT(isolate != NULL); | 519 ASSERT(isolate != NULL); |
| 520 Heap* heap = isolate->heap(); | 520 Heap* heap = isolate->heap(); |
| 521 ASSERT(heap != NULL); | 521 ASSERT(heap != NULL); |
| 522 JSONObject obj(stream); | 522 JSONObject obj(stream); |
| 523 obj.AddProperty("type", "AllocationProfile"); | 523 obj.AddProperty("type", "AllocationProfile"); |
| 524 obj.AddPropertyF( | 524 if (isolate->last_allocationprofile_accumulator_reset_timestamp()) { |
|
Cutch
2016/08/17 17:35:10
the type of
isolate->last_allocationprofile_accum
cbernaschina
2016/08/17 17:55:52
Done.
| |
| 525 "dateLastAccumulatorReset", | 525 obj.AddPropertyF( |
| 526 "%" Pd64 "", | 526 "dateLastAccumulatorReset", |
| 527 isolate->last_allocationprofile_accumulator_reset_timestamp()); | 527 "%" Pd64 "", |
| 528 obj.AddPropertyF( | 528 isolate->last_allocationprofile_accumulator_reset_timestamp()); |
| 529 "dateLastServiceGC", | 529 } |
| 530 "%" Pd64 "", | 530 if (isolate->last_allocationprofile_gc_timestamp()) { |
|
Cutch
2016/08/17 17:35:10
ditto
cbernaschina
2016/08/17 17:55:52
Done.
| |
| 531 isolate->last_allocationprofile_gc_timestamp()); | 531 obj.AddPropertyF( |
| 532 "dateLastServiceGC", | |
| 533 "%" Pd64 "", | |
| 534 isolate->last_allocationprofile_gc_timestamp()); | |
| 535 } | |
| 532 | 536 |
| 533 { | 537 { |
| 534 JSONObject heaps(&obj, "heaps"); | 538 JSONObject heaps(&obj, "heaps"); |
| 535 { | 539 { |
| 536 heap->PrintToJSONObject(Heap::kNew, &heaps); | 540 heap->PrintToJSONObject(Heap::kNew, &heaps); |
| 537 } | 541 } |
| 538 { | 542 { |
| 539 heap->PrintToJSONObject(Heap::kOld, &heaps); | 543 heap->PrintToJSONObject(Heap::kOld, &heaps); |
| 540 } | 544 } |
| 541 } | 545 } |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 576 void ClassTable::UpdateLiveNew(intptr_t cid, intptr_t size) { | 580 void ClassTable::UpdateLiveNew(intptr_t cid, intptr_t size) { |
| 577 ClassHeapStats* stats = PreliminaryStatsAt(cid); | 581 ClassHeapStats* stats = PreliminaryStatsAt(cid); |
| 578 ASSERT(stats != NULL); | 582 ASSERT(stats != NULL); |
| 579 ASSERT(size >= 0); | 583 ASSERT(size >= 0); |
| 580 stats->post_gc.AddNew(size); | 584 stats->post_gc.AddNew(size); |
| 581 } | 585 } |
| 582 #endif // !PRODUCT | 586 #endif // !PRODUCT |
| 583 | 587 |
| 584 | 588 |
| 585 } // namespace dart | 589 } // namespace dart |
| OLD | NEW |