Skip to content
Snippets Groups Projects
Forked from Glasgow Haskell Compiler / GHC
Source project has a limited visibility.
  • Alp Mestanogullari's avatar
    688a1b89
    compiler: trace SysTools commands to emit start/stop eventlog markers · 688a1b89
    Alp Mestanogullari authored and Marge Bot's avatar Marge Bot committed
    This patch was motivated by some performance characterization work done
    for #16822, where we suspected that GHC was spending a lot of time waiting
    on the linker to be done. (That turned out to be true.)
    
    The tracing is taken care of by ErrUtils.withTiming, so this patch just defines
    and uses a little wrapper around that function in all the helpers for
    calling the various systools (C compiler, linker, unlit, ...).
    
    With this patch, assuming a GHC executable linked against an eventlog-capable
    RTS (RTS ways that contain the debug, profiling or eventlog way units), we can
    measure how much time is spent in each of the SysTools when building hello.hs
    by simply doing:
    
      ghc hello.hs -ddump-timings +RTS -l
    
    The event names are "systool:{cc, linker, as, unlit, ...}".
    688a1b89
    History
    compiler: trace SysTools commands to emit start/stop eventlog markers
    Alp Mestanogullari authored and Marge Bot's avatar Marge Bot committed
    This patch was motivated by some performance characterization work done
    for #16822, where we suspected that GHC was spending a lot of time waiting
    on the linker to be done. (That turned out to be true.)
    
    The tracing is taken care of by ErrUtils.withTiming, so this patch just defines
    and uses a little wrapper around that function in all the helpers for
    calling the various systools (C compiler, linker, unlit, ...).
    
    With this patch, assuming a GHC executable linked against an eventlog-capable
    RTS (RTS ways that contain the debug, profiling or eventlog way units), we can
    measure how much time is spent in each of the SysTools when building hello.hs
    by simply doing:
    
      ghc hello.hs -ddump-timings +RTS -l
    
    The event names are "systool:{cc, linker, as, unlit, ...}".
Code owners
Assign users and groups as approvers for specific file changes. Learn more.