Tracing the execution path of a computer program
AssigneeInternational Business Machines Corporation
InventorAnthony John O'Dowd
Life of this patent
Estimating the term…
Abstract
The invention relates to tracing the execution path of a computer program comprising at least one module including a plurality of instructions. At least one of these instructions is a branch instruction. Each branch instruction is identified and evaluated to be one of true and false. An evaluation of true results in a unique identifier being pushed into a predefined area of storage. This unique identifier is associated with the instructions executed as a result of an evaluation of true.
Claims13
A method for tracing the execution path of a computer program comprising at least one module including a plurality of instructions, at least one of said instructions being a branch instruction, the method comprising the steps of:
- instrumenting the computer program with instructions for defining the size of a predefined area of storage and instructions for outputting the contents of the storage area to a file at a predetermined period of time irrespective to the completion or non-completion of the trace;
- tracing the execution path of the computer program by:
- automatically identifying each branch instruction of the computer program;
- evaluating each branch instruction to be one of true and false;
- and
- responsive to an evaluation of true, automatically pushing at least one unique identifier into a said predefined area of storage, wherein said at least one unique identifier directly references a set of instructions executed as a result of said evaluation of true;
- and responsive to a determination that a plurality of unique identifiers in said predefined area of storage have been overwritten. re-instrumenting the instruction defining the size of the storage area to increase the size of the predefined area.
An apparatus stored on a computer system for tracing the execution path of a computer program comprising at least one module including a plurality of instructions, at least one of said instructions being a branch instruction, said apparatus comprising:
- a compiler for instrumenting the computer program with instructions for defining the size of a predefined area of storage and instructions for outputting the contents of the storage area to a file at a predetermined period of time irrespective to the completion or non-completion of the trace;
- wherein said compiler traces the execution path of the computer program, and comprises of:
- an identifier for automatically identifying each branch instruction of the computer program;
- an evaluator for evaluating each branch instruction to be one of true and false;
- and
- a pusher, responsive to an evaluation of true, for automatically pushing at least one unique identifier into a predefined area of storage, wherein said at least one unique identifier directly references a set of instructions executed as a result of said evaluation of true;
- and an evaluator responsive to a determination that a plurality of unique identifiers in said predefined area of storage have been overwritten, re-instrumenting the instruction defining the size of the storage area to increase the size of the predefined area.
A method for instrumenting a computer program comprising at least one module including a plurality of instructions, at least one of said instructions being a branch instruction, each branch instruction being evaluated to be one of true and false at run-time, with at least one signature instruction for indicating the execution path of said program at run-time, the method comprising the steps of:
- automatically identifying each branch instruction;
- identifying at least one set of instructions associated with an evaluation of true to the identified branch instruction at run-time;
- instrumenting the computer program with instructions for defining the size of a predefined area of storage and instructions for outputting the contents of the storage area to a file at a predetermined period of time irrespective to the completion or non-completion of a trace;
- instrumenting said at least one set of instructions associated with an evaluation of true with at least one signature instruction, wherein said at least one signature instruction causes at least one unique identifier to be pushed into said predefined area of storage at run-time, and wherein said at least one unique identifier directly references said at least one set of instructions associated with an evaluation of true
- re-instrumenting the instruction defining the size of the storage area to increase the size of the predefined area responsive to a determination that a plurality of unique identifiers in said predefined area of storage have been overwritten.
A compiler executing on a computer system for instrumenting a computer program comprising at least one module including a plurality of instructions, at least one of said instructions being a branch instruction, each branch instruction being evaluated to be one of true and false at runtime, with at least one signature instruction for indicating the execution path of said program at run-time, said compiler comprising:
- a first pusher for instrumenting the computer program with instructions for defining the size of a predefined area of storage and instructions for outputting the contents of the storage area to a file at a predetermined period of time irrespective to the completion or non-completion of a trace
- a first identifier for automatically identifying each branch instruction of the computer program;
- a second identifier for identifying the instructions associated with an evaluation of true of the branch instruction at run-time;
- a second pusher for instrumenting said instructions associated with an evaluation of true of the branch instruction with a signature instruction, wherein said signature instruction causes a unique identifier to be pushed into said predefined area of storage upon evaluation of true to said branch instructions at run-time, and wherein said at least one unique identifier directly references said at least one instruction associated with an evaluation of true
- a third pusher for re-instrumenting the instruction defining the size of the storage area to increase the size of the predefined area responsive to a determination that a plurality of unique identifiers in said predefined area of storage have been overwritten.
Dependencies are inferred from the claim text.