diff options
author | Takano Akio <aljee@hyper.cx> | 2013-02-15 20:06:38 +0900 |
---|---|---|
committer | Edward Z. Yang <ezyang@mit.edu> | 2013-03-25 00:27:31 -0700 |
commit | b9d537317cb774abf832758e2be9c08db70b6d2c (patch) | |
tree | cdc4fa5afcff50da3ce7b9e4442bff3a62b357e5 /rts/ProfHeap.c | |
parent | 98267a869ff04ec9c69d48773a15664946b0ef42 (diff) | |
download | haskell-b9d537317cb774abf832758e2be9c08db70b6d2c.tar.gz |
Heap profiling: flush .hp file at the end of each frame
Diffstat (limited to 'rts/ProfHeap.c')
-rw-r--r-- | rts/ProfHeap.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/rts/ProfHeap.c b/rts/ProfHeap.c index f570a54c25..f094038235 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); + } } /* -------------------------------------------------------------------------- |