.hp file contains extra sample PROF time after the last sample
If you take a heap profile then there is an additional empty sample inserted at the end which can make the resulting graphs look strange.
For example, in a recent profiling run I had at the end of the file
END_SAMPLE 119.98233
BEGIN_SAMPLE 180.94231
END_SAMPLE 180.95321
The last sample is a full 60s after the end of the last sample.
The gap corresponds approximately to the PROF
time of the program. So it's likely that there is a failure to do a subtraction somewhere.
I observed this with 8.6.4.