SCARPE: A Technique and Tool for Selective Capture and Replay of Program Executions Shrinivas Joshi Alessandro Orso Advanced Micro Devices Georgia Institute of Technology Shrinivas.Joshi@amd.com orso@cc.gatech.edu This work was supported in part by NSF awards CCF-0541080 and CCR-0205422 to Georgia Tech.
Collecting Field Data In house In the field Developers
Collecting Field Data In house In the field Developers
Collecting Field Data In house In the field ? Developers
Collecting Field Data In house In the field ? Developers Field Data
Collecting Field Data In house In the field ? Developers Field Data
Collecting Field Data In house In the field ? Maintenance tasks: Debugging Regression testing Developers Impact analysis Behavior classification ... Field Data
Presentation Outline • Motivation and Overview • Record & Replay Technique • Implementation and Evaluation • Conclusions and Future Work
Presentation Outline • Motivation and Overview • Record & Replay Technique • Implementation and Evaluation • Conclusions and Future Work
Record & Replay: Issues
Record & Replay: Issues Users Network DB
Record & Replay: Issues • Practicality • High volume of data • Ad-hoc mechanisms Users • Inefficiency in recording Network DB
Record & Replay: Issues • Practicality • High volume of data • Ad-hoc mechanisms Users • Inefficiency in recording • Privacy • Sensitive information Network DB
Record & Replay: Issues • Practicality • High volume of data • Ad-hoc mechanisms Users • Inefficiency in recording • Privacy • Sensitive information Network • Safety • Side effects DB
Record & Replay: Issues • Practicality • High volume of data Our technique • Is specifically designed to be used on deployed software • Ad-hoc mechanisms Users (but can also be used in-house) • Inefficiency in recording • Mitigates practicality, safety, and privacy issues through • Privacy • novel technical solutions • Sensitive information • careful engineering Network • Safety • Side effects DB
Overview of the Approach d r o c e R y a l p e R
Overview of the Approach d r o c e R y a l p e R
Overview of the Approach d r o Subsystem c of interest e R y a l p e R
Overview of the Approach d r o Subsystem c of interest e R y a l p e R
Overview of the Approach Output d Input r o Subsystem c of interest e R Environment y a l p e R
Overview of the Approach Output d Input r o Subsystem c of interest e R Event Environment Log y a l p e R
Overview of the Approach Output d Input r o Subsystem c of interest e R Event Environment Log y a l p Subsystem e R of interest
Overview of the Approach Output d Input r o Subsystem c of interest e R Event Environment Log Replay Scaffolding y a l p Subsystem e R of interest
Overview of the Approach Output d Input r o Subsystem c of interest e R Event Environment Log Replay Scaffolding y a l p Event Subsystem e Log R of interest
Overview of the Approach Output d Input r o Subsystem c of interest e R Event Environment Log Replay Scaffolding y a l p Event Subsystem e Log R of interest
Record: Recorded Events Subsystem of interest
Record: Recorded Events ... x = getRatio(myTree) Method calls ... • INCALL • INCALLRET • Subsystem OUTCALL of interest • OUTCALLRET
Record: Recorded Events ... x = getRatio(myTree) Method calls Method calls ... • • INCALL INCALL • • INCALLRET INCALLRET x = getRatio(myTree) • • Subsystem OUTCALL OUTCALL of interest • • OUTCALLRET OUTCALLRET
Record: Recorded Events ... x = getRatio(myTree) Method calls Method calls Method calls ... • • • INCALL INCALL INCALL • • • INCALLRET INCALLRET INCALLRET x = getRatio(myTree) • • • Subsystem OUTCALL OUTCALL OUTCALL 28.5 of interest • • • OUTCALLRET OUTCALLRET OUTCALLRET
Record: Recorded Events Method calls • INCALL • INCALLRET • Subsystem OUTCALL of interest • OUTCALLRET
Record: Recorded Events Method calls ... • n = it.next() INCALL ... • INCALLRET • Subsystem OUTCALL of interest • OUTCALLRET
Record: Recorded Events Method calls Method calls ... • • n = it.next() INCALL INCALL ... • • INCALLRET INCALLRET it.next() • • Subsystem OUTCALL OUTCALL of interest • • OUTCALLRET OUTCALLRET
Record: Recorded Events Method calls Method calls Method calls ... • • • n = it.next() INCALL INCALL INCALL ... • • • INCALLRET INCALLRET INCALLRET it.next() • • • Subsystem OUTCALL OUTCALL OUTCALL <some object> of interest • • • OUTCALLRET OUTCALLRET OUTCALLRET
Record: Recorded Events Method calls • INCALL • INCALLRET • Subsystem OUTCALL of interest • OUTCALLRET INCALL / OUTCALL event { • Callee’s type • Callee’s object ID • Callee’s signature • Parameter*
Record: Recorded Events Method calls • INCALL • INCALLRET • OUTCALL • OUTCALLRET
Record: Recorded Events Method calls Field Accesses • • INCALL INWRITE • • INCALLRET OUTWRITE • • OUTCALL OUTREAD • OUTCALLRET
Record: Recorded Events Method calls Field Accesses Exceptions • • • INCALL INWRITE EXCIN • • • INCALLRET OUTWRITE EXCOUT • • OUTCALL OUTREAD • OUTCALLRET
Record: Capturing Partial Data Subsystem of interest
Record: Capturing Partial Data • Recording complete data is impractical (huge time/space overhead in preliminary studies) Subsystem of interest
Record: Capturing Partial Data • Recording complete data is impractical (huge time/space overhead in preliminary studies) x = getRatio(hugeTree) Subsystem 28.5 of interest
Record: Capturing Partial Data • Recording complete data is impractical (huge time/space overhead in preliminary studies) double getRatio(HugeTree ht) { Iterator it = ht.iterator(); while (it.hasNext()) { Node n = (Node)it.next(); double res = n.val; x = getRatio(hugeTree) if (res > 0) Subsystem 28.5 return res / norm; of interest }
Record: Capturing Partial Data • Recording complete data is impractical (huge time/space overhead in preliminary studies) ➡ Record only data that affect the computation • Scalar values • Object IDs and Types double getRatio(HugeTree ht) { Iterator it = ht.iterator(); while (it.hasNext()) { Node n = (Node)it.next(); double res = n.val; x = getRatio(hugeTree) if (res > 0) Subsystem 28.5 return res / norm; of interest }
Record: Capturing Partial Data • Recording complete data is impractical (huge time/space overhead in preliminary studies) ➡ Record only data that affect the computation • Scalar values • Object IDs and Types double getRatio(HugeTree ht) { Iterator it = ht.iterator(); while (it.hasNext()) { Node n = (Node)it.next(); double res = n.val; x = getRatio(hugeTree) if (res > 0) Subsystem 28.5 return res / norm; of interest } 28.5
Record: Capturing Partial Data • Recording complete data is impractical (huge time/space overhead in preliminary studies) ➡ Record only data that affect the computation • Scalar values • Object IDs and Types double getRatio(HugeTree ht) { Iterator it = ht.iterator(); while (it.hasNext()) { <1110, some.package.HugeTree> Node n = (Node)it.next(); double res = n.val; x = getRatio(hugeTree) if (res > 0) Subsystem 28.5 return res / norm; of interest } 28.5
Possible Applications
Possible Applications Output Input Subsystem of interest Event Environment Log 1. Debugging of field failures 2. Unit test cases from user executions 3. Post-mortem dynamic analysis
Possible Applications Subsystem of interest Environment 1. Debugging of field failures 2. Unit test cases from user executions 3. Post-mortem dynamic analysis
Possible Applications Output Input Subsystem of interest Event Environment Log 1. Debugging of field failures 2. Unit test cases from user executions 3. Post-mortem dynamic analysis
Possible Applications Output Input Subsystem of interest Event Environment Log 1. Debugging of field failures 2. Unit test cases from user executions 3. Post-mortem dynamic analysis
Possible Applications Output Input Subsystem of interest Event Environment Log 1. Debugging of field failures 2. Unit test cases from user executions 3. Post-mortem dynamic analysis • For component failures [WODA 06] • For complete executions [ICSE 07]
Possible Applications Output Input Subsystem of interest Event Environment Log 1. Debugging of field failures 2. Unit test cases from user executions 3. Post-mortem dynamic analysis
Possible Applications Output Input Subsystem Unit of of interest interest Event Environment Log 1. Debugging of field failures 2. Unit test cases from user executions 3. Post-mortem dynamic analysis
Recommend
More recommend