projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use DynFlags to work out if we are doing ticky ticky profiling
[ghc-hetmet.git]
/
compiler
/
codeGen
/
StgCmmTicky.hs
diff --git
a/compiler/codeGen/StgCmmTicky.hs
b/compiler/codeGen/StgCmmTicky.hs
index
544f863
..
2e4b29e
100644
(file)
--- a/
compiler/codeGen/StgCmmTicky.hs
+++ b/
compiler/codeGen/StgCmmTicky.hs
@@
-56,12
+56,13
@@
import CLabel
import Module
import Name
import Id
import Module
import Name
import Id
-import StaticFlags
import BasicTypes
import FastString
import Constants
import Outputable
import BasicTypes
import FastString
import Constants
import Outputable
+import DynFlags
+
-- Turgid imports for showTypeCategory
import PrelNames
import TcType
-- Turgid imports for showTypeCategory
import PrelNames
import TcType
@@
-321,9
+322,9
@@
tickyAllocHeap hp
-- Ticky utils
ifTicky :: FCode () -> FCode ()
-- Ticky utils
ifTicky :: FCode () -> FCode ()
-ifTicky code
- | opt_DoTickyProfiling = code
- | otherwise = nopC
+ifTicky code = do dflags <- getDynFlags
+ if doingTickyProfiling dflags then code
+ else nopC
-- All the ticky-ticky counters are declared "unsigned long" in C
bumpTickyCounter :: LitString -> FCode ()
-- All the ticky-ticky counters are declared "unsigned long" in C
bumpTickyCounter :: LitString -> FCode ()