[commit: ghc] master: Add traceBinaryEvent# primop (21f0f56)
git at git.haskell.org
git at git.haskell.org
Tue Aug 21 22:57:50 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/21f0f56164f50844c2150c62f950983b2376f8b6/ghc
>---------------------------------------------------------------
commit 21f0f56164f50844c2150c62f950983b2376f8b6
Author: Mitsutoshi Aoe <maoe at foldr.in>
Date: Tue Aug 21 16:08:17 2018 -0400
Add traceBinaryEvent# primop
This adds a new primop called traceBinaryEvent# that takes the length
of binary data and a pointer to the data, then emits it to the eventlog.
There is some example code that uses this primop and the new event:
* [traceBinaryEventIO][1] that calls `traceBinaryEvent#`
* [A patch to ghc-events][2] that parses the new `EVENT_USER_BINARY_MSG`
There's no corresponding issue on Trac but it was discussed at
ghc-devs [3].
[1] https://github.com/maoe/ghc-trace-events/blob
/fb226011ef1f85a97b4da7cc9d5f98f9fe6316ae/src/Debug/Trace/Binary.hs#L29)
[2] https://github.com/maoe/ghc-events/commit
/239ca77c24d18cdd10d6d85a0aef98e4a7c56ae6)
[3] https://mail.haskell.org/pipermail/ghc-devs/2018-May/015791.html
Reviewers: bgamari, erikd, simonmar
Reviewed By: bgamari
Subscribers: rwbarton, thomie, carter
Differential Revision: https://phabricator.haskell.org/D5007
>---------------------------------------------------------------
21f0f56164f50844c2150c62f950983b2376f8b6
compiler/prelude/primops.txt.pp | 14 ++++++--
includes/rts/EventLogFormat.h | 6 +++-
includes/stg/MiscClosures.h | 1 +
rts/PrimOps.cmm | 8 +++++
rts/RtsSymbols.c | 1 +
rts/Trace.c | 11 ++++++
rts/Trace.h | 5 +++
rts/eventlog/EventLog.c | 54 +++++++++++++++++++++++++----
rts/eventlog/EventLog.h | 3 ++
testsuite/tests/rts/all.T | 4 +++
testsuite/tests/rts/traceBinaryEvent.hs | 25 +++++++++++++
testsuite/tests/rts/traceBinaryEvent.stderr | 1 +
testsuite/tests/rts/traceEvent.hs | 5 +++
testsuite/tests/rts/traceEvent.stderr | 1 +
14 files changed, 130 insertions(+), 9 deletions(-)
Diff suppressed because of size. To see it, use:
git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 21f0f56164f50844c2150c62f950983b2376f8b6
More information about the ghc-commits
mailing list