Add modules stats into the "statistics dump" command.
The new module stats adds the ability to measure the time it takes to parse and index the symbol tables for each module, and reports modules statistics in the output of "statistics dump" along with the path, UUID and triple of the module. The time it takes to parse and index the symbol tables are also aggregated into new top level key/value pairs at the target level. Differential Revision: https://reviews.llvm.org/D112279
This commit is contained in:
@@ -2692,9 +2692,6 @@ Symtab *ObjectFileELF::GetSymtab() {
|
||||
if (!module_sp)
|
||||
return nullptr;
|
||||
|
||||
Progress progress(llvm::formatv("Parsing symbol table for {0}",
|
||||
m_file.GetFilename().AsCString("<Unknown>")));
|
||||
|
||||
// We always want to use the main object file so we (hopefully) only have one
|
||||
// cached copy of our symtab, dynamic sections, etc.
|
||||
ObjectFile *module_obj_file = module_sp->GetObjectFile();
|
||||
@@ -2702,6 +2699,10 @@ Symtab *ObjectFileELF::GetSymtab() {
|
||||
return module_obj_file->GetSymtab();
|
||||
|
||||
if (m_symtab_up == nullptr) {
|
||||
Progress progress(
|
||||
llvm::formatv("Parsing symbol table for {0}",
|
||||
m_file.GetFilename().AsCString("<Unknown>")));
|
||||
ElapsedTime elapsed(module_sp->GetSymtabParseTime());
|
||||
SectionList *section_list = module_sp->GetSectionList();
|
||||
if (!section_list)
|
||||
return nullptr;
|
||||
|
||||
Reference in New Issue
Block a user