Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/951c3e2acb90e504d8b75a01167892178176a7c7

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

commit 951c3e2acb90e504d8b75a01167892178176a7c7
Author: Simon Marlow <[email protected]>
Date:   Thu Nov 17 11:59:10 2011 +0000

    GhcProfiled: don't automatically add -auto-all

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

 compiler/ghc.mk |   19 ++++++++++++++-----
 1 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/compiler/ghc.mk b/compiler/ghc.mk
index 4449a14..d2a272e 100644
--- a/compiler/ghc.mk
+++ b/compiler/ghc.mk
@@ -349,12 +349,21 @@ else
 compiler_CONFIGURE_OPTS += --ghc-option=-DNO_REGS
 endif
 
-# If we're profiling GHC then we want lots of SCCs, so -auto-all
-# We also don't want to waste time building the non-profiling library.
-# Unfortunately this means that we have to tell ghc-pkg --force as it
-# gets upset when libHSghc-6.9.a doesn't exist.
 ifeq "$(GhcProfiled)" "YES"
-compiler_stage2_CONFIGURE_OPTS += --ghc-option=-auto-all
+
+# If we're profiling GHC then we want SCCs.  However, adding -auto-all
+# everywhere tends to give a hard-to-read profile, and adds lots of
+# overhead.  A better approach is to proceed top-down; identify the
+# parts of the compiler of interest, and then add further cost centres
+# as necessary.  Turn on -auto-all for individual modules like this:
+
+compiler/main/DriverPipeline_HC_OPTS += -auto-all
+compiler/main/GhcMake_HC_OPTS        += -auto-all
+compiler/main/GHC_HC_OPTS            += -auto-all
+
+# or alternatively addd {-# OPTIONS_GHC -auto-all #-} to the top of
+# modules you're interested in.
+
 # We seem to still build the vanilla libraries even if we say
 # --disable-library-vanilla, but installation then fails, as Cabal
 # doesn't copy the vanilla .hi files, but ghc-pkg complains about



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to