Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Issue 2776193002: Revert of linux: Improve gdb startup time for debug builds from over 4 minutes to 35s. (Closed)

Created:
3 years, 8 months ago by jwd
Modified:
3 years, 8 months ago
Reviewers:
Dirk Pranke, piman, Nico, mithro
CC:
chromium-reviews, Lei Zhang, awong, brettw, sky, Ken Russell (switch to Gerrit), Jeffrey Yasskin, Jakob Kummerow, piman
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Revert of linux: Improve gdb startup time for debug builds from over 4 minutes to 35s. (patchset #4 id:60001 of https://codereview.chromium.org/2770933009/ ) Reason for revert: Suspicion that it cause a compile failure on https://build.chromium.org/p/chromium.linux/builders/Linux%20Builder%20%28dbg%29%2832%29/builds/65207 Original issue's description: > linux: Improve gdb startup time for debug builds from over 4 minutes to 35s. > > This change contains two parts, for full-symbol (symbol_level=2, default) > and reduced-symbol (symbol_level=1) debug builds. It has no effect on release > builds. > > 1.) For symbol_level=2, pass -Wl,--gdb-index to the linker. This lets the linker > write an index that lets it load binaries much faster. > gdb startup time for target chrome from goes from 60s to 10s and time from > `run` in gdb to the program actually starting from 270s to 45s. > In return, this slows down linking a bit, but for target chrome in a > debug build, it increases link time from 37s to 42s, which is better than > making people who want to use gdb wait several minutes every time they start > gdb. > > There's some history here: We used to pass -Wl,--gdb-index long ago, and > then removed it in https://codereview.chromium.org/335903002/, with the > recommendation that people who want to use gdb could run build/gdb-add-index. > But running `gdb-add-index chrome` takes 73s nowadays, a lot more than the 5s > that gold needs. (Back then, gdb-add-index was faster, and gold, due to us > not yet defaulting to component builds in debug builds, was slower. Also, > people were on an older default Ubuntu and used an older gdb version.) > > People who don't use gdb should use symbol_level=1 for their builds anyhow > (and bots do too), so this small regression in link time shouldn't affect > them. > > Remove the explicit gdb_index gn arg now that this has a good default. > > 2) For symbol_level=1, make this mode actually work again after the gn swtich. > In symbol_level=1 builds, gn would pass `-g1 -gsplit-dwarf` to clang (*). > Surprisingly, -gsplit-dwarf implies -g2 with clang, so the -g1 gets > overriden by -g2 immediately. > > Before this, symbol_level=1 in debug builds would produce full debug info. > Since all bots set symbol_level=1, this might help with build speed > on debug bots. For people who set this locally, it'll also speed up > gdb startup time for target chrome from 39s to 13s and time from > `run` in gdb to the program actually starting from 255s to 35s. > > *: clang always writes stack debug info to both .o and .dwo files, and lets > the linker link them into the executable, so -g1 -gsplit-dwarf would make > no sense. This was used as justification to make -gsplit-dwarf imply -g2, > as it otherwise wouldn't have an effect. > > BUG=374952 > > Review-Url: https://codereview.chromium.org/2770933009 > Cr-Commit-Position: refs/heads/master@{#459790} > Committed: https://chromium.googlesource.com/chromium/src/+/7b26c51270cebd5de672a155b34f30bc8282c35a TBR=dpranke@chromium.org,piman@chromium.org,tansell@chromium.org,thakis@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=374952 Review-Url: https://codereview.chromium.org/2776193002 Cr-Commit-Position: refs/heads/master@{#459800} Committed: https://chromium.googlesource.com/chromium/src/+/745ab003bddd9043058e1f19db831a9b4f0f6dbf

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -7 lines) Patch
M build/config/compiler/BUILD.gn View 5 chunks +12 lines, -7 lines 0 comments Download

Messages

Total messages: 6 (3 generated)
jwd
Created Revert of linux: Improve gdb startup time for debug builds from over 4 minutes ...
3 years, 8 months ago (2017-03-27 16:29:33 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2776193002/1
3 years, 8 months ago (2017-03-27 16:30:11 UTC) #3
commit-bot: I haz the power
3 years, 8 months ago (2017-03-27 16:31:40 UTC) #6
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/chromium/src/+/745ab003bddd9043058e1f19db83...

Powered by Google App Engine
This is Rietveld 408576698