110 likes | 246 Views
Using Phoenix for Exploring Whole Execution Traces. Rajiv Gupta Sriraman Tallam & Xiangyu Zhang The University of Arizona. Whole Execution Traces. Values Computed. Control Flow. Dependences Exercised. Comprehensive Compact [ MICRO 2004 ]. Addresses Referenced.
E N D
Using Phoenix for Exploring Whole Execution Traces Rajiv Gupta Sriraman Tallam & Xiangyu Zhang The University of Arizona
Whole Execution Traces Values Computed Control Flow Dependences Exercised • Comprehensive • Compact [MICRO 2004] Addresses Referenced Dynamic Slicing • Locating faulty code by analyzing faulty runs [AADEBUG 2005] Dynamic Matching • Comparing executions of two versions [ESEC-FSE 2005] Execution Histories Debugging Scenarios
Whole Execution Trace Representation • Static Program Representation • Control flow graph • Program Dependences • Data and control dependences • Dynamic Profile Representation • Designed for Analysis • Annotates static program representation • Related information can be easily accessed • Comprehensive • Control flow • Addresses and values • Data and control dependences • Compact • Design compression techniques
Relevant Full Data Dynamic Slicing
Comparison of Dynamic Slices How often erroneous statement is in the dynamic slice? Assignments Predicates
Comparison of Dynamic Slices Slice Sizes
Execute trace OPT Compare mapping Compiler Report Execute UNOPT trace Dynamic Matching & Comparison Checking Drawbacks • Compiler writer must produce mappings • Compiler modification may not be possible Source Code
Profiling Using Phoenix [PACT 2005] • Captured Control Flow Trace • Parsed the CFG and inserted “printf bbid” instructions at the beginning of every basic block. • < 100 lines of programming. • Captured Memory Dependence Trace • At Store instructions • Inserted a call to a DLL function “storei” that saves the address and instruction id in a hash, indexed by the address. • At Load instructions • Inserted a call to a DLL function “loadi” that looks up the hash with the memory address to obtain the dependence. • Captured extended Control Flow Trace • Additional control flow captures dependences.
Experience with Phoenix • SPEC2000 benchmarks Native Binary. • Native binary Phoenix Lowest level IR. • Instrument IR inserts “print bbid” instructions and calls to “loadi” and “storei” in a DLL. • Implement “loadi” and “storei” in the DLL separately. • Write out the binary and generate the new DLL. • Using DLLs simplified the programming. • < 300 lines of programming, mainly implementing “storei” and “loadi” in the DLL.