Author: Tobias Weber <[email protected]>
Branch: c8-adaptive-trx-length-per-thread
Changeset: r2072:0621fb926e22
Date: 2017-06-11 17:03 +0200
http://bitbucket.org/pypy/stmgc/changeset/0621fb926e22/
Log: Merge transaction start instrumentation fix
diff --git a/c8/stm/core.c b/c8/stm/core.c
--- a/c8/stm/core.c
+++ b/c8/stm/core.c
@@ -1152,8 +1152,6 @@
long _stm_start_transaction(stm_thread_local_t *tl)
{
- start_timer();
-
s_mutex_lock();
#ifdef STM_NO_AUTOMATIC_SETJMP
long repeat_count = did_abort; /* test/support.py */
@@ -1161,6 +1159,9 @@
#else
long repeat_count = stm_rewind_jmp_setjmp(tl);
#endif
+
+ start_timer();
+
if (repeat_count) {
/* only if there was an abort, we need to reset the memory: */
if (tl->mem_reset_on_abort)
@@ -1168,7 +1169,7 @@
tl->mem_bytes_to_reset_on_abort);
}
- // _do_start_transaction is instrumented as well and pauses for waits
+ // _do_start_transaction is instrumented as well b/c it needs to pause for
waits
pause_timer();
_do_start_transaction(tl);
continue_timer();
diff --git a/c8/stm/timing.h b/c8/stm/timing.h
--- a/c8/stm/timing.h
+++ b/c8/stm/timing.h
@@ -29,7 +29,7 @@
#define stm_duration_payload(duration_data) \
stm_timing_event_payload_data_t stm_duration_data = \
- { .duration = &(duration_data) }; \
+ { .duration = &(duration_data) }; \
stm_timing_event_payload_t stm_duration_payload = \
{ STM_EVENT_PAYLOAD_DURATION, stm_duration_data };
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit