Author: Armin Rigo <[email protected]>
Branch: stmgc-c4
Changeset: r66926:17d596a06b51
Date: 2013-09-12 20:50 +0200
http://bitbucket.org/pypy/pypy/changeset/17d596a06b51/
Log: import stmgc/4ed9ba1552f8 and hack to always print aborts
diff --git a/rpython/translator/stm/src_stm/et.c
b/rpython/translator/stm/src_stm/et.c
--- a/rpython/translator/stm/src_stm/et.c
+++ b/rpython/translator/stm/src_stm/et.c
@@ -903,6 +903,7 @@
void AbortTransaction(int num)
{
+ static const char *abort_names[] = ABORT_NAMES;
struct tx_descriptor *d = thread_descriptor;
unsigned long limit;
struct timespec now;
@@ -1001,13 +1002,15 @@
stm_invoke_callbacks_on_abort(d);
stm_clear_callbacks_on_abort(d);
+ fprintf(stderr, "[%lx] abort %s\n",
+ (long)d->public_descriptor_index, abort_names[num]);
dprintf(("\n"
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"
- "!!!!!!!!!!!!!!!!!!!!! [%lx] abort %d\n"
+ "!!!!!!!!!!!!!!!!!!!!! [%lx] abort %s\n"
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"
- "\n", (long)d->public_descriptor_index, num));
+ "\n", (long)d->public_descriptor_index, abort_names[num]));
if (num != ABRT_MANUAL && d->max_aborts >= 0 && !d->max_aborts--)
stm_fatalerror("unexpected abort!\n");
@@ -1534,8 +1537,8 @@
(XXX statically we should know when we're outside
a transaction) */
- fprintf(stderr, "[%lx] inevitable: %s\n",
- (long)d->public_descriptor_index, why);
+ dprintf(("[%lx] inevitable: %s\n",
+ (long)d->public_descriptor_index, why));
cur_time = acquire_inev_mutex_and_mark_global_cur_time(d);
if (d->start_time != cur_time)
diff --git a/rpython/translator/stm/src_stm/et.h
b/rpython/translator/stm/src_stm/et.h
--- a/rpython/translator/stm/src_stm/et.h
+++ b/rpython/translator/stm/src_stm/et.h
@@ -125,6 +125,15 @@
#define ABRT_COLLECT_MINOR 6
#define ABRT_COLLECT_MAJOR 7
#define ABORT_REASONS 8
+#define ABORT_NAMES { "MANUAL", \
+ "COMMIT", \
+ "STOLEN_MODIFIED", \
+ "VALIDATE_INFLIGHT", \
+ "VALIDATE_COMMIT", \
+ "VALIDATE_INEV", \
+ "COLLECT_MINOR", \
+ "COLLECT_MAJOR", \
+ }
#define SPLP_ABORT 0
#define SPLP_LOCKED_INFLIGHT 1
diff --git a/rpython/translator/stm/src_stm/revision
b/rpython/translator/stm/src_stm/revision
--- a/rpython/translator/stm/src_stm/revision
+++ b/rpython/translator/stm/src_stm/revision
@@ -1,1 +1,1 @@
-0b3f7830cb46
+4ed9ba1552f8
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit