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

Side by Side Diff: src/optimizing-compiler-thread.cc

Issue 12039088: Actually increment queue length for parallel recompile queue. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 OptimizingCompiler* compiler = NULL; 128 OptimizingCompiler* compiler = NULL;
129 output_queue_.Dequeue(&compiler); 129 output_queue_.Dequeue(&compiler);
130 Handle<SharedFunctionInfo> shared = compiler->info()->shared_info(); 130 Handle<SharedFunctionInfo> shared = compiler->info()->shared_info();
131 Compiler::InstallOptimizedCode(compiler); 131 Compiler::InstallOptimizedCode(compiler);
132 return shared; 132 return shared;
133 } 133 }
134 134
135 135
136 void OptimizingCompilerThread::QueueForOptimization( 136 void OptimizingCompilerThread::QueueForOptimization(
137 OptimizingCompiler* optimizing_compiler) { 137 OptimizingCompiler* optimizing_compiler) {
138 ASSERT(IsQueueAvailable());
139 Barrier_AtomicIncrement(&queue_length_, static_cast<Atomic32>(1));
138 input_queue_.Enqueue(optimizing_compiler); 140 input_queue_.Enqueue(optimizing_compiler);
139 input_queue_semaphore_->Signal(); 141 input_queue_semaphore_->Signal();
140 } 142 }
141 143
142 #ifdef DEBUG 144 #ifdef DEBUG
143 bool OptimizingCompilerThread::IsOptimizerThread() { 145 bool OptimizingCompilerThread::IsOptimizerThread() {
144 if (!FLAG_parallel_recompilation) return false; 146 if (!FLAG_parallel_recompilation) return false;
145 return ThreadId::Current().ToInteger() == thread_id_; 147 return ThreadId::Current().ToInteger() == thread_id_;
146 } 148 }
147 #endif 149 #endif
148 150
149 151
150 } } // namespace v8::internal 152 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698