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

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

Issue 342513004: Visual refresh of allocation profile page (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
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 #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
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->timestamp_last_allocationprofile_accumulator_reset());
340 obj.AddPropertyF(
341 "dateLastGC",
koda 2014/06/17 21:04:07 Consider renaming GC -> ServiceGC or something to
Cutch 2014/06/18 14:35:04 Done.
342 "%" Pd64 "",
343 isolate->timestamp_last_allocationprofile_gc());
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698