Binary profile instrumentation framework
AssigneeOracle America, Inc.
InventorsChandrashekhar Garud, Fu-Hwa Wang
Life of this patent
Estimating the term…
Abstract
Techniques for reliable binary instrumentation based on annotation information are described. A binary file that comprises a code section representing the executable code of a computer program is accessed. The binary file also comprises annotation information that indicates the boundaries of one or more portions of the computer program. Accurate data flow information and control flow information may be generated based on the annotation information included in the binary file. The binary file is instrumented by inserting a set of instrumentation code at one or more points in the code section of the computer program. The one or more points are determined based on the data flow information and the control flow information.
Claims28
A machine implemented method, comprising:
- accessing a binary file, wherein the binary file comprises:
- a code section that represents the executable code of a computer program;
- and
- annotation information that indicates the boundaries of one or more portions of the computer program, wherein the annotation information identifies a specific instruction, that when executed, is configured to free at least one register to obtain a free register;
- and
- instrumenting the binary file, wherein instrumenting comprises:
- inserting a set of instrumentation code at one or more points in the code section of the computer program, wherein the one or more points are determined using the annotation information;
- and
- inserting a profile section configured to store profile information, wherein the set of instrumentation code, when executed, modifies the profile information and wherein the profile information characterizes the execution of the executable code,
- wherein the free register is determined, using the annotation information, at a particular point of the one or more points in the code section of the computer program at which the set of instrumentation code is inserted;
- and
- inserting a group of instructions that use the free register at the particular point, wherein the group of instructions are executed as part of executing the binary file.
A machine readable storage device, comprising:
- instructions for causing one or more processors to access a binary file, wherein the binary file comprises:
- a code section that represents the executable code of a computer program;
- and
- annotation information that indicates the boundaries of one or more portions of the computer program, wherein the annotation information identifies a specific instruction, that when executed, is configured to free at least one register to obtain a free register;
- and
- instructions for causing one or more processors to instrument the binary file, wherein instrumenting comprises:
- inserting a set of instrumentation code at one or more points in the code section of the computer program, wherein the one or more points are determined using the annotation information;
- and
- inserting a profile section configured to store profile information, wherein the set of instrumentation code, when executed, modifies the profile information and wherein the profile information characterizes the execution of the executable code,
- wherein the free register is determined, using the annotation information, at a particular point of the one or more points in the code section of the computer program at which the set of instrumentation code is inserted;
- and
- inserting a group of instructions that use the free register at the particular point, wherein the group of instructions are executed as part of executing the binary file.
Dependencies are inferred from the claim text.