Build Android with -O3 cflags

Registered by Rob Beane

We currently build Android with -O3 for arm cflags, while thumb still uses -Os. So enable -O3 globally for both arm and thumb cflags.

Blueprint information

Status:
Started
Approver:
Rob Beane
Priority:
Medium
Drafter:
None
Direction:
Approved
Assignee:
Rob Beane
Definition:
Approved
Series goal:
Accepted for v1.0.0
Implementation:
Good progress
Milestone target:
milestone icon mr2
Started by
Rob Beane

Related branches

Sprints

Whiteboard

[2012/07/18 robbeane] Posted public test build fully compiled with -O3
http://goo.im/devs/existz/test/aospX-1.0.0-BR5-Test1-DHD.zip

[2012/07/22 robbeane] It looks like this test build causes higher than normal memory usage. Further testing is needed to verify that O3 for thumb flags is causing this.. If O3 is the cause then we will ditch the plan to use it globally and instead just apply O3 to the packages that make most sense. We will need to benchmark before and after to find the best locations to use O3.

Im moving this blueprint from BR5 target to backlog for now, extensive testing still needs to be done.

[2012/08/25 robbeane] dalvik/libdex can now be built with -O3 optimizations by using the flag -fno-inline-functions. This also allows libskia to be built with O3 without causing the white flashing during boot. I still need to test and bench before/after to make sure no new issues are introduced. But id like to get this moving and add O3 to the packages that would benefit from it the most..

[2012/08/26 robbeane] Moving this out of backlog and back into the br* release queue since work has begun. This will probably be a series of updates with the next few builds, by adding O3 to a few packages per release. So far using O3 on libdex and libskia has not introduced any new issues, so they will probably make it into BR8. I have a few other places that im looking into, but might have to wait till BR9 to start testing these. Once I get a list together of possible packages, ill add them to Work Items list.

[2012/09/29 robbeane] -O3 has now been added to libdex, libskia and libsqlite. But we still need to test -O3 on a few other packages and see if it provides any improvement, if not then theres no need for the extra size increase. We need to test the following..

# Bionic
Add -O3 optimization to libc

# Dalvik
Add -O3 optimization to libdvm
Add -O3 optimization to dalvikvm

# Webkit
Add -O3 optimization to libwebcore

#Framework
Add -O3 optimization to libui
Add -O3 optimization to libhwui

# PNG
Add -O3 optimization to libpng

(?)

Work Items

Work items:
Add -O3 optimization to libdex: DONE
Add -O3 optimization to libskia: DONE
Add -O3 optimization to libsqlite: DONE
Find the best locations to use O3: INPROGRESS
Compare benchmarks before and after: TODO
Fix new issues introduced, if any: TODO

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.