[pypy-commit] stmgc c8-efficient-serial-execution: Introduce general data structure for timing event workloads
tob...@masterthesis-vm
pypy.commits at gmail.com
Fri Mar 3 06:01:35 EST 2017
Author: tobias at masterthesis-vm
Branch: c8-efficient-serial-execution
Changeset: r2018:7c3284e554f1
Date: 2017-03-01 21:56 +0100
http://bitbucket.org/pypy/stmgc/changeset/7c3284e554f1/
Log: Introduce general data structure for timing event workloads
diff --git a/c8/stmgc.h b/c8/stmgc.h
--- a/c8/stmgc.h
+++ b/c8/stmgc.h
@@ -574,6 +574,13 @@
STM_GC_MAJOR_START,
STM_GC_MAJOR_DONE,
+ /* execution duration profiling events */
+ STM_DURATION_WRITE_BARRIER,
+ STM_DURATION_VALIDATION,
+ STM_DURATION_COMMIT,
+ STM_DURATION_MINOR_GC,
+ STM_DURATION_MAJOR_GC,
+
_STM_EVENT_N
};
@@ -596,6 +603,22 @@
uintptr_t odd_number; /* marker odd number, or 0 if marker is missing */
object_t *object; /* marker object, or NULL if marker is missing */
} stm_loc_marker_t;
+/* Allow any kind of payload to be attached to a timing event. */
+enum stm_payload_type_e {
+ STM_EVENT_PAYLOAD_MARKER,
+ STM_EVENT_PAYLOAD_DURATION,
+
+ _STM_EVENT_PAYLOAD_N
+};
+typedef union {
+ stm_loc_marker_t *loc_marker;
+ uint32_t duration;
+} stm_timing_event_payload_data_t;
+/* Wrapper for payload holding data type and data. */
+typedef struct {
+ enum stm_payload_type_e payload_type;
+ stm_timing_event_payload_data_t payload_data;
+} stm_timing_event_payload_t;
extern void (*stmcb_timing_event)(stm_thread_local_t *tl, /* the local thread */
enum stm_event_e event,
stm_loc_marker_t *marker);
More information about the pypy-commit
mailing list