[pypy-commit] stmgc default: Print the full name of the abort reason
arigo
noreply at buildbot.pypy.org
Thu Sep 12 20:48:48 CEST 2013
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r529:4ed9ba1552f8
Date: 2013-09-12 20:48 +0200
http://bitbucket.org/pypy/stmgc/changeset/4ed9ba1552f8/
Log: Print the full name of the abort reason
diff --git a/c4/et.c b/c4/et.c
--- a/c4/et.c
+++ b/c4/et.c
@@ -902,6 +902,7 @@
void AbortTransaction(int num)
{
+ static const char *abort_names[] = ABORT_NAMES;
struct tx_descriptor *d = thread_descriptor;
unsigned long limit;
struct timespec now;
@@ -1003,10 +1004,10 @@
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");
diff --git a/c4/et.h b/c4/et.h
--- a/c4/et.h
+++ b/c4/et.h
@@ -124,6 +124,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
More information about the pypy-commit
mailing list