Title: [167815] trunk/Source/WTF
- Revision
- 167815
- Author
- [email protected]
- Date
- 2014-04-25 12:41:56 -0700 (Fri, 25 Apr 2014)
Log Message
Figure out how many cores are available for realsies.
Rubber stamped by Andreas Kling.
HW_AVAILCPU is more canonical than HW_NCPU. For example if you use hacks to tell Darwin
to make it seem like there are fewer CPUs, HW_AVAILCPU will change but HW_NCPU won't.
HW_NCPU doesn't reflect how much actual paralellism you'll get; it's merely reporting
facts about the machine you're running on. HW_AVAILCPU is almost always what WebKit
wants since it uses this information to decide how many threads to launch for various
things.
* wtf/NumberOfCores.cpp:
(WTF::numberOfProcessorCores):
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (167814 => 167815)
--- trunk/Source/WTF/ChangeLog 2014-04-25 19:39:09 UTC (rev 167814)
+++ trunk/Source/WTF/ChangeLog 2014-04-25 19:41:56 UTC (rev 167815)
@@ -1,3 +1,19 @@
+2014-04-25 Filip Pizlo <[email protected]>
+
+ Figure out how many cores are available for realsies.
+
+ Rubber stamped by Andreas Kling.
+
+ HW_AVAILCPU is more canonical than HW_NCPU. For example if you use hacks to tell Darwin
+ to make it seem like there are fewer CPUs, HW_AVAILCPU will change but HW_NCPU won't.
+ HW_NCPU doesn't reflect how much actual paralellism you'll get; it's merely reporting
+ facts about the machine you're running on. HW_AVAILCPU is almost always what WebKit
+ wants since it uses this information to decide how many threads to launch for various
+ things.
+
+ * wtf/NumberOfCores.cpp:
+ (WTF::numberOfProcessorCores):
+
2014-04-22 Brent Fulgham <[email protected]>
[Win] Support Python 2.7 in Cygwin
Modified: trunk/Source/WTF/wtf/NumberOfCores.cpp (167814 => 167815)
--- trunk/Source/WTF/wtf/NumberOfCores.cpp 2014-04-25 19:39:09 UTC (rev 167814)
+++ trunk/Source/WTF/wtf/NumberOfCores.cpp 2014-04-25 19:41:56 UTC (rev 167815)
@@ -53,7 +53,7 @@
size_t length = sizeof(result);
int name[] = {
CTL_HW,
- HW_NCPU
+ HW_AVAILCPU
};
int sysctlResult = sysctl(name, sizeof(name) / sizeof(int), &result, &length, 0, 0);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes