New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 811308 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android , iOS
Pri: 2
Type: Bug



Sign in to add a comment

[Cronet] Cronet dependency on //components/metrics is linking in break pad client.

Project Member Reported by mef@chromium.org, Feb 12 2018

Issue description

Cronet depends on //components/metrics to provide histogram data to applications.

It turns out that currently //components/metrics depend on //components/variations:variations which in turn depends on //components/crash/core/common:crash_key that pulls in the breakpad client that includes google_toolbox_for_mac:

                      //components/metrics:metrics
                        //base:base...
                        //base:base_static
                        //components/metrics:call_stack_profile_params
                          //base:base...
                        //components/prefs:prefs
                          //base:base...
                          //build/config:exe_and_shlib_deps
                        //components/variations:variations
                          //base:base...
                          //components/crash/core/common:crash_key
                            //base:base...
                            //build/config:exe_and_shlib_deps
                            //third_party/breakpad:client
                              //third_party/google_toolbox_for_mac:google_toolbox_for_mac
                                //build/config:exe_and_shlib_deps


Removing variations_util.cc //components/crash/core/common:crash_key dependency from //components/variations:variations target reduces ARM64 Cronet binary for iOS by ~150kb (~4%):

Full:
-rwxr-xr-x  1 mef  eng  4099296 Feb 12 10:49 Cronet
No breakpad:
-rwxr-xr-x  1 mef  eng  3949888 Feb 12 10:56 Cronet

We should extract variations_util into separate target, unless it is possible to make dependency of //components/metrics on //components/variations optional.
 

Comment 1 by mef@chromium.org, Feb 12 2018

The binary size increase on ARMv7 Android is much more reasonable 9k:

Full:
2651824 Feb 12 11:09 libcronet.66.0.3345.0.so

No Breakpad:
2642872 Feb 12 11:19 libcronet.66.0.3345.0.so

Comment 2 by pkl@chromium.org, Feb 12 2018

Cc: michaeldo@chromium.org
+cc michaeldo in case this is related to some recent changes related to ios/web integration.
Cc: rsesek@chromium.org
Maybe related to crash key revamp rsesek did?

Anyway, it seems reasonable to split off the crash key stuff to a separate target in variations that browser depends on but cronet (and metrics component) doesn't. Happy to review such a CL.

Comment 4 by rsesek@chromium.org, Feb 12 2018

Is Cronet a separate build configuration (i.e. with its own GN args?)? If so, there's probably a simple fix I can land.

Comment 5 by mef@chromium.org, Feb 12 2018

There is iOS-specific 'is_cronet_build' feature: https://cs.chromium.org/chromium/src/ios/features.gni?rcl=85339f6516a0e93e0ee05e9bfd8e1066db4374a9&l=9

There are also other gn args that cronet builders set: https://cs.chromium.org/chromium/src/ios/build/bots/chromium.fyi/ios-simulator-cronet.json and we can always add more. 

Comment 6 by mef@chromium.org, Feb 12 2018

I *think* this may also be causing linker warnings reported in b/70227717.

Comment 7 by rsesek@chromium.org, Feb 12 2018

Then perhaps something like https://chromium-review.googlesource.com/c/chromium/src/+/914708 would work? It'd allow you to set use_crash_key_stubs=true in GN and it would drop the dependency on Breakpad.

Comment 8 by mef@chromium.org, Feb 13 2018

Yeah, that should work.

Owner: rsesek@chromium.org
Status: Assigned (was: Untriaged)

Comment 10 by w...@chromium.org, Feb 16 2018

Re #4: We're actually in the process of getting Cronet building as a normal target, under Linux, Mac and Fuchsia (see https://chromium-review.googlesource.com/c/chromium/src/+/914805) right now, FWIW.
So should I proceed with the CL in #7 or not?

Comment 12 by mef@chromium.org, Feb 27 2018

rsesek@: Yes, please proceed with  and we'll have a separate cl to set use_crash_key_stubs = true on cronet builders.
Project Member

Comment 13 by bugdroid1@chromium.org, Mar 13 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c6f653ac05411d6005ff6f80a05cf77553f14abb

commit c6f653ac05411d6005ff6f80a05cf77553f14abb
Author: Robert Sesek <rsesek@chromium.org>
Date: Tue Mar 13 17:32:59 2018

Allow using the crash key stub implementation by setting a GN arg.

This adds a new use_crash_key_stubs GN argument that effectively disables the
crash key subsystem.

Bug:  811308 
Change-Id: Ie0fba2c9af4c1514cc7dabc12ca012736a3d5422
Reviewed-on: https://chromium-review.googlesource.com/914708
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Misha Efimov <mef@chromium.org>
Commit-Queue: Robert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542841}
[modify] https://crrev.com/c6f653ac05411d6005ff6f80a05cf77553f14abb/components/crash/core/common/BUILD.gn
[modify] https://crrev.com/c6f653ac05411d6005ff6f80a05cf77553f14abb/components/crash/core/common/crash_key.h
[modify] https://crrev.com/c6f653ac05411d6005ff6f80a05cf77553f14abb/components/crash/core/common/crash_key_stubs.cc

Owner: mef@chromium.org
-> mef to set use_crash_key_stubs=true where applicable.
Project Member

Comment 15 by bugdroid1@chromium.org, Mar 19 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/de8bc40184e4ca987bc8b13c188da2d6b4a3edc7

commit de8bc40184e4ca987bc8b13c188da2d6b4a3edc7
Author: Misha Efimov <mef@chromium.org>
Date: Mon Mar 19 23:44:30 2018

[Cronet] Set "use_crash_key_stubs=true" in Cronet builds.

- Removes Cronet dependency on Breakpad.
- Applies to developer environment and public bots.
- Reduces Cronet binary size, especially on iOS.
- Official buildbots will be updated separately.

Bug:  811308 
Cq-Include-Trybots: master.tryserver.chromium.android:android_cronet_tester;master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I24fe9075a731a507ed8861e1f4811d4d463bb80d
Reviewed-on: https://chromium-review.googlesource.com/964596
Commit-Queue: Misha Efimov <mef@chromium.org>
Reviewed-by: John Budorick <jbudorick@chromium.org>
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#544211}
[modify] https://crrev.com/de8bc40184e4ca987bc8b13c188da2d6b4a3edc7/components/cronet/tools/cr_cronet.py
[modify] https://crrev.com/de8bc40184e4ca987bc8b13c188da2d6b4a3edc7/components/cronet/tools/package_ios.py
[modify] https://crrev.com/de8bc40184e4ca987bc8b13c188da2d6b4a3edc7/ios/build/bots/chromium.fyi/ios-simulator-cronet.json
[modify] https://crrev.com/de8bc40184e4ca987bc8b13c188da2d6b4a3edc7/ios/build/bots/chromium.mac/ios-simulator-cronet.json
[modify] https://crrev.com/de8bc40184e4ca987bc8b13c188da2d6b4a3edc7/tools/mb/mb_config.pyl

Project Member

Comment 16 by bugdroid1@chromium.org, Mar 20 2018

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/chrome/ios_internal.git/+/a6a0031e2e17c3549e99d078007c7b9143a46123

commit a6a0031e2e17c3549e99d078007c7b9143a46123
Author: Misha Efimov <mef@chromium.org>
Date: Tue Mar 20 13:51:25 2018

Comment 17 by mef@chromium.org, Mar 21 2018

Status: Fixed (was: Assigned)
I've verified that //chromium-cronet/ios/67.0.3377.0/Release-iphoneos/cronet/Cronet.framework/Cronet is ~200k smaller than previous build.
Project Member

Comment 18 by bugdroid1@chromium.org, Mar 26 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/tools/build/+/c49b3feb5f733c5fbed99c2e9cd6289be7395d49

commit c49b3feb5f733c5fbed99c2e9cd6289be7395d49
Author: Misha Efimov <mef@chromium.org>
Date: Mon Mar 26 15:08:23 2018

[Cronet] Set "use_crash_key_stubs=true" in official Cronet builds on Android.

Bug:  811308 
Change-Id: I4b65d51b09c4cd7618944619566def64603d249d
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Reviewed-on: https://chromium-review.googlesource.com/978394
Commit-Queue: Misha Efimov <mef@chromium.org>
Reviewed-by: John Budorick <jbudorick@chromium.org>

[modify] https://crrev.com/c49b3feb5f733c5fbed99c2e9cd6289be7395d49/scripts/slave/recipe_modules/chromium_android/chromium_config.py
[modify] https://crrev.com/c49b3feb5f733c5fbed99c2e9cd6289be7395d49/scripts/slave/recipe_modules/cronet/examples/full.expected/gn_test.json

Sign in to add a comment