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

Unified Diff: src/optimizing-compiler-thread.h

Issue 11419012: Introduce helper functions to test parallel recompilation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 1 month 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
Index: src/optimizing-compiler-thread.h
diff --git a/src/optimizing-compiler-thread.h b/src/optimizing-compiler-thread.h
index d5627266d09898d5bf514512b36cb42261b5152d..8a39b39a47d9002058ef865531b04c660d014a9d 100644
--- a/src/optimizing-compiler-thread.h
+++ b/src/optimizing-compiler-thread.h
@@ -29,8 +29,8 @@
#define V8_OPTIMIZING_COMPILER_THREAD_H_
#include "atomicops.h"
-#include "platform.h"
#include "flags.h"
+#include "platform.h"
#include "unbound-queue.h"
namespace v8 {
@@ -38,6 +38,7 @@ namespace internal {
class HGraphBuilder;
class OptimizingCompiler;
+class SharedFunctionInfo;
class OptimizingCompilerThread : public Thread {
public:
@@ -46,6 +47,7 @@ class OptimizingCompilerThread : public Thread {
isolate_(isolate),
stop_semaphore_(OS::CreateSemaphore(0)),
input_queue_semaphore_(OS::CreateSemaphore(0)),
+ output_queue_semaphore_(OS::CreateSemaphore(0)),
time_spent_compiling_(0),
time_spent_total_(0) {
NoBarrier_Store(&stop_thread_, static_cast<AtomicWord>(false));
@@ -57,6 +59,9 @@ class OptimizingCompilerThread : public Thread {
void QueueForOptimization(OptimizingCompiler* optimizing_compiler);
void InstallOptimizedFunctions();
+ // Wait for the next optimized function and install it.
+ Handle<SharedFunctionInfo> InstallNextOptimizedFunction();
+
inline bool IsQueueAvailable() {
// We don't need a barrier since we have a data dependency right
// after.
@@ -77,6 +82,7 @@ class OptimizingCompilerThread : public Thread {
~OptimizingCompilerThread() {
delete input_queue_semaphore_;
+ delete output_queue_semaphore_; // Only used for manual mode.
delete stop_semaphore_;
}
@@ -84,6 +90,7 @@ class OptimizingCompilerThread : public Thread {
Isolate* isolate_;
Semaphore* stop_semaphore_;
Semaphore* input_queue_semaphore_;
+ Semaphore* output_queue_semaphore_;
UnboundQueue<OptimizingCompiler*> input_queue_;
UnboundQueue<OptimizingCompiler*> output_queue_;
volatile AtomicWord stop_thread_;
« no previous file with comments | « src/flag-definitions.h ('k') | src/optimizing-compiler-thread.cc » ('j') | src/runtime.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698