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

GHC ghc-devs at haskell.org
Thu May 25 01:59:35 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):

 Thanks for the script, duog! It'll help me figure out what commit(s)
 introduced this regression.

 I did some quick testing on my Ubuntu machine with `gcc-4.8.4`. As
 baselines, I tested GHC 8.0.2:

 {{{
 real    0m0.299s
 user    0m0.256s
 sys     0m0.028s
 }}}

 and GHC 8.2.1-rc2:

 {{{
 (Without -fwhole-archive-hs-libs)
 real    0m12.946s
 user    0m12.816s
 sys     0m0.136s

 (With -fwhole-archive-hs-libs)
 real    0m2.676s
 user    0m2.436s
 sys     0m0.220s
 }}}

 I noticed a significant difference around commit
 b207b536ded40156f9adb168565ca78e1eef2c74 (Generalize kind of the (->)
 tycon). Before that commit, we have:

 {{{
 Commit efeaf9e436109cb35b491e08b5407c0598108186 (Bump nofib submodule)
 ------
 (Without -fwhole-archive-hs-libs)
 real    0m4.686s
 user    0m4.600s
 sys     0m0.068s

 (With -fwhole-archive-hs-libs)
 real    0m0.055s
 user    0m0.040s
 sys     0m0.008s
 }}}

 And after:

 {{{
 Commit b207b536ded40156f9adb168565ca78e1eef2c74 (Generalize kind of the
 (->) tycon)
 ------
 (Without -fwhole-archive-hs-libs)
 real    0m13.047s
 user    0m12.948s
 sys     0m0.104s

 (With -fwhole-archive-hs-libs)
 real    0m2.696s
 user    0m2.480s
 sys     0m0.196s
 }}}

 However, the times for commit efeaf9e436109cb35b491e08b5407c0598108186 are
 still not at parity with GHC 8.0.2, so an earlier commit must have
 contributed as well. I'll try to track down which one(s).

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


More information about the ghc-tickets mailing list