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

Hierarchical Program Paths

Published: 22 August 2016 Publication History

Abstract

Complete dynamic control flow is a fundamental kind of execution profile about program executions with a wide range of applications. Tracing the dynamic control flow of program executions for a brief period easily generates a trace consisting of billions of control flow events. The number of events in such a trace is large, making both path tracing and path querying to incur significant slowdowns. A major class of path tracing techniques is to design novel trace representations that can be generated efficiently, and encode the inputted sequences of such events so that the inputted sequences are still derivable from the encoded and smaller representations. The control flow semantics in such representations have, however, become obscure, which makes implementing path queries on such a representation inefficient and the design of such queries complicated. We propose a novel two-phase path tracing framework—Hierarchical Program Path (HPP)—to model the complete dynamic control flow of an arbitrary number of executions of a program. In Phase 1, HPP monitors each execution, and efficiently generates a stream of events, namely HPPTree, representing a novel tree-based representation of control flow for each thread of control in the execution. In Phase 2, given a set of such event streams, HPP identifies all the equivalent instances of the same exercised interprocedural path in all the corresponding HPPTree instances, and represents each such equivalent set of paths with a single subgraph, resulting in our compositional graph-based trace representation, namely, HPPDAG. Thus, an HPPDAG instance has the potential to be significantly smaller in size than the corresponding HPPTree instances, and still completely preserves the control flow semantics of the traced executions. Control flow queries over all the traced executions can also be directly performed on the single HPPDAG instance instead of separately processing the trace representation of each execution followed by aggregating their results. We validate HPP using the SPLASH2 and SPECint 2006 benchmarks. Compared to the existing technique, named BLPT (Ball-Larus-based Path Tracing), HPP generates significantly smaller trace representations and incurs fewer slowdowns to the native executions in online tracing of Phase 1. The HPPDAG instances generated in Phase 2 are significantly smaller than their corresponding BLPT and HPPTree traces. We show that HPPDAG supports efficient backtrace querying, which is a representative path query based on complete control flow trace. Finally, we illustrate the ease of use of HPPDAG by building a novel and highly efficient path profiling technique to demonstrate the applicability of HPPDAG.

References

[1]
Hiralal Agrawal and Joseph R. Horgan. 1990. Dynamic program slicing. In Proceedings of the ACM SIGPLAN 1990 Conference on Programming Language Design and Implementation (PLDI’90). ACM, New York, NY, 246--256.
[2]
Gautam Altekar and Ion Stoica. 2009. ODR: Output-deterministic replay for multicore debugging. In Proceedings of the ACM SIGOPS 22nd Symposium on Operating Systems Principles (SOSP’09). ACM, New York, NY, 193--206.
[3]
Andrew Ayers, Richard Schooler, Chris Metcalf, Anant Agarwal, Junghwan Rhee, and Emmett Witchel. 2005. TraceBack: First fault diagnosis by reconstruction of distributed control flow. In Proceedings of the 2005 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI’05). ACM, New York, NY, 201--212.
[4]
Thomas Ball and James R. Larus. 1996. Efficient path profiling. In Proceedings of the 29th Annual ACM/IEEE International Symposium on Microarchitecture (MICRO29). IEEE Computer Society, Washington, DC, 46--57.
[5]
Martin Burtscher. 2004. VPC3: A fast and effective trace-compression algorithm. SIGMETRICS Perform. Eval. Rev. 32, 1 (June 2004), 167--176.
[6]
Martin Burtscher, Ilya Ganusov, Sandra J. Jackson, Jian Ke, Paruj Ratanaworabhan, and Nana B. Sam. 2005. The VPC trace-compression algorithms. IEEE Trans. Comput. 54, 11 (Nov. 2005), 1329--1344.
[7]
Yan Cai and W. K. Chan. 2014. Magiclock: Scalable detection of potential deadlocks in large-scalemultithreaded programs. IEEE Trans. Softw. Eng. 40, 3 (March 2014), 266--281.
[8]
Trishul M. Chilimbi, Ben Liblit, Krishna Mehra, Aditya V. Nori, and Kapil Vaswani. 2009. HOLMES: Effective statistical debugging via efficient path profiling. In Proceedings of the 31st International Conference on Software Engineering (ICSE’09). IEEE Computer Society, Washington, DC, 34--44.
[9]
CLANG 3.5. 2015. http://clang.llvm.org/.
[10]
Daniele Cono D’Elia and Camil Demetrescu. 2013. Ball-Larus path profiling across multiple loop iterations. In Proceedings of the 2013 ACM SIGPLAN International Conference on Object Oriented Programming Systems Languages & Applications (OOPSLA’’13). ACM, New York, NY, 373--390.
[11]
Evelyn Duesterwald and Vasanth Bala. 2000. Software profiling for hot path prediction: Less is more. In Proceedings of the 9th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS’00). ACM, New York, NY, 202--211.
[12]
Cormac Flanagan and Stephen N. Freund. 2009. FastTrack: Efficient and precise dynamic race detection. SIGPLAN Not. 44, 6 (June 2009), 121--133.
[13]
GDB: The GNU Project Debugger. Retrieved May 2015 from http://www.gnu.org/software/gdb/.
[14]
GZIP: GNU gzip v1.4. 2010. Retrieved May 2015 from http://www.gnu.org/software/gzip/.
[15]
Milos Gligoric, Alex Groce, Chaoqiang Zhang, Rohan Sharma, Mohammad Amin Alipour, and Darko Marinov. 2013. Comparing non-adequate test suites using coverage criteria. In Proceedings of the 2013 International Symposium on Software Testing and Analysis (ISSTA’13). ACM, New York, NY, 302--313.
[16]
Ankit Goel, Abhik Roychoudhury, and Tulika Mitra. 2003. Compactly representing parallel program executions. In Proceedings of the 9th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP’03). ACM, New York, NY, 191--202.
[17]
John L. Henning. 2006. SPEC CPU2006 benchmark descriptions. SIGARCH Comput. Archit. News 34, 4 (Sept. 2006), 1--17.
[18]
Jeff Huang, Charles Zhang, and Julian Dolby. 2013. CLAP: Recording local executions to reproduce concurrency failures. In Proceedings of the 34th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI’13). ACM, New York, NY, 141--152.
[19]
Scott F. Kaplan, Yannis Smaragdakis, and Paul R. Wilson. 2003. Flexible reference trace reduction for VM simulations. ACM Trans. Model. Comput. Simul. 13, 1 (Jan. 2003), 1--38.
[20]
Alain Ketterlin and Philippe Clauss. 2008. Prediction and trace compression of data access addresses through nested loop recognition. In Proceedings of the 6th Annual IEEE/ACM International Symposium on Code Generation and Optimization (CGO’08). ACM, New York, NY, 94--103.
[21]
James R. Larus. 1999. Whole program paths. In Proceedings of the ACM SIGPLAN 1999 Conference on Programming Language Design and Implementation (PLDI’99). ACM, New York, NY, 259--269.
[22]
Chris Lattner and Vikram Adve. 2004. LLVM: A compilation framework for lifelong program analysis and transformation. In Proceedings of the International Symposium on Code Generation and Optimization: Feedback-Directed and Runtime Optimization (CGO’04). IEEE Computer Society, Washington, DC, 75--86.
[23]
James Law and Gregg Rothermel. 2003. Whole program path-based dynamic impact analysis. In Proceedings of the 25th International Conference on Software Engineering (ICSE’03). IEEE Computer Society, Washington, DC, 308--318.
[24]
Bixin Li, Lulu Wang, Hareton Leung, and Fei Liu. 2012. Profiling all paths: A new profiling technique for both cyclic and acyclic paths. J. Syst. Softw. 85, 7 (July 2012), 1558--1576.
[25]
Yongjing Lin, Youtao Zhang, and Rajiv Gupta. 2007. The design and evaluation of path matching schemes on compressed control flow traces. J. Syst. Softw. 80, 3 (March 2007), 396--409.
[26]
David Melski and Thomas W. Reps. 1999. Interprocedural path profiling. In Proceedings of the 8th International Conference on Compiler Construction, Held as Part of the European Joint Conferences on the Theory and Practice of Software, ETAPS’99 (CC’99), Stefan Jähnichen (Ed.). Springer-Verlag, London, UK, 47--62.
[27]
Craig G. Nevill-Manning and Ian H. Witten. 1997. Linear-time, incremental hierarchy inference for compression. In Proceedings of the Conference on Data Compression (DCC’97). IEEE Computer Society, Washington, DC, 3--11.
[28]
Peter Ohmann and Ben Liblit. 2013. Lightweight control-flow instrumentation and postmortem analysis in support of debugging. In Proceedings of the IEEE/ACM 28th International Conference on Automated Software Engineering (ASE). IEEE Computer Society, Silicon Valley, CA, 378--388.
[29]
Arun Ramamurthi, Subhajit Roy, and Y. N. Srikant. 2011. Probabilistic dataflow analysis using path profiles on structure graphs. In Proceedings of the 19th ACM SIGSOFT Symposium and the 13th European Conference on Foundations of Software Engineering (ESEC/FSE’11). ACM, New York, NY, 512--515.
[30]
Manos Renieris, Shashank Ramaprasad, and Steven P. Reiss. 2005. Arithmetic program paths. In Proceedings of the 10th European Software Engineering Conference Held Jointly with 13th ACM SIGSOFT International Symposium on Foundations of Software Engineering (ESEC/FSE-13). ACM, New York, NY, 90--98.
[31]
Subhajit Roy and Y. N. Srikant. 2009. Profiling k-iteration paths: A generalization of the Ball-Larus profiling algorithm. In Proceedings of the 7th Annual IEEE/ACM International Symposium on Code Generation and Optimization (CGO’09). IEEE Computer Society, Washington, DC, 70--80.
[32]
Bernhard Scholz and Eduard Mehofer. 2002. Dataflow frequency analysis based on whole program paths. In Proceedings of the 2002 International Conference on Parallel Architectures and Compilation Techniques (PACT’02). IEEE Computer Society, Washington, DC, 95--103.
[33]
William N. Sumner, Yunhui Zheng, Dasarath Weeratunge, and Xiangyu Zhang. 2010. Precise calling context encoding. In Proceedings of the 32nd ACM/IEEE International Conference on Software Engineering Volume 1 (ICSE’10), 1. ACM, New York, NY, 525--534.
[34]
Sriraman Tallam, Xiangyu Zhang, and Rajiv Gupta. 2004. Extending path profiling across loop backedges and procedure boundaries. In Proceedings of the International Symposium on Code Generation and Optimization: Feedback-Directed and Runtime Optimization (CGO’04). IEEE Computer Society, Washington, DC, 251--262.
[35]
Sriraman Tallam, Rajiv Gupta, and Xiangyu Zhang. 2005. Extended whole program paths. In Proceedings of the 14th International Conference on Parallel Architectures and Compilation Techniques (PACT’05). IEEE Computer Society, Washington, DC, 17--26.
[36]
Tao Wang and Abhik Roychoudhury. 2007. Hierarchical dynamic slicing. In Proceedings of the 2007 International Symposium on Software Testing and Analysis (ISSTA’07). ACM, New York, NY, 228--238.
[37]
T. A. Welch. 1984. A technique for high-performance data compression. Computer 17, 6 (June 1984), 8--19.
[38]
Steven Cameron Woo, Moriyoshi Ohara, Evan Torrie, Jaswinder Pal Singh, and Anoop Gupta. 1995. The SPLASH-2 programs: Characterization and methodological considerations. In Proceedings of the 22nd Annual International Symposium on Computer Architecture (ISCA’95). ACM, New York, NY, 24--36.
[39]
Bin Xin, William N. Sumner, and Xiangyu Zhang. 2008. Efficient program execution indexing. In Proceedings of the 2008 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI’08). ACM, New York, NY, 238--248.
[40]
Guoqing Xu, Nick Mitchell, Matthew Arnold, Atanas Rountev, Edith Schonberg, and Gary Sevitsky. 2014. Scalable runtime bloat detection using abstract dynamic slicing. ACM Trans. Softw. Eng. Methodol. 23, 3, Article 23 (June 2014), 50.
[41]
Xiangyu Zhang and Rajiv Gupta. 2004. Whole execution traces. In Proceedings of the 37th Annual IEEE/ACM International Symposium on Microarchitecture (MICRO 37). IEEE Computer Society, Washington, DC, 105--116.
[42]
Youtao Zhang and Rajiv Gupta. 2001. Timestamped whole program path representation and its applications. In Proceedings of the ACM SIGPLAN 2001 Conference on Programming Language Design and Implementation (PLDI’01). ACM, New York, NY, 180--190.
[43]
Qin Zhao, Joon Edward Sim, Weng-Fai Wong, and Larry Rudolph. 2006. DEP: Detailed execution profile. In Proceedings of the 15th International Conference on Parallel Architectures and Compilation Techniques (PACT’06). ACM, New York, NY, 154--163.

Cited By

View all
  • (2021)OPE: Transforming Programs with Clean and Precise Separation of Tested Intraprocedural Program Paths with Path Profiling2021 IEEE 21st International Conference on Software Quality, Reliability and Security (QRS)10.1109/QRS54544.2021.00039(279-290)Online publication date: Dec-2021
  • (2019)A Fuzz Testing Service for Assuring Smart Contracts2019 IEEE 19th International Conference on Software Quality, Reliability and Security Companion (QRS-C)10.1109/QRS-C.2019.00116(544-545)Online publication date: Jul-2019
  • (2018)Hierarchical abstraction of execution traces for program comprehensionProceedings of the 26th Conference on Program Comprehension10.1145/3196321.3196343(86-96)Online publication date: 28-May-2018
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Transactions on Software Engineering and Methodology
ACM Transactions on Software Engineering and Methodology  Volume 25, Issue 3
August 2016
291 pages
ISSN:1049-331X
EISSN:1557-7392
DOI:10.1145/2943790
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 the author(s) 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].

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 22 August 2016
Accepted: 01 June 2016
Revised: 01 April 2016
Received: 01 July 2015
Published in TOSEM Volume 25, Issue 3

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Path tracing
  2. hierarchical and compositional representation
  3. interprocedural path

Qualifiers

  • Research-article
  • Research
  • Refereed

Funding Sources

  • Early Career Scheme of the Research Grants Council of Hong Kong
  • General Research Fund

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)10
  • Downloads (Last 6 weeks)0
Reflects downloads up to 15 Oct 2024

Other Metrics

Citations

Cited By

View all
  • (2021)OPE: Transforming Programs with Clean and Precise Separation of Tested Intraprocedural Program Paths with Path Profiling2021 IEEE 21st International Conference on Software Quality, Reliability and Security (QRS)10.1109/QRS54544.2021.00039(279-290)Online publication date: Dec-2021
  • (2019)A Fuzz Testing Service for Assuring Smart Contracts2019 IEEE 19th International Conference on Software Quality, Reliability and Security Companion (QRS-C)10.1109/QRS-C.2019.00116(544-545)Online publication date: Jul-2019
  • (2018)Hierarchical abstraction of execution traces for program comprehensionProceedings of the 26th Conference on Program Comprehension10.1145/3196321.3196343(86-96)Online publication date: 28-May-2018
  • (2018)Automatic Hierarchical Clustering of Static Call Graphs for Program Comprehension2018 IEEE International Conference on Big Data (Big Data)10.1109/BigData.2018.8622426(4016-4025)Online publication date: Dec-2018
  • (2018)Fuse: An Architecture for Smart Contract Fuzz Testing Service2018 25th Asia-Pacific Software Engineering Conference (APSEC)10.1109/APSEC.2018.00099(707-708)Online publication date: Dec-2018
  • (2018)AdapTracer:Adaptive path profiling using arithmetic codingJournal of Systems Architecture10.1016/j.sysarc.2018.05.01188(74-86)Online publication date: Aug-2018

View Options

Get Access

Login options

Full Access

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