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

Unified Diff: Source/platform/heap/Heap.cpp

Issue 648633002: Oilpan: Scale up the number of marking threads according to available processors (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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 | « Source/platform/heap/Heap.h ('k') | Source/platform/heap/ThreadState.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/heap/Heap.cpp
diff --git a/Source/platform/heap/Heap.cpp b/Source/platform/heap/Heap.cpp
index fb73381446f1fa96c9e0ffac812c603b15e9e05c..fe91e41e8de11f975323192664639643827fc205 100644
--- a/Source/platform/heap/Heap.cpp
+++ b/Source/platform/heap/Heap.cpp
@@ -2141,11 +2141,10 @@ void Heap::init()
s_orphanedPagePool = new OrphanedPagePool();
s_markingThreads = new Vector<OwnPtr<blink::WebThread> >();
if (blink::Platform::current()) {
- // FIXME: We should let the amount of threads scale with the
- // amount of processors in the system instead of hardcoding
- // it.
+ int processors = blink::Platform::current()->numberOfProcessors();
+ int numberOfMarkingThreads = std::min(processors, maxNumberOfMarkingThreads);
for (int i = 0; i < numberOfMarkingThreads; i++)
- s_markingThreads->append(adoptPtr(blink::Platform::current()->createThread("Blink Heap Marker Thread")));
+ s_markingThreads->append(adoptPtr(blink::Platform::current()->createThread("Blink GC Marking Thread")));
}
}
« no previous file with comments | « Source/platform/heap/Heap.h ('k') | Source/platform/heap/ThreadState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698