| 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 "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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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->StatsAt(cid); |
| 59 } | 59 } |
| 60 | 60 |
| 61 static void DumpClassHeapStats(ClassHeapStats* stats) { | 61 static void DumpClassHeapStats(ClassHeapStats* stats) { |
| 62 printf("%" Pd " ", stats->recent.new_count); | 62 OS::Print("%" Pd " ", stats->recent.new_count); |
| 63 printf("%" Pd " ", stats->post_gc.new_count); | 63 OS::Print("%" Pd " ", stats->post_gc.new_count); |
| 64 printf("%" Pd " ", stats->pre_gc.new_count); | 64 OS::Print("%" Pd " ", stats->pre_gc.new_count); |
| 65 printf("\n"); | 65 OS::Print("\n"); |
| 66 } | 66 } |
| 67 }; | 67 }; |
| 68 | 68 |
| 69 | 69 |
| 70 static RawClass* GetClass(const Library& lib, const char* name) { | 70 static RawClass* GetClass(const Library& lib, const char* name) { |
| 71 const Class& cls = Class::Handle( | 71 const Class& cls = Class::Handle( |
| 72 lib.LookupClass(String::Handle(Symbols::New(name)))); | 72 lib.LookupClass(String::Handle(Symbols::New(name)))); |
| 73 EXPECT(!cls.IsNull()); // No ambiguity error expected. | 73 EXPECT(!cls.IsNull()); // No ambiguity error expected. |
| 74 return cls.raw(); | 74 return cls.raw(); |
| 75 } | 75 } |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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. |
| OLD | NEW |