Open Bug 1753912 Opened 3 years ago

Check that timestamps sent through ProfileBufferChunkManagerUpdate and DestroyReleasedChunksAtOrBefore are related to each other

Categories

(Core :: Gecko Profiler, task, P2)

task

Tracking

()

People

(Reporter: mozbugz, Unassigned)

References

Details

While profiling, the parent process receives ProfileBufferChunkManagerUpdates from child processes, which contain TimeStamps 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.

You need to log in before you can comment on or make changes to this bug.