Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit b9d537317cb774abf832758e2be9c08db70b6d2c 1 parent 98267a8
@takano-akio takano-akio authored ezyang committed
Showing with 3 additions and 0 deletions.
  1. +3 −0  rts/ProfHeap.c
View
3  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);
+ }
}
/* --------------------------------------------------------------------------
Please sign in to comment.
Something went wrong with that request. Please try again.