[pypy-commit] stmgc default: merge
Raemi
noreply at buildbot.pypy.org
Sat Aug 31 14:52:48 CEST 2013
Author: Remi Meier <remi.meier at gmail.com>
Branch:
Changeset: r508:ad930f6cd71a
Date: 2013-08-31 14:52 +0200
http://bitbucket.org/pypy/stmgc/changeset/ad930f6cd71a/
Log: merge
diff --git a/c4/et.c b/c4/et.c
--- a/c4/et.c
+++ b/c4/et.c
@@ -26,6 +26,31 @@
return tmp_buf;
}
+void stm_dump_dbg(void)
+{
+ fprintf(stderr, "/**** stm_dump_dbg ****/\n\n");
+
+ int i;
+ for (i = 0; i < MAX_THREADS; i++) {
+ struct tx_public_descriptor *pd = stm_descriptor_array[i];
+ if (pd == NULL)
+ continue;
+ fprintf(stderr, "stm_descriptor_array[%d]\npublic_descriptor: %p\n",
+ i, pd);
+
+ struct tx_descriptor *d = stm_tx_head;
+ while (d && d->public_descriptor != pd)
+ d = d->tx_next;
+ if (!d)
+ continue;
+
+ fprintf(stderr, "thread_descriptor: \033[%dm%p\033[0m\n\n",
+ d->tcolor, d);
+ }
+
+ fprintf(stderr, "/**********************/\n");
+}
+
__thread struct tx_descriptor *thread_descriptor = NULL;
@@ -1691,6 +1716,7 @@
stm_thread_local_obj = NULL;
d->thread_local_obj_ref = &stm_thread_local_obj;
d->max_aborts = -1;
+ d->tcolor = dprintfcolor();
d->tx_prev = NULL;
d->tx_next = stm_tx_head;
if (d->tx_next != NULL) d->tx_next->tx_prev = d;
diff --git a/c4/et.h b/c4/et.h
--- a/c4/et.h
+++ b/c4/et.h
@@ -175,6 +175,7 @@
struct FXCache recent_reads_cache;
char **read_barrier_cache_ref;
struct tx_descriptor *tx_prev, *tx_next;
+ int tcolor;
};
extern __thread struct tx_descriptor *thread_descriptor;
More information about the pypy-commit
mailing list