X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FcodeGen%2FCgProf.hs;h=bc5473a6e53b5bd18c650f237ed60e1679bb3f0a;hb=2eb04ca0f8d0ec72b417cddc60672c696b4a3daa;hp=9bbf05b90c0482f3829b6915dc969962feaa7cb6;hpb=61d2625ae2e6a4cdae2ffc92df828905e81c24cc;p=ghc-hetmet.git diff --git a/compiler/codeGen/CgProf.hs b/compiler/codeGen/CgProf.hs index 9bbf05b..bc5473a 100644 --- a/compiler/codeGen/CgProf.hs +++ b/compiler/codeGen/CgProf.hs @@ -2,7 +2,7 @@ -- -- Code generation for profiling -- --- (c) The University of Glasgow 2004 +-- (c) The University of Glasgow 2004-2006 -- ----------------------------------------------------------------------------- @@ -32,29 +32,28 @@ module CgProf ( #include "../includes/DerivedConstants.h" -- For REP_xxx constants, which are MachReps -import ClosureInfo ( ClosureInfo, closureSize, - closureName, isToplevClosure, closureReEntrant, ) +import ClosureInfo import CgUtils import CgMonad -import SMRep ( StgWord, profHdrSize ) +import SMRep import Cmm import MachOp -import CmmUtils ( zeroCLit, mkIntCLit, mkLblExpr ) -import CLabel ( mkCCLabel, mkCCSLabel, mkRtsDataLabel ) +import CmmUtils +import CLabel -import Module ( pprModule ) -import Id ( Id ) +import Id +import qualified Module import CostCentre -import StgSyn ( GenStgExpr(..), StgExpr ) -import StaticFlags ( opt_SccProfilingOn ) -import FastString ( FastString ) +import StgSyn +import StaticFlags +import FastString import Constants -- Lots of field offsets import Outputable -import Maybe -import Char ( ord ) -import Monad ( when ) +import Data.Maybe +import Data.Char +import Control.Monad ----------------------------------------------------------------------------- -- @@ -292,7 +291,11 @@ emitCostCentreDecl -> Code emitCostCentreDecl cc = do { label <- mkStringCLit (costCentreUserName cc) - ; modl <- mkStringCLit (showSDoc (pprModule (cc_mod cc))) + ; modl <- mkStringCLit (Module.moduleNameString + (Module.moduleName (cc_mod cc))) + -- All cost centres will be in the main package, since we + -- don't normally use -auto-all or add SCCs to other packages. + -- Hence don't emit the package name in the module here. ; let lits = [ zero, -- StgInt ccID, label, -- char *label,