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

On branch  : ghc-7.4

http://hackage.haskell.org/trac/ghc/changeset/bced264076d58d49f36e5b76189dd1faa56816c6

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

commit bced264076d58d49f36e5b76189dd1faa56816c6
Author: Simon Marlow <[email protected]>
Date:   Mon Dec 19 11:53:42 2011 +0000

    Fix alignment in the CostCentre struct (#5710)

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

 compiler/codeGen/CgProf.hs     |    2 +-
 compiler/codeGen/StgCmmProf.hs |   16 ++++++++--------
 includes/rts/prof/CCS.h        |    2 +-
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/compiler/codeGen/CgProf.hs b/compiler/codeGen/CgProf.hs
index a2e40d0..296dd62 100644
--- a/compiler/codeGen/CgProf.hs
+++ b/compiler/codeGen/CgProf.hs
@@ -178,8 +178,8 @@ emitCostCentreDecl cc = do
              label,    -- char *label,
              modl,     -- char *module,
               loc,      -- char *srcloc,
+              zero64,   -- StgWord64 mem_alloc
               zero,     -- StgWord time_ticks
-              zero64,  -- StgWord64 mem_alloc
               is_caf,   -- StgInt is_caf
               zero      -- struct _CostCentre *link
            ] 
diff --git a/compiler/codeGen/StgCmmProf.hs b/compiler/codeGen/StgCmmProf.hs
index 88031dc..6d16f01 100644
--- a/compiler/codeGen/StgCmmProf.hs
+++ b/compiler/codeGen/StgCmmProf.hs
@@ -223,14 +223,14 @@ emitCostCentreDecl cc = do
                 -- 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,
-                 modl,  -- char *module,
-                 loc,   -- char *srcloc,
-                 zero,  -- StgWord time_ticks
-                zero64,        -- StgWord64 mem_alloc
-                 is_caf,   -- StgInt is_caf
-                 zero   -- struct _CostCentre *link
+  ; let lits = [ zero,    -- StgInt ccID,
+                label,   -- char *label,
+                 modl,    -- char *module,
+                 loc,     -- char *srcloc,
+                 zero64,  -- StgWord64 mem_alloc
+                 zero,    -- StgWord time_ticks
+                 is_caf,  -- StgInt is_caf
+                 zero     -- struct _CostCentre *link
               ] 
   ; emitDataLits (mkCCLabel cc) lits
   }
diff --git a/includes/rts/prof/CCS.h b/includes/rts/prof/CCS.h
index 36404aa..3639e49 100644
--- a/includes/rts/prof/CCS.h
+++ b/includes/rts/prof/CCS.h
@@ -37,8 +37,8 @@ typedef struct _CostCentre {
     char * srcloc;
 
     // used for accumulating costs at the end of the run...
-    StgWord   time_ticks;
     StgWord64 mem_alloc;      // align 8 (Note [struct alignment])
+    StgWord   time_ticks;
 
     StgInt is_caf;            // non-zero for a CAF cost centre
 



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

Reply via email to