summaryrefslogtreecommitdiff
path: root/rts/Trace.c
diff options
context:
space:
mode:
authorDuncan Coutts <duncan@well-typed.com>2011-10-25 18:55:55 +0100
committerDuncan Coutts <duncan@well-typed.com>2011-10-26 12:00:43 +0100
commit4856d15a87d9052e2d9729c6a3e4312eb00622a2 (patch)
treee43d369cf1e1bd372c22c9a58dce71996c06a5fe /rts/Trace.c
parentece21ea00b8681b09c9eedbebbac1af764864367 (diff)
downloadhaskell-4856d15a87d9052e2d9729c6a3e4312eb00622a2.tar.gz
Add new eventlog EVENT_WALL_CLOCK_TIME for time matching
Eventlog timestamps are elapsed times (in nanoseconds) relative to the process start. To be able to merge eventlogs from multiple processes we need to be able to align their timelines. If they share a clock domain (or a user judges that their clocks are sufficiently closely synchronised) then it is sufficient to know how the eventlog timestamps match up with the clock. The EVENT_WALL_CLOCK_TIME contains the clock time with (up to) nanosecond precision. It is otherwise an ordinary event and so contains the usual timestamp for the same moment in time. It therefore enables us to match up all the eventlog timestamps with clock time.
Diffstat (limited to 'rts/Trace.c')
-rw-r--r--rts/Trace.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/rts/Trace.c b/rts/Trace.c
index 7aa0f7b444..9d29f2a8fa 100644
--- a/rts/Trace.c
+++ b/rts/Trace.c
@@ -328,6 +328,12 @@ void traceCapsetEvent_ (EventTypeNum tag,
}
}
+void traceWallClockTime_(void) {
+ if (eventlog_enabled) {
+ postWallClockTime(CAPSET_CLOCKDOMAIN_DEFAULT);
+ }
+}
+
void traceOSProcessInfo_(void) {
if (eventlog_enabled) {
postCapsetEvent(EVENT_OSPROCESS_PID,