make.conf: link with -Wl,-O2 -Wl,--as-needed [chromiumos/overlays/chromiumos-overlay : master]

61 views
Skip to first unread message

Mike Frysinger (Code Review)

unread,
Nov 2, 2012, 1:04:41 AM11/2/12
to Mike Frysinger
Mike Frysinger has uploaded a new change for review.

Change subject: make.conf: link with -Wl,-O2 -Wl,--as-needed
......................................................................

make.conf: link with -Wl,-O2 -Wl,--as-needed

The as-needed flag removes linking from libraries that are otherwise
unused which in turn saves on space and runtime overhead.

We are already linking with the -O1 flag. This ups it to -O2 which
enables a few string table optimizations at link time.

BUG=chromium-os:9855
TEST=been using this personally for over 6 months and many targets build & boot
TEST=`cbuildbot chromiumos-sdk` works
TEST=`cbuildbot {arm,x86,amd64}-generic-full` works
TEST=`cbuildbot {stumpy,lumpy,link,x86-alex,butterfly,daisy}-release` works

Change-Id: I017bc62ef73116bd93f0dfff8231d6aa0582af40
---
M chromeos/config/make.conf.amd64-host
M chromeos/config/make.conf.common-target
2 files changed, 3 insertions(+), 0 deletions(-)


git pull ssh://gerrit.chromium.org:29418/chromiumos/overlays/chromiumos-overlay refs/changes/86/37186/1
--
To view, visit https://gerrit.chromium.org/gerrit/37186
To unsubscribe, visit https://gerrit.chromium.org/gerrit/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I017bc62ef73116bd93f0dfff8231d6aa0582af40
Gerrit-PatchSet: 1
Gerrit-Project: chromiumos/overlays/chromiumos-overlay
Gerrit-Branch: master
Gerrit-Owner: Mike Frysinger <vap...@chromium.org>

asharif (Code Review)

unread,
Nov 2, 2012, 9:17:15 PM11/2/12
to Mike Frysinger, Gerrit, David James, Han Shen
asharif has posted comments on this change.

Change subject: make.conf: link with -Wl,-O2 -Wl,--as-needed
......................................................................


Patch Set 1:

Since this is a global change, I'd prefer you test with crosperf or by hand on BootPerfServer and PyAutoPerfTests. I know most likely you will see improvements, but I just want to make sure there are no regressions.
Gerrit-MessageType: comment
Gerrit-Change-Id: I017bc62ef73116bd93f0dfff8231d6aa0582af40
Gerrit-PatchSet: 1
Gerrit-Project: chromiumos/overlays/chromiumos-overlay
Gerrit-Branch: master
Gerrit-Owner: Mike Frysinger <vap...@chromium.org>
Gerrit-Reviewer: David James <david...@chromium.org>
Gerrit-Reviewer: Gerrit <chrom...@google.com>
Gerrit-Reviewer: Han Shen <she...@chromium.org>
Gerrit-Reviewer: asharif <ash...@chromium.org>

David James (Code Review)

unread,
Nov 2, 2012, 9:30:45 PM11/2/12
to Mike Frysinger, Gerrit, asharif, Han Shen
David James has posted comments on this change.

Change subject: make.conf: link with -Wl,-O2 -Wl,--as-needed
......................................................................


Patch Set 1: Looks good to me, approved
Gerrit-MessageType: comment
Gerrit-Change-Id: I017bc62ef73116bd93f0dfff8231d6aa0582af40
Gerrit-PatchSet: 1
Gerrit-Project: chromiumos/overlays/chromiumos-overlay
Gerrit-Branch: master
Gerrit-Owner: Mike Frysinger <vap...@chromium.org>

Han Shen (Code Review)

unread,
Nov 3, 2012, 2:23:33 AM11/3/12
to Mike Frysinger, Gerrit, David James, asharif
Han Shen has posted comments on this change.

Change subject: make.conf: link with -Wl,-O2 -Wl,--as-needed
......................................................................


Patch Set 1:

Yeah, it would be better if we see some performance data.
Gerrit-MessageType: comment
Gerrit-Change-Id: I017bc62ef73116bd93f0dfff8231d6aa0582af40
Gerrit-PatchSet: 1
Gerrit-Project: chromiumos/overlays/chromiumos-overlay
Gerrit-Branch: master
Gerrit-Owner: Mike Frysinger <vap...@chromium.org>

Mike Frysinger (Code Review)

unread,
Nov 8, 2012, 12:22:53 AM11/8/12
to Mike Frysinger, Gerrit, David James, asharif, Han Shen
Mike Frysinger has posted comments on this change.

Change subject: make.conf: link with -Wl,-O2 -Wl,--as-needed
......................................................................


Patch Set 1:

i have no idea how to run perf tests
Gerrit-MessageType: comment
Gerrit-Change-Id: I017bc62ef73116bd93f0dfff8231d6aa0582af40
Gerrit-PatchSet: 1
Gerrit-Project: chromiumos/overlays/chromiumos-overlay
Gerrit-Branch: master
Gerrit-Owner: Mike Frysinger <vap...@chromium.org>
Gerrit-Reviewer: David James <david...@chromium.org>
Gerrit-Reviewer: Gerrit <chrom...@google.com>
Gerrit-Reviewer: Han Shen <she...@chromium.org>
Gerrit-Reviewer: Mike Frysinger <vap...@chromium.org>
Gerrit-Reviewer: asharif <ash...@chromium.org>

asharif (Code Review)

unread,
Nov 12, 2012, 3:22:41 PM11/12/12
to Mike Frysinger, Gerrit, David James, Han Shen
asharif has posted comments on this change.

Change subject: make.conf: link with -Wl,-O2 -Wl,--as-needed
......................................................................


Patch Set 1:

An update on this. I've been running tests on lumpy and alex. ETA is around 3 days from now. I am running a total of 400 reboots for each image with and without this patch, as well as 10x PyAutoPerfTests.

Unfortunately running autotests is time intensive (and not a high priority of the test team). I could run them in parallel across multiple machines but then the numbers may not be trustworthy. So it'll be worth the wait, hopefully.

Can someone run tests on daisy for me? I can gladly provide images from identical checkouts (with/without this patch)? Or, if you can give me the ip address of a daisy I can run tests there.
Gerrit-MessageType: comment
Gerrit-Change-Id: I017bc62ef73116bd93f0dfff8231d6aa0582af40
Gerrit-PatchSet: 1
Gerrit-Project: chromiumos/overlays/chromiumos-overlay
Gerrit-Branch: master
Gerrit-Owner: Mike Frysinger <vap...@chromium.org>
Gerrit-Reviewer: David James <david...@chromium.org>
Gerrit-Reviewer: Gerrit <chrom...@google.com>
Gerrit-Reviewer: Han Shen <she...@chromium.org>
Gerrit-Reviewer: Mike Frysinger <vap...@chromium.org>
Gerrit-Reviewer: asharif <ash...@google.com>

asharif (Code Review)

unread,
Nov 14, 2012, 3:28:46 PM11/14/12
to Mike Frysinger, Gerrit, David James, Han Shen
asharif has posted comments on this change.

Change subject: make.conf: link with -Wl,-O2 -Wl,--as-needed
......................................................................


Patch Set 1:

I built a vanilla image as well as an image with this CL. First, I wanted to see how many ELF binaries are actually different with this CL.

For lumpy:
Num same: 690
Num different: 1957

For alex:
Num same: 805
Num different: 1834


For daisy:
Num same: 1142
Num different: 1258


These are from mounting the image locally, and doing a find <image> -exec bash -c (file "{}" | grep -q ELF) && echo {} ;, and then running eu-readelf --notes <binary> | grep Build ID on it. So it includes any file that "file" thinks is an ELF binary.

The Chrome binary is slightly smaller with -O2, but the difference is very small (< 0.1%).

Performance tests for alex finished, and show a very small improvement for startup (0.2%) after about 250+ reboot cycles. However, the p-value is > 0.05, so I don't completely trust the numbers. Will send out an email with the alex results to vapier@ and the performance team.

daisy and lumpy experiments are still on-going. Will take a few more days to complete.
Gerrit-MessageType: comment
Gerrit-Change-Id: I017bc62ef73116bd93f0dfff8231d6aa0582af40
Gerrit-PatchSet: 1
Gerrit-Project: chromiumos/overlays/chromiumos-overlay
Gerrit-Branch: master
Gerrit-Owner: Mike Frysinger <vap...@chromium.org>

asharif (Code Review)

unread,
Nov 16, 2012, 2:54:23 PM11/16/12
to Mike Frysinger, Gerrit, David James, Han Shen
asharif has posted comments on this change.

Change subject: make.conf: link with -Wl,-O2 -Wl,--as-needed
......................................................................


Patch Set 1: Looks good to me, approved

Gerrit-MessageType: comment
Gerrit-Change-Id: I017bc62ef73116bd93f0dfff8231d6aa0582af40
Gerrit-PatchSet: 1
Gerrit-Project: chromiumos/overlays/chromiumos-overlay
Gerrit-Branch: master
Gerrit-Owner: Mike Frysinger <vap...@chromium.org>

asharif (Code Review)

unread,
Nov 16, 2012, 2:54:58 PM11/16/12
to Mike Frysinger, Gerrit, David James, Han Shen
asharif has posted comments on this change.

Change subject: make.conf: link with -Wl,-O2 -Wl,--as-needed
......................................................................


Patch Set 1:

All performance results are now on this bug: http://code.google.com/p/chromium-os/issues/detail?id=36447
Gerrit-MessageType: comment
Gerrit-Change-Id: I017bc62ef73116bd93f0dfff8231d6aa0582af40
Gerrit-PatchSet: 1
Gerrit-Project: chromiumos/overlays/chromiumos-overlay
Gerrit-Branch: master
Gerrit-Owner: Mike Frysinger <vap...@chromium.org>

Mike Frysinger (Code Review)

unread,
Nov 16, 2012, 6:09:35 PM11/16/12
to Mike Frysinger, Gerrit, David James, asharif, Han Shen
Mike Frysinger has posted comments on this change.

Change subject: make.conf: link with -Wl,-O2 -Wl,--as-needed
......................................................................


Patch Set 1: Verified; Ready

thanks for running those for me
Gerrit-MessageType: comment
Gerrit-Change-Id: I017bc62ef73116bd93f0dfff8231d6aa0582af40
Gerrit-PatchSet: 1
Gerrit-Project: chromiumos/overlays/chromiumos-overlay
Gerrit-Branch: master
Gerrit-Owner: Mike Frysinger <vap...@chromium.org>
Reply all
Reply to author
Forward
0 new messages