| 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 #include "src/heap/memory-reducer.h" | 5 #include "src/heap/memory-reducer.h" |
| 6 | 6 |
| 7 #include "src/flags.h" | 7 #include "src/flags.h" |
| 8 #include "src/heap/gc-tracer.h" |
| 8 #include "src/heap/heap.h" | 9 #include "src/heap/heap.h" |
| 9 #include "src/objects-inl.h" // TODO(mstarzinger): Temporary cycle breaker! | 10 #include "src/objects-inl.h" // TODO(mstarzinger): Temporary cycle breaker! |
| 10 #include "src/utils.h" | 11 #include "src/utils.h" |
| 11 #include "src/v8.h" | 12 #include "src/v8.h" |
| 12 | 13 |
| 13 namespace v8 { | 14 namespace v8 { |
| 14 namespace internal { | 15 namespace internal { |
| 15 | 16 |
| 16 const int MemoryReducer::kLongDelayMs = 5000; | 17 const int MemoryReducer::kLongDelayMs = 5000; |
| 17 const int MemoryReducer::kShortDelayMs = 500; | 18 const int MemoryReducer::kShortDelayMs = 500; |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 auto timer_task = new MemoryReducer::TimerTask(this); | 221 auto timer_task = new MemoryReducer::TimerTask(this); |
| 221 V8::GetCurrentPlatform()->CallDelayedOnForegroundThread( | 222 V8::GetCurrentPlatform()->CallDelayedOnForegroundThread( |
| 222 isolate, timer_task, (delay_ms + kSlackMs) / 1000.0); | 223 isolate, timer_task, (delay_ms + kSlackMs) / 1000.0); |
| 223 } | 224 } |
| 224 | 225 |
| 225 | 226 |
| 226 void MemoryReducer::TearDown() { state_ = State(kDone, 0, 0, 0.0); } | 227 void MemoryReducer::TearDown() { state_ = State(kDone, 0, 0, 0.0); } |
| 227 | 228 |
| 228 } // internal | 229 } // internal |
| 229 } // v8 | 230 } // v8 |
| OLD | NEW |