Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

Like this presentation? Why not share!

CS6270 Presentation - Retargetable binary translators



CS6270 Presentation - Retargetable binary translators

CS6270 Presentation - Retargetable binary translators



Total Views
Views on SlideShare
Embed Views



0 Embeds 0

No embeds



Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

CS6270 Presentation - Retargetable binary translators CS6270 Presentation - Retargetable binary translators Presentation Transcript

  • Retargetable Binary Translators 10 Sep 2007 National University of Singapore School of Computing OH KWANG SHIN
  • Agenda
    • Emulation Summary
    • Binary Translators - Example
    • Binary Translators - Weakness
    • Retargetable Binary Translator Framework
      • Strata
      • Walkabout
  • Emulation Summary Poor Medium Excellent Excellent Code Portability Fast Medium Slow Slow Steady-state Slow Slow Fast Fast Start-up High High Low Low Memory Binary Translation Direct Threaded Indirect Threaded Decode-dispatch
  • Binary Translators Example I
    • Transmeta’s Code Morphing
      • Intel IA-32 binary to run on VLIW Crusoe processor
    • UQDBT System
      • Intel IA-32 binary to run on SPARC-based processor
    • FX!32
      • x86 binary to run on Alpha processor
  • Binary Translators Example II
    • Shade
      • Implement high-performance instruction set simulators
    • Embra
      • Implement a high-performance operating system emulator
    • Dynamo and Mojo
      • Improve the performance of native binaries
  • Binary Translator Weakness
    • Code Portability - Poor
      • Typically, written for a single application and/or platform
      • Specialized for the target ISA
      • Single-target, single-purpose approach
      • Reinvent the wheel!
        • Have to develop a new system (Binary Translator) from scratch!
  • Retargetable Binary Translator Framework
    • Strata
      • A cross-platform infrastructure for building software binary dynamic translators
    • Walkabout
      • A retargetable binary translation framework for experimenting with dynamic translation of binary code
  • Strata - Background
    • Strata
      • Binary Translator implementation infrastructure
      • Provides common framework for software engineering principle, Code Reuse
        • Provides simple binary translator for a variety of architectures
        • Allows code reuse through composition
  • Strata - Architecture Target-independent Common services Reconfigurable
  • Strata-SPARC
    • First Strata software dynamic translator
    • For the SPARC V8/V9 instruction set architecture and the Solaris operating system
    • A variety of target-independent techniques
      • Reduce the number of context switches
  • Strata-SPARC Performance
    • Strata-SPARC with native execution
      • From 1.02x to 1.8x, average 1.32x
  • Strata-MIPS
    • For MIPS IV instruction set architecture and the IRIX 6.5.10 operating system
    • In porting Strata to the MIPS
      • Found Strata’s structure to be flexible and relatively easy to retarget
    • Initial version
      • One person less than three weeks
  • Strata-MIPS Performance
    • Strata-MIPS with native execution
      • From 1.09x to 3.0x, average 1.8x
  • Strata-X86
    • For Intel 80x86 instruction set architecture
    • Difference between CISC and RISC
      • Still used Strata-SPARC as the basis for retargeting to the x86
    • Focus on implementing the instruction fetch and decode function
      • To do some amount of decoding of an instruction to determine its length
  • Strata-X86 Performance
    • Strata-X86 with native execution
      • From 1.0x to 1.8x, average 1.35x
  • Walkabout - Background
    • Walkabout
      • Retargetable binary translation framework for experimenting with dynamic translation of binary code
      • How to instrument interpreters in a retargetable way
      • Inspiration
        • University of Queensland Binary Translator (UQBT) framework
          • Enabled static translations of binary codes
  • Walkabout - Architecture
    • Designed with retargetability in mind
  • Walkabout - Retargetability
    • Supporting binaries for different input and output machines
    • Users could instantiate new translators out of the framework
      • Source and target machines of choice
    • Supported through the specifications
      • Machine descriptions
      • Hot path selection method specifications
  • Walkabout - Interpreter
    • Automatically generated from
      • Specifications of syntax and semantics of machine instruction set
    • Interpreter Generator
      • SLED describes the instruction syntax
      • SSL describes the instruction semantics
  • Walkabout - Performance Performance results for an automatically-generated C Language interpreter for the SPARC architecture (Static size in bytes, Interpreter running time in seconds, Path-Finder with dynamic optimization running time)
  • References
    • K. Scott, N. Kumar, S. Velusamy, B. R. Childers, J. W. Davidson, and M. L. Soffa, Retargetable and Reconfigurable Software Dynamic Translation , International Symposium on Code Generation and Optimization, pp. 36–47 (March 2003).
    • CIFUENTES, C., LEWIS, B., AND UNG, D. Walkabout – A Retargetable Dynamic Binary Translation Framework. In Proceedings of the 2002 Workshop on Binary Translation (2002).
    • C. Cifuentes, M. Van Emmerik, N. Ramsey, and B. Lewis. Experience in the design, implementation and use of a retargetable static binary translation framework. Technical Report TR-2002-105, Sun Microsystems Laboratories, Palo Alto, CA 94303, January 2002.
    • C. Cifuentes, B. Lewis. Walkabout – A framework for Experimental Dynamic Binary Translation. Sun Microsystems Inc, Palo Alto, CA 94303, January 2002.