Check that timestamps sent through ProfileBufferChunkManagerUpdate and DestroyReleasedChunksAtOrBefore are related to each other
Categories
(Core :: Gecko Profiler, task, P2)
Tracking
()
People
(Reporter: mozbugz, Unassigned)
References
Details
While profiling, the parent process receives ProfileBufferChunkManagerUpdate
s from child processes, which contain TimeStamp
s in that child (for things like update time, time when a buffer chunk is "released", etc.)
This is used in the parent when the overall profiler memory usage reaches a limit, to discard the oldest chunk.
However, if these different timestamps are not all synchronized, the chunk with the oldest timestamp may not be the oldest one overall!
The TimeStamp
documentation says "elapsed time according to the system", so it sounds okay, but it doesn't explicitly mention if all processes see the same time. Elsewhere, it says "this process' XPCOM session", which leaves the door open to different processes seeing different things.
If timestamps are indeed living in different "timezones" in each process, the profiler will need to adjust them accordingly when comparing timestamps from child processes.
In any case, it may be worth adding comments in different places, to clarify this point.
Description
•