| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/debug/debug.h" | 5 #include "src/debug/debug.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "src/api.h" | 9 #include "src/api.h" |
| 10 #include "src/arguments.h" | 10 #include "src/arguments.h" |
| (...skipping 1232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1243 // Flush all optimized code maps. Note that the below heap iteration does not | 1243 // Flush all optimized code maps. Note that the below heap iteration does not |
| 1244 // cover this, because the given function might have been inlined into code | 1244 // cover this, because the given function might have been inlined into code |
| 1245 // for which no JSFunction exists. | 1245 // for which no JSFunction exists. |
| 1246 { | 1246 { |
| 1247 SharedFunctionInfo::Iterator iterator(isolate_); | 1247 SharedFunctionInfo::Iterator iterator(isolate_); |
| 1248 while (SharedFunctionInfo* shared = iterator.Next()) { | 1248 while (SharedFunctionInfo* shared = iterator.Next()) { |
| 1249 shared->ClearCodeFromOptimizedCodeMap(); | 1249 shared->ClearCodeFromOptimizedCodeMap(); |
| 1250 } | 1250 } |
| 1251 } | 1251 } |
| 1252 | 1252 |
| 1253 // The native context also has a list of OSR'd optimized code. Clear it. |
| 1254 isolate_->ClearOSROptimizedCode(); |
| 1255 |
| 1253 // Make sure we abort incremental marking. | 1256 // Make sure we abort incremental marking. |
| 1254 isolate_->heap()->CollectAllGarbage(Heap::kMakeHeapIterableMask, | 1257 isolate_->heap()->CollectAllGarbage(Heap::kMakeHeapIterableMask, |
| 1255 GarbageCollectionReason::kDebugger); | 1258 GarbageCollectionReason::kDebugger); |
| 1256 | 1259 |
| 1257 DCHECK(shared->is_compiled()); | 1260 DCHECK(shared->is_compiled()); |
| 1258 bool baseline_exists = shared->HasBaselineCode(); | 1261 bool baseline_exists = shared->HasBaselineCode(); |
| 1259 | 1262 |
| 1260 { | 1263 { |
| 1261 // TODO(yangguo): with bytecode, we still walk the heap to find all | 1264 // TODO(yangguo): with bytecode, we still walk the heap to find all |
| 1262 // optimized code for the function to deoptimize. We can probably be | 1265 // optimized code for the function to deoptimize. We can probably be |
| (...skipping 1245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2508 logger_->DebugEvent("Put", message.text()); | 2511 logger_->DebugEvent("Put", message.text()); |
| 2509 } | 2512 } |
| 2510 | 2513 |
| 2511 void LockingCommandMessageQueue::Clear() { | 2514 void LockingCommandMessageQueue::Clear() { |
| 2512 base::LockGuard<base::Mutex> lock_guard(&mutex_); | 2515 base::LockGuard<base::Mutex> lock_guard(&mutex_); |
| 2513 queue_.Clear(); | 2516 queue_.Clear(); |
| 2514 } | 2517 } |
| 2515 | 2518 |
| 2516 } // namespace internal | 2519 } // namespace internal |
| 2517 } // namespace v8 | 2520 } // namespace v8 |
| OLD | NEW |