To speed up the processing of large ELF files which are common in HPC please resolve the data races which prevent parallel parsing of CU's DIEs within ELF files. We'd like to do something like: for(Dwarf_Off cu_off = 0; dwarf_next_unit(dbg(), cu_off, &next_cu_header, &cu_header_length, NULL, &abbrev_offset, &addr_size, &offset_size, &type_signaturep, NULL) == 0; cu_off = next_cu_header) { if(!dwarf_offdie_types(dbg(), cu_off + cu_header_length, ¤t_cu_die)) continue; // Modified for parallelism: rather than a single DwarfWalker holding state, // create a new context and clone before we spawn a thread push(); DwarfWalker mod_walker(*this); pop(); bool ret = cilk_spawn mod_walker.parseModule(false, fixUnknownMod); // bool ret = parseModule(false, fixUnknownMod); if(!ret) { cilk_sync; return false; } compile_offset = next_cu_header; } cilk_sync; Code similar to this is being worked on for dyninst http://www.dyninst.org/
I believe this has been resolved since elfutils Version 0.178 libdw: Abbrevs and DIEs can now be read concurrently by multiple threads through the same Dwarf handle.
Yea done.