Add a way to generate tracing events programmatically
authorSimon Marlow <marlowsd@gmail.com>
Fri, 25 Sep 2009 15:02:43 +0000 (15:02 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Fri, 25 Sep 2009 15:02:43 +0000 (15:02 +0000)
commit5407ad8e0a5c08ac5193c1a9ede2a12570baee0b
tree0676ae90bb68e88ad42fd05a0c0282cd48c8b140
parente43a5e498520b933a0d9f4c7e9ddfb7ed2032cfd
Add a way to generate tracing events programmatically

added:

 primop  TraceEventOp "traceEvent#" GenPrimOp
   Addr# -> State# s -> State# s
   { Emits an event via the RTS tracing framework.  The contents
     of the event is the zero-terminated byte string passed as the first
     argument.  The event will be emitted either to the .eventlog file,
     or to stderr, depending on the runtime RTS flags. }

and added the required RTS functionality to support it.  Also a bit of
refactoring in the RTS tracing code.
compiler/prelude/primops.txt.pp
includes/rts/EventLogFormat.h
includes/rts/Flags.h
includes/stg/MiscClosures.h
rts/Linker.c
rts/PrimOps.cmm
rts/RtsFlags.c
rts/Trace.c
rts/Trace.h
rts/eventlog/EventLog.c
rts/eventlog/EventLog.h