Optimizing Android in the ARM Ecosystem [email protected] ARM Strategic Software Alliances
Total Page:16
File Type:pdf, Size:1020Kb
Optimizing Android in the ARM Ecosystem [email protected] ARM Strategic Software Alliances 1 ARM Engineering Global Coverage [email protected] 2 ARM Android Ecosystem Strategy § Deliver value throughout the growing Ecosystem § Make it easy for ARM Silicon Partners to Deliver Android § Off-the-shelf ARM Processor/Board ports and recipes § Make Android better on ARM for OEM’s § Optimize Key Open Source ingredients § Engage Developers in use of advanced ARM Tech § Blog Posts, Webinars § Tools, Libraries § Developer Knowledge Sites § Developer Relations 3 ARM Android Ecosystem Strategy § Deliver value throughout the growing Ecosystem § Make it easy for ARM Silicon Partners to Deliver Android § Off-the-shelf ARM Processor/Board ports and recipes § Make Android better on ARM for OEM’s § Optimize Key Open Source ingredients § Engage Developers in use of advanced ARM Tech § Blog Posts, Webinars § Tools, Libraries § Developer Knowledge Sites § Developer Relations 4 Android Boot Recipe for new ARM SoC’s § ARM brings the latest Android releases up on latest SoC’s § “From Zero to Boot” Recipe Blog Post § ARM Partners can easily apply recipe to their SoC § Typical bring-up times are in the order of a few days! 5 Android Bring-Up on ARM SoC’s Info § From Zero to Boot recipe § http://blogs.arm.com/software-enablement/498-from-zero-to-boot-porting-android- to-your-arm-platform/ § Building Android for ARM Boards - Existing ports description § http://linux-arm.org/LinuxKernel/LinuxAndroidPlatform § Git repos - existing ports § Linux Kernel and Android Filesystem Patches for ARM Boards § http://linux-arm.org/git?p=armdroid.git;a=summary § Android Kernel for ARM Boards source tree § http://linux-arm.org/git?p=linux-2.6-armdroid.git;a=summary § Google’s § http://source.android.com/source/initializing.html § http://developer.android.com/index.html 66 ARM Android Ecosystem Strategy § Deliver value throughout the growing Ecosystem § Make it easy for ARM Silicon Partners to Deliver Android § Off-the-shelf ARM Processor/Board ports and recipes § Make Android better on ARM for OEM’s § Optimize Key Open Source ingredients § Engage Developers in use of advanced ARM Tech § Blog Posts, Webinars § Tools, Libraries § Developer Knowledge Sites § Developer Relations 7 Key Ingredient Technologies In Google Platforms Mobile Tablet Google TV Chrome OS Chrome Chrome Chrome Chrome Browser Browser Browser Browser AIR Flash Flash Flash Flash Webkit VP8 Webkit Webkit Webkit LLVM LLVM LLVM LLVM LLVM LLVM LLVM V8 JavaScript V8 JavaScript V8 JavaScript V8 JavaScript Engine Engine Engine Engine SKIA 2D SKIA 2D SKIA 2D SKIA 2D Graphics Android Android Android Linux Middleware Middleware Middleware LLVM LLVM LLVM LLVM VP8 VP8 Middleware LLVM LLVM VP8 Dalvik Dalvik Dalvik X Windows Linux Kernel Linux Kernel Linux Kernel Linux Kernel § ARM and Partners focus on optimizing Common Ingredient Technologies across Google OS § GCC, Kernel, V8 JavaScript Engine, Webkit, LLVM, Chromium Browser, VP8 § Ongoing contributions to many upstream open source projects § Deep technical engagements with many industry shaping companies including Google 8 www.linaro.org § Linaro is a not for profit engineering company that delivers core Linux technology for the benefit of members Key goals: § Use shared investment to provide high ROI to members § Accelerate time to market for member products § Reduce fragmentation and resulting costs § Work closely with ARM to deliver Linux software and tools for new ARM technology – big.LITTLE, server, ARMv8 § Make ARM a leading architecture in open source 9 ARM and Linaro Deliver significant Goodness § ARM Upstream § GCC Patches for new CPU Cores § Kernel Patches for new CPU Cores § Linaro § Upstream latest Kernel & GCC patches § Transfer advanced ARM tech to world § Deliver customized tools and platforms for membership 10 Linaro Android Performance Improvements § PandaBoard 4430 running Android 4.0.4 (ICS) from Linaro twice as fast as stock Android 4.0.4 § http://www.youtube.com/watch?v=mrQRYmYip6Q&feature=plcp Linaro Android Stock Android 11 Linaro Android Jelly Bean Available § 10 Jul: Jelly Bean on AOSP § 13 Jul: Linaro initial build for Galaxy Nexus § 26 Jul: Linaro experimental builds § Origen and PandaBoard § 30 Aug: Linaro Jelly Bean builds in regular release § Links: § https://groups.google.com/forum/?fromgroups=#!topic/android-platform/_W63mhUNU0E § http://www.youtube.com/watch?v=YPFHwOpW_Ts&feature=plcp § http://www.androidauthority.com/galaxy-nexus-gt-i9250-android-4-1-1-jelly-bean-jro03l-aosp-rom-108895/ § http://www.linaro.org/linaro-blog/2012/08/26/linaro-android-jellybean-on-galaxy-nexus-gsm-speeding-up-phones/ 12 Linaro Core Roadmap Ubuntu 12.10 Android K Concept Platform OpenEmbedded AArch64 Adv. Planning OpenEmbedded bootstrap hard-float bootstrap Optimized AArch64 libs Development Ubuntu 12.04 Android JellyBean Android AArch64 Android debug, performance and tracing Released AArch64 toolchain Upstream bootstrap LLVM OpenEmbedded Tools NEON optimizations meta-Linaro layerGDB for Android for libraries LAVA power/ video probes Windows hosted LAVA FastModels LAVA full SD card images toolchain GCC performance and optimizations Power-aware scheduler UFS Kernel (big.LITTLE MP) DeviceTree Swap on uprobes Kernel driver validation baseline and flash TrustZone/TEE pin control QEMU KVM Kernel framework LPAE zImage stress testing w/mult. USBs AArch64 Common OpenGL ES kernel bootstrap struct clock test suite Android Struct clk for upstreaming KVM Big.LITTLE other SoCs Per-CPU latency (runtime DMA-BUF in-kernel eMMC 4.5 PM, pmqos, CPUIDLE) switcher extended features 2012 H1 2012 H2 2013 H1 2013 H2 Future Version 1.0, November 2012 13 Linaro AArch64 Roadmap Concept Adv. Planning LEG Core AArch64 support: LEG Bottom-up AArch64 support: Development - pre-built kernel - pre-built kernel - pre-built GNU tools - pre-built GNU tools - File system support Released Upstream AArch64 LAVA Integration: AArch64 LAVA Integration: - Community AEM model - Member platform readiness - LTP tests running - Directed Member LAVA testing Upstreaming Community Support AArch64 Libraries - Basic Libraries - Performance Libraries AArch64 Cross build platform: Upstreaming Community Support - Initial platform bootstrapping - based on OpenEmbedded Member Landing Team: - Readiness for early Si - Model à FPGA à Si - Pulls from WGs big.LITTLE: Summary AArch64 GNU Tool Chain: - 64-bit support - Upstreaming to OSS projects - In-kernel migration path • Focus on 64-bit static - MP Focus compiler, assembler linker, bootstrap for members loader, • Integration directly andAArch64 C library Kernel Debugger/Profiler Review: Upstreaming Community Support - Public set of patches available into LAVA - Linaro support for public review • Core support for server AArch64 Private code review: • big.LITTLE enablement - Invitation only - F2F at Connect - Review against ARM specification 2012 H1 2012 H2 2013 H1 2013 H2 2014 H1 Future Version 1.0, November 2012 14 Key Ingredient Technologies In Google Platforms Mobile Tablet Google TV Chrome OS Chrome Chrome Chrome Chrome Browser Browser Browser Browser AIR Flash Flash Flash Flash Webkit VP8 Webkit Webkit Webkit LLVM LLVM LLVM LLVM LLVM LLVM LLVM V8 JavaScript V8 JavaScript V8 JavaScript V8 JavaScript Engine Engine Engine Engine SKIA 2D SKIA 2D SKIA 2D SKIA 2D Graphics Android Android Android Linux Middleware Middleware Middleware LLVM LLVM LLVM LLVM VP8 VP8 Middleware LLVM LLVM VP8 Dalvik Dalvik Dalvik X Windows Linux Kernel Linux Kernel Linux Kernel Linux Kernel § Webkit is a common key component across all Google Client Platforms § Underlying Framework for high performance HTML5 15 Optimizing HTML5 with NEON § ARM and partners optimizing HTML5 tags § <canvas> 2D bitmap graphics § NEON optimized- SKIA § <svg> 2D vector graphics § NEON optimized- SKIA § feFilters optimized using SMP and NEON § Up to 4X improvement § <video><audio> § NEON optimized- TheorARM § NEON optimized- WebM VP8 § NEON optimized- Theora and ffmpeg 16 Improving HTML5 with § CSS3 Animation (Accelerated Compositing) § HTML5 2D Canvas (Accelerated 2D Canvas) Evidence of improvement in Webkit using a GPU 17 Key Ingredient Technologies In Google Platforms Mobile Tablet Google TV Chrome OS Chrome Chrome Chrome Chrome Browser Browser Browser Browser AIR Flash Flash Flash Flash Webkit VP8 Webkit Webkit Webkit LLVM LLVM LLVM LLVM LLVM LLVM LLVM V8 JavaScript V8 JavaScript V8 JavaScript V8 JavaScript Engine Engine Engine Engine SKIA 2D SKIA 2D SKIA 2D SKIA 2D Graphics Android Android Android Linux Middleware Middleware Middleware LLVM LLVM LLVM LLVM VP8 VP8 Middleware LLVM LLVM VP8 Dalvik Dalvik Dalvik X Windows Linux Kernel Linux Kernel Linux Kernel Linux Kernel § The V8 JavaScript Engine is a common key component in high performance HTML5 18 JavaScript Acceleration on ARM § JavaScript accelerated by compiling to native code using JIT § ARM performance increased 5X in 1 year Google V8 § ARM has worked on Multiple JITs Chrome § Google V8 Android Chrome OS GoogleTV § TraceMonkey § JaegerMonkey § IonMonkey § Squirrel Fish Nitro § Tamarin § ARM contributions to upstream projects result in performance optimizations across the ecosystem § Example: ARM and Google continually optimizing V8 together § Optimizations released into public: http://code.google.com/p/v8 § More info at: http://bit.ly/v8ARMTurbo 19 Renderscript: High Performance GP/GPU Compute § Android’s Renderscript Compute is the first computation platform ported to run directly on a mobile device GPU § SW parallelization across