Coverage analysis using sub-instruction profiling
AssigneeGoogle Inc.
InventorsTavis Ormandy, William A. Drewry
Life of this patent
Estimating the term…
Abstract
Some embodiments provide a system that facilitates coverage analysis in a software program. During operation, the system identifies a complex instruction in the software program. Next, the system generates a set of sub-instruction blocks that is functionally equivalent to the complex instruction. Finally, the system uses the sub-instruction blocks in place of the complex instruction during coverage analysis of the software program.
Claims15
A computer-implemented method for facilitating coverage analysis in a software program, the method comprising:
- identifying a complex instruction in the software program by:
- identifying a basic block exit for a condition code in the software program;
- and
- identifying a comparison instruction associated with setting the condition code prior to the basic block exit;
- generating a set of sub-instruction blocks that is functionally equivalent to the complex instruction by dividing the comparison instruction into a series of simpler comparison instructions, wherein each of the simpler compare instructions compares a subset of a value used in the comparison instruction;
- and
- using the sub-instruction blocks in place of the complex instruction during coverage analysis of the software program.
A system for facilitating coverage analysis in a software program executing on a computing processor, the system comprising:
- an input-collection apparatus configured to obtain a set of inputs for the software program;
- and
- a coverage-analysis apparatus configured to:
- identify a complex instruction in the software program by:
- identifying a basic block exit for a condition code in the software program;
- and
- identifying a comparison instruction associated with setting the condition code prior to the basic block exit;
- generate a set of sub-instruction blocks that is functionally equivalent to the complex instruction by dividing the comparison instruction into a series of simpler comparison instructions, wherein each of the simpler compare instructions compares a subset of a value used in the comparison instruction;
- and
- determine a coverage of the software program associated with the set of inputs using the sub-instruction blocks in place of the complex instruction.
A non-transitory computer-readable storage medium storing instructions that when executed by a computer cause the computer to perform a method for facilitating coverage analysis in a software program, the method comprising:
- identifying a complex instruction in the software program by:
- identifying a basic block exit for a condition code in the software program;
- and
- identifying a comparison instruction associated with setting the condition code prior to the basic block exit;
- generating a set of sub-instruction blocks that is functionally equivalent to the complex instruction by dividing the comparison instruction into a series of simpler comparison instructions, wherein each of the simpler compare instructions compares a subset of a value used in the comparison instruction;
- and
- using the sub-instruction blocks in place of the complex instruction during coverage analysis of the software program.
Dependencies are inferred from the claim text.