[commit: ghc] master: Don't pass -dcore-lint to haddock in Haddock.mk (b10d3f3)

git at git.haskell.org git at git.haskell.org
Thu Jun 8 19:36:41 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/b10d3f36250d435f9f13079dd9e3ec1ecbb0017f/ghc

>---------------------------------------------------------------

commit b10d3f36250d435f9f13079dd9e3ec1ecbb0017f
Author: Douglas Wilson <douglas.wilson at gmail.com>
Date:   Thu Jun 8 15:03:44 2017 -0400

    Don't pass -dcore-lint to haddock in Haddock.mk
    
    This fixes the regressions in the haddock performance tests introduced
    in c9eb4385aad248118650725b7b699bb97ee21c0d.
    
    Reviewers: austin, bgamari
    
    Reviewed By: bgamari
    
    Subscribers: rwbarton, thomie
    
    GHC Trac Issues: #13789
    
    Differential Revision: https://phabricator.haskell.org/D3629


>---------------------------------------------------------------

b10d3f36250d435f9f13079dd9e3ec1ecbb0017f
 rules/haddock.mk                   | 38 ++++++++++++++++++++------------------
 testsuite/tests/perf/haddock/all.T |  9 ++++++---
 2 files changed, 26 insertions(+), 21 deletions(-)

diff --git a/rules/haddock.mk b/rules/haddock.mk
index 3d3a83c..35748c3 100644
--- a/rules/haddock.mk
+++ b/rules/haddock.mk
@@ -42,6 +42,9 @@ html_$1 : $$($$($1_PACKAGE)-$$($1_$2_VERSION)_HADDOCK_FILE)
 
 $$($1_PACKAGE)-$$($1_$2_VERSION)_HADDOCK_DEPS = $$(foreach n,$$($1_$2_DEPS),$$($$n_HADDOCK_FILE) $$($$n_dist-install_$$(HADDOCK_WAY)_LIB))
 
+# We don't pass -dcore-lint to haddock because it caused a performance regression in #13789
+$1_$2_HADDOCK_GHC_OPTS = $$(foreach opt, $$(filter-out -dcore-lint,$$($1_$2_$$(HADDOCK_WAY)_ALL_HC_OPTS)),--optghc=$$(opt))
+
 ifeq "$$(HSCOLOUR_SRCS)" "YES"
 $1_$2_HADDOCK_FLAGS += --source-module=src/%{MODULE/./-}.html --source-entity=src/%{MODULE/./-}.html\#%{NAME}
 endif
@@ -56,23 +59,23 @@ ifeq "$$(HSCOLOUR_SRCS)" "YES"
 	"$$(ghc-cabal_INPLACE)" hscolour $1 $2
 endif
 	"$$(TOP)/$$(INPLACE_BIN)/haddock" \
-	  --verbosity=0 \
-	  --odir="$1/$2/doc/html/$$($1_PACKAGE)" \
-	  --no-tmp-comp-dir \
-	  --dump-interface=$$($$($1_PACKAGE)-$$($1_$2_VERSION)_HADDOCK_FILE) \
-	  --html \
-	  --hoogle \
-	  --title="$$($1_PACKAGE)-$$($1_$2_VERSION)$$(if $$(strip $$($1_$2_SYNOPSIS)),: $$(strip $$($1_$2_SYNOPSIS)),)" \
-	  --prologue="$1/$2/haddock-prologue.txt" \
-	  --optghc="-D__HADDOCK_VERSION__=$$(HADDOCK_VERSION_STRING)" \
-	  $$(foreach mod,$$($1_$2_HIDDEN_MODULES),--hide=$$(mod)) \
-	  $$(foreach pkg,$$($1_$2_DEPS),$$(if $$($$(pkg)_HADDOCK_FILE),--read-interface=../$$(pkg)$$(comma)../$$(pkg)/src/%{MODULE/./-}.html\#%{NAME}$$(comma)$$($$(pkg)_HADDOCK_FILE))) \
-	  $$(foreach opt,$$($1_$2_$$(HADDOCK_WAY)_ALL_HC_OPTS),--optghc=$$(opt)) \
-	  $$($1_$2_HADDOCK_FLAGS) $$($1_$2_HADDOCK_OPTS) \
-	  $$($1_$2_HS_SRCS) \
-	  $$($1_$2_EXTRA_HADDOCK_SRCS) \
-	  $$(EXTRA_HADDOCK_OPTS) \
-	  +RTS -t"$1/$2/haddock.t" --machine-readable
+		--verbosity=0 \
+		--odir="$1/$2/doc/html/$$($1_PACKAGE)" \
+		--no-tmp-comp-dir \
+		--dump-interface=$$($$($1_PACKAGE)-$$($1_$2_VERSION)_HADDOCK_FILE) \
+		--html \
+		--hoogle \
+		--title="$$($1_PACKAGE)-$$($1_$2_VERSION)$$(if $$(strip $$($1_$2_SYNOPSIS)),: $$(strip $$($1_$2_SYNOPSIS)),)" \
+		--prologue="$1/$2/haddock-prologue.txt" \
+		--optghc="-D__HADDOCK_VERSION__=$$(HADDOCK_VERSION_STRING)" \
+		$$(foreach mod,$$($1_$2_HIDDEN_MODULES),--hide=$$(mod)) \
+		$$(foreach pkg,$$($1_$2_DEPS),$$(if $$($$(pkg)_HADDOCK_FILE),--read-interface=../$$(pkg)$$(comma)../$$(pkg)/src/%{MODULE/./-}.html\#%{NAME}$$(comma)$$($$(pkg)_HADDOCK_FILE))) \
+		$$($1_$2_HADDOCK_GHC_OPTS) \
+		$$($1_$2_HADDOCK_FLAGS) $$($1_$2_HADDOCK_OPTS) \
+		$$($1_$2_HS_SRCS) \
+		$$($1_$2_EXTRA_HADDOCK_SRCS) \
+		$$(EXTRA_HADDOCK_OPTS) \
+		+RTS -t"$1/$2/haddock.t" --machine-readable
 
 # --no-tmp-comp-dir above is important: it saves a few minutes in a
 # validate.  This flag lets Haddock use the pre-compiled object files
@@ -89,4 +92,3 @@ endif # $1_$2_DO_HADDOCK
 
 $(call profEnd, haddock($1,$2))
 endef
-
diff --git a/testsuite/tests/perf/haddock/all.T b/testsuite/tests/perf/haddock/all.T
index 47421ce..64a6449 100644
--- a/testsuite/tests/perf/haddock/all.T
+++ b/testsuite/tests/perf/haddock/all.T
@@ -9,7 +9,7 @@ test('haddock.base',
           [(platform('x86_64-unknown-mingw32'), 24286343184, 5)
             # 2017-02-19                        24286343184 (x64/Windows) - Generalize kind of (->)
 
-          ,(wordsize(64), 27868466432, 5)
+          ,(wordsize(64), 25173968808, 5)
             # 2012-08-14:  5920822352 (amd64/Linux)
             # 2012-09-20:  5829972376 (amd64/Linux)
             # 2012-10-08:  5902601224 (amd64/Linux)
@@ -40,6 +40,7 @@ test('haddock.base',
             # 2017-02-17: 38425793776 (x86_64/Linux) - Generalize kind of (->)
             # 2017-02-12: 25592972912 (x86_64/Linux) - Type-indexed Typeable
             # 2017-06-05: 27868466432 (x86_64/Linux) - Desugar modules compiled with -fno-code
+            # 2017-06-06: 25173968808 (x86_64/Linux) - Don't pass on -dcore-lint in Haddock.mk
 
           ,(platform('i386-unknown-mingw32'), 2885173512, 5)
             # 2013-02-10:                     3358693084 (x86/Windows)
@@ -66,7 +67,7 @@ test('haddock.Cabal',
      [extra_files(['../../../../libraries/Cabal/Cabal/dist-install/haddock.t']),
       unless(in_tree_compiler(), skip), req_haddock
      ,stats_num_field('bytes allocated',
-          [(wordsize(64), 22294859000, 5)
+          [(wordsize(64), 18753963960 , 5)
             # 2012-08-14:  3255435248 (amd64/Linux)
             # 2012-08-29:  3324606664 (amd64/Linux, new codegen)
             # 2012-10-08:  3373401360 (amd64/Linux)
@@ -113,6 +114,7 @@ test('haddock.Cabal',
             # 2017-02-12: 18865432648 (amd64/Linux) - Type-indexed Typeable
             # 2017-05-31: 18269309128 (amd64/Linux) - Faster checkFamInstConsistency
             # 2017-06-05: 22294859000 (amd64/Linux) - Desugar modules compiled with -fno-code
+            # 2017-06-05: 18753963960 (amd64/Linux) - Don't pass on -dcore-lint in Haddock.mk
 
           ,(platform('i386-unknown-mingw32'), 3293415576, 5)
             # 2012-10-30:                     1733638168 (x86/Windows)
@@ -136,7 +138,7 @@ test('haddock.compiler',
      [extra_files(['../../../../compiler/stage2/haddock.t']),
       unless(in_tree_compiler(), skip), req_haddock
      ,stats_num_field('bytes allocated',
-          [(wordsize(64), 65378619232, 10)
+          [(wordsize(64), 55990521024 , 10)
             # 2012-08-14: 26070600504 (amd64/Linux)
             # 2012-08-29: 26353100288 (amd64/Linux, new CG)
             # 2012-09-18: 26882813032 (amd64/Linux)
@@ -156,6 +158,7 @@ test('haddock.compiler',
             # 2017-02-25: 55777283352 (amd64/Linux) Early inline patch
             # 2017-05-31: 52762752968 (amd64/Linux) Faster checkFamInstConsistency
             # 2017-06-05: 65378619232 (amd64/Linux) Desugar modules compiled with -fno-code
+            # 2017-06-06: 55990521024 (amd64/Linux) Don't pass on -dcore-lint in Haddock.mk
 
           ,(platform('i386-unknown-mingw32'),   367546388, 10)
             # 2012-10-30:                     13773051312 (x86/Windows)



More information about the ghc-commits mailing list