[pypy-commit] pypy gc-incminimark-pinning-improve: Merge release-2.5.x into branch
groggi
noreply at buildbot.pypy.org
Fri Mar 27 10:10:31 CET 2015
Author: Gregor Wegberg <code at gregorwegberg.com>
Branch: gc-incminimark-pinning-improve
Changeset: r76591:db8331fd62ee
Date: 2015-03-27 09:54 +0100
http://bitbucket.org/pypy/pypy/changeset/db8331fd62ee/
Log: Merge release-2.5.x into branch
diff --git a/pypy/doc/conf.py b/pypy/doc/conf.py
--- a/pypy/doc/conf.py
+++ b/pypy/doc/conf.py
@@ -67,7 +67,7 @@
# The short X.Y version.
version = '2.5'
# The full version, including alpha/beta/rc tags.
-release = '2.5.0'
+release = '2.5.1'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
diff --git a/pypy/doc/index-of-release-notes.rst b/pypy/doc/index-of-release-notes.rst
--- a/pypy/doc/index-of-release-notes.rst
+++ b/pypy/doc/index-of-release-notes.rst
@@ -6,6 +6,7 @@
.. toctree::
+ release-2.5.1.rst
release-2.5.0.rst
release-2.4.0.rst
release-2.3.1.rst
diff --git a/pypy/doc/index-of-whatsnew.rst b/pypy/doc/index-of-whatsnew.rst
--- a/pypy/doc/index-of-whatsnew.rst
+++ b/pypy/doc/index-of-whatsnew.rst
@@ -7,6 +7,7 @@
.. toctree::
whatsnew-head.rst
+ whatsnew-2.5.1.rst
whatsnew-2.5.0.rst
whatsnew-2.4.0.rst
whatsnew-2.3.1.rst
diff --git a/pypy/doc/release-2.5.1.rst b/pypy/doc/release-2.5.1.rst
new file mode 100644
--- /dev/null
+++ b/pypy/doc/release-2.5.1.rst
@@ -0,0 +1,115 @@
+================================
+PyPy 2.5.1 - Pineapple Bromeliad
+================================
+
+We're pleased to announce PyPy 2.5.1, Pineapple `Bromeliad`_ following on the heels of 2.5.0
+
+You can download the PyPy 2.5.1 release here:
+
+ http://pypy.org/download.html
+
+We would like to thank our donors for the continued support of the PyPy
+project, and for those who donate to our three sub-projects, as well as our
+volunteers and contributors.
+We've shown quite a bit of progress, but we're slowly running out of funds.
+Please consider donating more, or even better convince your employer to donate,
+so we can finish those projects! The three sub-projects are:
+
+* `Py3k`_ (supporting Python 3.x): We have released a Python 3.2.5 compatible version
+ we call PyPy3 2.4.0, and are working toward a Python 3.3 compatible version
+
+* `STM`_ (software transactional memory): We have released a first working version,
+ and continue to try out new promising paths of achieving a fast multithreaded Python
+
+* `NumPy`_ which requires installation of our fork of upstream numpy,
+ available `on bitbucket`_
+
+.. _`Bromeliad`: http://xkcd.com/1498
+.. _`Py3k`: http://pypy.org/py3donate.html
+.. _`STM`: http://pypy.org/tmdonate2.html
+.. _`NumPy`: http://pypy.org/numpydonate.html
+.. _`on bitbucket`: https://www.bitbucket.org/pypy/numpy
+
+We would also like to encourage new people to join the project. PyPy has many
+layers and we need help with all of them: `PyPy`_ and `Rpython`_ documentation
+improvements, tweaking popular `modules`_ to run on pypy, or general `help`_ with making
+Rpython's JIT even better.
+
+.. _`PyPy`: http://doc.pypy.org
+.. _`Rpython`: http://rpython.readthedocs.org
+.. _`modules`: http://doc.pypy.org/en/latest/project-ideas.html#make-more-python-modules-pypy-friendly
+.. _`help`: http://doc.pypy.org/en/latest/project-ideas.html
+
+What is PyPy?
+=============
+
+PyPy is a very compliant Python interpreter, almost a drop-in replacement for
+CPython 2.7. It's fast (`pypy and cpython 2.7.x`_ performance comparison)
+due to its integrated tracing JIT compiler.
+
+This release supports **x86** machines on most common operating systems
+(Linux 32/64, Mac OS X 64, Windows, and OpenBSD),
+as well as newer **ARM** hardware (ARMv6 or ARMv7, with VFPv3) running Linux.
+
+While we support 32 bit python on Windows, work on the native Windows 64
+bit python is still stalling, we would welcome a volunteer
+to `handle that`_.
+
+.. _`pypy and cpython 2.7.x`: http://speed.pypy.org
+.. _`handle that`: http://doc.pypy.org/en/latest/windows.html#what-is-missing-for-a-full-64-bit-translation
+
+Highlights
+==========
+
+* The past months have seen pypy mature and grow, as rpython becomes the goto
+ solution for writing fast dynamic language interpreters. Our separation of
+ Rpython and the python interpreter PyPy is now much clearer in the
+ `PyPy documentation`_ and we now have seperate `RPython documentation`_.
+ Tell us what still isn't clear, or even better help us improve the documentation.
+
+* We merged version 2.7.9 of python's stdlib. From the python release notice:
+
+ * The entirety of Python 3.4's `ssl module`_ has been backported.
+ See `PEP 466`_ for justification.
+
+ * HTTPS certificate validation using the system's certificate store is now
+ enabled by default. See `PEP 476`_ for details.
+
+ * SSLv3 has been disabled by default in httplib and its reverse dependencies
+ due to the `POODLE attack`_.
+
+ * The `ensurepip module`_ has been backported, which provides the pip
+ package manager in every Python 2.7 installation. See `PEP 477`_.
+
+* The garbage collector now ignores parts of the stack which did not change
+ since the last collection, another performance boost
+
+* errno and LastError are saved around cffi calls so things like pdb will not
+ overwrite it
+
+* We continue to asymptotically approach a score of 7 times faster than cpython
+ on our benchmark suite, we now rank 6.98 on latest runs
+
+* Issues reported with our previous release were resolved_ after reports from users on
+ our issue tracker at https://bitbucket.org/pypy/pypy/issues or on IRC at
+ #pypy.
+
+.. _`PyPy documentation`: http://doc.pypy.org
+.. _`RPython documentation`: http://rpython.readthedocs.org
+.. _`ssl module`: https://docs.python.org/3/library/ssl.html
+.. _`PEP 466`: https://www.python.org/dev/peps/pep-0466
+.. _`PEP 476`: https://www.python.org/dev/peps/pep-0476
+.. _`PEP 477`: https://www.python.org/dev/peps/pep-0477
+.. _`POODLE attack`: https://www.imperialviolet.org/2014/10/14/poodle.html
+.. _`ensurepip module`: https://docs.python.org/2/library/ensurepip.html
+.. _resolved: http://doc.pypy.org/en/latest/whatsnew-2.5.1.html
+
+Please try it out and let us know what you think. We welcome
+success stories, `experiments`_, or `benchmarks`_, we know you are using PyPy, please tell us about it!
+
+Cheers
+
+The PyPy Team
+
+.. _`experiments`: http://morepypy.blogspot.com/2015/02/experiments-in-pyrlang-with-rpython.html
+.. _`benchmarks`: https://mithrandi.net/blog/2015/03/axiom-benchmark-results-on-pypy-2-5-0
diff --git a/pypy/doc/whatsnew-2.5.0.rst b/pypy/doc/whatsnew-2.5.0.rst
--- a/pypy/doc/whatsnew-2.5.0.rst
+++ b/pypy/doc/whatsnew-2.5.0.rst
@@ -1,6 +1,6 @@
-=======================
-What's new in PyPy 2.5
-=======================
+========================
+What's new in PyPy 2.5.0
+========================
.. this is a revision shortly after release-2.4.x
.. startrev: 7026746cbb1b
diff --git a/pypy/doc/whatsnew-2.5.1.rst b/pypy/doc/whatsnew-2.5.1.rst
new file mode 100644
--- /dev/null
+++ b/pypy/doc/whatsnew-2.5.1.rst
@@ -0,0 +1,40 @@
+========================
+What's new in PyPy 2.5.1
+========================
+
+.. this is a revision shortly after release-2.5.0
+.. startrev: 397b96217b85
+
+
+Non-blocking file reads sometimes raised EAGAIN even though they
+had buffered data waiting, fixed in b1c4fcb04a42
+
+Fix a bug in cpyext in multithreded programs acquiring/releasing the GIL
+
+.. branch: vmprof
+
+.. branch: stackroot-speedup-2
+Avoid tracing all stack roots during repeated minor collections,
+by ignoring the part of the stack that didn't change
+
+.. branch: stdlib-2.7.9
+Update stdlib to version 2.7.9
+
+.. branch: fix-kqueue-error2
+Fix exception being raised by kqueue.control (CPython compatibility)
+
+.. branch: gitignore
+
+.. branch: framestate2
+Refactor rpython.flowspace.framestate.FrameState.
+
+.. branch: alt_errno
+Add an alternative location to save LastError, errno around ctypes,
+cffi external calls so things like pdb will not overwrite it
+
+.. branch: nonquadratic-heapcache
+Speed up the warmup times of the JIT by removing a quadratic algorithm in the
+heapcache.
+
+.. branch: online-transforms-2
+Simplify flow graphs on the fly during annotation phase.
diff --git a/pypy/doc/whatsnew-head.rst b/pypy/doc/whatsnew-head.rst
--- a/pypy/doc/whatsnew-head.rst
+++ b/pypy/doc/whatsnew-head.rst
@@ -2,38 +2,6 @@
What's new in PyPy 2.5+
=======================
-.. this is a revision shortly after release-2.5.x
+.. this is a revision shortly after release-2.5.1
.. startrev: 397b96217b85
-
-Non-blocking file reads sometimes raised EAGAIN even though they
-had buffered data waiting, fixed in b1c4fcb04a42
-
-
-.. branch: vmprof
-
-.. branch: stackroot-speedup-2
-Avoid tracing all stack roots during repeated minor collections,
-by ignoring the part of the stack that didn't change
-
-.. branch: stdlib-2.7.9
-Update stdlib to version 2.7.9
-
-.. branch: fix-kqueue-error2
-Fix exception being raised by kqueue.control (CPython compatibility)
-
-.. branch: gitignore
-
-.. branch: framestate2
-Refactor rpython.flowspace.framestate.FrameState.
-
-.. branch: alt_errno
-Add an alternative location to save LastError, errno around ctypes,
-cffi external calls so things like pdb will not overwrite it
-
-.. branch: nonquadratic-heapcache
-Speed up the warmup times of the JIT by removing a quadratic algorithm in the
-heapcache.
-
-.. branch: online-transforms-2
-Simplify flow graphs on the fly during annotation phase.
diff --git a/pypy/module/cpyext/include/patchlevel.h b/pypy/module/cpyext/include/patchlevel.h
--- a/pypy/module/cpyext/include/patchlevel.h
+++ b/pypy/module/cpyext/include/patchlevel.h
@@ -29,7 +29,7 @@
#define PY_VERSION "2.7.9"
/* PyPy version as a string */
-#define PYPY_VERSION "2.6.0-alpha0"
+#define PYPY_VERSION "2.5.1"
/* Subversion Revision number of this file (not of the repository).
* Empty since Mercurial migration. */
diff --git a/pypy/module/pyexpat/__init__.py b/pypy/module/pyexpat/__init__.py
--- a/pypy/module/pyexpat/__init__.py
+++ b/pypy/module/pyexpat/__init__.py
@@ -39,8 +39,6 @@
'error': 'space.fromcache(interp_pyexpat.Cache).w_error',
'__version__': 'space.wrap("85819")',
- 'EXPAT_VERSION': 'interp_pyexpat.get_expat_version(space)',
- 'version_info': 'interp_pyexpat.get_expat_version_info(space)',
}
submodules = {
@@ -53,3 +51,9 @@
'XML_PARAM_ENTITY_PARSING_ALWAYS']:
interpleveldefs[name] = 'space.wrap(interp_pyexpat.%s)' % (name,)
+ def startup(self, space):
+ from pypy.module.pyexpat import interp_pyexpat
+ w_ver = interp_pyexpat.get_expat_version(space)
+ space.setattr(self, space.wrap("EXPAT_VERSION"), w_ver)
+ w_ver = interp_pyexpat.get_expat_version_info(space)
+ space.setattr(self, space.wrap("version_info"), w_ver)
diff --git a/pypy/module/sys/version.py b/pypy/module/sys/version.py
--- a/pypy/module/sys/version.py
+++ b/pypy/module/sys/version.py
@@ -10,7 +10,7 @@
#XXX # sync CPYTHON_VERSION with patchlevel.h, package.py
CPYTHON_API_VERSION = 1013 #XXX # sync with include/modsupport.h
-PYPY_VERSION = (2, 6, 0, "alpha", 0) #XXX # sync patchlevel.h
+PYPY_VERSION = (2, 5, 1, "final", 0) #XXX # sync patchlevel.h
if platform.name == 'msvc':
COMPILER_INFO = 'MSC v.%d 32 bit' % (platform.version * 10 + 600)
diff --git a/rpython/doc/rtyper.rst b/rpython/doc/rtyper.rst
--- a/rpython/doc/rtyper.rst
+++ b/rpython/doc/rtyper.rst
@@ -118,8 +118,7 @@
given this representation. The RTyper also computes a ``concretetype`` for
Constants, to match the way they are used in the low-level operations (for
example, ``int_add(x, 1)`` requires a ``Constant(1)`` with
-``concretetype=Signed``, but an untyped ``add(x, 1)`` works with a
-``Constant(1)`` that must actually be a PyObject at run-time).
+``concretetype=Signed``).
In addition to ``lowleveltype``, each Repr subclass provides a set of methods
called ``rtype_op_xxx()`` which define how each high-level operation ``op_xxx``
@@ -306,14 +305,14 @@
~~~~~~~~~~~~~
As in C, pointers provide the indirection needed to make a reference modifiable
-or sharable. Pointers can only point to a structure, an array, a function
-(see below) or a PyObject (see below). Pointers to primitive types, if needed,
-must be done by pointing to a structure with a single field of the required
-type. Pointer types are declared by::
+or sharable. Pointers can only point to a structure, an array or a function
+(see below). Pointers to primitive types, if needed, must be done by pointing
+to a structure with a single field of the required type. Pointer types are
+declared by::
Ptr(TYPE)
-At run-time, pointers to GC structures (GcStruct, GcArray and PyObject) hold a
+At run-time, pointers to GC structures (GcStruct, GcArray) hold a
reference to what they are pointing to. Pointers to non-GC structures that can
go away when their container is deallocated (Struct, Array) must be handled
with care: the bigger structure of which they are part of could be freed while
@@ -356,22 +355,6 @@
:graph: the flow graph of the function.
-The PyObject Type
-~~~~~~~~~~~~~~~~~
-
-This is a special type, for compatibility with CPython: it stands for a
-structure compatible with PyObject. This is also a "container" type (thinking
-about C, this is ``PyObject``, not ``PyObject*``), so it is usually manipulated
-via a Ptr. A typed graph can still contain generic space operations (add,
-getitem, etc.) provided they are applied on objects whose low-level type is
-``Ptr(PyObject)``. In fact, code generators that support this should consider
-that the default type of a variable, if none is specified, is ``Ptr(PyObject)``.
-In this way, they can generate the correct code for fully-untyped flow graphs.
-
-The testing implementation allows you to "create" PyObjects by calling
-``pyobjectptr(obj)``.
-
-
Opaque Types
~~~~~~~~~~~~
diff --git a/rpython/jit/metainterp/jitprof.py b/rpython/jit/metainterp/jitprof.py
--- a/rpython/jit/metainterp/jitprof.py
+++ b/rpython/jit/metainterp/jitprof.py
@@ -44,7 +44,10 @@
pass
def get_counter(self, num):
- return -1.0
+ return 0
+
+ def get_times(self, num):
+ return 0.0
class Profiler(BaseProfiler):
initialized = False
@@ -109,6 +112,9 @@
return self.cpu.tracker.total_freed_bridges
return self.counters[num]
+ def get_times(self, num):
+ return self.times[num]
+
def count_ops(self, opnum, kind=Counters.OPS):
from rpython.jit.metainterp.resoperation import rop
self.counters[kind] += 1
diff --git a/rpython/jit/metainterp/test/test_jitiface.py b/rpython/jit/metainterp/test/test_jitiface.py
--- a/rpython/jit/metainterp/test/test_jitiface.py
+++ b/rpython/jit/metainterp/test/test_jitiface.py
@@ -5,7 +5,7 @@
from rpython.jit.codewriter.policy import JitPolicy
from rpython.jit.metainterp.resoperation import rop
from rpython.rtyper.annlowlevel import hlstr
-from rpython.jit.metainterp.jitprof import Profiler
+from rpython.jit.metainterp.jitprof import Profiler, EmptyProfiler
class JitHookInterfaceTests(object):
@@ -178,6 +178,20 @@
self.meta_interp(main, [], ProfilerClass=Profiler)
+ def test_get_stats_empty(self):
+ driver = JitDriver(greens = [], reds = ['i'])
+ def loop(i):
+ while i > 0:
+ driver.jit_merge_point(i=i)
+ i -= 1
+ def main():
+ loop(30)
+ assert jit_hooks.stats_get_counter_value(None,
+ Counters.TOTAL_COMPILED_LOOPS) == 0
+ assert jit_hooks.stats_get_times_value(None, Counters.TRACING) == 0
+ self.meta_interp(main, [], ProfilerClass=EmptyProfiler)
+
+
class LLJitHookInterfaceTests(JitHookInterfaceTests):
# use this for any backend, instead of the super class
diff --git a/rpython/memory/gctransform/asmgcroot.py b/rpython/memory/gctransform/asmgcroot.py
--- a/rpython/memory/gctransform/asmgcroot.py
+++ b/rpython/memory/gctransform/asmgcroot.py
@@ -368,6 +368,13 @@
if rpy_fastgil != 1:
ll_assert(rpy_fastgil != 0, "walk_stack_from doesn't have the GIL")
initialframedata = rffi.cast(llmemory.Address, rpy_fastgil)
+ #
+ # very rare issue: initialframedata.address[0] is uninitialized
+ # in this case, but "retaddr = callee.frame_address.address[0]"
+ # reads it. If it happens to be exactly a valid return address
+ # inside the C code, then bad things occur.
+ initialframedata.address[0] = llmemory.NULL
+ #
self.walk_frames(curframe, otherframe, initialframedata)
stackscount += 1
#
@@ -519,17 +526,15 @@
from rpython.jit.backend.llsupport.jitframe import STACK_DEPTH_OFS
tid = self.gc.get_possibly_forwarded_type_id(ebp_in_caller)
- ll_assert(rffi.cast(lltype.Signed, tid) ==
- rffi.cast(lltype.Signed, self.frame_tid),
- "found a stack frame that does not belong "
- "anywhere I know, bug in asmgcc")
- # fish the depth
- extra_stack_depth = (ebp_in_caller + STACK_DEPTH_OFS).signed[0]
- ll_assert((extra_stack_depth & (rffi.sizeof(lltype.Signed) - 1))
- == 0, "asmgcc: misaligned extra_stack_depth")
- extra_stack_depth //= rffi.sizeof(lltype.Signed)
- self._shape_decompressor.setjitframe(extra_stack_depth)
- return
+ if (rffi.cast(lltype.Signed, tid) ==
+ rffi.cast(lltype.Signed, self.frame_tid)):
+ # fish the depth
+ extra_stack_depth = (ebp_in_caller + STACK_DEPTH_OFS).signed[0]
+ ll_assert((extra_stack_depth & (rffi.sizeof(lltype.Signed) - 1))
+ == 0, "asmgcc: misaligned extra_stack_depth")
+ extra_stack_depth //= rffi.sizeof(lltype.Signed)
+ self._shape_decompressor.setjitframe(extra_stack_depth)
+ return
llop.debug_fatalerror(lltype.Void, "cannot find gc roots!")
def getlocation(self, callee, ebp_in_caller, location):
diff --git a/rpython/rlib/jit_hooks.py b/rpython/rlib/jit_hooks.py
--- a/rpython/rlib/jit_hooks.py
+++ b/rpython/rlib/jit_hooks.py
@@ -130,7 +130,7 @@
@register_helper(annmodel.SomeFloat())
def stats_get_times_value(warmrunnerdesc, no):
- return warmrunnerdesc.metainterp_sd.profiler.times[no]
+ return warmrunnerdesc.metainterp_sd.profiler.get_times(no)
LOOP_RUN_CONTAINER = lltype.GcArray(lltype.Struct('elem',
('type', lltype.Char),
diff --git a/rpython/translator/simplify.py b/rpython/translator/simplify.py
--- a/rpython/translator/simplify.py
+++ b/rpython/translator/simplify.py
@@ -334,25 +334,25 @@
flowcontext.py).
"""
for block in list(graph.iterblocks()):
- for i in range(len(block.exits)-1, -1, -1):
- exit = block.exits[i]
- if not (exit.target is graph.exceptblock and
- exit.args[0] == Constant(AssertionError)):
- continue
- # can we remove this exit without breaking the graph?
- if len(block.exits) < 2:
+ for i in range(len(block.exits)-1, -1, -1):
+ exit = block.exits[i]
+ if not (exit.target is graph.exceptblock and
+ exit.args[0] == Constant(AssertionError)):
+ continue
+ # can we remove this exit without breaking the graph?
+ if len(block.exits) < 2:
+ break
+ if block.canraise:
+ if exit.exitcase is None:
break
- if block.canraise:
- if exit.exitcase is None:
- break
- if len(block.exits) == 2:
- # removing the last non-exceptional exit
- block.exitswitch = None
- exit.exitcase = None
- # remove this exit
- lst = list(block.exits)
- del lst[i]
- block.recloseblock(*lst)
+ if len(block.exits) == 2:
+ # removing the last non-exceptional exit
+ block.exitswitch = None
+ exit.exitcase = None
+ # remove this exit
+ lst = list(block.exits)
+ del lst[i]
+ block.recloseblock(*lst)
# _____________________________________________________________________
More information about the pypy-commit
mailing list