The default bug view has changed. See this FAQ.

GC dead sections on android targets

RESOLVED FIXED in mozilla25

Status

()

Core
Build Config
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: froydnj, Unassigned)

Tracking

(Blocks: 1 bug)

unspecified
mozilla25
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 2 obsolete attachments)

(Reporter)

Description

4 years ago
This enables the check for GC'ing sections when compiling with GCC and GNU ld.
GC'ing sections saves ~1.5MB off of libxul according to size(1):

[froydnj@cerebro eideticker]$ size /opt/build/froydnj/build-android/dist/bin/libxul.so
   text	   data	    bss	    dec	    hex	filename
23733400	2314816	1495973	27544189	1a44a7d	/opt/build/froydnj/build-android/dist/bin/libxul.so
[froydnj@cerebro eideticker]$ size /opt/build/froydnj/build-android/dist/bin/libxul.so
   text	   data	    bss	    dec	    hex	filename
22261936	2145116	1494533	25901585	18b3a11	/opt/build/froydnj/build-android/dist/bin/libxul.so
(Reporter)

Comment 1

4 years ago
Created attachment 768436 [details] [diff] [review]
set MOZ_DEBUG_FLAGS for android targets

I don't know that this is the best way to fix things, but it at least makes
android work the same as Linux.  Tested with GCC 4.6.
Attachment #768436 - Flags: review?(mh+mozilla)
(Reporter)

Updated

4 years ago
Blocks: 807322
Summary: set MOZ_DEBUG_FLAGS for android targets → GC dead sections on android targets
Comment on attachment 768436 [details] [diff] [review]
set MOZ_DEBUG_FLAGS for android targets

Review of attachment 768436 [details] [diff] [review]:
-----------------------------------------------------------------

The right thing to do here is to move the setting and resetting of MOZ_DEBUG_FLAGS above MOZ_COMPILER_OPTS. Which feels like an old tune, I think there was a bug about that already.
Attachment #768436 - Flags: review?(mh+mozilla) → review-
(Reporter)

Comment 3

4 years ago
Created attachment 770206 [details] [diff] [review]
move --enable-debug{,-symbols} option processing before MOZ_COMPILER_OPTS

MOZ_COMPILER_OPTS depends on MOZ_DEBUG_FLAGS being set for proper checking of
linker dead code deletion when using GCC.

I think this DTRT, currently running on try: https://tbpl.mozilla.org/?tree=Try&rev=cd407a2d4067
Attachment #768436 - Attachment is obsolete: true
Attachment #770206 - Flags: review?(mh+mozilla)
(Reporter)

Comment 4

4 years ago
Created attachment 770241 [details] [diff] [review]
move --enable-debug{,-symbols} option processing before MOZ_COMPILER_OPTS

Sigh, check-sync-dirs.  https://tbpl.mozilla.org/?tree=Try&rev=7f8a626528e7
Attachment #770206 - Attachment is obsolete: true
Attachment #770206 - Flags: review?(mh+mozilla)
Attachment #770241 - Flags: review?(mh+mozilla)
Comment on attachment 770241 [details] [diff] [review]
move --enable-debug{,-symbols} option processing before MOZ_COMPILER_OPTS

Review of attachment 770241 [details] [diff] [review]:
-----------------------------------------------------------------

Let's hope it doesn't have bad side effects.

::: configure.in
@@ +2542,5 @@
> +dnl ========================================================
> +dnl = Debug info is ON by default.
> +dnl ========================================================
> +if test -z "$MOZ_DEBUG_FLAGS"; then
> +  MOZ_DEBUG_FLAGS="-g"

Considering this, you can also remove any MOZ_DEBUG_FLAGS=-g above.
Attachment #770241 - Flags: review?(mh+mozilla) → review+
(Reporter)

Comment 6

4 years ago
Created attachment 771276 [details] [diff] [review]
move --enable-debug{,-symbols} option processing before MOZ_COMPILER_OPTS, js version

Might as well do the same thing for the JS engine.
Attachment #771276 - Flags: review?(mh+mozilla)
Comment on attachment 771276 [details] [diff] [review]
move --enable-debug{,-symbols} option processing before MOZ_COMPILER_OPTS, js version

Review of attachment 771276 [details] [diff] [review]:
-----------------------------------------------------------------

Hoping this will stick.
Attachment #771276 - Flags: review?(mh+mozilla) → review+
(Reporter)

Comment 8

4 years ago
(In reply to Mike Hommey [:glandium] from comment #7)
> Hoping this will stick.

Inbound is the new try, right? ;)

http://hg.mozilla.org/integration/mozilla-inbound/rev/6fe449ecd692
Flags: in-testsuite-
According to http://areweslimyet.com/mobile this reduces startup memory usage by ~2.5MB, which is a nice win!
https://hg.mozilla.org/mozilla-central/rev/6fe449ecd692
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
You need to log in before you can comment on or make changes to this bug.