
11 Nov
2018
11 Nov
'18
3:10 a.m.
Richard Eisenberg
OK. Well, I couldn't sample from Activity Monitor, because the processes came and went too quickly. But the terminal command `sample` takes a *name* as an argument, and so passing ghc-stage1 worked nicely. Samples were taken during rts_dist_HC calls.
Hmmm, it looks to me like all of these are from GHC waiting on various things (e.g. _pthread_cond_wait, nanosleep, and pthread_join). It's quite surprising that these operations are chewing through cycles in kernel mode. I wonder how rapidly we are context switching. Perhaps we are quickly jumping between kernel and user mode? Perhaps strace (or I think the OS X equivalent is truss?) will shed some light? Cheers, - Ben