summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2011-05-09 18:10:57 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2011-05-09 18:10:57 +0100
commit2d5205118357cac8a2dd43b33bcd93a3c00f5558 (patch)
tree3571265d70bfc01fe4e4df6cc32fbe9627cc7c2a
parent6a1aab7737016aa714b2ffec2b5657a18fac0e42 (diff)
parent72d4ef338d4d64724cdf6e9ba3e66862082ed45b (diff)
downloadhaskell-2d5205118357cac8a2dd43b33bcd93a3c00f5558.tar.gz
Merge branch 'master' of http://darcs.haskell.org/ghc
-rw-r--r--compiler/nativeGen/X86/Ppr.hs14
-rw-r--r--rts/ProfHeap.c11
2 files changed, 20 insertions, 5 deletions
diff --git a/compiler/nativeGen/X86/Ppr.hs b/compiler/nativeGen/X86/Ppr.hs
index a9ed03610e..38b6344950 100644
--- a/compiler/nativeGen/X86/Ppr.hs
+++ b/compiler/nativeGen/X86/Ppr.hs
@@ -642,8 +642,8 @@ pprInstr (FDIV size op1 op2) = pprSizeOpOp (sLit "div") size op1 op2
pprInstr (CVTSS2SD from to) = pprRegReg (sLit "cvtss2sd") from to
pprInstr (CVTSD2SS from to) = pprRegReg (sLit "cvtsd2ss") from to
-pprInstr (CVTTSS2SIQ sz from to) = pprSizeOpReg (sLit "cvttss2si") sz from to
-pprInstr (CVTTSD2SIQ sz from to) = pprSizeOpReg (sLit "cvttsd2si") sz from to
+pprInstr (CVTTSS2SIQ sz from to) = pprSizeSizeOpReg (sLit "cvttss2si") FF32 sz from to
+pprInstr (CVTTSD2SIQ sz from to) = pprSizeSizeOpReg (sLit "cvttsd2si") FF64 sz from to
pprInstr (CVTSI2SS sz from to) = pprSizeOpReg (sLit "cvtsi2ss") sz from to
pprInstr (CVTSI2SD sz from to) = pprSizeOpReg (sLit "cvtsi2sd") sz from to
@@ -1094,7 +1094,6 @@ pprSizeOpReg name size op1 reg2
pprReg archWordSize reg2
]
-
pprCondRegReg :: LitString -> Size -> Cond -> Reg -> Reg -> Doc
pprCondRegReg name size cond reg1 reg2
= hcat [
@@ -1116,11 +1115,18 @@ pprSizeSizeRegReg name size1 size2 reg1 reg2
pprSize size2,
space,
pprReg size1 reg1,
-
comma,
pprReg size2 reg2
]
+pprSizeSizeOpReg :: LitString -> Size -> Size -> Operand -> Reg -> Doc
+pprSizeSizeOpReg name size1 size2 op1 reg2
+ = hcat [
+ pprMnemonic name size2,
+ pprOperand size1 op1,
+ comma,
+ pprReg size2 reg2
+ ]
pprSizeRegRegReg :: LitString -> Size -> Reg -> Reg -> Reg -> Doc
pprSizeRegRegReg name size reg1 reg2 reg3
diff --git a/rts/ProfHeap.c b/rts/ProfHeap.c
index 9bd707fb2a..7d2a450129 100644
--- a/rts/ProfHeap.c
+++ b/rts/ProfHeap.c
@@ -18,6 +18,7 @@
#include "LdvProfile.h"
#include "Arena.h"
#include "Printer.h"
+#include "sm/GCThread.h"
#include <string.h>
@@ -1057,8 +1058,9 @@ heapCensusChain( Census *census, bdescr *bd )
void
heapCensus( void )
{
- nat g;
+ nat g, n;
Census *census;
+ gen_workspace *ws;
census = &censuses[era];
census->time = mut_user_time();
@@ -1080,6 +1082,13 @@ heapCensus( void )
// Are we interested in large objects? might be
// confusing to include the stack in a heap profile.
heapCensusChain( census, generations[g].large_objects );
+
+ for (n = 0; n < n_capabilities; n++) {
+ ws = &gc_threads[n]->gens[g];
+ heapCensusChain(census, ws->todo_bd);
+ heapCensusChain(census, ws->part_list);
+ heapCensusChain(census, ws->scavd_list);
+ }
}
// dump out the census info