1 / 9

JIFL: JIT Instrumentation Framework for Linux

JIFL: JIT Instrumentation Framework for Linux. Marek Olszewski Adam Czajkowski Keir Mierle University of Toronto. Instrumenting Operating Systems. Operating systems are growing in complexity Becoming harder to understand

sissy
Télécharger la présentation

JIFL: JIT Instrumentation Framework for Linux

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. JIFL: JIT Instrumentation Framework for Linux Marek Olszewski Adam Czajkowski Keir Mierle University of Toronto

  2. Instrumenting Operating Systems • Operating systems are growing in complexity • Becoming harder to understand • Kernel instrumentation is a well know method of combating this problem • Used for: debugging, profiling, monitoring, coverage testing, security auditing... • Dynamic instrumentation is especially useful • No recompilation & no reboot • Good for debugging systemic problems • Feasible in production settings

  3. Dynamic Instrumentation • All dynamic instrumentation tools for operating systems are probe based • Overwrite existing code with jump/trap instructions • Efficient on fixed length architectures • Slow on variable length architectures • Must use trap instruction (and hash table lookup) • JIT-based instrumentation can be more efficient • Proven itself for user space (Pin, Valgrind) • Probe-based instrumentation is seldom used in user-space

  4. Probe-based Instrumentation Trap Handler Instrumentation Code OS Code • Look up which instrumentation to call • Call instrumentation • Emulate overwritten instruction Instrumentation Code

  5. JIT Instrumentation • JIT instrumentation rewrites the OS code with calls to instrumentation code • Creates a duplicate instrumented copy of the OS • Called the code-cache • Since instrumentation is dynamic, it is not feasible to rewrite the entire operating system up-front • Instrumentation is performed just-in-time, basic block by basic block, right before each new basic block is executed. • The resulting code is fast • No hash table lookup required • Though there is some cost in executing in the code-cache

  6. JIT Instrumentation Duplicate Copy of OS Instrumentation Code OS Code Instrumentation Code

  7. Software Architecture

  8. Performance Evaluation Apache Web Server Throughput

  9. Conclusions • JIT instrumentation viable for operating systems • Fine grained instrumentation now possible for kernel space on variable length architectures • Intel’s x86 • AMD’s AMD64 • Great performance • Though it comes with a fixed cost

More Related