Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(373)

Side by Side Diff: runtime/vm/class_table.cc

Issue 2255613002: Converted Observatory heap-profile element (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Avoid to send dateLastServiceGC & dateLastAccumulatorReset if never happened Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/observatory/tests/observatory_ui/mocks/repositories/allocation_profile.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « runtime/observatory/tests/observatory_ui/mocks/repositories/allocation_profile.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698