Mechanism for profiling computer code
AssigneeSun Microsystems, Inc.
InventorAleksandr M. Kuzmin
Life of this patent
Estimating the term…
Abstract
A set of computer code is profiled by breaking each code segment of the computer code down into basic instructions. Thereafter, the set of computer code is executed. As each code segment is executed, a log is updated to indicate execution of that code segment. This is done for each executed code segment; thus, at the end of execution, the log reflects all of the code segments that were executed, and how many times each code segment was executed. Using the log, and a set of calibration statistics, which specify how much processing time is consumed by each basic instruction, an overall execution cost is derived for each executed code segment. The set of overall execution costs for all of the executed code segments are incorporated into an overall profile for the set of computer code.
Claims24
A method for profiling a set of computer code, comprising:
- selecting a code segment within a set of computer code that is executed during execution of the set of computer code;
- accessing a decomposed representation of said code segment, said decomposed representation specifying one or more basic instructions that are executed to execute said code segment;
- determining a resource measure for each of the basic instructions specified in said decomposed representation, wherein a resource measure for a basic instruction provides an indication of an amount of processing resources consumed in executing that basic instruction;
- and
- deriving, based upon said decomposed representation and the resource measures, an execution cost for said code segment, wherein said execution cost provides an indication of an amount of processing resources consumed in executing said code segment.
A computer readable medium, comprising:
- instructions for causing one or more processors to select a code segment within a set of computer code that is executed during execution of the set of computer code;
- instructions for causing one or more processors to access a decomposed representation of said code segment, said decomposed representation specifying one or more basic instructions that are executed to execute said code segment;
- instructions for causing one or more processors to determine a resource measure for each of the basic instructions specified in said decomposed representation, wherein a resource measure for a basic instruction provides an indication of an amount of processing resources consumed in executing that basic instruction;
- and
- instructions for causing one or more processors to derive, based upon said decomposed representation and the resource measures, an execution cost for said code segment, wherein said execution cost provides an indication of an amount of processing resources consumed in executing said code segment.
Dependencies are inferred from the claim text.