
#13426: compile-time memory-usage regression for DynFlags between GHC 8.0 and GHC
8.2
-------------------------------------+-------------------------------------
Reporter: hvr | Owner: (none)
Type: bug | Status: new
Priority: high | Milestone: 8.2.1
Component: Compiler | Version: 8.1
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: Compile-time
Unknown/Multiple | performance bug
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
I notice that buildbots were having a hard-time building GHC 8.2
snapshots... so I investigated...
One thing that jumped at me was the memory usage while compiling DynFlags
which is the worst memory-offender with 4777MiB of resident size:
{{{
"inplace/bin/ghc-stage1" -hisuf hi -osuf o -hcsuf hc -static -H32m -O
-Wall -Iincludes -Iincludes/dist -Iincludes/dist-derivedconstants/header
-Iincludes/dist-ghcconstants/header -this-unit-id ghc-8.2.0.201
70313 -hide-all-packages -i -icompiler/backpack -icompiler/basicTypes
-icompiler/cmm -icompiler/codeGen -icompiler/coreSyn -icompiler/deSugar
-icompiler/ghci -icompiler/hsSyn -icompiler/iface -icompiler/llvmGen -
icompiler/main -icompiler/nativeGen -icompiler/parser -icompiler/prelude
-icompiler/profiling -icompiler/rename -icompiler/simplCore
-icompiler/simplStg -icompiler/specialise -icompiler/stgSyn
-icompiler/stranal
-icompiler/typecheck -icompiler/types -icompiler/utils
-icompiler/vectorise -icompiler/stage2/build -Icompiler/stage2/build
-icompiler/stage2/build/./autogen -Icompiler/stage2/build/./autogen
-Icompiler/. -Icompi
ler/parser -Icompiler/utils -Icompiler/../rts/dist/build -Icompiler/stage2
-optP-DGHCI -optP-include
-optPcompiler/stage2/build/./autogen/cabal_macros.h -package-id
base-4.10.0.0 -package-id deepseq-1.4.3.0 -pa
ckage-id directory-1.3.0.2 -package-id process-1.4.3.0 -package-id
bytestring-0.10.8.2 -package-id binary-0.8.4.1 -package-id time-1.8.0.1
-package-id containers-0.5.10.2 -package-id array-0.5.1.2 -package-id fil
epath-1.4.1.1 -package-id template-haskell-2.12.0.0 -package-id
hpc-0.6.0.3 -package-id transformers-0.5.2.0 -package-id ghc-
boot-8.2.0.20170313 -package-id ghc-boot-th-8.2.0.20170313 -package-id
ghci-8.2.0.20170
313 -package-id hoopl-3.10.2.2 -package-id unix-2.7.2.1 -package-id
terminfo-0.4.0.2 -Wall -fno-warn-name-shadowing -this-unit-id ghc
-XHaskell2010 -optc-DTHREADED_RTS -DGHCI_TABLES_NEXT_TO_CODE -DSTAGE=2
-Rghc-t
iming -O2 -no-user-package-db -rtsopts -Wnoncanonical-monad-
instances -odir compiler/stage2/build -hidir compiler/stage2/build
-stubdir compiler/stage2/build -dynamic-too -c compiler/main/DynFlags.hs
-o
compiler/stage2/build/DynFlags.o -dyno
compiler/stage2/build/DynFlags.dyn_o
}}}
{{{
<