[GHC] #13739: Very slow linking of profiled executables

GHC ghc-devs at haskell.org
Fri May 26 16:18:42 UTC 2017


#13739: Very slow linking of profiled executables
-------------------------------------+-------------------------------------
        Reporter:  duog              |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.2.1-rc2
      Resolution:                    |             Keywords:
Operating System:  Linux             |         Architecture:  x86_64
 Type of failure:  Compile-time      |  (amd64)
  performance bug                    |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by RyanGlScott):

 For reference, I decided to compare two builds of GHC 8.2.1-rc2 with and
 without reverting commit 283acec1d7307fdbd8cd7b3f1d984a036366d6b4, and the
 difference is astounding.

 If you revert commit 283acec1d7307fdbd8cd7b3f1d984a036366d6b4, you get:

 {{{
 (Without -fwhole-archive-hs-libs)
 real    0m0.277s
 user    0m0.224s
 sys     0m0.036s

 (With -fwhole-archive-hs-libs)
 real    0m5.447s
 user    0m5.104s
 sys     0m0.328s
 }}}

 And if you use plain 8.2.1-rc2 (without reverting commit
 283acec1d7307fdbd8cd7b3f1d984a036366d6b4), you get:

 {{{
 (Without -fwhole-archive-hs-libs)
 real    0m13.648s
 user    0m12.716s
 sys     0m0.156s

 (With -fwhole-archive-hs-libs)
 real    0m3.077s
 user    0m2.500s
 sys     0m0.216s
 }}}

 So that commit at least explains the differences without the use of the
 `-fwhole-archive-hs-libs` flag. However, it doesn't account for the jump
 in times _with_ the the `-fwhole-archive-hs-libs` flag. I'll try
 investigating that next.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13739#comment:11>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list