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 // TODO(jochen): Remove this after the setting is turned on globally. | 5 // TODO(jochen): Remove this after the setting is turned on globally. |
6 #define V8_IMMINENT_DEPRECATION_WARNINGS | 6 #define V8_IMMINENT_DEPRECATION_WARNINGS |
7 | 7 |
8 #include <stdlib.h> | 8 #include <stdlib.h> |
9 | 9 |
10 #ifdef __linux__ | 10 #ifdef __linux__ |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 | 79 |
80 bool PendingDelayedTask() { return delayed_task_ != nullptr; } | 80 bool PendingDelayedTask() { return delayed_task_ != nullptr; } |
81 | 81 |
82 void PerformDelayedTask() { | 82 void PerformDelayedTask() { |
83 Task* task = delayed_task_; | 83 Task* task = delayed_task_; |
84 delayed_task_ = nullptr; | 84 delayed_task_ = nullptr; |
85 task->Run(); | 85 task->Run(); |
86 delete task; | 86 delete task; |
87 } | 87 } |
88 | 88 |
| 89 uint64_t AddTraceEvent(char phase, const uint8_t* categoryEnabledFlag, |
| 90 const char* name, uint64_t id, uint64_t bind_id, |
| 91 int numArgs, const char** argNames, |
| 92 const uint8_t* argTypes, const uint64_t* argValues, |
| 93 unsigned int flags) override { |
| 94 return 0; |
| 95 } |
| 96 |
| 97 void UpdateTraceEventDuration(const uint8_t* categoryEnabledFlag, |
| 98 const char* name, uint64_t handle) override {} |
| 99 |
| 100 const uint8_t* GetCategoryGroupEnabled(const char* name) override { |
| 101 static uint8_t no = 0; |
| 102 return &no; |
| 103 } |
| 104 |
| 105 const char* GetCategoryGroupName( |
| 106 const uint8_t* categoryEnabledFlag) override { |
| 107 static const char* dummy = "dummy"; |
| 108 return dummy; |
| 109 } |
| 110 |
89 private: | 111 private: |
90 v8::Platform* platform_; | 112 v8::Platform* platform_; |
91 IdleTask* idle_task_; | 113 IdleTask* idle_task_; |
92 Task* delayed_task_; | 114 Task* delayed_task_; |
93 }; | 115 }; |
94 | 116 |
95 | 117 |
96 TEST(IncrementalMarkingUsingIdleTasks) { | 118 TEST(IncrementalMarkingUsingIdleTasks) { |
97 if (!i::FLAG_incremental_marking) return; | 119 if (!i::FLAG_incremental_marking) return; |
98 CcTest::InitializeVM(); | 120 CcTest::InitializeVM(); |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 while (!marking->IsStopped() && platform.PendingDelayedTask()) { | 190 while (!marking->IsStopped() && platform.PendingDelayedTask()) { |
169 platform.PerformDelayedTask(); | 191 platform.PerformDelayedTask(); |
170 } | 192 } |
171 // There could be pending delayed task from memory reducer after GC finishes. | 193 // There could be pending delayed task from memory reducer after GC finishes. |
172 CHECK(marking->IsStopped()); | 194 CHECK(marking->IsStopped()); |
173 i::V8::SetPlatformForTesting(old_platform); | 195 i::V8::SetPlatformForTesting(old_platform); |
174 } | 196 } |
175 | 197 |
176 } // namespace internal | 198 } // namespace internal |
177 } // namespace v8 | 199 } // namespace v8 |
OLD | NEW |