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.
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- F. Bellard. QEMU: a fast and portable dynamic translator. In Proc. of USENIX 2005 Annual Technical Conference, FREENIX Track, pages 41--46, 2005. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- J. C. Mogul. Emergent (mis)behavior vs. complex systems. In Proc. of EuroSys 2006, pages 293--304, Apr. 2006. Google Scholar
Digital Library
- N. Nethercote and J. Seward. Valgrind: A program supervision framework. Electronic Notes in Theoretical Computer Science, 89(2):1--23, Oct. 2003.Google Scholar
Cross Ref
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- K. Yaghmour and M. Dagenais. The Linux Trace Toolkit. Linux Journal, Issue no. 73, May 2000. http://www.linuxjournal.com/article/3829. Google Scholar
Digital Library
Index Terms
JIT instrumentation: a novel approach to dynamically instrument operating systems
Recommendations
JIT instrumentation: a novel approach to dynamically instrument operating systems
EuroSys '07: Proceedings of the 2nd ACM SIGOPS/EuroSys European Conference on Computer Systems 2007As 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 ...
Anywhere, any-time binary instrumentation
PASTE '11: Proceedings of the 10th ACM SIGPLAN-SIGSOFT workshop on Program analysis for software toolsThe Dyninst binary instrumentation and analysis framework distinguishes itself from other binary instrumentation tools through its abstract, machine independent interface; its emphasis on anywhere, any-time binary instrumentation; and its low overhead ...
Hybrid binary rewriting for memory access instrumentation
VEE '11: Proceedings of the 7th ACM SIGPLAN/SIGOPS international conference on Virtual execution environmentsMemory access instrumentation is fundamental to many applications such as software transactional memory systems, profiling tools and race detectors. We examine the problem of efficiently instrumenting memory accesses in x86 machine code to support ...






Comments