Skip to content
  • Zejun Wu's avatar
    Merge sections in profiling .a to .p_o and use it whenever it exists · de56a67a
    Zejun Wu authored and Ben Gamari's avatar Ben Gamari committed
    Summary:
    We do this for vanilla way already.
    Let's also merge sections for profiling way and use it instead of the .a
    library when it exists.
    
    Test Plan:
    ```
     $ inplace/bin/ghc-stage2 --interactive -prof -fexternal-interpreter
     GHCi, version 8.7.20180921: http://www.haskell.org/ghc/  :? for help
     Prelude> pid <- System.Posix.Process.getProcessID
     Prelude> maps <- readFile $ "/proc/" ++ show pid ++ "/maps"
     Prelude> pid
     3807346
     Prelude> putStrLn $ unlines $ take 20 $ lines maps
     00400000-02103000 r-xp 00000000 00:1a 199277344
     /data/users/watashi/ghc/inplace/lib/bin/ghc-iserv-prof
     02104000-02106000 r--p 01d03000 00:1a 199277344
     /data/users/watashi/ghc/inplace/lib/bin/ghc-iserv-prof
     02106000-02417000 rw-p 01d05000 00:1a 199277344
     /data/users/watashi/ghc/inplace/lib/bin/ghc-iserv-prof
     02417000-0280a000 rw-p 00000000 00:00 0
     [heap]
     40098000-400b0000 rwxp 000d2000 00:1a 199276023
     /data/users/watashi/ghc/libraries/bytestring/dist-ins...
    de56a67a