Author: Remi Meier <[email protected]>
Branch: stmgc-c8
Changeset: r80950:4b10dce73f17
Date: 2015-11-25 12:48 +0100
http://bitbucket.org/pypy/pypy/changeset/4b10dce73f17/
Log: add explicit gc_writebarrier to ll_arraycopy
Seems like in all cases, the repeated stm_write_cards within the
slowpath-loop are unhelpful. Either because the destination is newly
allocated or because we write to a significant number of the array
elements anyway.
diff --git a/rpython/rlib/rgc.py b/rpython/rlib/rgc.py
--- a/rpython/rlib/rgc.py
+++ b/rpython/rlib/rgc.py
@@ -53,7 +53,7 @@
"""
_pinned_objects.append(obj)
return True
-
+
class PinEntry(ExtRegistryEntry):
_about_ = pin
@@ -296,6 +296,10 @@
slowpath = False
if stm_is_enabled():
slowpath = True
+ # seems to be a good idea to do a *full* write barrier on the
+ # items array, as this prevents repeated stm_write_card() inside
+ # the loop below (see logic in stmframework.py).
+ llop.gc_writebarrier(lltype.Void, dest)
#
elif _contains_gcptr(TP.OF):
# perform a write barrier that copies necessary flags from
@@ -864,7 +868,7 @@
pending.extend(get_rpy_referents(gcref))
all_typeids = {}
-
+
def get_typeid(obj):
raise Exception("does not work untranslated")
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit