Author: Stefano Rivera <[email protected]>
Branch:
Changeset: r93596:9472e9d10a85
Date: 2017-12-28 21:21 +0100
http://bitbucket.org/pypy/pypy/changeset/9472e9d10a85/
Log: rvmprof: Handle ProcessorAutodetectError
detect_cpu only knows about architectures supported by PyPy's JIT
diff --git a/rpython/rlib/rvmprof/cintf.py b/rpython/rlib/rvmprof/cintf.py
--- a/rpython/rlib/rvmprof/cintf.py
+++ b/rpython/rlib/rvmprof/cintf.py
@@ -16,9 +16,12 @@
pass
# vmprof works only on x86 for now
-IS_SUPPORTED = detect_cpu.autodetect().startswith('x86')
-if sys.platform == 'win32' or sys.platform.startswith("openbsd"):
- IS_SUPPORTED = False
+IS_SUPPORTED = False
+if sys.platform in ('darwin', 'linux', 'linux2'):
+ try:
+ IS_SUPPORTED = detect_cpu.autodetect().startswith('x86')
+ except detect_cpu.ProcessorAutodetectError:
+ pass
ROOT = py.path.local(rpythonroot).join('rpython', 'rlib', 'rvmprof')
SRC = ROOT.join('src')
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit