ABSTRACT
Dynamic correctness checking tools (a.k.a. lifeguards) can detect a wide array of correctness issues, such as memory, security, and concurrency misbehavior, in unmodified executables at run time. However, lifeguards that are implemented using dynamic binary instrumentation (DBI) often slow down the monitored application by 10-50X, while proposals that replace DBI with hardware still see 3-8X slowdowns. The remaining overhead is the cost of performing the lifeguard analysis itself. In this paper, we explore compiler optimization techniques to reduce this overhead.
The lifeguard software is typically structured as a set of event-driven handlers, where the events are individual instructions in the monitored application's dynamic instruction stream. We propose to decouple the lifeguard checking code from the application that it is monitoring so that the lifeguard analysis can be invoked at the granularity of hot paths in the monitored application. In this way, we are able to find many more opportunities for eliminating redundant work in the lifeguard analysis, even starting with well-optimized applications and hand-tuned lifeguard handlers. Experimental results with two lifeguard frameworks - one DBI-based and one hardware-assisted - show significant reduction in monitoring overhead.
- A. V. Aho, R. Sethi, and J. D. Ullman. Compilers: Principles, Techniques, and Tools. Addison Wesley, 1986. Google Scholar
Digital Library
- V. Bala, E. Duesterwald, and S. Banerjia. Dynamo: A Transparent Dynamic Optimization System. In PLDI, 2000. Google Scholar
Digital Library
- D. Bruening. Efficient, Transparent, and Comprehensive Runtime Code Manipulation. PhD thesis, MIT, 2004. Google Scholar
Digital Library
- W. R. Bush, J. D. Pincus, and D. J. Sielaff. A static analyzer for finding dynamic programming errors. Software - Practice and Experience, 30 (7), 2000. Google Scholar
Digital Library
- S. Chen, M. Kozuch, T. Strigkos, B. Falsafi, P. B. Gibbons, T. C. Mowry, V. Ramachandran, O. Ruwase, M. Ryan, and E. Vlachos. Flexible Hardware Acceleration for Instruction-grain Program Monitoring. In ISCA, 2008. Google Scholar
Digital Library
- S. Chen, M. Kozuch, P. B. Gibbons, M. Ryan, T. Strigkos, T. C. Mowry, O. Ruwase, E. Vlachos, B. Falsafi, and V. Ramachandran. Flexible hardware acceleration for instruction-grain lifeguards. IEEE Micro, 29 (1), 2009. Top Picks from the 2008 Computer Architecture Conferences. Google Scholar
Digital Library
- B. Cmelik and D. Keppel. Shade : a Fast Instruction Set Simulator for Execution Profiling. In SIGMETRICS, 1994. Google Scholar
Digital Library
- M. L. Corliss, E. C. Lewis, and A. Roth. DISE: A programmable macro engine for customizing applications. In ISCA, 2003. Google Scholar
Digital Library
- M. Dalton, H. Kannan, and C. Kozyrakis. Raksha: a Flexible Information Flow Architecture for Software Security. In ISCA, 2007. Google Scholar
Digital Library
- D. Engler, B. Chelf, A. Chou, and S. Hallem. Checking system rules using system-specific, programmer-written compiler extensions. In OSDI, 2000. Google Scholar
Digital Library
- C. Flanagan, K. R. M. Leino, M. Lillibridge, G. Nelson, J. B. Saxe, and R. Stata. Extended static checking for Java. In PLDI, 2002. Google Scholar
Digital Library
- A. Gal and M. F. C. W. Probst. Hotpathvm: an effective JIT compiler for resource-constrained devices. In VEE, 2006. Google Scholar
Digital Library
- M. L. Goodstein, E. Vlachos, S. Chen, P. B. Gibbons, M. Kozuch, and T. C. Mowry. Butterfly analysis: Adapting dataflow analysis to dynamic parallel monitoring. In ASPLOS, 2010. Google Scholar
Digital Library
- N. D. Jones. An introduction to partial evaluation. ACM Comput. Surv., 28 (3): 480--503, 1996. Google Scholar
Digital Library
- I. H. Kazi, H. H. Chen, B. Stanley, and D. J. Lilja. Techniques for obtaining high performance in java programs. ACM Comput. Surv., 32 (3): 213--240, 2000. Google Scholar
Digital Library
- P. Lee and M. Leone. Optimizing ML with Runtime Code Generation. In PLDI, 1996. 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, 2005. Google Scholar
Digital Library
- S. Narayanasamy, G. Pokam, and B. Calder. BugNet: Continuously recording program execution for deterministic replay debugging. In ISCA, 2005. Google Scholar
Digital Library
- National Center for Biotechnology Information. ftp://ftp.ncbi.nih.gov/blast/.Google Scholar
- N. Nethercote. Dynamic Binary Analysis and Instrumentation. PhD thesis, U. Cambridge, 2004. http://valgrind.org.Google Scholar
- N. Nethercote and J. Seward. Valgrind: a framework for heavyweight dynamic binary instrumentation. In PLDI, 2007. Google Scholar
Digital Library
- N. Nethercote and J. Seward. Valgrind: A program supervision framework. Electronic Notes in Theoretical Computer Science, 89 (2), 2003.Google Scholar
- N. Nethercote and J. Seward. How to shadow every byte of memory used by a program. In VEE, 2007. Google Scholar
Digital Library
- J. Newsome and D. Song. Dynamic Taint Analysis for Automatic Detection, Analysis, and Signature Generation of Exploits on Commodity Software. In NDSS, 2005.Google Scholar
- E. B. Nightingale, D. Peek, P. M. Chen, and J. Flinn. Parallelizing security checks on commodity hardware. In ASPLOS, 2008. Google Scholar
Digital Library
- Parallel Bzip2. http://compression.ca/pbzip2/.Google Scholar
- Princeton Zchaff. http://www.princeton.edu/~chaff/zchaff.html.Google Scholar
- T. A. Proebsting. Optimizing an ANSI C interpreter with superoperators. In POPL, 1995. Google Scholar
Digital Library
- F. Qin, C.Wang, Z. Li, H. Kim, Y. Zhou, and Y. Wu. LIFT: A low-overhead practical information flow tracking system for detecting security attacks. In MICRO-39, 2006. Google Scholar
Digital Library
- O. Ruwase, P. B. Gibbons, T. C. Mowry, V. Ramachandran, S. Chen, M. Kozuch, and M. Ryan. Parallelizing Dynamic Information Flow Tracking. In SPAA, 2008. Google Scholar
Digital Library
- S. Savage, M. Burrows, G. Nelson, P. Sobalvarro, and T. Anderson. Eraser: A dynamic race detector for multi-threaded programs. ACM TOCS, 15 (4), 1997. Google Scholar
Digital Library
- M. Tiwari, S. Mysore, and T. Sherwood. Quantifying the potential of program analysis peripherals. In PACT, 2009. Google Scholar
Digital Library
- Virtutech Simics. http://www.virtutech.com/.Google Scholar
- E. Vlachos, M. L. Goodstein, M. A. Kozuch, S. Chen, B. Falsafi, P. B. Gibbons, and T. C. Mowry. ParaLog: Enabling and Accelerating Online Parallel Monitoring of Multithreaded Applications. In ASPLOS, 2010. Google Scholar
Digital Library
- E. Witchel and M. Rosenblum. Embra: Fast and Flexible Machine Simulation. In SIGMETRICS, 1996. Google Scholar
Digital Library
- M. Xu, R. Bodik, and M. D. Hill. A 'Flight Data Recorder' for enabling full-system multiprocessor deterministic replay. In ISCA, 2003. Google Scholar
Digital Library
Index Terms
Decoupled lifeguards: enabling path optimizations for dynamic correctness checking tools
Recommendations
Decoupled lifeguards: enabling path optimizations for dynamic correctness checking tools
PLDI '10Dynamic correctness checking tools (a.k.a. lifeguards) can detect a wide array of correctness issues, such as memory, security, and concurrency misbehavior, in unmodified executables at run time. However, lifeguards that are implemented using dynamic ...
The CSI Framework for Compiler-Inserted Program Instrumentation
SIGMETRICS '18The CSI framework provides comprehensive static instrumentation that a compiler can insert into a program-under-test so that dynamic-analysis tools - memory checkers, race detectors, cache simulators, performance profilers, code-coverage analyzers, etc. ...
The CSI Framework for Compiler-Inserted Program Instrumentation
The CSI framework provides comprehensive static instrumentation that a compiler can insert into a program-under-test so that dynamic-analysis tools - memory checkers, race detectors, cache simulators, performance profilers, code-coverage analyzers, etc. ...







Comments