ABSTRACT
Robust and powerful software instrumentation tools are essential for program analysis tasks such as profiling, performance evaluation, and bug detection. To meet this need, we have developed a new instrumentation system called Pin. Our goals are to provide easy-to-use, portable, transparent, and efficient instrumentation. Instrumentation tools (called Pintools) are written in C/C++ using Pin's rich API. Pin follows the model of ATOM, allowing the tool writer to analyze an application at the instruction level without the need for detailed knowledge of the underlying instruction set. The API is designed to be architecture independent whenever possible, making Pintools source compatible across different architectures. However, a Pintool can access architecture-specific details when necessary. Instrumentation with Pin is mostly transparent as the application and Pintool observe the application's original, uninstrumented behavior. Pin uses dynamic compilation to instrument executables while they are running. For efficiency, Pin uses several techniques, including inlining, register re-allocation, liveness analysis, and instruction scheduling to optimize instrumentation. This fully automated approach delivers significantly better instrumentation performance than similar tools. For example, Pin is 3.3x faster than Valgrind and 2x faster than DynamoRIO for basic-block counting. To illustrate Pin's versatility, we describe two Pintools in daily use to analyze production software. Pin is publicly available for Linux platforms on four architectures: IA32 (32-bit x86), EM64T (64-bit x86), Itanium®, and ARM. In the ten months since Pin 2 was released in July 2004, there have been over 3000 downloads from its website.
- AMBER home page. http://amber.scripps.edu/.]]Google Scholar
- Fluent home page. http://www.fluent.com/.]]Google Scholar
- LS-DYNA home page. http://www.lstc.com/.]]Google Scholar
- RenderMan home page. http://RenderMan.pixar.com/.]]Google Scholar
- A.-R. Adl-Tabatabai, J. Bharadwaj, D.-Y. Chen, A. Ghuloum, V. Menon, B. Murphy, M. Serrano, and T. Shpeisman. The StarJIT compiler: A dynamic compiler for managed runtime environments. Intel Technology Journal, 7(1):19--31, Feb 2003.]]Google Scholar
- D. L. Bruening. Efficient, Transparent, and Comprehensive Runtime Code Manipulation. PhD thesis, M.I.T. (http://www.cag.lcs.mit.edu/dynamorio/), September 2004.]] Google ScholarDigital Library
- B. R. Buck and J. Hollingsworth. An api for runtime code patching. Journal of High Performance Computing Applications, 14(4):317--329, 2000.]] Google ScholarDigital Library
- M. G. Burke, J.-D. Choi, S. Fink, D. Grove, M. Hind, V. Sarkar, M. J. Serrano, V. C. Sreedhar, H. Srinivasan, and J. Whaley. The Jalapeno dynamic optimizing compiler for java. In ACM Java Grande Conference, pages 129--141, June 1999.]] Google ScholarDigital Library
- B. M. Cantrill, M. W. Shapiro, and A. H. Leventhal. Dynamic instrumentation of production systems. In Proceedings of the 6th Symposium on Operating Systems Design and Implementation, 2004.]] Google ScholarDigital Library
- K.D. Cooper, M.W. Hall, and K. Kennedy. A methodology for procedure cloning. Computer Languages, 19(2), April 1993.]]Google Scholar
- J. L. Henning. SPEC CPU2000: measuring cpu performance in the new millennium. IEEE Computer, 33(7):28--35, July 2000.]] Google ScholarDigital Library
- Intel. Pin User Manual. http://rogue.colorado.edu/Pin.]]Google Scholar
- Intel. Intel Itanium Architecture Software Developer's Manual Vols 1-4, Oct. 2002.]]Google Scholar
- Intel. IA-32 Intel Architecture Software Developer's Manual Vols 1-3, 2003.]]Google Scholar
- Intel. Intel Extended Memory 64 Technology Software Developer's Guide Vols 1-2, 2004.]]Google Scholar
- Intel. Intel PXA27x Processor Family Developer's Manual, April 2004.]]Google Scholar
- H.-S. Kim and J. Smith. Hardware support for control transfers in code caches. In Proceedings of the 36th Annual ACM/IEEE International Symposium on Microarchitecture, Dec 2003.]] Google ScholarDigital Library
- J. Larus and E. Schnarr. EEL: Machine-independent executable editing. In Proceedings of the ACM SIGPLAN 95 Conference on Programming Language Design and Implementation, pages 291--300, June 1995.]] Google ScholarDigital Library
- P. Geoffrey Lowney, Stefan M. Freudenberger, Thomas J. Karzes, W. D. Lichtenstein, Robert P. Nix, John S. O'Donnell, and John C. Ruttenberg. The Multiflow Trace Scheduling compiler. The Journal of Supercomputing, 7(1-2):51--142, 1993.]] Google ScholarDigital Library
- Chi-Keung Luk, Robert Muth, Harish Patil, Robert Cohn, and Geoff Lowney. Ispike: A Post-link Optimizer for the Intel Itanium Architecture. In Proceedings of the 2nd Conference on Code Generation and Optimization, pages 15--26, 2004.]] Google ScholarDigital Library
- J. Maebe, M. Ronsse, and K. De Bosschere. Diota: Dynamic instrumentation, optimization and transformation of applications. In Compendium of Workshops and Tutorials held in conjunction with PACT'02, 2002.]]Google Scholar
- N. Nethercote and J. Seward. Valgrind: A program supervision framework. In Proceedings of the 3rd Workshop on Runtime Verification. http://valgrind.kde.org/, 2003.]]Google Scholar
- H. Patil, R. Cohn, M. Charney, R. Kapoor, A. Sun, and A. Karunanidhi. Pinpointing representative portions of large intel itanium progams with dynamic instrumentation. In Proceedings of the 37th Annual ACM/IEEE International Symposium on Microarchitecture, Dec 2004.]] Google ScholarDigital Library
- M. Poletto and V. Sarkar. Linear scan register allocation. ACM Transactions. on Programming Languages and Systems, 21(5):895--913, Sept 1999.]] Google ScholarDigital Library
- T. Romer, G. Voelker, D. Lee, A. Wolman, W. Wong, H. Levy, B. Bershad, and B. Chen. Instrumentation and optimization of win32/intel executables using Etch. In Proceedings of the USENIX Windows NT Workshop, pages 1--7, August 1997.]] Google ScholarDigital Library
- H. Saito, G. Gaertner, W. Jones, R. Eigenmann, H. Iwashita, R. Liberman, M. van Waveren, and B. Whitney. Large system performance of spec omp2001 benchmarks. In Proceedings of the 2002 Workship on OpenMP: Experiences and Implementation, 2002.]]Google ScholarDigital Library
- K. Scott, N. Kumar, S. Velusamy, B. Childers, J. Davidson, and M. L. Soffa. Reconfigurable and retargetable software dynamic translation. In Proceedings of the 1st Conference on Code Generation and Optimization, pages 36--47, 2003.]] Google ScholarDigital Library
- T. Sherwood, E. Perelman, G. Hamerly, and B. Calder. Automatically characterizing large scale program behavior. In Proceedings of the 10th International Conference on Architectural Support for Programming Languages and Operating Systems, Oct 2002.]] Google ScholarDigital Library
- A. Srivastava, A. Edwards, and H. Vo. Vulcan: Binary transformation in a distributed environment. Technical Report MSR-TR-2001-50, Microsoft Research, April 2001.]]Google Scholar
- A. Srivastava and A. Eustace. Atom: A system for building customized program analysis tools. In Proceedings of the ACM SIGPLAN 94 Conference on Programming Language Design and Implementation, pages 196--205, 1994.]] Google ScholarDigital Library
- X. Zhang, Z. Wang, N. Gloy, J. B. Chen, and M. D. Smith. System support for automatic profiling and optimization. In Proceedings of the 16th Symposium on Operating System Principles, October 1997.]] Google ScholarDigital Library
Index Terms
- Pin: building customized program analysis tools with dynamic instrumentation
Recommendations
Pin: building customized program analysis tools with dynamic instrumentation
Proceedings of the 2005 ACM SIGPLAN conference on Programming language design and implementationRobust and powerful software instrumentation tools are essential for program analysis tasks such as profiling, performance evaluation, and bug detection. To meet this need, we have developed a new instrumentation system called Pin. Our goals are to ...
Improving instrumentation speed via buffering
WBIA '09: Proceedings of the Workshop on Binary Instrumentation and ApplicationsDynamic binary instrumentation systems are useful tools for a wide range of tasks including program analysis, security policy enforcement, and architectural simulation. The overhead of such systems is a primary concern, as some tasks introduce as much ...
Pin Accessibility-Driven Detailed Placement Refinement
ISPD '17: Proceedings of the 2017 ACM on International Symposium on Physical DesignThe significantly increased number of routing design rules at sub-20nm nodes has made pin access one of the most critical challenges in detailed routing. Resolving pin access issues in detailed routing stage may be too late due to the fixed pin ...
Comments