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

Side by Side Diff: src/optimizing-compile-dispatcher.h

Issue 1064723005: Remove support for specifying the number of available threads (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « src/isolate.cc ('k') | 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 // 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 #ifndef V8_OPTIMIZING_COMPILE_DISPATCHER_H_ 5 #ifndef V8_OPTIMIZING_COMPILE_DISPATCHER_H_
6 #define V8_OPTIMIZING_COMPILE_DISPATCHER_H_ 6 #define V8_OPTIMIZING_COMPILE_DISPATCHER_H_
7 7
8 #include <queue> 8 #include <queue>
9 9
10 #include "src/base/atomicops.h" 10 #include "src/base/atomicops.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 return input_queue_length_ < input_queue_capacity_; 63 return input_queue_length_ < input_queue_capacity_;
64 } 64 }
65 65
66 inline void AgeBufferedOsrJobs() { 66 inline void AgeBufferedOsrJobs() {
67 // Advance cursor of the cyclic buffer to next empty slot or stale OSR job. 67 // Advance cursor of the cyclic buffer to next empty slot or stale OSR job.
68 // Dispose said OSR job in the latter case. Calling this on every GC 68 // Dispose said OSR job in the latter case. Calling this on every GC
69 // should make sure that we do not hold onto stale jobs indefinitely. 69 // should make sure that we do not hold onto stale jobs indefinitely.
70 AddToOsrBuffer(NULL); 70 AddToOsrBuffer(NULL);
71 } 71 }
72 72
73 static bool Enabled(int max_available) { 73 static bool Enabled() { return FLAG_concurrent_recompilation; }
74 return (FLAG_concurrent_recompilation && max_available > 1);
75 }
76 74
77 private: 75 private:
78 class CompileTask; 76 class CompileTask;
79 77
80 enum ModeFlag { COMPILE, FLUSH }; 78 enum ModeFlag { COMPILE, FLUSH };
81 79
82 void FlushOutputQueue(bool restore_function_code); 80 void FlushOutputQueue(bool restore_function_code);
83 void FlushOsrBuffer(bool restore_function_code); 81 void FlushOsrBuffer(bool restore_function_code);
84 void CompileNext(OptimizedCompileJob* job); 82 void CompileNext(OptimizedCompileJob* job);
85 OptimizedCompileJob* NextInput(bool check_if_flushing = false); 83 OptimizedCompileJob* NextInput(bool check_if_flushing = false);
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 // background thread. 128 // background thread.
131 // 129 //
132 // Since flags might get modified while the background thread is running, it 130 // Since flags might get modified while the background thread is running, it
133 // is not safe to access them directly. 131 // is not safe to access them directly.
134 int recompilation_delay_; 132 int recompilation_delay_;
135 }; 133 };
136 } 134 }
137 } // namespace v8::internal 135 } // namespace v8::internal
138 136
139 #endif // V8_OPTIMIZING_COMPILE_DISPATCHER_H_ 137 #endif // V8_OPTIMIZING_COMPILE_DISPATCHER_H_
OLDNEW
« no previous file with comments | « src/isolate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698