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

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

Issue 345543003: Send allocation stats with each class and show in class view. (Closed) Base URL: http://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 "platform/globals.h" 5 #include "platform/globals.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "vm/dart_api_impl.h" 8 #include "vm/dart_api_impl.h"
9 #include "vm/globals.h" 9 #include "vm/globals.h"
10 #include "vm/heap.h" 10 #include "vm/heap.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 heap->CollectGarbage(Heap::kOld); 48 heap->CollectGarbage(Heap::kOld);
49 Dart_ExitScope(); 49 Dart_ExitScope();
50 heap->CollectGarbage(Heap::kOld); 50 heap->CollectGarbage(Heap::kOld);
51 } 51 }
52 52
53 53
54 class ClassHeapStatsTestHelper { 54 class ClassHeapStatsTestHelper {
55 public: 55 public:
56 static ClassHeapStats* GetHeapStatsForCid(ClassTable* class_table, 56 static ClassHeapStats* GetHeapStatsForCid(ClassTable* class_table,
57 intptr_t cid) { 57 intptr_t cid) {
58 return class_table->StatsAt(cid); 58 return class_table->PreliminaryStatsAt(cid);
59 } 59 }
60 60
61 static void DumpClassHeapStats(ClassHeapStats* stats) { 61 static void DumpClassHeapStats(ClassHeapStats* stats) {
62 OS::Print("%" Pd " ", stats->recent.new_count); 62 OS::Print("%" Pd " ", stats->recent.new_count);
63 OS::Print("%" Pd " ", stats->post_gc.new_count); 63 OS::Print("%" Pd " ", stats->post_gc.new_count);
64 OS::Print("%" Pd " ", stats->pre_gc.new_count); 64 OS::Print("%" Pd " ", stats->pre_gc.new_count);
65 OS::Print("\n"); 65 OS::Print("\n");
66 } 66 }
67 }; 67 };
68 68
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 } 202 }
203 } 203 }
204 { 204 {
205 NoGCScope no_gc; 205 NoGCScope no_gc;
206 FindNothing find_nothing; 206 FindNothing find_nothing;
207 EXPECT(Object::null() == heap->FindObject(&find_nothing)); 207 EXPECT(Object::null() == heap->FindObject(&find_nothing));
208 } 208 }
209 } 209 }
210 210
211 } // namespace dart. 211 } // namespace dart.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698