Commit 536b1e56 authored by Takuto Ikuta's avatar Takuto Ikuta Committed by Commit Bot

Use -g0 in minimal_symbols config in non-sanitizer build

I confirm that how -g0 affects stacktrace shown in test failure/crash.
With -g1: https://chromium-review.googlesource.com/c/chromium/src/+/892540/1
With -g0: https://chromium-review.googlesource.com/c/chromium/src/+/892187/3

I summarize how stacktrace is shown on each builder affected by this CL.
This CL does not change stacktrace.

|--------------------------+---------------+------------------+---------------+------------------|
| builder                  | -g0 crash     | -g0 CHECK(false) | -g1 crash     | -g1 CHECK(false) |
|--------------------------+---------------+------------------+---------------+------------------|
| android_n5x_swarming_rel | no stacktrace | correct          | no stacktrace | correct          |
| cast_shell_linux         | correct       | correct          | correct       | correct          |
| ios-simulator            | no stacktrace | no stacktrace    | no stacktrace | no stacktrace    |
| linux-chromeos-rel       | correct       | correct          | correct       | correct          |
| linux_android_rel_ng     | no stacktrace | correct          | no stacktrace | correct          |
| mac_chromium_rel_ng      | correct       | correct          | correct       | correct          |
|--------------------------+---------------+------------------+---------------+------------------|


I see improved link time of some large binary on (very slow) andrdoin_n5x_swarming_rel builder.

With this patch: build stat https://chromium-build-stats.appspot.com/ninja_log/2018/01/30/slave603-c4/ninja_log.slave603-c4.chrome-bot.20180130-001251.4049.gz/table?dedup=true
taken from https://ci.chromium.org/buildbot/tryserver.chromium.android/android_n5x_swarming_rel/350571

Without this patch: build stat https://chromium-build-stats.appspot.com/ninja_log/2018/01/30/slave604-c4/ninja_log.slave604-c4.chrome-bot.20180130-005043.1186.gz/table?dedup=true
taken from https://ci.chromium.org/buildbot/tryserver.chromium.android/android_n5x_swarming_rel/350593

|-----------------------------------------+---------+-----------|
| link time of each target                | -g0     | -g1       |
|-----------------------------------------+---------+-----------|
| android_clang_arm/libmonochrome.so      | 14.206s | 27.25s    |
| android_clang_arm/libwebviewchromium.so | 12.355s | 1m44.577s |
| lib_components_unittests__library.so    | 22.194s | 1m17.442s |
| libwebviewchromium.so                   | 30.729s | 1m45.147s |
| libmonochrome.so:                       | 31.862s | 1m33.027s |
| lib_unit_tests__library.so              | 53.444s | 44.943s   |
|-----------------------------------------+---------+-----------|

This patch improved link time in most cases.

Bug: 794423
Change-Id: I757a8a01bed0dea4c62e2f8ebfccc5a163d8cc18
Reviewed-on: https://chromium-review.googlesource.com/892187Reviewed-by: default avatarDirk Pranke <dpranke@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@google.com>
Cr-Commit-Position: refs/heads/master@{#533158}
parent 76c5e970
...@@ -2020,7 +2020,7 @@ config("minimal_symbols") { ...@@ -2020,7 +2020,7 @@ config("minimal_symbols") {
# TODO(thakis): Remove this again once dump_syms is fixed. # TODO(thakis): Remove this again once dump_syms is fixed.
cflags += [ "-gdwarf-3" ] cflags += [ "-gdwarf-3" ]
} }
if (is_linux && !using_sanitizer) { if (!using_sanitizer) {
# minimal_symbols needs to only produce valid stack traces, and -g0 does # minimal_symbols needs to only produce valid stack traces, and -g0 does
# that, even though you might think it'd produce no symbols at all. # that, even though you might think it'd produce no symbols at all.
# Not using -g1 allows us to speed up link time and save disk space. # Not using -g1 allows us to speed up link time and save disk space.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment