Closed phadej closed 2 years ago
Can we review and merge this @bgamari ?
I have gone ahead and merged this but it appears that there is something wrong here; a simple "hello world" testcase compiled with 8.10.7 (from #4) seems to result in an eventlog without a header.
@phadej, were you able to test this?
I did a bit of digging here. The problem appears to be that the endEventLogging
, which listen_iteration
calls, pushes a block marker to the EventBuf
. This then appears before the eventlog header (produced by startEventLogging
) in the output stream. I fixed this in https://gitlab.haskell.org/ghc/ghc/-/commit/8188adf0f1a0482c269d1eb6350dd91dddc9ed29. Unfortunately, that commit is only in GHC 9.2 and later.
Indeed I can confirm that things work as expected in GHC 9.2.
@bgamari I'm not working on this anymore. Please take over.
EDIT: IIRC I did very little testing on non-GHC-9.2 sources, if any.
I tried to comment code, I'll be happy to clarify.