OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef HEAP_HEAP_TESTER_H_ | 5 #ifndef HEAP_HEAP_TESTER_H_ |
6 #define HEAP_HEAP_TESTER_H_ | 6 #define HEAP_HEAP_TESTER_H_ |
7 | 7 |
8 #include "src/handles.h" | 8 #include "src/handles.h" |
9 #include "src/heap/spaces.h" | 9 #include "src/heap/spaces.h" |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... |
27 V(ResetWeakHandle) \ | 27 V(ResetWeakHandle) \ |
28 V(StressHandles) \ | 28 V(StressHandles) \ |
29 V(TestMemoryReducerSampleJsCalls) \ | 29 V(TestMemoryReducerSampleJsCalls) \ |
30 V(TestSizeOfObjects) \ | 30 V(TestSizeOfObjects) \ |
31 V(Regress587004) \ | 31 V(Regress587004) \ |
32 V(Regress589413) \ | 32 V(Regress589413) \ |
33 V(WriteBarriersInCopyJSObject) | 33 V(WriteBarriersInCopyJSObject) |
34 | 34 |
35 #define HEAP_TEST(Name) \ | 35 #define HEAP_TEST(Name) \ |
36 CcTest register_test_##Name(v8::internal::HeapTester::Test##Name, __FILE__, \ | 36 CcTest register_test_##Name(v8::internal::HeapTester::Test##Name, __FILE__, \ |
37 #Name, NULL, true, true); \ | 37 #Name, true, true); \ |
38 void v8::internal::HeapTester::Test##Name() | 38 void v8::internal::HeapTester::Test##Name() |
39 | 39 |
40 | |
41 #define THREADED_HEAP_TEST(Name) \ | 40 #define THREADED_HEAP_TEST(Name) \ |
42 RegisterThreadedTest register_##Name(v8::internal::HeapTester::Test##Name, \ | 41 RegisterThreadedTest register_##Name(v8::internal::HeapTester::Test##Name, \ |
43 #Name); \ | 42 #Name); \ |
44 /* */ HEAP_TEST(Name) | 43 /* */ HEAP_TEST(Name) |
45 | 44 |
46 | 45 |
47 namespace v8 { | 46 namespace v8 { |
48 namespace internal { | 47 namespace internal { |
49 | 48 |
50 class HeapTester { | 49 class HeapTester { |
51 public: | 50 public: |
52 #define DECLARE_STATIC(Name) static void Test##Name(); | 51 #define DECLARE_STATIC(Name) static void Test##Name(); |
53 | 52 |
54 HEAP_TEST_METHODS(DECLARE_STATIC) | 53 HEAP_TEST_METHODS(DECLARE_STATIC) |
55 #undef HEAP_TEST_METHODS | 54 #undef HEAP_TEST_METHODS |
56 | 55 |
57 /* test-alloc.cc */ | 56 /* test-alloc.cc */ |
58 static AllocationResult AllocateAfterFailures(); | 57 static AllocationResult AllocateAfterFailures(); |
59 static Handle<Object> TestAllocateAfterFailures(); | 58 static Handle<Object> TestAllocateAfterFailures(); |
60 | 59 |
61 /* test-api.cc */ | 60 /* test-api.cc */ |
62 static void ResetWeakHandle(bool global_gc); | 61 static void ResetWeakHandle(bool global_gc); |
63 }; | 62 }; |
64 | 63 |
65 } // namespace internal | 64 } // namespace internal |
66 } // namespace v8 | 65 } // namespace v8 |
67 | 66 |
68 #endif // HEAP_HEAP_TESTER_H_ | 67 #endif // HEAP_HEAP_TESTER_H_ |
OLD | NEW |