[pypy-commit] pypy stmgc-c7: For now, explicitly call stm_flush_timing(verbose=1).
arigo
noreply at buildbot.pypy.org
Sun Mar 30 21:32:27 CEST 2014
Author: Armin Rigo <arigo at tunes.org>
Branch: stmgc-c7
Changeset: r70338:17cf4e920972
Date: 2014-03-30 21:31 +0200
http://bitbucket.org/pypy/pypy/changeset/17cf4e920972/
Log: For now, explicitly call stm_flush_timing(verbose=1).
diff --git a/rpython/translator/c/genc.py b/rpython/translator/c/genc.py
--- a/rpython/translator/c/genc.py
+++ b/rpython/translator/c/genc.py
@@ -914,6 +914,12 @@
stm_thread_local.mem_clear_on_abort = (char *)&pypy_g_ExcData;
stm_thread_local.mem_bytes_to_clear_on_abort = sizeof(pypy_g_ExcData);
}
+
+void pypy_stm_unregister_thread_local(void)
+{
+ stm_flush_timing(&stm_thread_local, 1); // XXX temporary
+ stm_unregister_thread_local(&stm_thread_local);
+}
'''
def commondefs(defines):
diff --git a/rpython/translator/stm/funcgen.py b/rpython/translator/stm/funcgen.py
--- a/rpython/translator/stm/funcgen.py
+++ b/rpython/translator/stm/funcgen.py
@@ -47,7 +47,7 @@
return 'pypy_stm_register_thread_local();'
def stm_unregister_thread_local(funcgen, op):
- return 'stm_unregister_thread_local(&stm_thread_local);'
+ return 'pypy_stm_unregister_thread_local();'
def stm_read(funcgen, op):
assert isinstance(op.args[0].concretetype, lltype.Ptr)
diff --git a/rpython/translator/stm/src_stm/stmgcintf.c b/rpython/translator/stm/src_stm/stmgcintf.c
--- a/rpython/translator/stm/src_stm/stmgcintf.c
+++ b/rpython/translator/stm/src_stm/stmgcintf.c
@@ -83,7 +83,7 @@
pypy_stm_ready_atomic = 1;
stm_commit_transaction();
pypy_stm_ready_atomic = 0;
- stm_unregister_thread_local(&stm_thread_local);
+ pypy_stm_unregister_thread_local();
errno = e;
}
else {
diff --git a/rpython/translator/stm/src_stm/stmgcintf.h b/rpython/translator/stm/src_stm/stmgcintf.h
--- a/rpython/translator/stm/src_stm/stmgcintf.h
+++ b/rpython/translator/stm/src_stm/stmgcintf.h
@@ -16,6 +16,7 @@
void pypy_stm_setup(void);
void pypy_stm_setup_prebuilt(void); /* generated into stm_prebuilt.c */
void pypy_stm_register_thread_local(void); /* generated into stm_prebuilt.c */
+void pypy_stm_unregister_thread_local(void); /* generated into stm_prebuilt.c */
static inline void pypy_stm_commit_if_not_atomic(void) {
int e = errno;
More information about the pypy-commit
mailing list