[GHC] #14468: Why does alanz's branch blow up GHC's heap?

GHC ghc-devs at haskell.org
Wed Nov 15 19:46:12 UTC 2017


#14468: Why does alanz's branch blow up GHC's heap?
-------------------------------------+-------------------------------------
        Reporter:  bgamari           |                Owner:  (none)
            Type:  task              |               Status:  new
        Priority:  high              |            Milestone:  8.4.1
       Component:  Compiler          |              Version:  8.2.1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by bgamari):

 Perhaps unsurprisingly, the dominant contribution here is typechecking,
 {{{
 *** Checking old interface for HsInstances (use -ddump-hi-diffs for more
 details):
 *** Parser [HsInstances]:
 !!! Parser [HsInstances]: finished in 4.90 milliseconds, allocated 9.166
 megabytes
 *** Renamer/typechecker [HsInstances]:
 !!! Renamer/typechecker [HsInstances]: finished in 48430.88 milliseconds,
 allocated 59998.701 megabytes
 *** Desugar [HsInstances]:
 Result size of Desugar (after optimization)
   = {terms: 39,619,
      types: 309,762,
      coercions: 4,274,106,
      joins: 0/3,281}
 !!! Desugar [HsInstances]: finished in 17066.61 milliseconds, allocated
 21449.018 megabytes
 *** Simplifier [HsInstances]:
 Result size of Simplifier iteration=1
   = {terms: 61,148,
      types: 351,421,
      coercions: 238,159,
      joins: 0/3,212}
 Result size of Simplifier iteration=2
   = {terms: 59,333,
      types: 350,264,
      coercions: 242,742,
      joins: 0/2,475}
 Result size of Simplifier iteration=3
   = {terms: 58,354,
      types: 345,841,
      coercions: 241,068,
      joins: 0/2,446}
 Result size of Simplifier iteration=4
   = {terms: 58,338,
      types: 345,742,
      coercions: 240,892,
      joins: 0/2,444}
 Result size of Simplifier
   = {terms: 58,338,
      types: 345,742,
      coercions: 240,892,
      joins: 0/2,444}
 !!! Simplifier [HsInstances]: finished in 3464.16 milliseconds, allocated
 5298.698 megabytes
 *** Specialise [HsInstances]:
 Result size of Specialise
   = {terms: 63,565,
      types: 358,072,
      coercions: 242,946,
      joins: 0/2,422}
 !!! Specialise [HsInstances]: finished in 366.65 milliseconds, allocated
 806.110 megabytes
 *** Float out(FOS {Lam = Just 0,
                    Consts = True,
                    OverSatApps = False}) [HsInstances]:
 Result size of Float out(FOS {Lam = Just 0,
                               Consts = True,
                               OverSatApps = False})
   = {terms: 72,114,
      types: 387,785,
      coercions: 242,946,
      joins: 0/2,790}
 !!! Float out(FOS {Lam = Just 0,
                    Consts = True,
                    OverSatApps = False}) [HsInstances]: finished in 665.25
 milliseconds, allocated 927.697 megabytes
 *** Simplifier [HsInstances]:
 Result size of Simplifier iteration=1
   = {terms: 72,811,
      types: 394,019,
      coercions: 243,374,
      joins: 0/2,887}
 Result size of Simplifier iteration=2
   = {terms: 70,244,
      types: 394,237,
      coercions: 243,092,
      joins: 0/2,782}
 Result size of Simplifier iteration=3
   = {terms: 70,207,
      types: 395,136,
      coercions: 243,092,
      joins: 0/2,760}
 Result size of Simplifier
   = {terms: 70,207,
      types: 395,136,
      coercions: 243,092,
      joins: 0/2,760}
 !!! Simplifier [HsInstances]: finished in 2800.81 milliseconds, allocated
 3389.853 megabytes
 *** Simplifier [HsInstances]:
 Result size of Simplifier iteration=1
   = {terms: 69,365,
      types: 393,057,
      coercions: 243,092,
      joins: 9/2,769}
 Result size of Simplifier iteration=2
   = {terms: 69,317,
      types: 393,038,
      coercions: 243,092,
      joins: 0/2,760}
 Result size of Simplifier iteration=3
   = {terms: 69,310,
      types: 393,039,
      coercions: 243,092,
      joins: 0/2,770}
 Result size of Simplifier
   = {terms: 69,290,
      types: 393,029,
      coercions: 243,092,
      joins: 0/2,760}
 !!! Simplifier [HsInstances]: finished in 2498.60 milliseconds, allocated
 3181.271 megabytes
 *** Simplifier [HsInstances]:
 Result size of Simplifier iteration=1
   = {terms: 86,688,
      types: 407,268,
      coercions: 243,089,
      joins: 292/3,052}
 lt size of Simplifier
   = {terms: 86,688,
      types: 407,268,
      coercions: 243,089,
      joins: 292/3,052}
 !!! Simplifier [HsInstances]: finished in 1482.55 milliseconds, allocated
 1822.554 megabytes
 *** Float inwards [HsInstances]:
 Result size of Float inwards
   = {terms: 86,688,
      types: 407,268,
      coercions: 243,089,
      joins: 292/3,052}
 !!! Float inwards [HsInstances]: finished in 257.39 milliseconds,
 allocated 492.612 megabytes
 *** Called arity analysis [HsInstances]:
 Result size of Called arity analysis
   = {terms: 86,688,
      types: 407,268,
      coercions: 243,089,
      joins: 292/3,052}
 !!! Called arity analysis [HsInstances]: finished in 857.47 milliseconds,
 allocated 1821.950 megabytes
 *** Simplifier [HsInstances]:
 Result size of Simplifier iteration=1
   = {terms: 86,688,
      types: 407,268,
      coercions: 243,089,
      joins: 292/3,052}
 Result size of Simplifier
   = {terms: 86,688,
      types: 407,268,
      coercions: 243,089,
      joins: 292/3,052}
 !!! Simplifier [HsInstances]: finished in 6407.60 milliseconds, allocated
 1816.619 megabytes
 *** Demand analysis [HsInstances]:
 Result size of Demand analysis
   = {terms: 86,688,
      types: 407,268,
      coercions: 243,089,
      joins: 292/3,052}
 !!! Demand analysis [HsInstances]: finished in 7202.07 milliseconds,
 allocated 9270.744 megabytes
 *** Worker Wrapper binds [HsInstances]:
 Result size of Worker Wrapper binds
   = {terms: 90,308,
      types: 415,860,
      coercions: 243,120,
      joins: 292/3,610}
 !!! Worker Wrapper binds [HsInstances]: finished in 91.28 milliseconds,
 allocated 42.636 megabytes
 *** Simplifier [HsInstances]:
 Result size of Simplifier iteration=1
   = {terms: 90,034,
      types: 416,359,
      coercions: 243,643,
      joins: 314/3,097}
 Result size of Simplifier iteration=2
   = {terms: 88,163,
      types: 411,674,
      coercions: 243,143,
      joins: 292/3,055}
 Result size of Simplifier iteration=3
   = {terms: 88,115,
      types: 411,518,
      coercions: 243,081,
      joins: 292/3,052}
 Result size of Simplifier
   = {terms: 88,115,
      types: 411,518,
      coercions: 243,081,
      joins: 292/3,052}
 !!! Simplifier [HsInstances]: finished in 3032.09 milliseconds, allocated
 3908.092 megabytes
 *** Exitification transformation [HsInstances]:
 Result size of Exitification transformation
   = {terms: 88,115,
      types: 411,518,
      coercions: 243,081,
      joins: 292/3,052}
 !!! Exitification transformation [HsInstances]: finished in 43.61
 milliseconds, allocated 33.863 megabytes
 *** Float out(FOS {Lam = Just 0,
                    Consts = True,
                    OverSatApps = True}) [HsInstances]:
 Result size of Float out(FOS {Lam = Just 0,
                               Consts = True,
                               OverSatApps = True})
   = {terms: 90,071,
      types: 413,216,
      coercions: 243,081,
      joins: 0/2,760}
 !!! Float out(FOS {Lam = Just 0,
                    Consts = True,
                    OverSatApps = True}) [HsInstances]: finished in 801.06
 milliseconds, allocated 1044.681 megabytes
 *** Common sub-expression [HsInstances]:
 Result size of Common sub-expression
   = {terms: 83,216,
      types: 403,886,
      coercions: 242,872,
      joins: 0/2,760}
 !!! Common sub-expression [HsInstances]: finished in 415.19 milliseconds,
 allocated 768.373 megabytes
 *** Float inwards [HsInstances]:
 Result size of Float inwards
   = {terms: 83,216,
      types: 403,886,
      coercions: 242,872,
      joins: 0/2,760}
 !!! Float inwards [HsInstances]: finished in 289.80 milliseconds,
 allocated 470.782 megabytes
 *** Liberate case [HsInstances]:
 Result size of Liberate case
   = {terms: 83,216,
      types: 403,886,
      coercions: 242,872,
      joins: 0/2,760}
 !!! Liberate case [HsInstances]: finished in 73.12 milliseconds, allocated
 103.518 megabytes
 *** Simplifier [HsInstances]:
 Result size of Simplifier iteration=1
   = {terms: 79,540,
      types: 395,132,
      coercions: 242,872,
      joins: 0/2,760}
 Result size of Simplifier
   = {terms: 79,540,
      types: 395,132,
      coercions: 242,872,
      joins: 0/2,760}
 !!! Simplifier [HsInstances]: finished in 1477.16 milliseconds, allocated
 1796.773 megabytes
 *** SpecConstr [HsInstances]:
 Result size of SpecConstr
   = {terms: 79,540,
      types: 395,132,
      coercions: 242,872,
      joins: 0/2,760}
 !!! SpecConstr [HsInstances]: finished in 433.32 milliseconds, allocated
 658.733 megabytes
 *** Simplifier [HsInstances]:
 Result size of Simplifier
   = {terms: 79,540,
      types: 395,132,
      coercions: 242,872,
      joins: 0/2,760}
 !!! Simplifier [HsInstances]: finished in 731.25 milliseconds, allocated
 872.946 megabytes
 *** Demand analysis [HsInstances]:
 Result size of Demand analysis
   = {terms: 79,540,
      types: 395,132,
      coercions: 242,872,
      joins: 0/2,760}
 !!! Demand analysis [HsInstances]: finished in 2900.86 milliseconds,
 allocated 3463.096 megabytes
 *** CoreTidy [HsInstances]:
 Result size of Tidy Core
   = {terms: 78,322,
      types: 391,734,
      coercions: 242,749,
      joins: 0/2,760}
 !!! CoreTidy [HsInstances]: finished in 268.39 milliseconds, allocated
 337.202 megabytes
 writeBinIface: 3171 Names
 writeBinIface: 3487 dict entries
 writeBinIface: 3171 Names
 writeBinIface: 3487 dict entries
 Created temporary directory: /tmp/ghc7250_0
 *** CorePrep [HsInstances]:
 Result size of CorePrep
   = {terms: 100,011,
      types: 474,602,
      coercions: 242,749,
      joins: 0/10,157}
 !!! CorePrep [HsInstances]: finished in 237.39 milliseconds, allocated
 349.483 megabytes
 *** Stg2Stg:
 *** CodeGen [HsInstances]:
 !!! CodeGen [HsInstances]: finished in 5228.65 milliseconds, allocated
 8228.633 megabytes
 *** Assembler:
 gcc -fno-stack-protector -DTABLES_NEXT_TO_CODE -Icompiler/hsSyn
 -Icompiler/stage3/build -Iincludes -Iincludes/dist -Iincludes/dist-
 derivedconstants/header -Iincludes/dist-ghcconstants/header
 -Icompiler/stage3/build -Icompiler/stage3/build/./autogen -Icompiler/.
 -Icompiler/parser -Icompiler/utils -Icompiler/../rts/dist/build
 -Icompiler/stage2 -no-pie -x assembler -c /tmp/ghc7250_0/ghc_1.s -o
 compiler/stage3/build/HsInstances.o
 *** CorePrep [HsInstances]:
 Result size of CorePrep
   = {terms: 100,011,
      types: 474,602,
      coercions: 242,749,
      joins: 0/10,157}
 !!! CorePrep [HsInstances]: finished in 283.31 milliseconds, allocated
 348.963 megabytes
 *** Stg2Stg:
 *** CodeGen [HsInstances]:
 !!! CodeGen [HsInstances]: finished in 8840.65 milliseconds, allocated
 8731.219 megabytes
 *** Assembler:
 }}}

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


More information about the ghc-tickets mailing list