[llvm-bugs] [Bug 42344] New: Add an option to disable inline line tables similar to MSVC /Zo-
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Jun 20 11:11:08 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=42344
Bug ID: 42344
Summary: Add an option to disable inline line tables similar to
MSVC /Zo-
Product: libraries
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: DebugInfo
Assignee: unassignedbugs at nondot.org
Reporter: rnk at google.com
CC: akhuang at google.com, dblaikie at gmail.com,
jdevlieghere at apple.com, keith.walker at arm.com,
llvm-bugs at lists.llvm.org,
paul_robinson at playstation.sony.com
The CodeView inline line tables that LLVM emits are large, and it even MSVC's
have long been a source of performance issues in tools that use DIA [1]. MSVC
has an option, /Zo- (formerly /d2Zi-), that disables the new optimized debug
info records added in a previous release. I think it would be helpful for clang
to have a similar option so that we can test various debugging use cases
(profiling, interactive debugging) with and without this information to see if
it causes performance or correctness issues. And, Bruce asked if such a flag
existed here [2].
[1]
https://randomascii.wordpress.com/2014/11/04/slow-symbol-loading-in-microsofts-profiler-take-two/
[2] https://crbug.com/965670#c10
I think the MSVC /Zo- flag also disables the emission of the S_LOCAL /
S_DEFRANGE* family of records, but I don't think we want to implement that,
since I think that's still the only way that LLVM can emit variable location
information.
I think the simplest way to implement this, at least for CodeView, is to thread
the option through to CodeViewDebug.cpp and simply skip emission of the
S_INLINE_SITE records, along with the inlinees subsection. A more complete
implementation would also skip emitting the .cv_loc udpates and other related
inline source location tracking directives, but that may require more code
changes.
I don't see any reason not to also implement this option for DWARF, but the
line tables are tracked very differently, so perhaps it shouldn't be in the
initial version of this feature. DWARF uses a unified line table, I believe in
.debug_loc, so we'd need to update DwarfDebug::beginInstruction to look up
through inlinedAt locations so that we don't emit .loc directives referring to
the source file of the inlined function.
Finally, the middle-end has a lot of invariants about source locations, calls,
and inlinedAt locations, and I don't think we want to disturb that. That's why
I think this should be implemented in the backend.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190620/2c2f76cb/attachment.html>
More information about the llvm-bugs
mailing list