[pypy-commit] pypy stm-gc: Change what is printed. Now even non-debug builds can have

arigo noreply at buildbot.pypy.org
Thu Feb 23 15:02:09 CET 2012


Author: Armin Rigo <arigo at tunes.org>
Branch: stm-gc
Changeset: r52803:a70cb92dc2e7
Date: 2012-02-23 14:58 +0100
http://bitbucket.org/pypy/pypy/changeset/a70cb92dc2e7/

Log:	Change what is printed. Now even non-debug builds can have logged
	the operation that caused the transaction to become inevitable.

diff --git a/pypy/translator/stm/src_stm/et.c b/pypy/translator/stm/src_stm/et.c
--- a/pypy/translator/stm/src_stm/et.c
+++ b/pypy/translator/stm/src_stm/et.c
@@ -690,25 +690,19 @@
   if (d == NULL)
     return;
 
+  if (is_inevitable(d))   /* also when the transaction is inactive */
+    {
+      return;  /* I am already inevitable */
+    }
+
 #ifdef RPY_STM_DEBUG_PRINT
   PYPY_DEBUG_START("stm-inevitable");
-#  ifdef RPY_STM_ASSERT
   if (PYPY_HAVE_DEBUG_PRINTS)
     {
-      fprintf(PYPY_DEBUG_FILE, "%s%s\n", why,
-              is_inevitable(d) ? "" : " <====");
+      fprintf(PYPY_DEBUG_FILE, "%s\n", why);
     }
-#  endif
 #endif
 
-  if (is_inevitable(d))   /* also when the transaction is inactive */
-    {
-#ifdef RPY_STM_DEBUG_PRINT
-      PYPY_DEBUG_STOP("stm-inevitable");
-#endif
-      return;  /* I am already inevitable */
-    }
-
   while (1)
     {
       unsigned long curtime = get_global_timestamp(d);
diff --git a/pypy/translator/stm/src_stm/et.h b/pypy/translator/stm/src_stm/et.h
--- a/pypy/translator/stm/src_stm/et.h
+++ b/pypy/translator/stm/src_stm/et.h
@@ -30,7 +30,7 @@
 float     stm_read_int4f(void *, long);
 
 
-#ifdef RPY_STM_ASSERT
+#if 1  /* #ifdef RPY_STM_ASSERT --- but it's always useful to have this info */
 #  define STM_CCHARP1(arg)    char* arg
 #  define STM_EXPLAIN1(info)  info
 #else


More information about the pypy-commit mailing list