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

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

Issue 257053003: Always use the same json for null in the vm service. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: gen js Created 6 years, 7 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
« no previous file with comments | « runtime/vm/class_table.h ('k') | runtime/vm/coverage.h » ('j') | 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 #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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 void ClassTable::ResetCountersNew() { 318 void ClassTable::ResetCountersNew() {
319 for (intptr_t i = 0; i < kNumPredefinedCids; i++) { 319 for (intptr_t i = 0; i < kNumPredefinedCids; i++) {
320 predefined_class_heap_stats_table_[i].ResetAtNewGC(); 320 predefined_class_heap_stats_table_[i].ResetAtNewGC();
321 } 321 }
322 for (intptr_t i = kNumPredefinedCids; i < top_; i++) { 322 for (intptr_t i = kNumPredefinedCids; i < top_; i++) {
323 class_heap_stats_table_[i].ResetAtNewGC(); 323 class_heap_stats_table_[i].ResetAtNewGC();
324 } 324 }
325 } 325 }
326 326
327 327
328 void ClassTable::AllocationProfilePrintToJSONStream(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 { 336 {
337 JSONObject heaps(&obj, "heaps"); 337 JSONObject heaps(&obj, "heaps");
338 { 338 {
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 426
427 void ClassTable::UpdateLiveNew(intptr_t cid, intptr_t size) { 427 void ClassTable::UpdateLiveNew(intptr_t cid, intptr_t size) {
428 ClassHeapStats* stats = StatsAt(cid); 428 ClassHeapStats* stats = StatsAt(cid);
429 ASSERT(stats != NULL); 429 ASSERT(stats != NULL);
430 ASSERT(size >= 0); 430 ASSERT(size >= 0);
431 stats->post_gc.AddNew(size); 431 stats->post_gc.AddNew(size);
432 } 432 }
433 433
434 434
435 } // namespace dart 435 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/class_table.h ('k') | runtime/vm/coverage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698