Eventlog Heap Profiling events and profiling time
I'm not sure how to properly reconstruct a .hp graph from an eventlog.
The problem is that the times in .hp
file subtract the time spend profiling from the sample times. If you use the
timestamps in the eventlog and the heap profile events then the timestamps clearly don't discount the time actually spent profiling.
There are also no event which happens at the end of a sample so you can't work out how long the sampling period was afterwards unless there is a guarantee that only events related to heap profiling will happen after the HeapProfSampleBegin
and before the end of the sample.
I'm not sure if this skew really matters too much, the graphs have approximately the same shape.
Some solutions would be
- Add a
HeapProfEndSample
event so that future times can be adjusted - Add the computed sample start time as a field to
HeapProfBeginSample
The first sounds preferable so that other events can be more easily correlated with heap profiles.
What do you think @bgamari ?