yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] sparksco:
Seems like a lot of problems with Resurrection Remix lately just saying...
[Android Software/Hacking General [Developers Only]] jgcaap:
Hello batlin.

Error in tool chains are normal, usually has to do with the type of coding. As a suggestion, please try check from other devs if there are solutions for it, or even develop a work around by removing some of the flags.

Happy building.
[Android Software/Hacking General [Developers Only]] MikeyNick:
Thanks! That did get me past that error, then I had an outdated GLIBCXX so I updated that and got past that, but now I`m getting:

packages/apps/Gallery2/jni/filters/hsv.c: In function 'fastevalPoly':
packages/apps/Gallery2/jni/filters/hsv.c:21:8: internal compiler error: Segmentation fault
double fastevalPoly(double *poly,int n, double x){
^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://source.android.com/source/report-bugs.html> for instructions.
make: *** [/home/michael/RR/out/target/product/ghost/obj/SHARED_LIBRARIES/libjni_filtershow_filters_intermediates/filters/hsv.o] Error 1

Segmentation faults are always fun to figure out... :-p

Going to poke around a bit but thought I`d post in case someone had an idea.
[Android Software/Hacking General [Developers Only]] sparksco:
I've never seen the error on my end before. Probably some other optimizations you have in the ROM not related to this JustArchi or the toolchain.

Also there's been a new LTS branch up since earlier today for the GLIBCXX
[Android Software/Hacking General [Developers Only]] sparksco:
OK guys. I moved graphite libs once again to the Toolchain root lib directory for people that don't have ROM patches for this. I don't know if this fixes the missing lib errors for some people or not. For people that have issues please download the gitlab toolchains to test and let me know. Thanks.
[Android Software/Hacking General [Developers Only]] attack11:
Thanks, [MENTION=4389873]spars[/MENTION]ko can you give the right instructions to enable graphite ? Im building a kernel and added the flags but im not sure if its working or its just placebo
[Android Software/Hacking General [Developers Only]] sparksco:
That's all you have to do is add the flags. Graphite is nothing special in gcc 4.8. It's been improved a lot in gcc 4.9 and 5.0. I use 5.0 for my kernel and I'm working on getting gcc 4.9 to work for the ROM I'm using also.
[Android Software/Hacking General [Developers Only]] MikeyNick:
Looks like it was one of these: -fgraphite-identity -floop-parallelize-all -floop-interchange -floop-strip-mine -floop-block

I removed them from after 'ARCHIDROID_GCC_CFLAGS += -fgraphite' and it went quite a bit further, but then I got this error:

frameworks/av/services/audioflinger/AudioMixer.cpp:2125:6: internal compiler error: in vect_get_vec_def_for_operand, at tree-vect-stmts.c:1423
void AudioMixer::track__NoResample(track_t* t, TO* out, size_t frameCount,
^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://source.android.com/source/report-bugs.html> for instructions.
make: *** [/home/michael/RR/out/target/product/ghost/obj/SHARED_LIBRARIES/libaudioflinger_intermediates/AudioMixer.o] Error 1

...

I wrote the above part of the post like 5 or 6 hours ago. I've tried almost every combination of tool chain (SM 4.8, 4.9 and standard androideabi) and -Ox flag (-O3, -O2, and -Os on the THUMB part and the general GCC_FLAGS) , just cannot seem to get past that error. I think I'm going to reset my build environment tomorrow and start from scratch. Probably just try to get a regular build going and start adding in some optimizations/toolchains one by one to see what i can figure out...
[Android Software/Hacking General [Developers Only]] Khaon:
Well adding Os to the 75th line of this file https://android.googlesource.com/pl...oid-5.1.0_r3/services/audioflinger/Android.mk will compile this module with Os you should not have any error then. if you have activated so other optimizations you should -fno-* them also.
[Android Software/Hacking General [Developers Only]] jgcaap:
That was pretty useful.. I thought was another code. Thanks!
[Android Software/Hacking General [Developers Only]] liv3dn8as:
builtins.o failed

Hi! I'm wondering if someone can't help me out here! Here's the link to my log, pastebin. Let me know what other info you might need! Thanks!
[Android Software/Hacking General [Developers Only]] jgcaap:
system/core/init/property_service.h:46:34: error: call to '__property_get_size_error' declared with attribute error: property_get called with too small buffer

What changes you made on your source?

Share me your system/core source part. Thanks
[Android Software/Hacking General [Developers Only]] abrakadabra_srb:
Damn, got another issue... Manage to compile and build CM12 for Htc ONE with these optimizations, but... I can make one or two phone calls, after that my signal drops and I get either 'Celular network not available' or when signal appears again I get 'Call not sent.' message. I've set -Os on all RIL related libs (I think I covered all) and also on frameworks but I still get the same issue. Has anyone experienced something similar and maybe know how to fix it?

Thnx!
[Android Software/Hacking General [Developers Only]] JustArchi:
[MENTION=2394329]sparksco[/MENTION]

Could you please create any valid mirror for latest SaberMods located outside of gitlab?

I can't clone your repo, neither via git, ssh, or https. The whole site works so crappy that I literally hate myself when trying to use it.

It literally doesn't work, at all. Please do something with it. Thank you.
[Android Software/Hacking General [Developers Only]] Crostantin:
works with ssh...you can't add on a manifests but can always clone it
[Android Software/Hacking General [Developers Only]] JustArchi:
Commands please? I tried with SSH too and it didn't work for me.
[Android Software/Hacking General [Developers Only]] Crostantin:
git clone git@gitlag.com:Saber/............./.git.

You can find the ssh link on the top of the page of the project...You need also to sync the ssh key with an accounyt...check for some tutorials online
[Android Software/Hacking General [Developers Only]] Hashbang173:
What error did you get cloning with ssh?
[Android Software/Hacking General [Developers Only]] JustArchi:
Server unexpectedly closing connections. EXACTLY the same issue with https. The whole server works like crap, I never experienced such issues with github or other git services.
[Android Software/Hacking General [Developers Only]] Hashbang173:
I can easily upload a mirror to github if it's ok with [MENTION=2394329]sparksco[/MENTION]
[Android Software/Hacking General [Developers Only]] Crostantin:
I synced all the toolchains an hour ago...I wrote the code a couple of post before
[Android Software/Hacking General [Developers Only]] sparksco:
Sure I don't mind. Maybe I'll upload a tarball later to mega getting sick of dealing with git and toolchains anyways.
[Android Software/Hacking General [Developers Only]] Mr.R™:
Excellent, please supply the link when you have [MENTION=4630246]joshuabg[/MENTION] gitlab has also been driving me nuts :/

[MENTION=5161352]JustArchi[/MENTION]

I'm trying to get your optimisations working with pac 5.1, i have added https://github.com/ArchiDroid/android_build/tree/cm-12.1-optimized to my local manifest, i went ahead and tried to build (with linario 4.9 and your generic architoolchain) and got an audiomixer.o error which i fixed with this commit: https://github.com/temasek/android_frameworks_av/commit/292d4e2c74d07287b7dc3b366e031f235e136fc8 then the build was successful but it states the output file is called cm-12.1-blahblah.zip but in reality no such file exists. I wouldn't mind if it was there and worked but its not :(

I understand i have likely done something wrong or missed something to make this work with pac which is where i could do with your help if at all possible and you dont mind :)

My build environment is set up correctly, i can build pac just fine with the toolchains i mentioned sans your optimisations so all help is appreciated, many thanks dude :)
[Android Software/Hacking General [Developers Only]] JustArchi:
Stop adding my repo to your manifest and start reading damn OP. You're supposed to cherry-pick the commit, not pick up the repo.
[Android Software/Hacking General [Developers Only]] sidneyk:
If you are talking about art runtime, then you set it near the bottom of developer settings in rom.
[Android Software/Hacking General [Developers Only]] F4k:
As workaround, try to add a LOCAL_CFLAGS (-Os) under Android.mk file on libhwcomposer folder.

If you mean when building, you can change default runtime on core_minimal.mk
[Android Software/Hacking General [Developers Only]] sidnoit22:
So no one got lucky yet. :( :silly:
[Android Software/Hacking General [Developers Only]] kantjer:
Thanks, just started a new clean build with the -Os flag set.
[Android Software/Hacking General [Developers Only]] JustArchi:
Told you guys that it's only a signpost where to start, it's not something that will work out of box for everyone, unless you compile OmniROM for i9300, same as I do :). You should experiment with these flags, not apply them blindly.
[Android Software/Hacking General [Developers Only]] kantjer:
I wasn't complaining, only asking for direction ;)

But thanks for the signpost, it did what a signpost is supposed to do, steer me in the right direction.
[Android Software/Hacking General [Developers Only]] JustArchi:
In general if you have weird reference errors, you should:

1. Try Google's GCC 4.8 if you used Linaro 4.8

2. Try Google's GCC 4.7 if you used Google'S GCC 4.8

3. Try to use O2 flag instead of O3 (in everything)

4. Find conflicting flag by checking one-by-one
[Android Software/Hacking General [Developers Only]] mauam:
Yes, lucky me here:cool:
[Android Software/Hacking General [Developers Only]] sidnoit22:
I am a Nexus 4 user.. :p
[Android Software/Hacking General [Developers Only]] mauam:
And...
[Android Software/Hacking General [Developers Only]] dbolivar:
SaberMod vs. Linaro

Does anyone know what's the difference, regarding code optimizations, between SaberMod and Linaro toolchains? Does one offer the same speed improvements as the other, and vice-versa, when comparing with Google's toolchain?
[Android Software/Hacking General [Developers Only]] Balino:
Me too :p
[Android Software/Hacking General [Developers Only]] surdu_petru:
Hi !

I'm back here with the result on my phone :

Antutu score on stock OmniROM : please, take a look here ;

My Antutu score after was applied your patches on the same build OmniROM : please take a looker here ;

Would be very helpful if you could add your advice, or on what direction we should go to benefit one bit from these optimizations.

Thank you very much in advance :o
[Android Software/Hacking General [Developers Only]] Fred6681:
And me too --> OmniRom samsung golden gcc/linaro 4.9 JustArchi's ArchiDroid Optimizations
[Android Software/Hacking General [Developers Only]] JustArchi:
Antutu is not a reliable benchmark, and never was. Does your system feel a lot smoother? Is there a difference?

Give your build to the users for comparision with normal one, the same I did with mysterious builds shared in the OP and check yourself what users choose :).
[Android Software/Hacking General [Developers Only]] Orphee:
Hello :)

After 2 hours of compilation, it crash :

Do you have an idea ?

I can't find Google GCC 4.8

I tried take lines from :

https://github.com/JustArchi/ArchiDroid/blob/2.X-EXPERIMENTAL/__dont_include/roomservice.xml#L7

But when I uncomment Google GCC 4.8 it fails to sync.

Thank you
[Android Software/Hacking General [Developers Only]] JustArchi:
It fails to sync because you specified Linaro already.

Use only ONE option. Linaro or Google. Not both. I put both of them in my roomservice.xml to allow you easy switching between them.
[Android Software/Hacking General [Developers Only]] Fred6681:
Your optimizations works with 4.9, he there a particular reason of not used ?
[Android Software/Hacking General [Developers Only]] Orphee:
so commenting linaro with <!-- --> does not work ?

I commented linaro lines before uncomment google one.

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<!-- LINARO TOOLCHAIN -->
<!-- <project name="JustArchi/linaro.git" path="prebuilts/gcc/linux-x86/arm/arm-eabi-4.8" remote="github" revision="4.8-eabi" /> -->
<!-- <project name="JustArchi/linaro.git" path="prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8" remote="github" revision="4.8-androideabi" /> -->

<!-- GOOGLE GCC TOOLCHAIN -->
<project name="platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8" path="prebuilts/gcc/linux-x86/arm/arm-eabi-4.8" revision="master" />
<project name="platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8" path="prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8" revision="master" />

<project name="CyanogenMod/android_device_motorola_moto_msm8960" path="device/motorola/moto_msm8960" remote="github" />
<project name="CyanogenMod/android_device_qcom_common" path="device/qcom/common" remote="github" />
<project name="CyanogenMod/android_device_motorola_qcom-common" path="device/motorola/qcom-common" remote="github" />
<project name="CyanogenMod/android_kernel_motorola_msm8960-common" path="kernel/motorola/msm8960-common" remote="github" />
</manifest>

Edit :

error: Cannot fetch platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8
Fetching projects: 60% (275/458)
error: Exited sync due to fetch errors
[Android Software/Hacking General [Developers Only]] Garcia98:
For people having issues with compiling using GCC 4.8 due to an error related to linker at memcheck step because of "memmove is not defined": you have to apply this patch to Valgrind in order to fix that issue.

Easier way, if you use GCC 4.8 and you have errors, cherry-pick this commit :good:
[Android Software/Hacking General [Developers Only]] Mr.R™:
Sorry my mistake i meant i added architoolchain-4.9-arm-linux-gnueabi-generic not the one i previously mentioned. i did pick the commit as i was supposed to. I had however added something else to my manifest that caused the issue, we all make mistakes when we are overtired. Just built successfully and going to test it out :)

On another note tho, we all make mistakes and have those stupid moments, there was no need for the crappy attitude.

Thanks for your excellent work its greatly appreciated :)
[Android Software/Hacking General [Developers Only]] JustArchi:
Never cherry-pick stuff if you're tired ;).
[Android Software/Hacking General [Developers Only]] Mr.R™:
Good moto haha. Rom is working brilliantly, had to use a custom kernel tho as seems building it with your architoolchain has broken the kernel, will try a different toolchain and see how it goes, again thanks for the great work :D
[Android Software/Hacking General [Developers Only]] sparksco:
Ok so toolchain mirrors are uploading expect them to be here

However these are the ones I compiled so they will have a newer GLIBCXX than ubuntu 14.04 trusty. Just a warning beforehand in case someone complains about a GLIBCXX error. In that case you'll want to compile the toolchains yourself or download from gitlab with ssh. I will only update the mirrors once a month.
[Android Software/Hacking General [Developers Only]] sparksco:
Did anyone else notice that libwebviewchromium is forced to use -Os?

I compiled it with -O3 and -fprefetch-loop-arrays with this patch.

https://gitlab.com/SaberMod/cm-andr...mmit/b932cb50c69d4a14389ba90856f4fa1fcc86dbf0
[Android Software/Hacking General [Developers Only]] tortellini:
Hello [MENTION=5161352]JustArchi[/MENTION]

I building a Resurrection Remix Rom CM12.1 for HTC One X with your V4 optimization, all works perfectly and very smooth ! Thanks for your great works.

I have just one problem "Graphical glitches in PlayStore", can i use this commit with CM 12.1 ? https://github.com/JustArchi/android_external_webp/commit/36c6201fbb108d6b757f860e2cd57f3982191662

I use Linaro 4.8 for ROM and Linaro 4.9 for kernel.

Thanks

Tortellini
[Android Software/Hacking General [Developers Only]] JustArchi:
Switch your toolchain then. The patch you mentioned indeed solves the problem, but does not solve all Linaro problems.
[Android Software/Hacking General [Developers Only]] :
I'm new to this whole optimizing thing.

I want to optimize CM12.1 for S2 Plus. All I have to do is edit the files like the ones from your github?

Thanks!
[Android Software/Hacking General [Developers Only]] Khaon:
Indeed, chromium code is huge and few broken code(because ofO3 or more optimizations) leads to an unstable lib.

This is my solution just to share with users:

https://github.com/OptiPop/build/blob/73d4591f5164c4449060c4b3dc73233149dca4e3/core/optipop.mk#L261
[Android Software/Hacking General [Developers Only]] sparksco:
I don't find it to be broken at all for me with -O3

The solution I posted works
[Android Software/Hacking General [Developers Only]] JustArchi:
Why did you disable so many things from using O3?

I'm using O3 for both ARM and THUMB targets, moreover, also CLANG ones, and I didn't face any issues related strictly to my optimizations.

Also I totally can't understand what's the point of applying O3 if you prevent around 70% of Android from using it. Chromium is one of the biggest targets, therefore it benefits much more from O3 than other smaller packages.

After doing little inspection I have a feeling like you don't know what you're doing.
[Android Software/Hacking General [Developers Only]] sparksco:
git cherry-pick is probably a easier option than copy/paste
[Android Software/Hacking General [Developers Only]] Khaon:
You are right to ask such a question. In my concern, I am bulding on an exynos 5250 and snapdragon 600.

Building webchromium with O3 for my exynos leads to instability. Ofc I could try to identify the modules culprits but I AM TOO LAZY.

However, bulding O3 on my snapardon is not unstable.

You have then your answer. Even if exynos is a15 and krait a derivative of it, you have to handle differntly flags.

Sorry to say that, but you should not talking about knowing what to do or not when you enable double and quad word for neon processor in the same line. I am not here to discusswhatflags/set up is correct just sharing what I use.
[Android Software/Hacking General [Developers Only]] sparksco:
I think the key word you mentioned was "other optimizations". -O3 is a basic optimization that turns on other optimization flags by default (read gcc documentation).

So the two questions you should be asking yourself is.

1. Is it really worth using other optimizations if they break a lot of code or simply don't work. I can give you a good example of this. Strict aliasing does not really work on much android system code out of the box without modification. So therefore it's not really beneficial unless you patch up a lot of code (which I'm to lazy to do). And by path up I don't mean excluding modules. But in the Linux kernel, it is able to compile more than 90% of the code, which I do happen to be using, because it' more beneficial in the Linux kernel. The same can be said for -floop-nest-optimize which is very broken in the android system but again works fine in the Linux kernel.

2. Decide when and where it is most beneficial to use each optimization option instead of trying to apply each one everywhere that's possible. Going back to what I said previously, -O3 is the most common optimization that will enable the ones that gnu works on the most.
[Android Software/Hacking General [Developers Only]] Khaon:
I totally agree with point 1. No need to discuss over in my concern. I am not even using graphite nor floop, it is not because our distro gives the opportunity to use that I use it,you are right it is highly experimental.

However I am not agreeing on point 2.

Google is enabling a lot of stuff already on O2 (example http://pastebin.com/qeJ4n0K3) and THIS COMPILER(ubertc in this case) HAS NOT EVEN slp vectorizer enabled on O2 level like google does.

Many chromium modules want to force Os by default.

Many flags that are enabled on O3 are already enabled.

I have nothing to say more.
[Android Software/Hacking General [Developers Only]] :
I might get the cherry-picking wrong, so I'd rather do it manually.

Just wanted to know if the idea is right.
[Android Software/Hacking General [Developers Only]] sparksco:
I never mentioned graphite flags as a whole. I mentioned one isl based flag (which is part of graphite). You can choose what cloog/isl flags you want to use and also where.

cloog/isl=graphite

I also mentioned strict-aliasing which you didn't touch base on. But that's OK I assume that's probably because you use it [emoji4]

A pastebin isn't really a creditable source. Also I don't use ubertc so I don't see the point of mentioning that to me.
[Android Software/Hacking General [Developers Only]] sparksco:
I'm pretty sure that patches are based on cm so it shouldn't be difficult.
[Android Software/Hacking General [Developers Only]] JustArchi:
I'm building for Exynos 4, which is much worse than your exynos 5+ :).

Show me where I enable double and quad word for neon processor, now I'm sure that you have no idea what you're doing, as you didn't even check my commit carefully :).

I'm not here to discuss about your flags either, but I see that you basicly invented so much hacks for compilation process that it's pointless to keep using O3.
[Android Software/Hacking General [Developers Only]] Khaon:
https://github.com/ArchiDroid/andro...268c#diff-0e3c33985fa7ce9825747becb552b5e0R80

You had on a single CFLAGS both double and quad words enabled for quite a lon time.(has been removed and removed later from unknown clang)

You I do read your OP, follow your commits and no need to mention the date
[Android Software/Hacking General [Developers Only]] JustArchi:
Mate, of course I do have them in unknown CLANG flags, because they're not recognized by CLANG compiler, and I enable either double or quad on per-device basis :). If you don't know what is the purpose of unknown clang flags, please make a research, or ask before making invalid statements like your last one.
[Android Software/Hacking General [Developers Only]] Khaon:
Ok but you did before enabling those flags for the whole build, that is why I point you out it was still inUNKNOWN ( but did'nt know you move them this to a config file

1/ By default vectorization with quad words so you don't need to activate it i think

2/ Seems your misunderstood what s the difference with double and quad, it is not related with the number of core

http://ctuning.org/dissemination/grow10-03.pdf
[Android Software/Hacking General [Developers Only]] JustArchi:
No, I never enabled quad and double vectorizations at the same time, it's the most stupid thing I could've done :).

Yes, you're right - mvectorize-with-neon-quad is the default choice. Adding that is intended, as it may not be default sometime in future.

Now you're comparing doubleword-registers, and quadword-registers (now default). You see, quadword-vectorization is NOT always faster than doubleword-vectorization. It depends mostly on how big L1/L2/L3 CPU caches are, and how many registers we need to store in there. For low-budget phones, especially with 2 cores or even less, doubleword-vectorization was faster by around 2-3% for me, rather than quadword-vectorization. This test was done on Xperia M with only 2 cores available. On Galaxy S3 with exynos4412 and 4 cores, quadword vectorization gives around 1-2% better results than doubleword.

Mastering optimizations is not done per-android-basis, but by per-device one. Doing something as easy as specifying how big CPU caches are for target device improves compiler decisions, especially on big optimization levels such as O3. If you enable O3 and you don't help the compiler, most likely your code will perform worse than it'd perform on O2 or Os. That's why I enable O3 in my commit, but I also help the compiler to describe my target device as good as I possibly can.
[Android Software/Hacking General [Developers Only]] JustArchi:
[MENTION=2394329]sparksco[/MENTION]

Were you able to compile any successful build with androideabi 4.9 for arm (32-bit)? Of course with Android 5.1.