Skip to content

debugger: :trace is wasting time

When using :trace, execution is constantly switching between the main GHCi thread and the execution thread. The main GHCi thread is a bound thread, whereas the other thread is an unbound thread, so these context switches are real OS-thread switches, consequently :trace wastes a lot of time context-switching.

Perhaps the main GHCi thread should be an unbound thread, or else :trace should fork an unbound thread before starting execution.

Edited by Simon Marlow
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information