[Lldb-commits] [lldb] Add logs for SymbolFileDWARF::FindTypes (PR #106030)
Dmitrii Galimzianov via lldb-commits
lldb-commits at lists.llvm.org
Sun Aug 25 20:19:21 PDT 2024
https://github.com/DmT021 created https://github.com/llvm/llvm-project/pull/106030
`SymbolFileDWARF::FindTypes` was logged prior to [this commit](https://github.com/llvm/llvm-project/commit/dd9587795811ba21e6ca6ad52b4531e17e6babd6#diff-edef3a65d5d569bbb75a4158d35b827aa5d42ee03ccd3b0c1d4f354afa12210c).
This is a helpful log message for checking for redundant type searches, so maybe we should restore it?
>From 07a0426d27bc7f5fb9354e86c528626e3334714e Mon Sep 17 00:00:00 2001
From: Dmitrii Galimzianov <dmt021 at gmail.com>
Date: Mon, 26 Aug 2024 05:10:50 +0200
Subject: [PATCH] Add logs for SymbolFileDWARF::FindTypes
---
.../Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index 7e0cf36d0de1b8..53f1276ee07f8b 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -2737,10 +2737,18 @@ void SymbolFileDWARF::FindTypes(const TypeQuery &query, TypeResults &results) {
if (results.AlreadySearched(this))
return;
+ auto type_basename = query.GetTypeBasename();
+
+ if (Log *log = GetLog(DWARFLog::Lookups)) {
+ GetObjectFile()->GetModule()->LogMessage(
+ log, "SymbolFileDWARF::FindTypes(type_basename=\"{0}\")",
+ type_basename);
+ }
+
std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
bool have_index_match = false;
- m_index->GetTypes(query.GetTypeBasename(), [&](DWARFDIE die) {
+ m_index->GetTypes(type_basename, [&](DWARFDIE die) {
// Check the language, but only if we have a language filter.
if (query.HasLanguage()) {
if (!query.LanguageMatches(GetLanguageFamily(*die.GetCU())))
More information about the lldb-commits
mailing list