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

Unified Diff: src/sweeper-thread.cc

Issue 110573004: Merge bleeding_edge 17696:18016. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 7 years 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/sweeper-thread.cc
diff --git a/src/sweeper-thread.cc b/src/sweeper-thread.cc
index 58c684a54f62c40f0f1aa51f761b99c0f64189dc..6f3baed11f8f111d91e1caf6c61685b043489b7f 100644
--- a/src/sweeper-thread.cc
+++ b/src/sweeper-thread.cc
@@ -105,4 +105,14 @@ void SweeperThread::StartSweeping() {
void SweeperThread::WaitForSweeperThread() {
end_sweeping_semaphore_.Wait();
}
+
+
+int SweeperThread::NumberOfThreads(int max_available) {
+ if (!FLAG_concurrent_sweeping && !FLAG_parallel_sweeping) return 0;
+ if (FLAG_sweeper_threads > 0) return FLAG_sweeper_threads;
+ if (FLAG_concurrent_sweeping) return max_available - 1;
+ ASSERT(FLAG_parallel_sweeping);
+ return max_available;
+}
+
} } // namespace v8::internal
« include/v8-platform.h ('K') | « src/sweeper-thread.h ('k') | src/trig-table.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698