clayborg added a comment.
The current Progress class allows users to specify how many items are to be
done when they construct a lldb_private::Progress object, but this part is not
used right now for anything yet because it is often hard to know how many items
of work there are. For symbol tables in ELF, we have two of them, but we might
also create new symbols from EH frame or other sources when there are no
symbols, so it was hard to pre-determine a full number of symbols for a given
executable. Same goes for mach-o files with the normal symbol table, then new
symbols are created from the LC_FUNCTION_STARTS load command that has start
addresses for all functions, many of which have symbols. For DWARF, we have 3
ways to index the DWARF: Apple tables, .debug_names, and manually. I will
comment inline where we could specify a valid number of work items for DWARF to
improve the feedback. The other reason the progress objects don't report
immediate feedback is the frequency of the progress callbacks could slow things
down if they are called too often with too little work. I am happy to talk
about any of these issues if anyone has any questions.
================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:470-472
+ Progress progress(
+ UINT64_MAX, "Indexing DWARF for %s",
+ GetObjectFile()->GetFileSpec().GetFilename().AsCString("<Unknown>"));
----------------
Instead of specifying UINT64_MAX as the number of work items here, we can
figure out how many compile units exist in the DWARF and use that number, and
then a reference to this progress object can be passed into the various
indexing calls below and can be updated as the DWARF is parsed.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97739/new/
https://reviews.llvm.org/D97739
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits