Changeset 105931 in webkit
- Timestamp:
- Jan 25, 2012 3:11:46 PM (12 years ago)
- Location:
- trunk/Tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r105922 r105931 1 2012-01-25 Eric Seidel <eric@webkit.org> 2 3 Remove Python 2.5 support from WebKit 4 https://bugs.webkit.org/show_bug.cgi?id=71593 5 6 Reviewed by Adam Barth. 7 8 Just removing support from this one core file. 9 I'll commit the rest of the (large) change once we've 10 gone 24 hours and seen that no bots have exploded. 11 We can roll out this one change if we break bots 12 and then roll in the rest once those bots are fixed. 13 14 * Scripts/webkitpy/common/system/executive.py: 15 (Executive.cpu_count): 16 1 17 2012-01-25 Hajime Morita <morrita@google.com> 2 18 -
trunk/Tools/Scripts/webkitpy/common/system/executive.py
r104482 r105931 28 28 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 29 30 try: 31 # This API exists only in Python 2.6 and higher. :( 32 import multiprocessing 33 except ImportError: 34 multiprocessing = None 35 30 import multiprocessing 36 31 import ctypes 37 32 import errno … … 161 156 162 157 def cpu_count(self): 163 if multiprocessing: 164 return multiprocessing.cpu_count() 165 # Darn. We don't have the multiprocessing package. 166 system_name = platform.system() 167 if system_name == "Darwin": 168 return int(self.run_command(["sysctl", "-n", "hw.ncpu"])) 169 elif system_name == "Windows": 170 return int(os.environ.get('NUMBER_OF_PROCESSORS', 1)) 171 elif system_name == "Linux": 172 num_cores = os.sysconf("SC_NPROCESSORS_ONLN") 173 if isinstance(num_cores, int) and num_cores > 0: 174 return num_cores 175 # This quantity is a lie but probably a reasonable guess for modern 176 # machines. 177 return 2 158 return multiprocessing.cpu_count() 178 159 179 160 @staticmethod
Note: See TracChangeset
for help on using the changeset viewer.