Author: tobias@masterthesis-vm
Branch: c8-efficient-serial-execution
Changeset: r2026:3d8a3ec72e8a
Date: 2017-03-06 17:02 +0100
http://bitbucket.org/pypy/stmgc/changeset/3d8a3ec72e8a/
Log: Adapt test interface of stmgc and fix crash if timing events are not
enabled
diff --git a/c8/stm/timing.h b/c8/stm/timing.h
--- a/c8/stm/timing.h
+++ b/c8/stm/timing.h
@@ -22,7 +22,9 @@
{ STM_EVENT_PAYLOAD_DURATION, stm_duration_data };
#define publish_event(event) \
- stmcb_timing_event(STM_SEGMENT->running_thread, event,
&stm_duration_payload);
+ (timing_enabled() ? \
+ stmcb_timing_event(STM_SEGMENT->running_thread, event,
&stm_duration_payload) : \
+ (void)0);
#define stop_timer_and_publish(event) stop_timer() \
get_duration() \
diff --git a/c8/test/support.py b/c8/test/support.py
--- a/c8/test/support.py
+++ b/c8/test/support.py
@@ -180,7 +180,7 @@
};
typedef union {
stm_loc_marker_t *loc_marker;
- uint32_t duration;
+ struct timespec *duration;
} stm_timing_event_payload_data_t;
/* Wrapper for payload holding data type and data. */
typedef struct {
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit