Size of content_shell has increased by ~170MB in v90

64 views
Skip to first unread message

Rahul

unread,
Apr 27, 2021, 12:43:30 PM4/27/21
to binary-size
Hi Team,
   I have been playing with content_shell to learn and understand the chromium in details, i had started with v83, but had some issues so started settings up the v90 and i am able to build it finally.

I have a device which has only 2gb of RAM but size of the v90 content_shell is 800MB+ , I am facing some issue which i wanted to debug using gdb, but not able to run the GDB due to running out of space.
  1. How do we debug the stack trace for content_shell other than the GDB ?
  2. Is there a way to reduce the size of content_shell for testing ?
Thanks,
 Rahul

Reid Kleckner

unread,
Apr 27, 2021, 1:48:41 PM4/27/21
to Rahul, binary-size
What gn arguments are you using? If you just need stack traces, consider using symbol_level=1, which will reduce the amount of debug info. If that is not enough, you can try symbol_level=0, which I think will only give you non-inline symbol names.

--
You received this message because you are subscribed to the Google Groups "binary-size" group.
To unsubscribe from this group and stop receiving emails from it, send an email to binary-size...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/binary-size/be803857-3fc9-45e8-9a75-d8b813e6536fn%40chromium.org.

Bruce Dawson

unread,
Apr 27, 2021, 1:53:57 PM4/27/21
to Reid Kleckner, Rahul, binary-size
I think the biggest difference between symbol_level=0 and =1 is that with =1 you get file names and line numbers. WIth =2 you get local variables, types, etc.

You can also separately set blink_symbol_level in order to reduce symbol sizes.

However if the main problem is that content_shell itself is too large then changing things like is_debug are more likely to help.



--
Bruce Dawson

Rahul Patel

unread,
Apr 27, 2021, 2:09:23 PM4/27/21
to Bruce Dawson, Reid Kleckner, binary-size
Hi Team,
   I am using the following args in args.gn file ?

ffmpeg_use_atomics_fallback=true

chrome_pgo_phase = 0

use_cups = false

v8_target_cpu="arm"

ffmpeg_branding = "Chrome"

proprietary_codecs = true

is_component_build = false

use_gnome_keyring = false

use_pulseaudio = true

is_debug = false

is_official_build = true

symbol_level = 0

enable_remoting = false

enable_nacl = false

use_sysroot = false

treat_warnings_as_errors = false

is_cfi = false

use_custom_libcxx = false

fieldtrial_testing_like_official_build = true

google_api_key = "invalid-api-key"

google_default_client_id = "invalid-client-id"

google_default_client_secret = "invalid-client-secret"

custom_toolchain = "//build/toolchain/yocto:yocto_target"

host_toolchain = "//build/toolchain/yocto:yocto_native"

is_clang = true

clang_use_chrome_plugins = false

target_cpu = "arm"

v8_snapshot_toolchain = "//build/toolchain/yocto:yocto_target"

use_ozone = true

ozone_auto_platforms = false

ozone_platform_headless = true

ozone_platform_wayland = true

ozone_platform_x11 = false

use_xkbcommon = true

use_system_libwayland = true

use_system_minigbm = true

use_system_libdrm = true

use_gtk = false

enable_widevine = true

use_lld = true

use_gold = false

arm_float_abi = "softfp"

arm_fpu = "neon"

arm_tune = ""

arm_version = 7

rtc_use_x11=false

rtc_use_x11_extensions=false

use_x11=false

Please let me if i am missing anything to add or update ?


Thanks,
 Rahul

Rahul Patel

unread,
Apr 28, 2021, 2:59:32 AM4/28/21
to Bruce Dawson, Reid Kleckner, binary-size
Hi Bruce,
I set the flat blink_symbol_level=0 , symbol_level = 0 and is_debug = false, still no luck, any idea if we can add/update some more flags. 

Thanks,
 Rahul

Bruce Dawson

unread,
Apr 28, 2021, 2:13:14 PM4/28/21
to Rahul Patel, Reid Kleckner, binary-size
I'm afraid that your list of gn args is rather daunting - I'm not sure I've seen a configuration with that many before. It might be worth trying just just a couple of gn args, or with a set copied from a bot, to see if the problem replicates. I'd be interested to know where that set of gn args came from.

It looks like you are working on Android. I normally work on Windows so I'm out of my natural element here.
--
Bruce Dawson

Rahul Patel

unread,
Apr 28, 2021, 10:59:06 PM4/28/21
to Bruce Dawson, Reid Kleckner, binary-size

Bruce Dawson

unread,
Apr 29, 2021, 11:23:03 AM4/29/21
to Rahul Patel, Reid Kleckner, binary-size
Huh. That's quite a recipe. I don't know why we would have builders configured to use that many parameters and I really can't comment on it. I'd focus on people (a mailing list or owners) more related to the platform that you are targeting, since this group doesn't seem to know.
--
Bruce Dawson

Rahul Patel

unread,
Apr 29, 2021, 11:53:20 AM4/29/21
to Bruce Dawson, Reid Kleckner, binary-size
Ok, thanks for the clarification Bruce!!

Rahul Patel

unread,
Jun 7, 2021, 11:36:35 AM6/7/21
to Bruce Dawson, Reid Kleckner, binary-size
Hi Bruce,
  One small help, could you please redirect me to the platform team, who can help me on this? 

I have tried keeping less number of args and build, facing some random crash, so not sure how do decide about the bare minimum flags in args ?

Thanks,
 Rahul

Bruce Dawson

unread,
Jun 7, 2021, 1:57:39 PM6/7/21
to Rahul Patel, Reid Kleckner, binary-size
chromi...@chromium.org is a good starting point. When sending questions to that mailing list you should be sure to mention what platform you are targeting (in the subject line?) so that the right set of people will reply.
--
Bruce Dawson, he/him

Rahul Patel

unread,
Jun 7, 2021, 2:24:57 PM6/7/21
to Bruce Dawson, Reid Kleckner, binary-size
Ok, thanks. Bruce!!
Reply all
Reply to author
Forward
0 new messages