Author: Armin Rigo <[email protected]>
Branch: gc-del
Changeset: r66059:694e0a037271
Date: 2013-08-10 13:35 +0200
http://bitbucket.org/pypy/pypy/changeset/694e0a037271/

Log:    hg merge default

diff --git a/rpython/memory/gc/env.py b/rpython/memory/gc/env.py
--- a/rpython/memory/gc/env.py
+++ b/rpython/memory/gc/env.py
@@ -131,8 +131,13 @@
 
 # ---------- Linux2 ----------
 
+try:
+    ARCH = os.uname()[4]  # machine
+except (OSError, AttributeError):
+    ARCH = ''
+
 def get_L2cache_linux2():
-    arch = os.uname()[4]  # machine
+    arch = ARCH      # precomputed; the call to os.uname() is not translated
     if arch.endswith('86') or arch == 'x86_64':
         return get_L2cache_linux2_cpuinfo()
     if arch in ('alpha', 'ppc', 'ppc64'):
@@ -145,6 +150,8 @@
         return get_L2cache_linux2_sparc()
     return -1
 
+get_L2cache_linux3 = get_L2cache_linux2
+
 
 def get_L2cache_linux2_cpuinfo(filename="/proc/cpuinfo", label='cache size'):
     debug_start("gc-hardware")
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to