[pypy-commit] stmgc c8-overheads-instrumentation: Merge single thread mode events and fixes for timing macros
tobweber
pypy.commits at gmail.com
Sat Jun 10 05:45:07 EDT 2017
Author: Tobias Weber <tobias_weber89 at gmx.de>
Branch: c8-overheads-instrumentation
Changeset: r2070:45d8e22cca0d
Date: 2017-06-10 11:43 +0200
http://bitbucket.org/pypy/stmgc/changeset/45d8e22cca0d/
Log: Merge single thread mode events and fixes for timing macros
diff --git a/c8/stm/timing.h b/c8/stm/timing.h
--- a/c8/stm/timing.h
+++ b/c8/stm/timing.h
@@ -29,20 +29,20 @@
#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 };
#define publish_event(thread_local, event) \
(timing_enabled() ? \
- stmcb_timing_event(thread_local, event, &stm_duration_payload) : \
+ stmcb_timing_event((thread_local), (event), &stm_duration_payload) :\
(void)0);
#define stop_timer_and_publish_for_thread(thread_local, event) \
pause_timer() \
stm_duration_payload(duration) \
- assert(thread_local != NULL); \
- publish_event(thread_local, event)
+ assert((thread_local) != NULL); \
+ publish_event((thread_local), (event))
#define stop_timer_and_publish(event) \
- stop_timer_and_publish_for_thread(STM_SEGMENT->running_thread, event)
+ stop_timer_and_publish_for_thread(STM_SEGMENT->running_thread, (event))
diff --git a/c8/stmgc.h b/c8/stmgc.h
--- a/c8/stmgc.h
+++ b/c8/stmgc.h
@@ -585,6 +585,10 @@
STM_DURATION_MAJOR_GC_LOG_ONLY,
STM_DURATION_MAJOR_GC_FULL,
+ STM_SINGLE_THREAD_MODE_ON,
+ STM_SINGLE_THREAD_MODE_OFF,
+ STM_SINGLE_THREAD_MODE_ADAPTIVE,
+
_STM_EVENT_N
};
More information about the pypy-commit
mailing list