SlideShare una empresa de Scribd logo
1 de 34
Descargar para leer sin conexión
Android Optimization:
             Myth and Reality



Jim Huang ( 黃敬群 ) <jserv@0xlab.org>
Developer, 0xlab
http://0xlab.org/

                                      July 8, 2011
Rights to copy
                                                                    © Copyright 2011 0xlab
                                                                           http://0xlab.org/
                                                                            contact@0xlab.org
Attribution – ShareAlike 3.0
You are free                                                  Corrections, suggestions, contributions and
                                                                               translations are welcome!
   to copy, distribute, display, and perform the work
   to make derivative works                                                  Latest update:July 10, 2011
   to make commercial use of the work
Under the following conditions
      Attribution. You must give the original author credit.
      Share Alike. If you alter, transform, or build upon this work, you may distribute the
      resulting work only under a license identical to this one.
   For any reuse or distribution, you must make clear to others the license terms of this
   work.
   Any of these conditions can be waived if you get permission from the copyright holder.
Your fair use and other rights are in no way affected by the above.
License text: http://creativecommons.org/licenses/by-sa/3.0/legalcode
Agenda   (1) Android Meets
            Hardware Revolution
         (2) Unproven "Optimization"
         (3) Android Evolution
         (4) Mythbusters
Revolution
   (1) an attempt, by a large number of people, to change the government of a country,
   especially by violent action ( 革命 )
   (2) a great change in conditions, ways of working, beliefs, etc. that affects large numbers
   of people ( 巨變 )




   Evolution
   (1) the gradual development of plants, animals, etc. over many years, from simple to
   more complicated forms ( 進化 )
   (2) the gradual development of something ( 演變 ; 發展 ; 漸進 )




Quote from Google Translation
My interpret of Android:
            Hardware is Revolution;
         Sotware is basically Evolution;
Android is Hardware-driven Software Revolution
Android Meets Hardware Revolution
Take ARM for Example

• 32-bit instructions, with extension to support 16-bit
  Thumb & Thumb-2 instructions.
• Single unified memory address space (i.e. all
  peripherals and I/O are accessed like normal
  memory, at certain specific memory locations).
• Relatively low power consumption.
• Run at wide range of clock cycle
   – (June 1, 2011) Qualcomm announced qual-
     core MSM8964/APQ8064
   – 2.5 GHz / 2MB L2 cache         Do you rember the specifications
                                     of your old laptop computers?
   – sample in early 2012
Classic ARM Processors                    (1)

• ARM7TDMI family
  – Based on ARMv4T architecture with 3-stage pipeline
  – supports the 16-bit Thumb instruction set
  – supports the JTAG Debugger
  – includes a fast Multiplier to support DSP algorithm
  – supports the In-Circuit Emulation interface
• ARM9TDMI family
  – Based on ARMv4T with Harvard cache architecture
  – 5-stage pipeline
  – ARM920T is based on ARM9TDMI with a memory
    management unit (MMU)
Classic ARM Processors                                        (2)

      • ARM9E family / Intel’s Xscale
         – Based on ARMv5E architecture
           – Enhanced with DSP instructions
           – Hardware support of Java bytecodes execution
      • ARM10 family
         – Based on ARMv5E with MMU
      • ARM11 family
         – Based on ARMv6 architecture                              The first shipped Android
                                                                 phone belongs to ARM11 family.
           – Supports SIMD instructions
           – Reduce context switching cost

Android 1.5 (2009/04/27)
ARMv5te optimizations: libc (thumb, memcpy, memset, clz),
dalvik (fast interpreter), skia, surfaceflinger, pixelflinger, audioflinger
Classic ARM Processors                                     (3)
                      Android 2.0 (2009q4)
                      ARMv7-a optimizations: libc (memcpy/neon), dalvik (JIT), skia
• Cortex families
   – Based on ARMv7 architecture
   – Supports the new Thumb-2 instruction set
                                                      The era of Android:
                                                      The era of Android:
   – NEON SIMD engine
                                                         High quality
                                                         High quality
   – Cortex-A: For complex OS based applications       mobile computing
                                                       mobile computing
      • Production: Cortex-A8 / Cortex-A9
   – Cortex-R: For real-time embedded applications
   – Cortex-M: For deeply embedded, microcontroller type cost
     sensitive applications
• Cortex-A15
   –   Triple dispatch superscalar, out-of-order
   –   High performance prefetcher
   –   Up to 4M integrated L2 cache
   –   1TB of physical address space
   –   Enterprise class performance, mobile power
ARM Optimizations in Android

      • Thumb2 optimizations in Dalvik VM
         – On real memory systems with latency the
           additional instructions in I-cache latency, it
           makes Thumb2 higher performance than ARM
           (logic: 1.23x)
      • NEON/VFP optimization in skia & dalvik
        – 1.45x in dalvik; 2-5x microbench in skia
      •   Thumb2 + VFP in V8 JavaScript engine
      •   ARMv6 atomic/rev in libc & dalvik
      •   NEON + VFP in StageFright
      •   SMP in libc, libcutils, dalvik
Again, we were informed of the improvements from
Again, we were informed of the improvements from
        hardware and dedicated software.
        hardware and dedicated software.
                But, is it enough?
                But, is it enough?
Unproven “Optimization"
“Optimization" → 最佳化 (?)
「最佳化的迷思」
操作績效不理想或想再創佳績    策略核心邏輯不是藤原拓海等級
於是就開始進行程式最佳化     參數再怎麼調
在操盤軟體上東調西調
                 也調不出來一個藤原拓海
嚐試在變化萬千的參數搭配中找尋聖杯
果然出現創紀錄的績效時
就以為得到聖杯          回到以策略為中心點
拿到市場實地操作         檢視策略在買賣點、停損停利點與資金
卻發現落差很大          控管上
                                         可以改善的空間
最佳化的對象是誰                                 才能突破你自己
程式還是策略
拿頭文字 D 來比喻吧
程式好比藤原拓海的車子
車子當然可以越改越好
但是藤原拓海才是致勝靈魂
對比程式 策略才是致勝關鍵

http://tw.myblog.yahoo.com/trend-trading/article?mid=18&prev=22&next=16
Key Concept: Strategy


 Even runtime is (claimed as) fully
optimized, we still have to look into
          details carefully.
Android Services in Action
Content     Telephony            Bluetooth     Connectivity                Location
Manager      Service              Service        Service                   Manager

Window      Activity             Package             Power
                                                                                 …
Manager     Manager              Manager            Manager
                        Add Service
                       Service                      Audio Flinger
                                      Add Service
                       Manager
daemons                                                  Surface
                                                         Surface
                       Service                           Flinger
                                                          Flinger
  usbd                 Manager

  adbd                                                                            System
                        runtime                                                   Server
debuggerd

   rild                   Init                  Zygote
                                                Zygote                           Dalvik VM
                                                                                 Dalvik VM

                                                Kernel         Android Service
                   Linux Kernel
                                                Dalvik         Framework
   Properties
                                   Android SurfaceFlinger
        Can combine 2D/3D surfaces and surfaces from multiple applications
        Surfaces passed as buffers via Binder IPC calls
        Can use OpenGL ES and 2D hardware accelerator for its compositions
             Double-buffering using page-flip
Optimizing SurfaceFlinger Techniques
 • Measure/Profile the execution flow
 • Scenario-driven system analysis
   – 2D/3D animation
   – Video Playback
   – Camera preview/recording
 • Check list:
   – Color space converting
   – Eliminate the invalid cases (quality of HAL)
   – Allow zero copy among framework/HAL/Driver
      • Shared memory / IPC cost
   – Any misconfiguration?
   – Cache (write-through vs. write-back)
   – The last: essential routines
Write bandwidth greatly
                  affected if caches are
                  configured as write-through

                  Configure caches as write-
                  back, with allocate-on -write




                            Memory bandwidth


Single Instance        2 Instances
Possibly Premature optimizations
• “Premature optimization is the root of all evil”
   – Donald Knuth
• Bionic
  – Glibc-incompatible, No SysV IPC, partial Pthread,
    incomplete prelink
  – inactive/incorrect kernel header inclusion
  – May not re-use existing system utilities
• Assumed UI behaviors
  – Input event dispatching and handler
  – Strict / non-maintainable state machine (policy)
  – Depending on a certain set of peripherals
• Unclear HAL design and interface
  – Wifi, Bluetooth, GPS, ...
Android Evolution
Android is Hardware-driven Software Revolution
Android Software Evolution
• Excluding the trickery, Android is a huge software project
  and publishes large parts of source repositories to
  AOSP (Android Open Source Project).
• “Hardware-driven software revolution” is the trickery. To
  fairly develop, it has to turn into "evolution".
   – SoC vendors built up the community(-like) hosted
     Android variants. → Qualcomm, TI, Samsung, ST-
     Ericsson, ...
• Quality-control is another key factor
  – 0xlab delivered 0xbench and related validation
    infrastructure.
• Solution to Android ecosystem is to continue to grow the
  AOSP community
  – need to unify to move forward
  – Reasons why Linaro exists
Functional View (1.5)
                                Applications
                                Applications
   Gallery         Phone         Web Browser    Google Maps   ・・・・・

                            Android Framework
                            Android Framework
  Activity        Window           Content                       Notification
                                                View System
  Manager         Manager          Manager                        Manager

  Package        Telephony        Resource        Location
  Manager         Manager         Manager         Manager


                            System Library
                            System Library          Android Runtime
                                                    Android Runtime
SurfaceFlinger
SurfaceFlinger   OpenCORE
                 OpenCORE          SQLite                Class Library

                                                    Dalvik Virtual Machine
                                                    Dalvik Virtual Machine
OpenGL|ES
OpenGL|ES        AudioFlinger
                 AudioFlinger      WebKit

    SGL
    SGL          OpenSSL          bionic libc
                                  bionic libc     Freetype


                                 Linux Kernel
                                 Linux Kernel
Functional View (2.3)
                                           Applications
                                           Applications
              Gallery         Phone         Web Browser    Google Maps   ・・・・・

                                       Android Framework
                                       Android Framework
             Activity        Window           Content                       Notification
                                                           View System
             Manager         Manager          Manager                        Manager

             Package         Telephony       Resource        Location
             Manager          Manager        Manager         Manager         RenderScript

OpenGL|ES 2.x accelerated.             System Library
                                       System Library          Android Runtime
                                                               Android Runtime
     Drop 2D accel
           SurfaceFlinger
           SurfaceFlinger   StageFright       SQLite                Class Library
                                               V8 bridge       Dalvik Virtual Machine
                                                               Dalvik Virtual Machine
GLES 2.0   OpenGL|ES
           OpenGL|ES        AudioFlinger
                            AudioFlinger      WebKit
                                                                            SMP improvements
               Skia
               Skia          OpenSSL         bionic libc
                                             bionic libc     Freetype
                                                                                           JIT compiler
Skia supports GPU backend                      SMP fixes
       In Android 3.x                       Linux Kernel
                                            Linux Kernel
Frequently Asked Questions

• "What is the minimal hardware requirement for
  running Android?"
    → UX is the key.
• "May I reduce BOM cost in my Android product?"
    → cost down is always possible, but it depends
    on the overall performance.
• "How can I upgrade Android without pain?"
• "I need XXX feature from newer version of
  Android. How can I get it into the current and old
  codebase?"
      → Partially upgrading is feasible for system
      libraries, but always difficult for Android
      framework
Mythbusters
Think Difficult

• The Effects of Convergence
   – Mobile computing platform
   – Ecosystem
• Content providers lead the development of
  containers (devices)
• Innovation is integrated by open source software
  model. The cost of proprietary software gets much
  higher.
• To optimize or not to optimize, that is the question.
   – Merge Local optimizations != Optimized globally
   – Hardware revolution sharpens optimization
     strategies and product directions.
   – The role of your team
http://0xlab.org

Más contenido relacionado

La actualidad más candente

Qi -- Lightweight Boot Loader Applied in Mobile and Embedded Devices
Qi -- Lightweight Boot Loader Applied in Mobile and Embedded DevicesQi -- Lightweight Boot Loader Applied in Mobile and Embedded Devices
Qi -- Lightweight Boot Loader Applied in Mobile and Embedded DevicesNational Cheng Kung University
 
F9: A Secure and Efficient Microkernel Built for Deeply Embedded Systems
F9: A Secure and Efficient Microkernel Built for Deeply Embedded SystemsF9: A Secure and Efficient Microkernel Built for Deeply Embedded Systems
F9: A Secure and Efficient Microkernel Built for Deeply Embedded SystemsNational Cheng Kung University
 
Develop Your Own Operating Systems using Cheap ARM Boards
Develop Your Own Operating Systems using Cheap ARM BoardsDevelop Your Own Operating Systems using Cheap ARM Boards
Develop Your Own Operating Systems using Cheap ARM BoardsNational Cheng Kung University
 
Dalvik Vm &amp; Jit
Dalvik Vm &amp; JitDalvik Vm &amp; Jit
Dalvik Vm &amp; JitAnkit Somani
 
Learning, Analyzing and Protecting Android with TOMOYO Linux (JLS2009)
Learning, Analyzing and Protecting Android with TOMOYO Linux (JLS2009)Learning, Analyzing and Protecting Android with TOMOYO Linux (JLS2009)
Learning, Analyzing and Protecting Android with TOMOYO Linux (JLS2009)Toshiharu Harada, Ph.D
 
Introduction to Android by Demian Neidetcher
Introduction to Android by Demian NeidetcherIntroduction to Android by Demian Neidetcher
Introduction to Android by Demian NeidetcherMatthew McCullough
 
Shorten Device Boot Time for Automotive IVI and Navigation Systems
Shorten Device Boot Time for Automotive IVI and Navigation SystemsShorten Device Boot Time for Automotive IVI and Navigation Systems
Shorten Device Boot Time for Automotive IVI and Navigation SystemsNational Cheng Kung University
 

La actualidad más candente (20)

Implement Checkpointing for Android (ELCE2012)
Implement Checkpointing for Android (ELCE2012)Implement Checkpointing for Android (ELCE2012)
Implement Checkpointing for Android (ELCE2012)
 
ARM and SoC Traning Part I -- Overview
ARM and SoC Traning Part I -- OverviewARM and SoC Traning Part I -- Overview
ARM and SoC Traning Part I -- Overview
 
Low Level View of Android System Architecture
Low Level View of Android System ArchitectureLow Level View of Android System Architecture
Low Level View of Android System Architecture
 
Qi -- Lightweight Boot Loader Applied in Mobile and Embedded Devices
Qi -- Lightweight Boot Loader Applied in Mobile and Embedded DevicesQi -- Lightweight Boot Loader Applied in Mobile and Embedded Devices
Qi -- Lightweight Boot Loader Applied in Mobile and Embedded Devices
 
Applied Computer Science Concepts in Android
Applied Computer Science Concepts in AndroidApplied Computer Science Concepts in Android
Applied Computer Science Concepts in Android
 
F9: A Secure and Efficient Microkernel Built for Deeply Embedded Systems
F9: A Secure and Efficient Microkernel Built for Deeply Embedded SystemsF9: A Secure and Efficient Microkernel Built for Deeply Embedded Systems
F9: A Secure and Efficient Microkernel Built for Deeply Embedded Systems
 
Develop Your Own Operating Systems using Cheap ARM Boards
Develop Your Own Operating Systems using Cheap ARM BoardsDevelop Your Own Operating Systems using Cheap ARM Boards
Develop Your Own Operating Systems using Cheap ARM Boards
 
Dalvik Vm &amp; Jit
Dalvik Vm &amp; JitDalvik Vm &amp; Jit
Dalvik Vm &amp; Jit
 
Build Programming Language Runtime with LLVM
Build Programming Language Runtime with LLVMBuild Programming Language Runtime with LLVM
Build Programming Language Runtime with LLVM
 
Learning, Analyzing and Protecting Android with TOMOYO Linux (JLS2009)
Learning, Analyzing and Protecting Android with TOMOYO Linux (JLS2009)Learning, Analyzing and Protecting Android with TOMOYO Linux (JLS2009)
Learning, Analyzing and Protecting Android with TOMOYO Linux (JLS2009)
 
Android IPC Mechanism
Android IPC MechanismAndroid IPC Mechanism
Android IPC Mechanism
 
Implement Runtime Environments for HSA using LLVM
Implement Runtime Environments for HSA using LLVMImplement Runtime Environments for HSA using LLVM
Implement Runtime Environments for HSA using LLVM
 
Introduction to Android by Demian Neidetcher
Introduction to Android by Demian NeidetcherIntroduction to Android by Demian Neidetcher
Introduction to Android by Demian Neidetcher
 
Shorten Device Boot Time for Automotive IVI and Navigation Systems
Shorten Device Boot Time for Automotive IVI and Navigation SystemsShorten Device Boot Time for Automotive IVI and Navigation Systems
Shorten Device Boot Time for Automotive IVI and Navigation Systems
 
TOMOYO Linux on Android
TOMOYO Linux on AndroidTOMOYO Linux on Android
TOMOYO Linux on Android
 
Embedded Virtualization applied in Mobile Devices
Embedded Virtualization applied in Mobile DevicesEmbedded Virtualization applied in Mobile Devices
Embedded Virtualization applied in Mobile Devices
 
Embedded Hypervisor for ARM
Embedded Hypervisor for ARMEmbedded Hypervisor for ARM
Embedded Hypervisor for ARM
 
淺談探索 Linux 系統設計之道
淺談探索 Linux 系統設計之道 淺談探索 Linux 系統設計之道
淺談探索 Linux 系統設計之道
 
L4 Microkernel :: Design Overview
L4 Microkernel :: Design OverviewL4 Microkernel :: Design Overview
L4 Microkernel :: Design Overview
 
Embedded Virtualization for Mobile Devices
Embedded Virtualization for Mobile DevicesEmbedded Virtualization for Mobile Devices
Embedded Virtualization for Mobile Devices
 

Similar a Android Optimization: Myth and Reality

0xdroid -- community-developed Android distribution by 0xlab
0xdroid -- community-developed Android distribution by 0xlab0xdroid -- community-developed Android distribution by 0xlab
0xdroid -- community-developed Android distribution by 0xlabNational Cheng Kung University
 
0xdroid osdc-2010-100426084937-phpapp02
0xdroid osdc-2010-100426084937-phpapp020xdroid osdc-2010-100426084937-phpapp02
0xdroid osdc-2010-100426084937-phpapp02chon2010
 
Google Android Naver 1212
Google Android Naver 1212Google Android Naver 1212
Google Android Naver 1212Yoojoo Jang
 
Ok Labs Webinar Android Migration At The Speed Of Light
Ok Labs Webinar Android Migration At The Speed Of LightOk Labs Webinar Android Migration At The Speed Of Light
Ok Labs Webinar Android Migration At The Speed Of LightOpen Kernel Labs
 
Build Community Android Distribution and Ensure the Quality
Build Community Android Distribution and Ensure the QualityBuild Community Android Distribution and Ensure the Quality
Build Community Android Distribution and Ensure the QualityNational Cheng Kung University
 
Linux on System z Update: Current & Future Linux on System z Technology
Linux on System z Update: Current & Future Linux on System z TechnologyLinux on System z Update: Current & Future Linux on System z Technology
Linux on System z Update: Current & Future Linux on System z TechnologyIBM India Smarter Computing
 
Android 110521210945-phpapp01
Android 110521210945-phpapp01Android 110521210945-phpapp01
Android 110521210945-phpapp01Mona AlRekabi
 
Profiling Multicore Systems to Maximize Core Utilization
Profiling Multicore Systems to Maximize Core Utilization Profiling Multicore Systems to Maximize Core Utilization
Profiling Multicore Systems to Maximize Core Utilization mentoresd
 
ELCE 2011 - BZ - Embedded Linux Optimization Techniques - How Not To Be Slow
ELCE 2011 - BZ - Embedded Linux Optimization Techniques - How Not To Be SlowELCE 2011 - BZ - Embedded Linux Optimization Techniques - How Not To Be Slow
ELCE 2011 - BZ - Embedded Linux Optimization Techniques - How Not To Be SlowBenjamin Zores
 
Multithreading in Android
Multithreading in AndroidMultithreading in Android
Multithreading in Androidcoolmirza143
 
“Seamless Deployment of Multimedia and Machine Learning Applications at the E...
“Seamless Deployment of Multimedia and Machine Learning Applications at the E...“Seamless Deployment of Multimedia and Machine Learning Applications at the E...
“Seamless Deployment of Multimedia and Machine Learning Applications at the E...Edge AI and Vision Alliance
 
Rapid prototyping with open source
Rapid prototyping with open sourceRapid prototyping with open source
Rapid prototyping with open sourceAlison Chaiken
 

Similar a Android Optimization: Myth and Reality (20)

0xdroid -- community-developed Android distribution by 0xlab
0xdroid -- community-developed Android distribution by 0xlab0xdroid -- community-developed Android distribution by 0xlab
0xdroid -- community-developed Android distribution by 0xlab
 
0xdroid osdc-2010-100426084937-phpapp02
0xdroid osdc-2010-100426084937-phpapp020xdroid osdc-2010-100426084937-phpapp02
0xdroid osdc-2010-100426084937-phpapp02
 
What's New in RHEL 6 for Linux on System z?
What's New in RHEL 6 for Linux on System z?What's New in RHEL 6 for Linux on System z?
What's New in RHEL 6 for Linux on System z?
 
Google Android Naver 1212
Google Android Naver 1212Google Android Naver 1212
Google Android Naver 1212
 
Ok Labs Webinar Android Migration At The Speed Of Light
Ok Labs Webinar Android Migration At The Speed Of LightOk Labs Webinar Android Migration At The Speed Of Light
Ok Labs Webinar Android Migration At The Speed Of Light
 
Android and Intel Inside
Android and Intel InsideAndroid and Intel Inside
Android and Intel Inside
 
Design and Concepts of Android Graphics
Design and Concepts of Android GraphicsDesign and Concepts of Android Graphics
Design and Concepts of Android Graphics
 
Build Community Android Distribution and Ensure the Quality
Build Community Android Distribution and Ensure the QualityBuild Community Android Distribution and Ensure the Quality
Build Community Android Distribution and Ensure the Quality
 
Current & Future Linux on System z Technology
Current & Future Linux on System z TechnologyCurrent & Future Linux on System z Technology
Current & Future Linux on System z Technology
 
Cont0519
Cont0519Cont0519
Cont0519
 
What’s New ?Linux on System z
What’s New ?Linux on System zWhat’s New ?Linux on System z
What’s New ?Linux on System z
 
Linux on System z Update: Current & Future Linux on System z Technology
Linux on System z Update: Current & Future Linux on System z TechnologyLinux on System z Update: Current & Future Linux on System z Technology
Linux on System z Update: Current & Future Linux on System z Technology
 
Android 110521210945-phpapp01
Android 110521210945-phpapp01Android 110521210945-phpapp01
Android 110521210945-phpapp01
 
Profiling Multicore Systems to Maximize Core Utilization
Profiling Multicore Systems to Maximize Core Utilization Profiling Multicore Systems to Maximize Core Utilization
Profiling Multicore Systems to Maximize Core Utilization
 
ELCE 2011 - BZ - Embedded Linux Optimization Techniques - How Not To Be Slow
ELCE 2011 - BZ - Embedded Linux Optimization Techniques - How Not To Be SlowELCE 2011 - BZ - Embedded Linux Optimization Techniques - How Not To Be Slow
ELCE 2011 - BZ - Embedded Linux Optimization Techniques - How Not To Be Slow
 
Multithreading in Android
Multithreading in AndroidMultithreading in Android
Multithreading in Android
 
olibc: Another C Library optimized for Embedded Linux
olibc: Another C Library optimized for Embedded Linuxolibc: Another C Library optimized for Embedded Linux
olibc: Another C Library optimized for Embedded Linux
 
“Seamless Deployment of Multimedia and Machine Learning Applications at the E...
“Seamless Deployment of Multimedia and Machine Learning Applications at the E...“Seamless Deployment of Multimedia and Machine Learning Applications at the E...
“Seamless Deployment of Multimedia and Machine Learning Applications at the E...
 
Arm
ArmArm
Arm
 
Rapid prototyping with open source
Rapid prototyping with open sourceRapid prototyping with open source
Rapid prototyping with open source
 

Más de National Cheng Kung University

PyPy's approach to construct domain-specific language runtime
PyPy's approach to construct domain-specific language runtimePyPy's approach to construct domain-specific language runtime
PyPy's approach to construct domain-specific language runtimeNational Cheng Kung University
 
進階嵌入式作業系統設計與實做 (2015 年秋季 ) 課程說明
進階嵌入式作業系統設計與實做 (2015 年秋季 ) 課程說明進階嵌入式作業系統設計與實做 (2015 年秋季 ) 課程說明
進階嵌入式作業系統設計與實做 (2015 年秋季 ) 課程說明National Cheng Kung University
 
給自己更好未來的 3 個練習:嵌入式作業系統設計、實做,與移植 (2015 年春季 ) 課程說明
給自己更好未來的 3 個練習:嵌入式作業系統設計、實做,與移植 (2015 年春季 ) 課程說明給自己更好未來的 3 個練習:嵌入式作業系統設計、實做,與移植 (2015 年春季 ) 課程說明
給自己更好未來的 3 個練習:嵌入式作業系統設計、實做,與移植 (2015 年春季 ) 課程說明National Cheng Kung University
 
進階嵌入式系統開發與實做 (2014 年秋季 ) 課程說明
進階嵌入式系統開發與實做 (2014 年秋季 ) 課程說明進階嵌入式系統開發與實做 (2014 年秋季 ) 課程說明
進階嵌入式系統開發與實做 (2014 年秋季 ) 課程說明National Cheng Kung University
 
Lecture notice about Embedded Operating System Design and Implementation
Lecture notice about Embedded Operating System Design and ImplementationLecture notice about Embedded Operating System Design and Implementation
Lecture notice about Embedded Operating System Design and ImplementationNational Cheng Kung University
 
中輟生談教育: 完全用開放原始碼軟體進行 嵌入式系統教學
中輟生談教育: 完全用開放原始碼軟體進行 嵌入式系統教學中輟生談教育: 完全用開放原始碼軟體進行 嵌入式系統教學
中輟生談教育: 完全用開放原始碼軟體進行 嵌入式系統教學National Cheng Kung University
 
進階嵌入式系統開發與實作 (2013 秋季班 ) 課程說明
進階嵌入式系統開發與實作 (2013 秋季班 ) 課程說明進階嵌入式系統開發與實作 (2013 秋季班 ) 課程說明
進階嵌入式系統開發與實作 (2013 秋季班 ) 課程說明National Cheng Kung University
 

Más de National Cheng Kung University (20)

PyPy's approach to construct domain-specific language runtime
PyPy's approach to construct domain-specific language runtimePyPy's approach to construct domain-specific language runtime
PyPy's approach to construct domain-specific language runtime
 
Making Linux do Hard Real-time
Making Linux do Hard Real-timeMaking Linux do Hard Real-time
Making Linux do Hard Real-time
 
2016 年春季嵌入式作業系統課程說明
2016 年春季嵌入式作業系統課程說明2016 年春季嵌入式作業系統課程說明
2016 年春季嵌入式作業系統課程說明
 
Interpreter, Compiler, JIT from scratch
Interpreter, Compiler, JIT from scratchInterpreter, Compiler, JIT from scratch
Interpreter, Compiler, JIT from scratch
 
進階嵌入式作業系統設計與實做 (2015 年秋季 ) 課程說明
進階嵌入式作業系統設計與實做 (2015 年秋季 ) 課程說明進階嵌入式作業系統設計與實做 (2015 年秋季 ) 課程說明
進階嵌入式作業系統設計與實做 (2015 年秋季 ) 課程說明
 
Construct an Efficient and Secure Microkernel for IoT
Construct an Efficient and Secure Microkernel for IoTConstruct an Efficient and Secure Microkernel for IoT
Construct an Efficient and Secure Microkernel for IoT
 
The Internals of "Hello World" Program
The Internals of "Hello World" ProgramThe Internals of "Hello World" Program
The Internals of "Hello World" Program
 
How A Compiler Works: GNU Toolchain
How A Compiler Works: GNU ToolchainHow A Compiler Works: GNU Toolchain
How A Compiler Works: GNU Toolchain
 
Virtual Machine Constructions for Dummies
Virtual Machine Constructions for DummiesVirtual Machine Constructions for Dummies
Virtual Machine Constructions for Dummies
 
給自己更好未來的 3 個練習:嵌入式作業系統設計、實做,與移植 (2015 年春季 ) 課程說明
給自己更好未來的 3 個練習:嵌入式作業系統設計、實做,與移植 (2015 年春季 ) 課程說明給自己更好未來的 3 個練習:嵌入式作業系統設計、實做,與移植 (2015 年春季 ) 課程說明
給自己更好未來的 3 個練習:嵌入式作業系統設計、實做,與移植 (2015 年春季 ) 課程說明
 
從線上售票看作業系統設計議題
從線上售票看作業系統設計議題從線上售票看作業系統設計議題
從線上售票看作業系統設計議題
 
進階嵌入式系統開發與實做 (2014 年秋季 ) 課程說明
進階嵌入式系統開發與實做 (2014 年秋季 ) 課程說明進階嵌入式系統開發與實做 (2014 年秋季 ) 課程說明
進階嵌入式系統開發與實做 (2014 年秋季 ) 課程說明
 
Xvisor: embedded and lightweight hypervisor
Xvisor: embedded and lightweight hypervisorXvisor: embedded and lightweight hypervisor
Xvisor: embedded and lightweight hypervisor
 
Making Linux do Hard Real-time
Making Linux do Hard Real-timeMaking Linux do Hard Real-time
Making Linux do Hard Real-time
 
Priority Inversion on Mars
Priority Inversion on MarsPriority Inversion on Mars
Priority Inversion on Mars
 
Lecture notice about Embedded Operating System Design and Implementation
Lecture notice about Embedded Operating System Design and ImplementationLecture notice about Embedded Operating System Design and Implementation
Lecture notice about Embedded Operating System Design and Implementation
 
中輟生談教育: 完全用開放原始碼軟體進行 嵌入式系統教學
中輟生談教育: 完全用開放原始碼軟體進行 嵌入式系統教學中輟生談教育: 完全用開放原始碼軟體進行 嵌入式系統教學
中輟生談教育: 完全用開放原始碼軟體進行 嵌入式系統教學
 
Open Source from Legend, Business, to Ecosystem
Open Source from Legend, Business, to EcosystemOpen Source from Legend, Business, to Ecosystem
Open Source from Legend, Business, to Ecosystem
 
Summer Project: Microkernel (2013)
Summer Project: Microkernel (2013)Summer Project: Microkernel (2013)
Summer Project: Microkernel (2013)
 
進階嵌入式系統開發與實作 (2013 秋季班 ) 課程說明
進階嵌入式系統開發與實作 (2013 秋季班 ) 課程說明進階嵌入式系統開發與實作 (2013 秋季班 ) 課程說明
進階嵌入式系統開發與實作 (2013 秋季班 ) 課程說明
 

Último

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 

Último (20)

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 

Android Optimization: Myth and Reality

  • 1. Android Optimization: Myth and Reality Jim Huang ( 黃敬群 ) <jserv@0xlab.org> Developer, 0xlab http://0xlab.org/ July 8, 2011
  • 2. Rights to copy © Copyright 2011 0xlab http://0xlab.org/ contact@0xlab.org Attribution – ShareAlike 3.0 You are free Corrections, suggestions, contributions and translations are welcome! to copy, distribute, display, and perform the work to make derivative works Latest update:July 10, 2011 to make commercial use of the work Under the following conditions Attribution. You must give the original author credit. Share Alike. If you alter, transform, or build upon this work, you may distribute the resulting work only under a license identical to this one. For any reuse or distribution, you must make clear to others the license terms of this work. Any of these conditions can be waived if you get permission from the copyright holder. Your fair use and other rights are in no way affected by the above. License text: http://creativecommons.org/licenses/by-sa/3.0/legalcode
  • 3. Agenda (1) Android Meets Hardware Revolution (2) Unproven "Optimization" (3) Android Evolution (4) Mythbusters
  • 4. Revolution (1) an attempt, by a large number of people, to change the government of a country, especially by violent action ( 革命 ) (2) a great change in conditions, ways of working, beliefs, etc. that affects large numbers of people ( 巨變 ) Evolution (1) the gradual development of plants, animals, etc. over many years, from simple to more complicated forms ( 進化 ) (2) the gradual development of something ( 演變 ; 發展 ; 漸進 ) Quote from Google Translation
  • 5. My interpret of Android: Hardware is Revolution; Sotware is basically Evolution; Android is Hardware-driven Software Revolution
  • 7. Take ARM for Example • 32-bit instructions, with extension to support 16-bit Thumb & Thumb-2 instructions. • Single unified memory address space (i.e. all peripherals and I/O are accessed like normal memory, at certain specific memory locations). • Relatively low power consumption. • Run at wide range of clock cycle – (June 1, 2011) Qualcomm announced qual- core MSM8964/APQ8064 – 2.5 GHz / 2MB L2 cache Do you rember the specifications of your old laptop computers? – sample in early 2012
  • 8. Classic ARM Processors (1) • ARM7TDMI family – Based on ARMv4T architecture with 3-stage pipeline – supports the 16-bit Thumb instruction set – supports the JTAG Debugger – includes a fast Multiplier to support DSP algorithm – supports the In-Circuit Emulation interface • ARM9TDMI family – Based on ARMv4T with Harvard cache architecture – 5-stage pipeline – ARM920T is based on ARM9TDMI with a memory management unit (MMU)
  • 9. Classic ARM Processors (2) • ARM9E family / Intel’s Xscale – Based on ARMv5E architecture – Enhanced with DSP instructions – Hardware support of Java bytecodes execution • ARM10 family – Based on ARMv5E with MMU • ARM11 family – Based on ARMv6 architecture The first shipped Android phone belongs to ARM11 family. – Supports SIMD instructions – Reduce context switching cost Android 1.5 (2009/04/27) ARMv5te optimizations: libc (thumb, memcpy, memset, clz), dalvik (fast interpreter), skia, surfaceflinger, pixelflinger, audioflinger
  • 10. Classic ARM Processors (3) Android 2.0 (2009q4) ARMv7-a optimizations: libc (memcpy/neon), dalvik (JIT), skia • Cortex families – Based on ARMv7 architecture – Supports the new Thumb-2 instruction set The era of Android: The era of Android: – NEON SIMD engine High quality High quality – Cortex-A: For complex OS based applications mobile computing mobile computing • Production: Cortex-A8 / Cortex-A9 – Cortex-R: For real-time embedded applications – Cortex-M: For deeply embedded, microcontroller type cost sensitive applications • Cortex-A15 – Triple dispatch superscalar, out-of-order – High performance prefetcher – Up to 4M integrated L2 cache – 1TB of physical address space – Enterprise class performance, mobile power
  • 11.
  • 12. ARM Optimizations in Android • Thumb2 optimizations in Dalvik VM – On real memory systems with latency the additional instructions in I-cache latency, it makes Thumb2 higher performance than ARM (logic: 1.23x) • NEON/VFP optimization in skia & dalvik – 1.45x in dalvik; 2-5x microbench in skia • Thumb2 + VFP in V8 JavaScript engine • ARMv6 atomic/rev in libc & dalvik • NEON + VFP in StageFright • SMP in libc, libcutils, dalvik Again, we were informed of the improvements from Again, we were informed of the improvements from hardware and dedicated software. hardware and dedicated software. But, is it enough? But, is it enough?
  • 15. 「最佳化的迷思」 操作績效不理想或想再創佳績 策略核心邏輯不是藤原拓海等級 於是就開始進行程式最佳化 參數再怎麼調 在操盤軟體上東調西調 也調不出來一個藤原拓海 嚐試在變化萬千的參數搭配中找尋聖杯 果然出現創紀錄的績效時 就以為得到聖杯 回到以策略為中心點 拿到市場實地操作 檢視策略在買賣點、停損停利點與資金 卻發現落差很大 控管上 可以改善的空間 最佳化的對象是誰 才能突破你自己 程式還是策略 拿頭文字 D 來比喻吧 程式好比藤原拓海的車子 車子當然可以越改越好 但是藤原拓海才是致勝靈魂 對比程式 策略才是致勝關鍵 http://tw.myblog.yahoo.com/trend-trading/article?mid=18&prev=22&next=16
  • 16. Key Concept: Strategy Even runtime is (claimed as) fully optimized, we still have to look into details carefully.
  • 17. Android Services in Action Content Telephony Bluetooth Connectivity Location Manager Service Service Service Manager Window Activity Package Power … Manager Manager Manager Manager Add Service Service Audio Flinger Add Service Manager daemons Surface Surface Service Flinger Flinger usbd Manager adbd System runtime Server debuggerd rild Init Zygote Zygote Dalvik VM Dalvik VM Kernel Android Service Linux Kernel Dalvik Framework
  • 18. Properties Android SurfaceFlinger  Can combine 2D/3D surfaces and surfaces from multiple applications  Surfaces passed as buffers via Binder IPC calls  Can use OpenGL ES and 2D hardware accelerator for its compositions  Double-buffering using page-flip
  • 19.
  • 20.
  • 21.
  • 22.
  • 23. Optimizing SurfaceFlinger Techniques • Measure/Profile the execution flow • Scenario-driven system analysis – 2D/3D animation – Video Playback – Camera preview/recording • Check list: – Color space converting – Eliminate the invalid cases (quality of HAL) – Allow zero copy among framework/HAL/Driver • Shared memory / IPC cost – Any misconfiguration? – Cache (write-through vs. write-back) – The last: essential routines
  • 24. Write bandwidth greatly affected if caches are configured as write-through Configure caches as write- back, with allocate-on -write Memory bandwidth Single Instance 2 Instances
  • 25. Possibly Premature optimizations • “Premature optimization is the root of all evil” – Donald Knuth • Bionic – Glibc-incompatible, No SysV IPC, partial Pthread, incomplete prelink – inactive/incorrect kernel header inclusion – May not re-use existing system utilities • Assumed UI behaviors – Input event dispatching and handler – Strict / non-maintainable state machine (policy) – Depending on a certain set of peripherals • Unclear HAL design and interface – Wifi, Bluetooth, GPS, ...
  • 27. Android is Hardware-driven Software Revolution
  • 28. Android Software Evolution • Excluding the trickery, Android is a huge software project and publishes large parts of source repositories to AOSP (Android Open Source Project). • “Hardware-driven software revolution” is the trickery. To fairly develop, it has to turn into "evolution". – SoC vendors built up the community(-like) hosted Android variants. → Qualcomm, TI, Samsung, ST- Ericsson, ... • Quality-control is another key factor – 0xlab delivered 0xbench and related validation infrastructure. • Solution to Android ecosystem is to continue to grow the AOSP community – need to unify to move forward – Reasons why Linaro exists
  • 29. Functional View (1.5) Applications Applications Gallery Phone Web Browser Google Maps ・・・・・ Android Framework Android Framework Activity Window Content Notification View System Manager Manager Manager Manager Package Telephony Resource Location Manager Manager Manager Manager System Library System Library Android Runtime Android Runtime SurfaceFlinger SurfaceFlinger OpenCORE OpenCORE SQLite Class Library Dalvik Virtual Machine Dalvik Virtual Machine OpenGL|ES OpenGL|ES AudioFlinger AudioFlinger WebKit SGL SGL OpenSSL bionic libc bionic libc Freetype Linux Kernel Linux Kernel
  • 30. Functional View (2.3) Applications Applications Gallery Phone Web Browser Google Maps ・・・・・ Android Framework Android Framework Activity Window Content Notification View System Manager Manager Manager Manager Package Telephony Resource Location Manager Manager Manager Manager RenderScript OpenGL|ES 2.x accelerated. System Library System Library Android Runtime Android Runtime Drop 2D accel SurfaceFlinger SurfaceFlinger StageFright SQLite Class Library V8 bridge Dalvik Virtual Machine Dalvik Virtual Machine GLES 2.0 OpenGL|ES OpenGL|ES AudioFlinger AudioFlinger WebKit SMP improvements Skia Skia OpenSSL bionic libc bionic libc Freetype JIT compiler Skia supports GPU backend SMP fixes In Android 3.x Linux Kernel Linux Kernel
  • 31. Frequently Asked Questions • "What is the minimal hardware requirement for running Android?" → UX is the key. • "May I reduce BOM cost in my Android product?" → cost down is always possible, but it depends on the overall performance. • "How can I upgrade Android without pain?" • "I need XXX feature from newer version of Android. How can I get it into the current and old codebase?" → Partially upgrading is feasible for system libraries, but always difficult for Android framework
  • 33. Think Difficult • The Effects of Convergence – Mobile computing platform – Ecosystem • Content providers lead the development of containers (devices) • Innovation is integrated by open source software model. The cost of proprietary software gets much higher. • To optimize or not to optimize, that is the question. – Merge Local optimizations != Optimized globally – Hardware revolution sharpens optimization strategies and product directions. – The role of your team