Author: Tobias Weber <tobias_webe...@gmx.de> Branch: c8-overheads-instrumentation Changeset: r2071:06b84e2a6b84 Date: 2017-06-11 16:25 +0200 http://bitbucket.org/pypy/stmgc/changeset/06b84e2a6b84/
Log: Fix wrong transaction start measurements when transaction was aborted with longjmp diff --git a/c8/stm/core.c b/c8/stm/core.c --- a/c8/stm/core.c +++ b/c8/stm/core.c @@ -1151,8 +1151,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 */ @@ -1160,6 +1158,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) @@ -1167,7 +1168,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 pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit