diff options
| author | Duncan Coutts <duncan@well-typed.com> | 2012-10-15 00:52:32 +0100 |
|---|---|---|
| committer | Duncan Coutts <duncan@well-typed.com> | 2012-10-15 12:28:29 +0100 |
| commit | a609027da31c7c9103d8b9741ba3fc6807b7b7b9 (patch) | |
| tree | d0e5340b10ef2d2e3935c3d682e3b35e4737d1ac /compiler | |
| parent | 8af2d940c786136a29a061fa9542e39f65e6d6fb (diff) | |
| download | haskell-a609027da31c7c9103d8b9741ba3fc6807b7b7b9.tar.gz | |
Add a new traceMarker# primop for use in profiling output
In time-based profiling visualisations (e.g. heap profiles and ThreadScope)
it would be useful to be able to mark particular points in the execution and
have those points in time marked in the visualisation.
The traceMarker# primop currently emits an event into the eventlog. In
principle it could be extended to do something in the heap profiling too.
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/prelude/primops.txt.pp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/compiler/prelude/primops.txt.pp b/compiler/prelude/primops.txt.pp index 2e56e981a5..7730106c46 100644 --- a/compiler/prelude/primops.txt.pp +++ b/compiler/prelude/primops.txt.pp @@ -2203,6 +2203,17 @@ primop TraceEventOp "traceEvent#" GenPrimOp has_side_effects = True out_of_line = True +primop TraceMarkerOp "traceMarker#" GenPrimOp + Addr# -> State# s -> State# s + { Emits a marker 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. } + with + has_side_effects = True + out_of_line = True + + ------------------------------------------------------------------------ --- --- ------------------------------------------------------------------------ |
