Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/1065010.1065034acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
Article

Pin: building customized program analysis tools with dynamic instrumentation

Published: 12 June 2005 Publication History

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.

References

[1]
AMBER home page. http://amber.scripps.edu/.]]
[2]
Fluent home page. http://www.fluent.com/.]]
[3]
LS-DYNA home page. http://www.lstc.com/.]]
[4]
RenderMan home page. http://RenderMan.pixar.com/.]]
[5]
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.]]
[6]
D. L. Bruening. Efficient, Transparent, and Comprehensive Runtime Code Manipulation. PhD thesis, M.I.T. (http://www.cag.lcs.mit.edu/dynamorio/), September 2004.]]
[7]
B. R. Buck and J. Hollingsworth. An api for runtime code patching. Journal of High Performance Computing Applications, 14(4):317--329, 2000.]]
[8]
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.]]
[9]
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.]]
[10]
K.D. Cooper, M.W. Hall, and K. Kennedy. A methodology for procedure cloning. Computer Languages, 19(2), April 1993.]]
[11]
J. L. Henning. SPEC CPU2000: measuring cpu performance in the new millennium. IEEE Computer, 33(7):28--35, July 2000.]]
[12]
Intel. Pin User Manual. http://rogue.colorado.edu/Pin.]]
[13]
Intel. Intel Itanium Architecture Software Developer's Manual Vols 1-4, Oct. 2002.]]
[14]
Intel. IA-32 Intel Architecture Software Developer's Manual Vols 1-3, 2003.]]
[15]
Intel. Intel Extended Memory 64 Technology Software Developer's Guide Vols 1-2, 2004.]]
[16]
Intel. Intel PXA27x Processor Family Developer's Manual, April 2004.]]
[17]
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.]]
[18]
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.]]
[19]
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.]]
[20]
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.]]
[21]
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.]]
[22]
N. Nethercote and J. Seward. Valgrind: A program supervision framework. In Proceedings of the 3rd Workshop on Runtime Verification. http://valgrind.kde.org/, 2003.]]
[23]
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.]]
[24]
M. Poletto and V. Sarkar. Linear scan register allocation. ACM Transactions. on Programming Languages and Systems, 21(5):895--913, Sept 1999.]]
[25]
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.]]
[26]
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.]]
[27]
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.]]
[28]
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.]]
[29]
A. Srivastava, A. Edwards, and H. Vo. Vulcan: Binary transformation in a distributed environment. Technical Report MSR-TR-2001-50, Microsoft Research, April 2001.]]
[30]
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.]]
[31]
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.]]

Cited By

View all
  • (2024)Function as a Service (FaaS) for Fast, Efficient, Scalable SystemsServerless Computing Concepts, Technology and Architecture10.4018/979-8-3693-1682-5.ch008(134-151)Online publication date: 5-Apr-2024
  • (2024)Camouflage: Utility-Aware Obfuscation for Accurate Simulation of Sensitive Program TracesACM Transactions on Architecture and Code Optimization10.1145/365011021:2(1-23)Online publication date: 21-May-2024
  • (2024)EPIC: Efficient and Proactive Instruction-level CyberdefenseProceedings of the Great Lakes Symposium on VLSI 202410.1145/3649476.3658749(409-414)Online publication date: 12-Jun-2024
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
PLDI '05: Proceedings of the 2005 ACM SIGPLAN conference on Programming language design and implementation
June 2005
338 pages
ISBN:1595930566
DOI:10.1145/1065010
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 40, Issue 6
    Proceedings of the 2005 ACM SIGPLAN conference on Programming language design and implementation
    June 2005
    325 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/1064978
    Issue’s Table of Contents
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]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 12 June 2005

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. dynamic compilation
  2. instrumentation
  3. program analysis tools

Qualifiers

  • Article

Conference

PLDI05
Sponsor:

Acceptance Rates

Overall Acceptance Rate 406 of 2,067 submissions, 20%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)535
  • Downloads (Last 6 weeks)60
Reflects downloads up to 13 Sep 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Function as a Service (FaaS) for Fast, Efficient, Scalable SystemsServerless Computing Concepts, Technology and Architecture10.4018/979-8-3693-1682-5.ch008(134-151)Online publication date: 5-Apr-2024
  • (2024)Camouflage: Utility-Aware Obfuscation for Accurate Simulation of Sensitive Program TracesACM Transactions on Architecture and Code Optimization10.1145/365011021:2(1-23)Online publication date: 21-May-2024
  • (2024)EPIC: Efficient and Proactive Instruction-level CyberdefenseProceedings of the Great Lakes Symposium on VLSI 202410.1145/3649476.3658749(409-414)Online publication date: 12-Jun-2024
  • (2024) ARCTURUS: Full Coverage Binary Similarity Analysis with Reachability-guided EmulationACM Transactions on Software Engineering and Methodology10.1145/364033733:4(1-31)Online publication date: 11-Jan-2024
  • (2024)Dynamic Inference of Likely Symbolic Tensor Shapes in Python Machine Learning ProgramsProceedings of the 46th International Conference on Software Engineering: Software Engineering in Practice10.1145/3639477.3639718(147-156)Online publication date: 14-Apr-2024
  • (2024)RPG2: Robust Profile-Guided Runtime Prefetch GenerationProceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 210.1145/3620665.3640396(999-1013)Online publication date: 27-Apr-2024
  • (2024)SPC-Indexed Indirect Branch Hardware Cache Redirecting Technique in Binary TranslationJournal of Circuits, Systems and Computers10.1142/S0218126624502426Online publication date: 28-Mar-2024
  • (2024)Balanced Encoding of Near-Zero Correlation for an AES ImplementationIEEE Transactions on Information Forensics and Security10.1109/TIFS.2024.342010119(6589-6603)Online publication date: 1-Jan-2024
  • (2024)CryptojackingTrap: An Evasion Resilient Nature-Inspired Algorithm to Detect Cryptojacking MalwareIEEE Transactions on Information Forensics and Security10.1109/TIFS.2024.335307219(7465-7477)Online publication date: 1-Jan-2024
  • (2024)Secure Run-Time Hardware Trojan Detection Using Lightweight Analytical ModelsIEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems10.1109/TCAD.2023.331611343:2(431-441)Online publication date: Feb-2024
  • Show More Cited By

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media