Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
article

PAST: accurate instrumentation on fully optimized program

Published: 01 March 2016 Publication History
  • Get Citation Alerts
  • Abstract

    Instrumentation is a powerful technique for monitoring, profiling, debugging, logging and tracing the software. In order to determine the instrumentation location, the user needs to know where the current executed location is in the source code. Previous instrumentation approaches rely on debugging information to find the location in the source code. For fully optimized programs, debugging information is not complete, which limits the application of those approaches. In this paper, we present pattern-based abstract syntax tree PAST instrumentation, an ideal instrumentation methodology that accurately instruments the fully optimized program. The instrumentation location is specified in an intuitive way that matches the source code at the abstract syntax tree level. The program can be instrumented either at the compile time using the ordinary compiling or when it is running using the just-in-time compiling. Experimental results show that PAST can accurately instrument the target program. There is negligible run time overhead when the running program is instrumented without any operation. We have implemented PAST on both x86-32 and x86-64 to show that PAST is easily portable across different architecture. Copyright © 2015 John Wiley & Sons, Ltd.

    References

    [1]
    Cantrill B, Shapiro M, Leventhal A. Dynamic instrumentation of production systems. In Proceedings of the Annual Conference on Usenix Annual Technical Conference. USENIX Association: Berkeley, CA, USA, 2004; pp.2-2.
    [2]
    Bernat AR, Miller BP. Anywhere, any-time binary instrumentation. In Proceedings of the 10th ACM SIGPLAN-SIGSOFT Workshop on Program Analysis for Software Tools. ACM: New York, NY, USA, 2011; pp.9-16.
    [3]
    Bruening D, Garnett T, Amarasinghe S. An infrastructure for adaptive dynamic optimization. In International Symposium on Code Generation and Optimization, 2003. CGO 2003. IEEE: New York, NY, USA, 2003; pp.265-275.
    [4]
    Nethercote N, Seward J. Valgrind: a framework for heavyweight dynamic binary instrumentation. In ACM Sigplan Notices, Vol.42. ACM: New York, NY, USA, 2007; pp.89-100.
    [5]
    Aho A, Lam M, Sethi R, Ullman J. Compilers: Principles, Techniques, and Tools. Pearson/Addison Wesley: Boston, MA, USA, 2007.
    [6]
    Lattner C. Clang: a c language family frontend for llvm, 2007.
    [7]
    Lattner C, Adve V. LLVM: a compilation framework for lifelong program analysis & transformation. In International Symposium on Code Generation and Optimization, 2004. CGO 2004. IEEE: New York, NY, USA, 2004; pp.75-86.
    [8]
    Lighttped-bug, 2012. Available at: "http://redmine.lighttpd.net/issues/2413" [last accessed 11 January 2015].
    [9]
    lighttpd, 2003. Available at: "http://en.wikipedia.org/wiki/lighttpd" [last accessed 11 January 2015].
    [10]
    Klimek M. The Clang AST - a tutorial, 2013.
    [11]
    Apache-Httpd-Bug, 2013. Available at: "https://issues.apache.org/bugzilla/show_bug.cgi?id=54881" [last accessed 11 January 2015].
    [12]
    Sager T, Bernstein A, Pinzger M, Kiefer C. Detecting similar Java classes using tree algorithms. In Proceedings of the 2006 International Workshop on Mining Software Repositories. ACM: New York, NY, USA, 2006; pp.65-71.
    [13]
    Neamtiu I, Foster JS, Hicks M. Understanding source code evolution using abstract syntax tree matching. In ACM SIGSOFT SOFTWARE Engineering Notes, Vol.30. ACM: New York, NY, USA, 2005; pp.1-5.
    [14]
    Necula GC, McPeak S, Rahul SP, Weimer W. CIL: intermediate language and tools for analysis and transformation of C programs. In Compiler Construction. Springer: Berlin, German, 2002; pp.213-228.
    [15]
    Erlingsson Ú, Peinado M, Peter S, Budiu M. Fay: extensible distributed tracing from kernels to clusters. In Proceedings of the Twenty-Third ACM Symposium on Operating Systems Principles. ACM: New York, NY, USA, 2011; pp.311-326.
    [16]
    Hui K, Soules C, Wisniewski R, Da D, Orran S, Marc K, Edelsohn A, Gamsa B, Ganger G, PMckenney, Ostrowski M, Rosenburg B, Stumm M, Xenidis J. Enabling autonomic system software with hot-swapping. In IBM Systems Journal. Citeseer: Armonk, NY, USA, 2003; pp.60-76.
    [17]
    Prasad V, Cohen W, Eigler F, Hunt M, Keniston J, Chen B. Locating system problems using dynamic instrumentation. 2005 Ottawa Linux Symposium, Ottawa, Ontario, Canada, 2005; pp.49-64.
    [18]
    Kiczales G, Hilsdale E, Hugunin J, Kersten M, Palm J, Griswold W. An overview of aspectJ. ECOOP 2001 Object-Oriented Programming, Budapest, Hungary, 2001; pp.327-354.
    [19]
    Coady Y, Kiczales G, Feeley M, Smolyn G. Using aspectC to improve the modularity of path-specific customization in operating system code. ACM SIGSOFT Software Engineering Notes 2001; Volume 26 Issue 5: pp.88-98.
    [20]
    Cook J, Nusayr A. Using AOP for detailed runtime monitoring instrumentation. WODA 2008: The Sixth International Workshop on Dynamic Analysis, Seattle, Washington, USA, 2008; pp.8-14.
    [21]
    VanPut L, Chanet D, DeBus B, DeSutter B, DeBosschere K. Diablo: a reliable, retargetable and extensible link-time rewriting framework. In Proceedings of the Fifth IEEE International Symposium on Signal Processing and Information Technology, 2005. IEEE: Athens, Greece, 2005; pp.7-12.
    [22]
    Srivastava A, Eustace A. ATOM: A System for Building Customized Program Analysis Tools, Vol.29. ACM: New York, NY, USA, 1994.
    [23]
    Muth R, Debray SK, Watterson S, DeBosschere K. Alto: a link-time optimizer for the compaq alpha. Software: Practice and Experience 2001; Volume 31 Issue 1: pp.67-101.
    [24]
    Cohn R, Goodwin D, Lowney PG, Rubin N. Spike: an optimizer for alpha/NT executables. USENIX Windows NT Workshop, Seattle, Washington, USA, 1997; pp.17-24.
    [25]
    Anand K, Smithson M, Elwazeer K, Kotha Aparna, Gruen J, Giles N, Barua R. A compiler-level intermediate representation based binary analysis and rewriting system. In Proceedings of the 8th ACM European Conference on Computer Systems. ACM: New York, NY, USA, 2013; pp.295-308.
    [26]
    Olszewski M, Mierle K, Czajkowski A, Brown A. JIT instrumentation: a novel approach to dynamically instrument operating systems. ACM SIGOPS Operating Systems Review 2007; Volume 41 Issue 3: pp.3-16.
    [27]
    Luk C, Cohn R, Muth R, Patil H, Klauser A, Lowney G, Wallace S, Reddi V, KHazelwood. PIN: building customized program analysis tools with dynamic instrumentation. In ACM Sigplan Notices, Vol.40. ACM: New York, NY, USA, 2005; pp.190-200.

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image Software—Practice & Experience
    Software—Practice & Experience  Volume 46, Issue 3
    March 2016
    140 pages

    Publisher

    John Wiley & Sons, Inc.

    United States

    Publication History

    Published: 01 March 2016

    Author Tags

    1. PAST
    2. abstract syntax tree
    3. offline instrumentation
    4. online instrumentation
    5. pattern matching

    Qualifiers

    • Article

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • 0
      Total Citations
    • 0
      Total Downloads
    • Downloads (Last 12 months)0
    • Downloads (Last 6 weeks)0
    Reflects downloads up to 10 Aug 2024

    Other Metrics

    Citations

    View Options

    View options

    Get Access

    Login options

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media