| 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 #if !defined(TARGET_ARCH_ARM64) | |
| 7 | 6 |
| 8 #include "platform/assert.h" | 7 #include "platform/assert.h" |
| 9 #include "vm/dart_api_impl.h" | 8 #include "vm/dart_api_impl.h" |
| 10 #include "vm/globals.h" | 9 #include "vm/globals.h" |
| 11 #include "vm/heap.h" | 10 #include "vm/heap.h" |
| 12 #include "vm/unit_test.h" | 11 #include "vm/unit_test.h" |
| 13 | 12 |
| 14 namespace dart { | 13 namespace dart { |
| 15 | 14 |
| 16 TEST_CASE(OldGC) { | 15 TEST_CASE(OldGC) { |
| (...skipping 27 matching lines...) Expand all Loading... |
| 44 EXPECT_VALID(result); | 43 EXPECT_VALID(result); |
| 45 EXPECT(!Dart_IsNull(result)); | 44 EXPECT(!Dart_IsNull(result)); |
| 46 EXPECT(Dart_IsList(result)); | 45 EXPECT(Dart_IsList(result)); |
| 47 Isolate* isolate = Isolate::Current(); | 46 Isolate* isolate = Isolate::Current(); |
| 48 Heap* heap = isolate->heap(); | 47 Heap* heap = isolate->heap(); |
| 49 heap->CollectGarbage(Heap::kOld); | 48 heap->CollectGarbage(Heap::kOld); |
| 50 Dart_ExitScope(); | 49 Dart_ExitScope(); |
| 51 heap->CollectGarbage(Heap::kOld); | 50 heap->CollectGarbage(Heap::kOld); |
| 52 } | 51 } |
| 53 | 52 |
| 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 printf("%" Pd " ", stats->recent.new_count); |
| 63 printf("%" Pd " ", stats->post_gc.new_count); | 63 printf("%" Pd " ", stats->post_gc.new_count); |
| (...skipping 138 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. |
| 212 | |
| 213 #endif // !defined(TARGET_ARCH_ARM64) | |
| OLD | NEW |