skip to main content
article

JIT instrumentation: a novel approach to dynamically instrument operating systems

Published:21 March 2007Publication History
Skip Abstract Section

Abstract

As modern operating systems become more complex, understanding their inner workings is increasingly difficult. Dynamic kernel instrumentation is a well established method of obtaining insight into the workings of an OS, with applications including debugging, profiling and monitoring, and security auditing. To date, all dynamic instrumentation systems for operating systems follow the probe-based instrumentation paradigm. While efficient on fixed-length instruction set architectures, probes are extremely expensive on variable-length ISAs such as the popular Intel x86 and AMD x86-64. We propose using just-in-time (JIT) instrumentation to overcome this problem. While common in user space, JIT instrumentation has not until now been attempted in kernel space. In this work, we show the feasibility and desirability of kernel-based JIT instrumentation for operating systems with our novel prototype, implemented as a Linux kernel module. The prototype is fully SMP capable. We evaluate our prototype against the popular Kprobes Linux instrumentation tool. Our prototype outperforms Kprobes, at both micro and macro levels, by orders of magnitude when applying medium- and fine-grained instrumentation.

References

  1. B. Alpern, D. Attanasio, J. Barton, M. Burke, P. Cheng, J.-D. Choi, A. Cocchi, S. Fink, D. Grove, M. Hind, S. F. Hummel, D. Lieber, V. Litvinov, T. Ngo, M. Mergen, V. Sarkar, M. Serrano, J. Shepherd, S. Smith, V. Sreedhar, H. Srinivasan, and J. Whaley. The Jalapeno virtual machine. 39(1), 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. J. Appavoo, K. Hui, C. A. N. Soules, R. W. W. D. D. Silva, O. Krieger, M. Auslander, D. Edelsohn, B. Gamsa, G. R. Ganger, P. McKenney, M. Ostrowski, B. Rosenburg, M. Stumm, and J. Xenidis. Enabling autonomic system software with hot-swapping. IBM Systems Journal, 42(1):60--76, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. V. Bala, E. Duesterwald, and S. Banerjia. Dynamo: A transparent dynamic optimization system. In SIGPLAN '00 Conference on Programming Language Design and Implementation, pages 1--12, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. F. Bellard. QEMU: a fast and portable dynamic translator. In Proc. of USENIX 2005 Annual Technical Conference, FREENIX Track, pages 41--46, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. L. Benini, A. Bogliolo, S. Cavallucci, and B. Ricco. Monitoring system activity for OS-directed dynamic power management. In Proc. of Intl. Symp. on Low Power Electronics and Design, pages 185--190, Aug. 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. D. Bruening, T. Garnett, and S. Amarasinghe. An infrastructure for adaptive dynamic optimization. In 1st Intl. Symposium on Code Generation and Optimization (CGO-03), Mar. 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. B. M. Cantrill, M. W. Shapiro, and A. H. Leventhal. Dynamic instrumentation of production systems. In Proc. of the USENIX 2004 Annual Technical Conference, pages 15--28, Jun. 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. C. Cifuentes, B. Lewis, and D. Ungar. Walkabout - a retargetable dynamic binary translation framework. In Proc. of the Fourth Workshop on Binary Translation, Sep. 2002.Google ScholarGoogle Scholar
  9. I. Cohen, J. S. Chase, M. Goldszmidt, T. Kelly, and J. Symons. Correlating instrumentation data to system states: A building block for automated diagnosis and control. In Proc. of the 6th Symp. on Operating Systems Design and Implementation (OSDI'04), pages 231--244, Dec. 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. G. W. Dunlap, S. T. King, S. Cinar, M. Basrai, and P. M. Chen. ReVirt: Enabling intrusion analysis through virtual-machine logging and replay. In Proc. of the 5th Symp. on Operating Systems Design and Implementation (OSDI'02), pages 211--224, Dec. 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. R. Flower, C. Luk, R. Muth, H. Patil, J. Shakshober, R. Cohn, and G. Lowney. Kernel optimizations and prefetch with the Spike executable optimizer. In Proc. of the 4th Workshop on Feedback-Directed and Dynamic Optimization (FDDO-4), 2001.Google ScholarGoogle Scholar
  12. R. Hastings and B. Joyce. Purify: A tool for detecting memory leaks and access errors in C and C++ programs. In Proc. of the 1992 USENIX Winter Technical Conference, pages 125--138, Jan. 1992.Google ScholarGoogle Scholar
  13. S. T. King, G. W. Dunlap, and P. M. Chen. Debugging operating systems with time-traveling virtual machines. In Proc. of the 2005 Annual USENIX Technical Conference, pages 1--15, Apr. 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. J. R. Larus and E. Schnarr. EEL: machine-independent executable editing. In PLDI '95: Proc. of the ACM SIGPLAN 1995 Conf. on Programming language design and implementation, pages 291--300, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. C.-K. Luk, R. Cohn, R. Muth, H. Patil, A. Klauser, G. Lowney, S. Wallace, V. J. Reddi, and K. Hazelwood. Pin: building customized program analysis tools with dynamic instrumentation. In PLDI '05: Proc. of the 2005 ACM SIGPLAN Conf. on Programming language design and implementation, pages 190--200, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. L. McVoy and C. Staelin. LMbench: Portable tools for performance analysis. In Proc. of the 1996 USENIX Technical Conference, pages 279--295, Jan. 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. J. C. Mogul. Emergent (mis)behavior vs. complex systems. In Proc. of EuroSys 2006, pages 293--304, Apr. 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. N. Nethercote and J. Seward. Valgrind: A program supervision framework. Electronic Notes in Theoretical Computer Science, 89(2):1--23, Oct. 2003.Google ScholarGoogle ScholarCross RefCross Ref
  19. M. Paleczny, C. Vick, and C. Click. The Java HotSpot#8482; server compiler. In USENIX Java Virtual Machine Research and Technology Symposium, pages 1--12, Apr. 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. P. S. Panchamukhi. Kernel debugging with kprobes: Insert printk's into the Linux kernel on the fly, Aug 2004. http://www-106.ibm.com/developerworks/library/lkprobes.html?ca=dgr-Inx%w07kprobe.Google ScholarGoogle Scholar
  21. D. J. Pearce, P. H. J. Kelly, T. Field, and U. Harder. GILK: A dynamic instrumentation tool for the Linux kernel. In TOOLS '02: Proc. of the 12th Intl. Conf. on Computer Performance Evaluation, Modelling Techniques and Tools, pages 220--226, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. V. Prasad, W. Cohen, F. Eigler, M. Hunt, J. Keniston, and B. Chen. Locating system problems using dynamic instrumentation. In Proc. of the 2005 Ottawa Linux Symposium, pages 49--64, Jul. 2005.Google ScholarGoogle Scholar
  23. B. Schwarz, S. Debray, G. Andrews, and M. Legendre. PLTO: A link-time optimizer for the Intel IA-32 architecture. In Proc. of the 2001 Workshop on Binary Rewriting (WBT-2001), Sep. 2001.Google ScholarGoogle Scholar
  24. A. Srivastava and A. Eustace. ATOM: a system for building customized program analysis tools (with retrospective). In K. S. McKinley, editor, Best of PLDI, pages 528--539. ACM, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. A. Tamches and B. P. Miller. Fine-grained dynamic instrumentation of commodity operating system kernels. In Proc. of the 3rd Symposium on Operating Systems Design and Implementation (OSDI'99), pages 117--130, Feb. 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. K. Yaghmour and M. Dagenais. The Linux Trace Toolkit. Linux Journal, Issue no. 73, May 2000. http://www.linuxjournal.com/article/3829. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. JIT instrumentation: a novel approach to dynamically instrument operating systems

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    • Published in

      cover image ACM SIGOPS Operating Systems Review
      ACM SIGOPS Operating Systems Review  Volume 41, Issue 3
      EuroSys'07 Conference Proceedings
      June 2007
      386 pages
      ISSN:0163-5980
      DOI:10.1145/1272998
      Issue’s Table of Contents
      • cover image ACM Conferences
        EuroSys '07: Proceedings of the 2nd ACM SIGOPS/EuroSys European Conference on Computer Systems 2007
        March 2007
        431 pages
        ISBN:9781595936363
        DOI:10.1145/1272996

      Copyright © 2007 ACM

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 21 March 2007

      Check for updates

      Qualifiers

      • article

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!