Can programs be monitored while they are running (possibly piping the event log)? Or is it only possible to view event logs after execution. If the latter is the case, is there a deeper reason with respect to how the Haskell runtime works?
Edit: I don’t know much about the runtime tbh, but given dflemstr’s response, I was curious about how much and the ways in which performance is degraded by adding the event monitoring runtime option. I recall in RWH they mentioned that the rts has to add cost centres, but I wasn’t completely sure about how expensive this sort of thing was.
The direct answer is that, no, it is not possible. And, no, there is no reason for that except that nobody has done the required legwork so far.
I think this would mainly be a matter of
Modifying
ghc-eventsso it supports reading event logs chunk-wise and provide partial results. Maybe porting it over toattoparsecwould help?Threadscope would have to update its internal tree data structures as new data streams in.
Nothing too hard, but somebody would need to do it. I think I heard discussion about adding this feature already… So it might happen eventually.
Edit: And to make it clear, there’s no real reason this would have to degrade performance beyond what you get with event log or cost centre profiling already.