yashsingh1/xdaforums huggingface dataset:
[Android Software Development] Ezekeel:
There are several different cross-compiler toolchains available for building the Android Linux kernel. There is the offical TC released by Google as part of the Android NDK (http://developer.android.com/sdk/ndk/index.html) as well as several TCs released by third parties which claim to be more optimized for the target platform. While the most popular of these third party TC is the one from CodeSourcerey (https://sourcery.mentor.com/sgpp/lite/arm/portal/release1803), Linaro also offers one TC very popular by developers of custom kernels (http://www.linaro.org/downloads/) and there also is the Mjolnir TC by redstar3894 and intersectRaven (https://github.com/redstar3894/Manifest/blob/master/README.mkdn).

I have read of lot of praise for these optimized TC from different kernel developers that all claim that these do much better than the offcial Google TC, however to my knowledge up until now nobody actually took the effort of investigating the effect of the TC and most devs simply assume that a TC marketed as optimized by their creators is actually performing better.

So to investigate the performance of the different TC, I compiled a kernel (GLaDOS kernel for ICS) with the following four different TC:

1. Offical Google arm-linux-androideabi-4.4.3 (part of android-ndk-r7)

2. CodeSourcerey arm-2011.03-41-arm-none-linux-gnueabi

3. Linaro android-toolchain-eabi-linaro-4.6-2011.11-4-2011-11-15_12-22-49-linux-x86

4. Mjolnir arm-eabi-4.6-mjolnir-20111006

Also while I was at it, I investigated the effect of the compiler flags '-fgcse-after-reload' and '-ftree-vectorize' (see https://github.com/Ezekeel/GLaDOS-nexus-s/commit/6e51fc5c0be5a9e7906573f78e00c9aee41f32ee#comments) by compiling a version with the CS TC which did not include these flags.

I performed the following two tests for the kernels:

Test I: Measured the bootup time including a rebuild of the Dalvik-cache after a wipe (2 times).

Test II: Performed a benchmark with AnTuTu Benchmark v2.4.3 including CPU/memory, 2D and 3D graphics (3 times).

Results:

Test I:

Google	1:34	1:34
CS	1:34	1:34
CS-flags	1:34	1:34
Linaro	1:34	1:34
Mjolnir	1:34	1:34

Test II:

Google TC:

CodeSourcerey TC:

CodeSourcerey TC without flags:

Linaro:

Mjolnir:

Average:

Google	2715
CS	2725
CS-flags	2718
Linaro	2718
Mjolnir	2716

As one can clearly see from the results, the so-called optimized TCs perform not better than the official TC released by Google in any measurable way. So the improvements that some kernel devs have felt cannot be backed up by these data and is most likely wishful thinking. Also note that the compiler flags '-fgcse-after-reload' and '-ftree-vectorize' do not have to seem any adverse effects regarding the performance of the kernel.

Update:

In case anyone wants to try some benchmark fun for himself, here are the kernels (GLaDOS kernel for ICS).

Google: http://www.multiupload.com/QK5T6SHUFC

CS: http://www.multiupload.com/25021GRFT0

CS-flags: http://www.multiupload.com/98TCZOKLWA

Linaro: http://www.multiupload.com/XZJN2J9DOE

Mjolnir: http://www.multiupload.com/QK4I6R8DGR
[Android Software Development] aic719:
First! How do you think of this stuff?!

I know I'm spamming but still. :-P
[Android Software Development] bedalus:
Let me preface this by saying i haven't compiled since i was a teenager (distant memory) and only built simple msdos apps. My question is, when you compile for Android, does it produce machine code, or something else usable by the VM? Is the kernel also machine code, or something else suitable for the boot loader?

Sent from my SNES
[Android Software Development] FloHimself:
Ezekeel, thank you for taking the time to invastigate on this topic. This thread should be moved to the general "Android Software Development" forum to inform the other devs about this aswell.

O.T.: You should really think about a paypal donation button. I know about your reservation about taking money, but you might make a statement about only taking donations for already made development. This way you are free to decide whether you stop working on something or not and users can't complain about abandoned projects they have donated to.
[Android Software Development] DebauchedSloth:
Awesome, awesome post. I've always figured the TC made little difference to the kernel.

What would be interesting, though, would be to see the effect on the whole OS - in particular, Skia, audio processing, the brwser, etc - all the C/C++ stuff. There's not only a lot more of that code, but there's also a lot more floating point and that could maybe see some useful gains.
[Android Software Development] polobunny:
You can clearly see CS is the winner here! :p

Definitely nothing worth mentioning in terms of gains, if any. On 100 runs I bet they'd all get the same average.

Nevertheless, could it be that one gives better results when meeting specific criteria? Thinking mostly about the compiling hardware than the device it's being compiled for. Maybe older/newer/different hardware?
[Android Software Development] aic719:
Seconded.
[Android Software Development] loudaccord:
This is awesome... I wish more of these threads existed!

Any thought on how these have to do with battery life?
[Android Software Development] Arkaknio:
LoL, great research Ez!!

Wherever, can't wait for new mods!
[Android Software Development] Ezekeel:
Android apps are written in Java and run of the Dalvik VM. The kernel is written in C and runs directly on the hardware.

Since the performance is virtually the same, I do not expect the battery runtime to be any different either.

Franco has suggested to try the Mjolnir TC with a different set of compiler flags that does enable the hardware support for floating-point math (http://pastie.org/2951626).

Results:

Test I:

Google	1:34	1:34
CS	1:34	1:34
CS-flags	1:34	1:34
Linaro	1:34	1:34
Mjolnir	1:34	1:34
Mjolnir-float	1:34	1:34

Test II:

Average:

Google	2715
CS	2725
CS-flags	2718
Linaro	2718
Mjolnir	2716
Mjolnir-float	2720

As one can see enabling hardware support for floating-point math in the Mjolnir TC does not yield any measurable improvements in performance. I guess the reason is the use of floating-point math in the kernel is avoided at all costs, because for most platforms only a very inefficient software emulation is available and so kernel devs have learned to get along with only integers or if some decimal number are really necessary by using fixed-point math.

GLaDOS ICS kernel with Mjolnir TC and floating-point support: http://www.multiupload.com/AM6COIPI6Z
[Android Software Development] franciscofranco:
Mostly games use floating point so I'm sure there will be some improvement in that scenario.
[Android Software Development] Ezekeel:
That is not relevant since non-kernel programs already have hardware support for floating-point math. The kernel is a special case for which the hardware support is typically not available, so adding these compiler flags just enables it for the kernel. And since the kernel practically does not use any floating-point math, these flags improve a feature which is not used and so the effects are zilch.
[Android Software Development] morfic:
Did you copy paste the code sourcery toolchain version over the linaro version?

And if yes, which linaro toolchain did you use?
[Android Software Development] Ezekeel:
Oops. You are right. I did use the Linaro android-toolchain-eabi-linaro-4.6-2011.11-4-2011-11-15_12-22-49-linux-x86.
[Android Software Development] morfic:
Compiler optimization will indeed be most effective on media apps.

Trying it on cm7 is easily foiled on project that would require a lot of clean up with 4.6 toolchains.

I would expect gains in libwebcore.

Anything that's big and bulky.

Media apps should benefit from neon improvements in the TC.
[Android Software Development] morfic:
I missed it, did you compile -Os or -O2?
[Android Software Development] Ezekeel:
-O2 since I do not care for size.
[Android Software Development] icecoldbong:
thats what she said

btw, great post and i'm a big fan of your graphs on other research as well :)
[Android Software Development] morfic:
Since linaro's 4.6 is actually not creating the same efficient code as 4.5.4 (but sees active development while 4.5.4 is in maintenance mode), it would be interesting if you could add another trinity of screenshots done with the linaro 4.5 toolchain.
[Android Software Development] Ezekeel:
As Morfic has suggested I also tried the Linaro 4.5 compiler (android-toolchain-eabi-linaro-4.5-2011.10-1-2011-10-21_15-21-26-linux-x86).

Results:

Test I:

Google	1:34	1:34
CS	1:34	1:34
CS-flags	1:34	1:34
Linaro	1:34	1:34
Linaro-4.5	1:34	1:34
Mjolnir	1:34	1:34
Mjolnir-float	1:34	1:34

Test II:

Average:

Google	2715
CS	2725
CS-flags	2718
Linaro	2718
Linaro-4.5	2715
Mjolnir	2716
Mjolnir-float	2720

The same results as for all the other TCs.

GLaDOS ICS kernel with Linaro 4.5: http://www.multiupload.com/3SAXXP0LWF
[Android Software Development] morfic:
Are you just building for the architecture, or are you building towards the actual CPU?

I suspect you only build with -march=armv7-a instead of -mcpu=cortex-a8

While building a Linux distro kernel generic so it runs on most hardware makes the most sense, we do know which ONE and only CPU we have and can afford to optimize for it.

Looking forward to the results of your redo.

Until then you can remove the "myth busted" and replace it with an "expectation proven".
[Android Software Development] Ezekeel:
-mtune=cortex-a8
[Android Software Development] morfic:
redo your tests.
[Android Software Development] simms22:
lmao!

i can see you standing there, at the front of a classroom, yardstick in hand, getting ready to strike a student if they dont listen to you. like this teacher, but a guy(google wouldnt provide me with a similar image but a man) :eek:

ps. sorry Eze for messing up your thread.
[Android Software Development] Ezekeel:
As Morfic has suggested I also tried the Linaro 4.5 compiler with -mcpu=cortex-a8.

Results:

Test I:

Google	1:34	1:34
CS	1:34	1:34
CS-flags	1:34	1:34
Linaro	1:34	1:34
Linaro-4.5	1:34	1:34
Linaro-a8	1:34	1:34
Mjolnir	1:34	1:34
Mjolnir-float	1:34	1:34

Test II:

Average:

Google	2715
CS	2725
CS-flags	2718
Linaro	2718
Linaro-4.5	2715
Linaro-a8	2718
Mjolnir	2716
Mjolnir-float	2720

The same results.

GLaDOS ICS kernel with Linaro 4.5 and -mcpu=cortex-a8: http://www.multiupload.com/ZMSJXGZ6JT
[Android Software Development] unforgiven512:
This is wonderful.
[Android Software Development] nexusphone:
Ezekeel is a professional developer? (a computer programmer, software business etc)
[Android Software Development] endursa:
i wouldn't wonder, since his work is really professional and backed up by benchmarks. something i think is not done enough!

since my background is in science i only rely on proofed data, which up to date only ezekeel managed to deliver :)
[Android Software Development] nexusphone:
Ezekeel makes big contributions in the Nexus S community. :)

Nice Englishman, Scot or Welshman?
[Android Software Development] Entropy512:
Thanks for the mythbusting. One thing not covered is that alternate toolchains can often cause oddball regressions - I've seen it happen many times.

So kernel developers should stick with whatever TC the manufacturer used, in order to minimize the risk that an alternate toolchain will cause a regression.

While technically, good code shouldn't break when compiled using a different compile, we're in the real world of development where some of the platform-specific drivers aren't exactly in the best of shape...
[Android Software Development] willverduzco:
Thread moved to Android Software Development, since this is useful for everyone, not just Nexus S owners.

As always, great work Ezekeel!

PS. I am leaving an extremely long 3 month redirect so that this thread doesn't get lost. :p
[Android Software Development] weedy2887:
As a long time gentoo and openwrt user a couple things immediately come to mind.

1. mtune/mcpu != march. That said I don't see it making a difference that couldn't be explained away by the margin of error. mtune would add a slight overhead in picking the generic vs. optimized instruction but that is generally only paid once. Also the obvious bloat that comes from have both instruction sets.

2. CS has always been faster, that is their thing. Linaro is regarded as the more stable/serious arm toolchain, but as your test showed it is still close to CS in performance.

3. The kernel is "serious business"(duh). As such it locks down gccs auto optimization routines a lot, we can't have a 5% performance boost if the resulting code is only stable on 95% of machines. So I am not surprised to see the lack of difference.

That said there is also likely to be a lot of optimization built into the kernel code since LKML is always a pissing contest and full of couch benchmarkers. For example x86(-64) now has a CONFIG_X86_MARCH_NATIVE which actually lets gcc optimize a little more. Poking around my mips tree I don't see anything like that except CONFIG_CC_OPTIMIZE_FOR_SIZE and CONFIG_JUMP_LABEL but since I don't have an arm tree laying around I can't say what options exist.

If you want to compare the compilers based on flags you can try the following.

cc -march=cortex-a8 -E -v - </dev/null 2>&1 | grep cc1
gcc -Q --help=target -march=cortex-a8
echo | gcc -dM -E - -march=cortex-a8

The first 2 can lie about flags since they will mark the parent but not the children. The last is quite verbose but shows all options. You can also compare flags between armv7-a and cortex-a8.
[Android Software Development] AlxMAX:
Interesting comparison. I have also made such a comparison for HTC Desire CyanogenMod kernel with the default Google toolchain, Linaro's 4.6 and one I have tried to compile myself (starting with Linaro's source and enable the PPL and CLooG stuff). I have disabled the optimize for size flag, then enabled -ftree-vectorize. I've noticed these:

no visible speed difference between the code generated with the 4.6 compiler and the one generated with the Google's toolchain.

the code generated by Linaro's TC is smaller than the code generated by Google's TC.

enabling -ftree-vectorize constantly locks my phone when using Linaro's TC (both of them).
[Android Software Development] weedy2887:
It's depends A LOT on the cpu, you also need to pass the right options.

http://infocenter.arm.com/help/topic/com.arm.doc.dht0002a/ch01s04s03.html

The is also a weaker -ftree-slp-vectorize, but i don't know if it's available for arm.
[Android Software Development] Sarkie:
Can we myth bust this too?

http://www.androidpolice.com/2012/0...e-and-now-parts-of-it-are-being-added-to-cm9/
[Android Software Development] Cadillac Johnson:
From what I understand Linaro would show much more improvement with user space not kernel space. Now I am FAR from an expert but I interpreted that as there not being much improvement incorporating that into a kernel as opposed to a ROM?
[Android Software Development] brashmadcap:
No, we can't because that's not a myth
[Android Software Development] BluPix:
Faster system only with kernel compiled by different compiler isn't myth too.

If someone recompile some cpu benchmark with this compilers and then we will have numbers little closer to real impact on running system.

I have linaro toolchain compiled rom in kindle fire (gedeROM v1.6) and yes, it's little faster. In quadrant:

cm9 memory benchmark: 1943, total: 2743

cm9 + linaro memory benchmark: 3441, total: 3173

So memory benchmark is 70% faster.

Operations in system are faster, gui is faster. But internet, 3D chip and storage isn't faster.
[Android Software Development] veyka:
Quadrant is not a valid benchmark, its inconsistent, easy to fake, and generally worthless.

Try antutu, CF bench, or 0xBenchmark or something.

Its been proven time and again that the kernels performance is not toolchain sensitive.

If you are talking about the rom, then yes, it will be faster compiled with a newer GCC version and or toolchain it will be faster, but thats not what this thread is debunking.
[Android Software Development] slycog:
I'm not super familiar with the Android kernel or the various architectures, but i can tell you that the type of benchmarking being done here is not very relevant.

In order to get a true picture of the various differences between the tool chains and impacts of compiler flags, you'd have to actually look at a dissassembly of the generated code.

Measuring the impact performance wise is a lot more in-depth than measuring boot time.

In addition to taking the time to benchmark actual kernel functions (actual cpu cycles...), It'd be good to take a look at the claims made by the various tool chains and actually put them to the test.

Outside of options that explicitly take advantage of architecture specific features. It's not unreasonable that a combination of the different enhancements to code generation being leveraged by the tool chains would result in faster code.

Your biggest gains however will come from improving the code itself.
[Android Software Development] spc_hicks09:
I could be wrong but I never thought Linaro claimed to make your phone faster. I could have swore it only claimed to compile faster. Could be wrong though.
[Android Software Development] generosity21:
I believe it is supposed to make the device faster. See link:

http://www.androidauthority.com/linaro-android-is-up-to-twice-as-fast-as-stock-android-92831/

See the comment by roger - it could be that this mythbusting is in need of an update.
[Android Software Development] srsdani:
So, I've made those comparisons. Quadrant test was run once.

[YOUTUBE]?v=TJCngqOhg_Q[/YOUTUBE]
[Android Software Development] weedy2887:
This thread was started in 2011.

It's pretty much expected that since then changes and updates to GCC will actually have some measurable effect.

But the biggest change will come from the ROM being compiled with a faster TC, not the kernel.
[Android Software Development] pariwadhwa:
Which toolchain compiled the fastest?
[Android Software Development] bamsbamx:
What about doing these tests again with the newer Android versions (Nougat, Oreo)?

Google, UBER, Linaro, SaberMod....

These must be compiled with GCC 4.9
[Windows Phone 7 General] andrewkeith5:
I woke up this morning to an alert on my HTC 7 Pro that I had a software update available - "hooray", I thought, expecting just to get 7740.

To my surprise I was also pushed the HTC Update with Internet Sharing enabled, so my 7 Pro is now fully 'mangoed'. Don't know if any of you guys have had this too?

Annoyingly, though, HTC didn't think to fix the MAC address issue (changes every time you reboot), so my phone can /be/ a wireless hotspot, but can't /connect/ to my wifi network. Damn :(
[Windows Phone 7 General] blindpet:
I got this update today too for my 7 pro. I thought it was weird since I'm on DFT v2 I didn't think we got updates.
[Windows Phone 7 General] blanket:
i guess it depends on your carrier and where you are located

maybe origin of phone plays a part too

i'm in singapore, where the 7 pro is not available, but i still got it

if it matters, my 7 pro is a unbranded set from the uk
[Windows Phone 7 General] Ttblondey:
Only IS for HD7 7720 not getting 7740 yet.:mad:
[Windows Phone 7 General] Ludacris:
And nothing for me on the trophy yet -.-
[Windows Phone 7 General] taruian:
hi m8

im also on DFT V1 rom on my mozart, i jst want to ask will the phone gets locked if we update?

just now i clickd update later :P
[Windows Phone 7 General] morpheuszg:
Today my 7 Pro got the update with IS and 7740.
[Windows Phone 7 General] taruian:
if you are on custom ROM, you cannot update to 7740.16

i just now tried, update encountered error while installing the updates, & now its restoring back. :(
[Windows Phone 7 General] Alcoholic:
No update for my HTC surround
[Windows Phone 7 General] andrewkeith5:
Well so far I only know of Mozart, HD7 and 7 Pro geting updates so I'm sure you will get it eventually if your carrier supports it, it's just a matter of time.

Incidentally, I've very please that the update isn't carrier dependent, as this means for sure that they can't detect you using it if you're on an unbranded device ;)
[Windows Phone 7 General] Hippy43:
I got the 7740.16 update yesterday but if it is supposed to enable IS,, I'll be damned if I can find it...

Did it just show up in the program list for the rest of you? Is there something that needs to be changed?

Thanks,,
[Windows Phone 7 General] andrewkeith5:
It's in settings ;)
[Windows Phone 7 General] Snake.:
it is not, this is OS update, not firmware update.
[Windows Phone 7 General] andrewkeith5:
Internet Sharing is located in Settings, between Bluetooth and Email+Accounts

At least it is on my HTC 7 Pro, updated to 7740 (which if you look carefully includes the HTC update at the bottom) yesterday.

If you install a later update, all earlier updates are installed also. It looks to me like the HTC Update was activated slightly before 7740, so is getting packaged in at the same time.
[Windows Phone 7 General] xboxmod:
Hi andrew

can you run WP7 Update Cab Sender to read the update log and share url of the HTC Update.
[Windows Phone 7 General] Ttblondey:
Can we force update like 7720? and how it's done.
[Windows Phone 7 General] zyxer_raffy:
I updated my unbranded hd7 to 7740 but still didn't have the IS. sucks!
[Windows Phone 7 General] xboxmod:
yes please a lots of people wait for this cab.
[Windows Phone 7 General] blanket:
although i don't need it, but here is the mirror for shooter's file in mediafire

lots of guys can't download through rs like i used to before i bought a service

http://www.mediafire.com/?833eb7c0jn3lvyb
[Windows Phone 7 General] Ttblondey:
My hd7 7720 contain IS.Haven't receive any update for 7740 yet.
[Windows Phone 7 General] weepatc:
Titan & HD7 both updated with HTC & 7740 UK O2 & Vodafone networks.

Sent from my HTC Titan using Board Express
[Windows Phone 7 General] andrewkeith5:
I'm happy to help with links etc but I've no idea what you're all talking about!

Bear in mind that if you have a carrier branded device, then the carrier may well have turned off IS for you...
[Windows Phone 7 General] CP-Geek:
Just updated my 7 Pro, they have also fixed the exchange-error where attachments couldn't be downloaded inside message, had to click the attachment to be downloaded, go back to folder and re-sync. And the internet-sharing is working like a dream also.

This is what happened, also the unlock is preserved.

OS 7.10.7720.68 -> 7.10.7740.16

FW 2250.21.30201.401 -> 2250.21.51003.401

HW 0002

Radio SW 5.69.09.29a_22.50.21U -> 5.71.09.02a_22.51.50.21U

Radio HW A.102.0.D4

Bootloader 3.2.2250.0 -> 5.10.2250.0

Chip SOC 2.2.5.0
[Windows Phone 7 General] holmesm:
7740 Update

I received 7740.16 update today (CDMA) fixed exchange and voicemail notification issues, still no tethering for me:(
[Windows Phone 7 General] jaygriggs:
do you have a cdma htc pro7? a sprint arrive?
[Galaxy Tab General] WintersComing:
Hi

Recently got a galaxy tab 10.1, and has 3.1 installed - no upgrade available yet apparently.

Anyway, I'm not sure if I've missed something glaringly obvious, but I'm reasonably literate with stuff like this. I'm trying to get my email setup, and have tried a number of apps. Until ICS comes out, Ive decided to use the stock email app, the samsung one..

Anyway, I can add multiple accounts, so I've got gmail, hotmail etc. The only problem is gmail (IMAP?) has a change displayed name feature, whereas hotmail (on activesync?) doesn't... So if my email was bigbillybob@whatever.com, my gmail has a setting to change that to whatever I want, in this instance Mr Bob Smith. However, the hotmail doesn't, and when I send an email, it's from bigbillybob, essentially just the first part of the email address.

I can't believe that this is a bug / intentional, but the setting isn't there under the hotmail account. I was hoping someone could shed some light on this. No luck searching :mad: - Otherwise it's a great little device.
[Galaxy Tab General] agc93:
This is not the Galaxy Tab 10.1 forums. This is for the original Galaxy Tab.

Please post your question in the correct forum (i.e. the 10.1's dedicated forum) to have your question better answered.