================ @@ -188,17 +188,26 @@ GetFileForModule(const ModuleSpec &module_spec, std::string cache_file_name = llvm::toHex(build_id, true); if (!file_name.empty()) cache_file_name += "-" + file_name.str(); - llvm::Expected<std::string> result = llvm::getCachedOrDownloadArtifact( - cache_file_name, url_path, cache_path, debuginfod_urls, timeout); - if (result) - return FileSpec(*result); - - Log *log = GetLog(LLDBLog::Symbols); - auto err_message = llvm::toString(result.takeError()); - LLDB_LOGV(log, - "Debuginfod failed to download symbol artifact {0} with error {1}", - url_path, err_message); - return {}; + StatsDuration duration; + std::string local_path; + { + ElapsedTime elapsed(duration); + llvm::Expected<std::string> result = llvm::getCachedOrDownloadArtifact( + cache_file_name, url_path, cache_path, debuginfod_urls, timeout); + + if (!result) { + Log *log = GetLog(LLDBLog::Symbols); + auto err_message = llvm::toString(result.takeError()); + LLDB_LOGV( + log, + "Debuginfod failed to download symbol artifact {0} with error {1}", + url_path, err_message); + return {}; + } + local_path = *result; + } + + return FileSpec(local_path, duration.get().count()); ---------------- GeorgeHuyubo wrote:
Removed https://github.com/llvm/llvm-project/pull/134563 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits