slow execution of built executables on a Mac

George Colpitts george.colpitts at
Wed Nov 7 23:23:51 UTC 2018

Ben, yeah, good point, probabilistically speaking, a few stack traces are
often all you need to pinpoint an egregious performance problem, at least
that's been my experience.

Richard, as you probably know, you can get stack traces by using the
Activity Monitor, select a ghc process and choose sample process from the
drop down of the gear icon on the left hand side of the top of the activity
monitor. It also shows cpu times which may be helpful.

On Wed, Nov 7, 2018 at 7:10 PM Ben Gamari <ben at> wrote:

> Richard Eisenberg <rae at> writes:
> > Sadly, none of the suggestions on this thread worked.
> >
> > But here is some more detail:
> >
> > - During stage-1, my machine's CPU is maxed out (or nearly so) in user
> mode.
> > - After stage-1 (most obviously during rts_dist_HC), my machine spends
> roughly 80% of its CPU in *system* mode.
> > - Testing on my other machine (which is slower, but much faster at
> building GHC), I never see high *system* percentages.
> > - Both machines use APFS, which was one candidate for the slowdown.
> > - The slow machine uses XCode 10.1; the fast one uses XCode 9.4.1
> > - The slow machine uses clang 10.0.0; the fast one uses clang 9.1.0
> > - `brew install gmp` on the slow machine tells me that gmp is already
> installed.
> > - As a reminder: the slow machine is macOS 10.13.6; the fast one is
> macOS 10.13.5. I don't wish to try upgrading the fast one... lest that slow
> it down!
> >
> > Does anyone have any insight?
> >
> Were you able to collect a few stacks from the slow processes? It sounds
> like the author of the original post was somehow able to do this. Under
> Linux I would just fire up perf and grab a system-wide profile. Knowing
> precisely what slow path you are hitting would help localize any
> possible problem in GHC.
> Cheers,
> - Ben
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the ghc-devs mailing list