-
Notifications
You must be signed in to change notification settings - Fork 10.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DO NOT MERGE][DebugInfo] Implement debug_names's IDX_parent attribute #75365
Closed
felipepiovezan
wants to merge
9
commits into
llvm:main
from
felipepiovezan:felipe/idx_parent_rebased
Closed
[DO NOT MERGE][DebugInfo] Implement debug_names's IDX_parent attribute #75365
felipepiovezan
wants to merge
9
commits into
llvm:main
from
felipepiovezan:felipe/idx_parent_rebased
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You can test this locally with the following command:git-clang-format --diff 80aeb622117f6411e65bff42be5231720e8b8cef 0450d05d26418796de24083acb240feec9f058d3 -- lldb/source/Commands/CommandObjectExpression.cpp lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h lldb/source/Plugins/SymbolFile/DWARF/DWARFDeclContext.cpp lldb/source/Plugins/SymbolFile/DWARF/DWARFDeclContext.h lldb/source/Plugins/SymbolFile/DWARF/DWARFIndex.cpp lldb/source/Plugins/SymbolFile/DWARF/DWARFIndex.h lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.h lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp lldb/unittests/SymbolFile/DWARF/DWARFDIETest.cpp llvm/include/llvm/CodeGen/AccelTable.h llvm/include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp llvm/lib/DWARFLinker/DWARFLinker.cpp llvm/lib/DWARFLinkerParallel/DWARFLinkerImpl.cpp llvm/lib/DWARFLinkerParallel/DWARFLinkerUnit.h llvm/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp View the diff from clang-format here.diff --git a/lldb/source/Commands/CommandObjectExpression.cpp b/lldb/source/Commands/CommandObjectExpression.cpp
index 59ea097fe8..0bff699be7 100644
--- a/lldb/source/Commands/CommandObjectExpression.cpp
+++ b/lldb/source/Commands/CommandObjectExpression.cpp
@@ -517,7 +517,8 @@ bool CommandObjectExpression::EvaluateExpression(llvm::StringRef expr,
}
auto end = std::chrono::steady_clock::now();
- auto duration = std::chrono::duration_cast<std::chrono::milliseconds>(end - start);
+ auto duration =
+ std::chrono::duration_cast<std::chrono::milliseconds>(end - start);
error_stream.Printf("Finished expr in: %" PRIu64, duration.count());
return (success != eExpressionSetupError &&
success != eExpressionParseError);
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp
index 775b7a2e73..340b9acf80 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp
@@ -192,9 +192,8 @@ DWARFDebugInfo::GetDIE(const DIERef &die_ref) {
return DWARFDIE(); // Not found
}
-llvm::StringRef
-DWARFDebugInfo::PeekDIEName(const DIERef &die_ref) {
- if(DWARFUnit *cu = GetUnit(die_ref))
+llvm::StringRef DWARFDebugInfo::PeekDIEName(const DIERef &die_ref) {
+ if (DWARFUnit *cu = GetUnit(die_ref))
return cu->GetNonSkeletonUnit().PeekDIEName(die_ref.die_offset());
return llvm::StringRef();
}
|
This allows us to not parse the entire DIE.
Combines: 1. the accelerator table capability of finding parents 2. the DWARFUnit capability of finding the name of a DIE without parsing the whole CU.
felipepiovezan
force-pushed
the
felipe/idx_parent_rebased
branch
from
January 2, 2024 13:15
4d3fa42
to
0450d05
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The commits are meant to be looked at one at a time.
https://discourse.llvm.org/t/rfc-improve-dwarf-5-debug-names-type-lookup-parsing-speed/74151/36