Last Comment Bug 887902 - GC dead sections on android targets
: GC dead sections on android targets
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Build Config (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla25
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
Depends on:
Blocks: 807322
  Show dependency treegraph
 
Reported: 2013-06-27 10:53 PDT by Nathan Froyd [:froydnj]
Modified: 2013-07-10 11:28 PDT (History)
6 users (show)
nfroyd: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
set MOZ_DEBUG_FLAGS for android targets (957 bytes, patch)
2013-06-27 10:54 PDT, Nathan Froyd [:froydnj]
mh+mozilla: review-
Details | Diff | Splinter Review
move --enable-debug{,-symbols} option processing before MOZ_COMPILER_OPTS (11.23 KB, patch)
2013-07-02 08:38 PDT, Nathan Froyd [:froydnj]
no flags Details | Diff | Splinter Review
move --enable-debug{,-symbols} option processing before MOZ_COMPILER_OPTS (14.84 KB, patch)
2013-07-02 09:54 PDT, Nathan Froyd [:froydnj]
mh+mozilla: review+
Details | Diff | Splinter Review
move --enable-debug{,-symbols} option processing before MOZ_COMPILER_OPTS, js version (8.16 KB, patch)
2013-07-04 03:50 PDT, Nathan Froyd [:froydnj]
mh+mozilla: review+
Details | Diff | Splinter Review

Description Nathan Froyd [:froydnj] 2013-06-27 10:53:31 PDT
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
Comment 1 Nathan Froyd [:froydnj] 2013-06-27 10:54:39 PDT
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.
Comment 2 Mike Hommey [:glandium] 2013-06-27 18:53:17 PDT
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.
Comment 3 Nathan Froyd [:froydnj] 2013-07-02 08:38:58 PDT
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
Comment 4 Nathan Froyd [:froydnj] 2013-07-02 09:54:25 PDT
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
Comment 5 Mike Hommey [:glandium] 2013-07-02 17:50:43 PDT
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.
Comment 6 Nathan Froyd [:froydnj] 2013-07-04 03:50:18 PDT
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.
Comment 7 Mike Hommey [:glandium] 2013-07-08 18:24:59 PDT
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.
Comment 8 Nathan Froyd [:froydnj] 2013-07-09 06:05:16 PDT
(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
Comment 9 Kartikaya Gupta (email:kats@mozilla.com) 2013-07-10 10:13:38 PDT
According to http://areweslimyet.com/mobile this reduces startup memory usage by ~2.5MB, which is a nice win!
Comment 10 Ryan VanderMeulen [:RyanVM] 2013-07-10 11:28:08 PDT
https://hg.mozilla.org/mozilla-central/rev/6fe449ecd692

Note You need to log in before you can comment on or make changes to this bug.