[llvm-bugs] [Bug 37933] New: lld creates redundant debug entries for enums
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Jun 25 17:13:56 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=37933
Bug ID: 37933
Summary: lld creates redundant debug entries for enums
Product: lld
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: All Bugs
Assignee: unassignedbugs at nondot.org
Reporter: brucedawson at chromium.org
CC: llvm-bugs at lists.llvm.org
While running Chrome's ShowGlobals.exe on Chrome's canary PDBs I noticed
hundreds of reports of redundant global variables that were in fact enums.
https://cs.chromium.org/chromium/src/tools/win/ShowGlobals/ShowGlobals.cc?q=showglobals.cc&sq=package:chromium&g=0&l=1
The tool has since been fixed to avoid these reports:
https://chromium-review.googlesource.com/c/chromium/src/+/1114291
However, the issue remains that redundant enum symbols are being emitted by
lld. I created a more minimal repro that is fairly convenient for anyone with
access to the Chrome source code. Using the pre-fix version of ShowGlobals.exe:
> gn gen out\default
Done. Made 8629 targets from 1585 files in 3328ms
> ninja -C out\default base && showglobals_old.exe out\default\base.dll.pdb | head
ninja: Entering directory `out\default'
[1 processes, 354/354 @ 15.1/s : 23.374s ] LINK(DLL) base.dll base.dll.lib
base.dll.pdb
#Dups DupSize Size Section Symbol name PDB name
92 736 0 0 num_bound_args out\default\base.dll.pdb
17 136 0 0 atomic_histogram_pointer
out\default\base.dll.pdb
30 120 0 0 TP_CALLBACK_PRIORITY_INVALID
out\default\base.dll.pdb
30 120 0 0 PowerUserMaximum
out\default\base.dll.pdb
30 120 0 0 JOB_OBJECT_NET_RATE_CONTROL_VALID_FLAGS
out\default\base.dll.pdb
30 120 0 0 JOB_OBJECT_NET_RATE_CONTROL_MAX_BANDWIDTH
out\default\base.dll.pdb
30 120 0 0 JOB_OBJECT_NET_RATE_CONTROL_ENABLE
out\default\base.dll.pdb
30 120 0 0 JOB_OBJECT_NET_RATE_CONTROL_DSCP_TAG
out\default\base.dll.pdb
30 120 0 0 JOB_OBJECT_IO_RATE_CONTROL_STANDALONE_VOLUME
out\default\base.dll.pdb
However if I change from the default settings (empty args.gn) to having a
single line which is "use_lld=false" then I get the following results:
#Dups DupSize Size Section Symbol name PDB name
92 736 0 0 num_bound_args out\default\base.dll.pdb
17 136 0 0 atomic_histogram_pointer
out\default\base.dll.pdb
11 88 0 0 instance_ out\default\base.dll.pdb
85 85 0 0 is_weak_call out\default\base.dll.pdb
85 85 0 0 is_method out\default\base.dll.pdb
1 64 0 0 kEnvironmentParams
out\default\base.dll.pdb
4 64 0 0 kCookieValue out\default\base.dll.pdb
7 56 0 0 kCircularBufferInitialCapacity
out\default\base.dll.pdb
1 56 0 0 buffer_ out\default\base.dll.pdb
This clearly indicates that lld is creating redundant enum entries in the debug
information. These are not necessarily a problem (the new version of
ShowGlobals.exe filters out all enums) but it seemed worth reporting.
I'm not sure if this is related to the (old, fixed) bug at
https://bugs.llvm.org/show_bug.cgi?id=14108
--
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/20180626/237587e0/attachment-0001.html>
More information about the llvm-bugs
mailing list