Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Accelerating performance on Qt and WebKit for the MIPS architecture

Delivering the Best Web Experience for Embedded Devices.

Presentation held during Qt Developer Days 2009.

  • Login to see the comments

  • Be the first to like this

Accelerating performance on Qt and WebKit for the MIPS architecture

  1. 1. Accelerating performance on Qt and  WebKit for the MIPS architecture Delivering the Best Web Experience  for Embedded Devices
  2. 2. Agenda • MIPS Introduction • Emerging Trends • Web Connectivity • JIT Optimizations for WebKit • Benchmarks • Summary
  3. 3. MIPS Technologies Overview MIPS®: Number One Processor Architecture for the Digital Home MIPS develops & licenses processor IP for the embedded semiconductor market Hundreds of licenses Billions of units shipped At the core of today’s most innovative digital consumer products
  4. 4. MIPS Segments & Markets Consumer Communication DTV DVD STB VoIP WiFi Modem/RG DPF Home Home NAS Entertainment Networking DMA DSC/DVC Printers & Copiers Personal Other Entertainment Segments Internet Games Infra PND/PMP MID/Netbook Telematics Appliances Mobile Microcontrollers, Enterprise
  5. 5. MIPS Processors: Owning “The Digital Home” -The Growth Sector of Semiconductors for 2009- End Market Share & Customers Digital TV 60% Set Top Box -Cable 72% -IPTV 75% Our customers include DVD -Blu-ray 75% -DVD 72% Digital Camera 31% Mobile TV & GPS PMP 60%
  6. 6. MIPS 32-Bit Processor Core Families 1004K: Multi-threaded (34K), Multiprocessor (1-4 cores) Broad range Coherence Management Unit 1004K of 1.3+ GHz (40nm), 1.5DMIPS/MHz/Core synthesizable processors, 74K: Superscalar 15-stage pipeline optimized for 1.1 GHz in 65nm (prod’n frequency) 74K low-power Up to 2.7GHz in 40nm convergent consumer 34K: Multi-threading 34K multimedia applications 24KE: DSP extensions 24KE 24K: 8-stage pipeline 800 MHz (65nm) 24K m M14Kc i c M14Kc 4KE: Cache, MMU 4KE r o M4K: MCU, Low Cost M M4K M14K I P S 4KS: Security 4KS microMIPS, MIPS32 Reduced interrupt latency AHB, advanced debug
  7. 7. Agenda • MIPS Introduction • Emerging Trends • Web Connectivity • JIT Optimizations for WebKit • Benchmarks • Summary
  8. 8. MIPS in Converging Devices Universal Media Player IP Phone Networked Multi-Protocol Media Tank IP Phone IPOD Video LCD TV Recorder with Widgets IP Set-top Box HD Home Entertainment Camcorder Device Movie Player STB Portable Media Player Networked Digital Photo Frame Digital Media Player Personal Media Retail Shopping Player Terminal
  9. 9. Qt Is In Homes Today Devices –Roku Netflix Player –Neuros OSD –Blu-Ray Players Software –MythTV PVR –LinuxMCE 9 © 2009 Nokia
  10. 10. Bring Internet Media into the Home Internet Connected Web Streaming Infotainment Portals “HD” Devices INTERNET HTTP H.264 Flash Etc. 10
  11. 11. Typical STB Software Architecture 3rd Party OEM App App 3rd Party Middleware Qt WebKit Browser Toolkit STB Adobe® Qt GUI ToolKit Java VM Middleware Flash Lite® Qt for Embedded Linux DRMs Audio Video Demux HDMI CAs µCode µCode µCode Library Linux Kernel MIPS MIPS Audio Video MIPS Peripheral IPU Security CPU DSPs Decoders CPU I/O MIPS 74K
  12. 12. Agenda • MIPS Introduction • Emerging Trends • Web Connectivity • JIT Optimizations for WebKit • Benchmarks • Summary
  13. 13. What Drives Web Performance? • Highly web content specific – Interactive AJAX content vs Simple HTML – Image heavy vs. text • Page rendering • Image rendering • Javascript • Interactive web content is heavily dependent on Javascript performance – PC: Chrome vs. IE8 vs. Firefox “performance” judged mainly on Javascript engine performance
  14. 14. Faster Javascript Leads to “Faster” Web Experience • PC browser performance differences directly related to Javascript engine – SquirrelFish Extreme (Nitro) • Javascript Virtual Machine engine used in Webkit Open Source Project • Some projects that make use of Webkit: Safari, Qt, Arora, Midori – V8 • Chrome – Tracemonkey (w/ nanoJIT) • Firefox 3.5.x – IE8
  15. 15. JIT and the Javascript Engine • Developing a JIT speeds up browsing performance on Javascript-based webpages and applications using it as a scripting language • JIT techniques also helpful for Tamarin – Flash 10 – Yahoo Widgets • Status: – JIT completed and submitted to Webkit project for review/acceptance – MIPS incorporating into MIPS-Android HD development
  16. 16. Agenda • MIPS Introduction • Emerging Trends • Web connectivity • JIT optimizations for WebKit • Benchmarks • Summary
  17. 17. MIPS JIT for WebKit JavaScriptCore • Development environment: Debian 5.0 (lenny). – Debian runs on top of Qemu simulators, MIPS Malta boards (FPGA), or Sigma boards. • Qt libraries are installed on Debian. – # apt-get install libqt4-dev • Webkit is configured and built with Qt (--qt) on Debian. • To accelerate compilation time, we copy Qt libraries, Qt headers, Qt generated files, and Makefile to an x86 Linux host. Then, we use MIPS linux-cross toolchains from CodeSourcery to cross-compile.
  18. 18. Implementing JIT • JIT frameworks need to assign registers for special purposes. The selection of registers is important. – Some registers are used for returned values. – Some registers must be preserved across function calls. • The design for trampoline is important. – We need to set up parameters in the stack to be passed to functions. – We need to support exceptions. – For MIPS position-independent code, we need to preserve the value of global-pointer register ($28) in the trampoline code.
  19. 19. Implementing JIT (cont.) • MIPS PC-relative branches cover 16-bit ranges. – When branches are too far away, direct jump (J) covers 26-bit ranges. – LUI/ORI/JR covers 32-bit ranges. • J and LUI/ORI/JR are not PC-relative instructions. • When the buffer to hold instructions is moved, the target of J and LUI/ORI/JR must be re-calculated and updated. • The relaxation of branches need four extra words. A short branch is created to jump over four extra words to speed up. • After JIT code is generated, we need to flush data cache using synci (a user-level instruction).
  21. 21. Agenda • MIPS Introduction • Emerging Trends • Web Connectivity • JIT Optimizations for WebKit • Benchmarks • Summary
  22. 22. Web Performance Benchmarks Relative Javascript Benchmark Performance Interpreted JIT H/W Platforms: 74Kf = Sigma Designs SMP8642 @ 660 MHz A8 = TI OMAP 3530 @ 500 MHz Atom = Intel Atom 330 @ 1.6 GHz >2x faster than ARM Same performance as Atom @ a fraction of the power and cost 74Kf_32K/32K_0KB 74Kf_32K/32K_256K (est) A8_16K/16K_256K Atom_32K/24K_512K V8/Sunspider benchmark suite All results normalized to 1 GHz
  23. 23. Agenda • MIPS Introduction • Emerging Trends • Web Connectivity • JIT Optimizations for WebKit • Benchmarks • Summary
  24. 24. Best Web and Multimedia Experience Driving Performance 2x performance of ARM! Fraction of the cost and power consumption of Intel!