Re: parallel loading of debug info in gdb
Tom Tromey <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
> Yes dependency is a problem, but some dependent libs are naturally > independent to be read by parallel. If there could be some way to > specify this, it would be great. If you try git gdb, you can enable background reading with "maint set dwarf synchronous off". (There's been at least one request to re-enable this by default for GDB 16... I wasn't sure if we should, though, considering that the data race fixes are pretty new.) Anyway, background reading is lazier -- the reading is started but gdb will only pause for it if it is truly needed. Note that the library debug info isn't really read in parallel. Or, it kind of is, depending on how the scheduling shakes out. That is, the DWARF reader looks at the number of worker threads and splits its work up accordingly. "Overlap" can only really happen if one such worker finishes and then the next library's job is scheduled. This might be a bad strategy overall. Like, testing on a big machine showed that the reader didn't parallelize past 8 CPUs, so maybe it would be better to limit the DWARF reader to 8 tasks. Nobody has worked on figuring out why it doesn't scale better, though, and I wouldn't want to change this without knowing more. Tom