[commit: ghc] master: Heap profiling: flush .hp file at the end of each frame (b9d5373)

Edward Z. Yang ezyang at MIT.EDU
Mon Mar 25 08:27:58 CET 2013


Repository : http://darcs.haskell.org/ghc.git/

On branch  : master

https://github.com/ghc/ghc/commit/b9d537317cb774abf832758e2be9c08db70b6d2c

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

commit b9d537317cb774abf832758e2be9c08db70b6d2c
Author: Takano Akio <aljee at hyper.cx>
Date:   Fri Feb 15 20:06:38 2013 +0900

    Heap profiling: flush .hp file at the end of each frame

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

 rts/ProfHeap.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/rts/ProfHeap.c b/rts/ProfHeap.c
index f570a54..f094038 100644
--- a/rts/ProfHeap.c
+++ b/rts/ProfHeap.c
@@ -364,6 +364,9 @@ printSample(rtsBool beginSample, StgDouble sampleValue)
     fprintf(hp_file, "%s %" FMT_Word64 ".%02" FMT_Word64 "\n",
             (beginSample ? "BEGIN_SAMPLE" : "END_SAMPLE"),
             (StgWord64)integralPart, (StgWord64)(fractionalPart * 100));
+    if (!beginSample) {
+        fflush(hp_file);
+    }
 }
 
 /* --------------------------------------------------------------------------





More information about the ghc-commits mailing list