Enabling -gsimple-template-names in Chrome builds

180 views
Skip to first unread message

Alan Zhao

unread,
Nov 4, 2022, 6:45:18 PM11/4/22
to chromi...@chromium.org, Lexan
What is being done?

On November 8, I plan on submitting https://crrev.com/c/3988987, which enables simple template names in debug builds for platforms where gdb is the dominant debugger (Android, Linux, and ChromeOS).

Why is this change being made?

The reason for this change is that it results in a significant reduction in debug info size. Debug info size is reaching critical levels on ChromeOS, where fission recently had to be disabled to avoid the 4GiB DWP file size ceiling. A Linux debug build with is_component_build = true using simple template names results in a 500 MB (33%) decrease in the size of the chrome binary:

$ du -h out/d{norm,simp}/chrome
1.5G    out/dnorm/chrome
1014M   out/dsimp/chrome


and a 5 GB (14%) decrease in the size of the contents of the build directory:

$ du -hs out/d{norm,simp}/
36G     out/dnorm/
31G     out/dsimp/

How will this change affect me?

Currently, lldb support for simple template names is limited (though support is being actively worked on), so users who debug Chrome with lldb may run into issues with symbol resolution of symbols with templates. All other lldb features (e.g. setting breakpoints based on file name and line) should still work. Manual testing showed that gdb does support simple template names, so gdb users should not be affected by this change.

The crash service is not affected by this change since Breakpad doesn't rely on these names.

I have a problem!

Please file a bug under the Tools > LLVM component.

Alan Zhao

unread,
Nov 8, 2022, 1:59:20 PM11/8/22
to chromi...@chromium.org
https://crrev.com/c/3988987 has been submitted.
Reply all
Reply to author
Forward
0 new messages