Author: Maciej Fijalkowski <fij...@gmail.com>
Branch: 
Changeset: r77641:555b324de044
Date: 2015-05-28 13:48 +0200
http://bitbucket.org/pypy/pypy/changeset/555b324de044/

Log:    hack around a stupid limitation, now _vmprof is not enabled when JIT
        is not on

diff --git a/pypy/config/pypyoption.py b/pypy/config/pypyoption.py
--- a/pypy/config/pypyoption.py
+++ b/pypy/config/pypyoption.py
@@ -285,6 +285,7 @@
     """Apply PyPy-specific optimization suggestions on the 'config'.
     The optimizations depend on the selected level and possibly on the backend.
     """
+    config.__dict__['_level'] = level
     # all the good optimizations for PyPy should be listed here
     if level in ['2', '3', 'jit']:
         config.objspace.std.suggest(withrangelist=True)
@@ -321,9 +322,11 @@
 
 
 def enable_allworkingmodules(config):
-    modules = working_modules
+    modules = working_modules.copy()
     if config.translation.sandbox:
         modules = default_modules
+    if config._level != 'jit':
+        del modules['_vmprof']
     # ignore names from 'essential_modules', notably 'exceptions', which
     # may not be present in config.objspace.usemodules at all
     modules = [name for name in modules if name not in essential_modules]
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to