[PATCH 0/9 v2] Fix thread-safety for elfutils
Milian Wolff
mail@milianw.de
Thu Jul 18 10:07:57 GMT 2024
On Donnerstag, 18. Juli 2024 00:33:59 MESZ Aaron Merey wrote:
> v1 can be found at
> https://sourceware.org/pipermail/elfutils-devel/2023q3/006329.html
>
> Heather McIntyre is the original author of v1 of these patches.
> Heather and myself co-wrote v2.
Hey you all,
this sounds very promising! I have some high level questions:
Could you please add some documentation on the thread safety guarantees when
elfutils was compiled with `--enable-thread-safety`? For my purposes in
maintaining profilers (heaptrack, hotspot), it would be extremely cool if we
could eventually use multiple threads to analyze separate samples. In theory,
I would hope that "write" operations (such as `dwfl_report_{begin,end,elf}`
will require synchronization, but subsequent "read" operations (such as those
needed for symbolication
(`dwfl_{addrmodule,module_getsymtab,module_getsym_info,module_nextcu,module_info,module_address_section,
get_debuginfod_client,...`,
`dwarf_{tag,getscopes_die,formstring,fromudata,diename,getsrc_die,dieoffset,linesrc,lineno,getsrcfiles,attr_integrate,...`)
or unwinding (`dwfl_{thread_state_registers,frame_pc,getthread_frames}) could
happen in parallel. Is that the case already after this patch set?
Generally it seems like the documentation could see some love in better
explaining this feature.
How can I query at runtime whether elfutils was compiled with thread safety
guarantees or not, such that I can adapt my consumer side accordingly (i.e.
enable multi-threading or not)?
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/20240718/ed5d2047/attachment.sig>
More information about the Elfutils-devel
mailing list