haskell / ghc-events

Library and tool for parsing .eventlog files from GHC
http://www.haskell.org/haskellwiki/ThreadScope
Other
33 stars 34 forks source link

Record skipped event data in events #43

Closed osa1 closed 5 months ago

osa1 commented 5 years ago

With this patch we record any skipped data of an event in Event, to be able to serialize Events with skipped data as they were generated by GHC. This in turn gives us roundtrip property for more events (but not for all events, for that we need to fix #14).

Fixes #41

osa1 commented 5 years ago

Ping @maoe .

Apparently this doesn't build with GHC 7.8.4. I'll fix this later.

maoe commented 5 years ago

The changes look good to me. Could we add a test case to check the property?

Regarding the build error with GHC 7.8.4, I'm personally fine with dropping support for it if the fix involves CPP.

osa1 commented 5 years ago

Could we add a test case to check the property?

We don't actually have roundtrip property until we fix #14 first -- I'll update the PR title and description. I wrote some ideas in #14 and I'm hoping to start working on it so let me know what you think. After #14 we can write hedgehog or QC based property tests.

(I'm currently testing this branch by reading a 1G large .eventlog file and for every event testing the roundtrip property)