@@ -71,6 +71,7 @@ json::Value ModuleStats::ToJSON() const {
7171 module .try_emplace (" debugInfoHadIncompleteTypes" ,
7272 debug_info_had_incomplete_types);
7373 module .try_emplace (" symbolTableStripped" , symtab_stripped);
74+ module .try_emplace (" symbolDownloadTime" , symbol_download_time);
7475 if (!symfile_path.empty ())
7576 module .try_emplace (" symbolFilePath" , symfile_path);
7677
@@ -288,6 +289,7 @@ llvm::json::Value DebuggerStats::ReportStatistics(
288289
289290 json::Array json_targets;
290291 json::Array json_modules;
292+ double symbol_download_time = 0.0 ;
291293 double symtab_parse_time = 0.0 ;
292294 double symtab_index_time = 0.0 ;
293295 double debug_parse_time = 0.0 ;
@@ -345,6 +347,10 @@ llvm::json::Value DebuggerStats::ReportStatistics(
345347 ++debug_index_saved;
346348 module_stat.debug_index_time = sym_file->GetDebugInfoIndexTime ().count ();
347349 module_stat.debug_parse_time = sym_file->GetDebugInfoParseTime ().count ();
350+ module_stat.symbol_download_time += sym_file->GetSymbolDownloadTime ();
351+ if (sym_file->GetObjectFile () != module ->GetObjectFile ())
352+ module_stat.symbol_download_time +=
353+ module ->GetObjectFile ()->GetFileSpec ().GetDownloadTime ();
348354 module_stat.debug_info_size =
349355 sym_file->GetDebugInfoSize (load_all_debug_info);
350356 module_stat.symtab_stripped = module ->GetObjectFile ()->IsStripped ();
@@ -361,6 +367,7 @@ llvm::json::Value DebuggerStats::ReportStatistics(
361367 if (module_stat.debug_info_had_variable_errors )
362368 ++num_modules_with_variable_errors;
363369 }
370+ symbol_download_time += module_stat.symbol_download_time ;
364371 symtab_parse_time += module_stat.symtab_parse_time ;
365372 symtab_index_time += module_stat.symtab_index_time ;
366373 debug_parse_time += module_stat.debug_parse_time ;
@@ -391,6 +398,7 @@ llvm::json::Value DebuggerStats::ReportStatistics(
391398 }
392399
393400 json::Object global_stats{
401+ {" totalSymbolDownloadTime" , symbol_download_time},
394402 {" totalSymbolTableParseTime" , symtab_parse_time},
395403 {" totalSymbolTableIndexTime" , symtab_index_time},
396404 {" totalSymbolTablesLoadedFromCache" , symtabs_loaded},
0 commit comments