[RFC] sketch of an unwinder cache interface for elfutils libdwfl

Milian Wolff mail@milianw.de
Wed Dec 11 20:33:09 GMT 2024


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
mail@milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://sourceware.org/pipermail/elfutils-devel/attachments/20241211/8f1a28ef/attachment-0001.sig>


More information about the Elfutils-devel mailing list