On Mittwoch, 11. Dezember 2024 17:09:19 Mitteleuropäische Normalzeit Christian 
Hergert wrote:
> On vacation until 2025 so my replies will be sparse here :)
> 
> On 12/11/24 3:24 AM, Milian Wolff wrote:
> > For symmetry reasons, we also need an `..._end` method. And what about
> > explicitly removing processes once they have finished (PERF_RECORD_EXIT)?
> 
> One area you can run into issues with this is that there is no
> synchronization between Perf streams from different CPUs. So you could
> end up processing an EXIT from PID N on CPU 1 before a SAMPLE from PID N
> on CPU 2.

I thought that the perf events are never ordered when you obtain them, you 
always first have to sort them based on their timestamps. For optimization 
purposes thankfully we have PERF_RECORD_FINISHED_ROUND so we don't need to 
buffer all events and sort them. That said, we do sometimes see violations of 
this, with some events arriving after a PERF_RECORD_FINISHED_ROUND with a 
timestamp earlier than what was previously handled in the last round.

Is that what you have in mind, or are you thinking of something else that I am 
not aware of yet?

Cheers

-- 
Milian Wolff
m...@milianw.de
http://milianw.de

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to