skip to main content
article

JIT instrumentation: a novel approach to dynamically instrument operating systems

Published: 21 March 2007 Publication History

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.
[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.
[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.
[4]
F. Bellard. QEMU: a fast and portable dynamic translator. In Proc. of USENIX 2005 Annual Technical Conference, FREENIX Track, pages 41--46, 2005.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[17]
J. C. Mogul. Emergent (mis)behavior vs. complex systems. In Proc. of EuroSys 2006, pages 293--304, Apr. 2006.
[18]
N. Nethercote and J. Seward. Valgrind: A program supervision framework. Electronic Notes in Theoretical Computer Science, 89(2):1--23, Oct. 2003.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[26]
K. Yaghmour and M. Dagenais. The Linux Trace Toolkit. Linux Journal, Issue no. 73, May 2000. http://www.linuxjournal.com/article/3829.

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

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
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 21 March 2007
Published in SIGOPS Volume 41, Issue 3

Check for updates

Author Tags

  1. JIT compiler
  2. binary rewriting
  3. dynamic instrumentation
  4. kernel analysis tools

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)4
  • Downloads (Last 6 weeks)0
Reflects downloads up to 02 Mar 2025

Other Metrics

Citations

Cited By

View all
  • (2019)Debugopt: Debugging fully optimized natively compiled programs using multistage instrumentationScience of Computer Programming10.1016/j.scico.2018.09.005169(18-32)Online publication date: Jan-2019
  • (2016)PASTSoftware—Practice & Experience10.1002/spe.231346:3(341-360)Online publication date: 1-Mar-2016
  • (2012)Comprehensive kernel instrumentation via dynamic binary translationACM SIGPLAN Notices10.1145/2248487.215099247:4(135-146)Online publication date: 3-Mar-2012
  • (2012)Comprehensive kernel instrumentation via dynamic binary translationACM SIGARCH Computer Architecture News10.1145/2189750.215099240:1(135-146)Online publication date: 3-Mar-2012
  • (2012)Comprehensive kernel instrumentation via dynamic binary translationProceedings of the seventeenth international conference on Architectural Support for Programming Languages and Operating Systems10.1145/2150976.2150992(135-146)Online publication date: 3-Mar-2012
  • (2012)Retooling and securing systemic debuggingProceedings of the 17th Nordic conference on Secure IT Systems10.1007/978-3-642-34210-3_10(137-152)Online publication date: 31-Oct-2012
  • (2010)Capability wrangling made easyACM SIGPLAN Notices10.1145/1837854.173600145:7(3-12)Online publication date: 17-Mar-2010
  • (2010)Capability wrangling made easyProceedings of the 6th ACM SIGPLAN/SIGOPS international conference on Virtual execution environments10.1145/1735997.1736001(3-12)Online publication date: 17-Mar-2010
  • (2008)Lightweight, high-resolution monitoring for troubleshooting production systemsProceedings of the 8th USENIX conference on Operating systems design and implementation10.5555/1855741.1855749(103-116)Online publication date: 8-Dec-2008
  • (2024)Towards Realistic Results for Instrumentation-Based Profilers for JIT-Compiled SystemsProceedings of the 21st ACM SIGPLAN International Conference on Managed Programming Languages and Runtimes10.1145/3679007.3685058(82-89)Online publication date: 13-Sep-2024
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media