Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(383)

Unified Diff: src/compiler-dispatcher/optimizing-compile-dispatcher.cc

Issue 2658313002: Only flush not yet started and finished compile jobs from gc (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler-dispatcher/optimizing-compile-dispatcher.h ('k') | src/debug/debug.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler-dispatcher/optimizing-compile-dispatcher.cc
diff --git a/src/compiler-dispatcher/optimizing-compile-dispatcher.cc b/src/compiler-dispatcher/optimizing-compile-dispatcher.cc
index 75c50eec7d069c4e03fd27fab078ae74f29df524..11695063848721b75fb54df93017badb314de1ca 100644
--- a/src/compiler-dispatcher/optimizing-compile-dispatcher.cc
+++ b/src/compiler-dispatcher/optimizing-compile-dispatcher.cc
@@ -134,7 +134,23 @@ void OptimizingCompileDispatcher::FlushOutputQueue(bool restore_function_code) {
}
}
-void OptimizingCompileDispatcher::Flush() {
+void OptimizingCompileDispatcher::Flush(BlockingBehavior blocking_behavior) {
+ if (FLAG_block_concurrent_recompilation) Unblock();
+ if (blocking_behavior == BlockingBehavior::kDontBlock) {
+ base::LockGuard<base::Mutex> access_input_queue_(&input_queue_mutex_);
+ while (input_queue_length_ > 0) {
+ CompilationJob* job = input_queue_[InputQueueIndex(0)];
+ DCHECK_NOT_NULL(job);
+ input_queue_shift_ = InputQueueIndex(1);
+ input_queue_length_--;
+ DisposeCompilationJob(job, true);
+ }
+ FlushOutputQueue(true);
+ if (FLAG_trace_concurrent_recompilation) {
+ PrintF(" ** Flushed concurrent recompilation queues (not blocking).\n");
+ }
+ return;
+ }
base::Release_Store(&mode_, static_cast<base::AtomicWord>(FLUSH));
if (FLAG_block_concurrent_recompilation) Unblock();
{
« no previous file with comments | « src/compiler-dispatcher/optimizing-compile-dispatcher.h ('k') | src/debug/debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698