IP Library Granted Patent US 7,353,505
Granted Patent B2
US 7,353,505 · App. 09/682,520 · Granted Apr 1, 2008

Tracing the execution path of a computer program

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 7,353,505
App. No.
09/682,520
Granted
Apr 1, 2008
Kind
B2
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.

Claims (45)

1. 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.

2. The method of claim 1 , further comprising the step of:

providing said predefined area of storage with volatile memory.

3. The method of claim 1 , further comprising the step of:

providing said predefined area of storage with non-volatile memory.

4. The method of claim 1 , further comprising the step of:

outputting trace information to said file upon exit from said at least one module.

5. The method of claim 4 , further comprising the step of outputting the contents of said storage area at the same time as said exit trace information.

6. The method of claim 1 , wherein the step of outputting the contents of said storage area further comprises the step of:

determining whether said storage area is full; and

responsive to a positive determination, outputting said contents to said file.

7. The method of claim 1 , wherein the step of outputting the contents of said storage area further comprises the step of:

determining whether a failure has occurred within said program; and

responsive to a positive determination, outputting said contents to said file.

8. The method of claim 1 , wherein the step of pushing a unique identifier into a predefined area of storage further comprises the steps of:

determining whether said predefined area of storage is full; and

overwriting the first unique identifier in said storage area.

9. The method of claim 8 , further comprising the step of determining that a plurality of unique identifiers have been overwritten comprises the step of:

writing the position of the most recent unique identifier to be written out to said storage area to said storage area.

10. The method of claim 9 , further comprising the step of determining that a plurality of unique identifiers have been overwritten comprises the step of:

using said position to determine the number of unique identifiers that have been overwritten prior to be written out to said file.

11. 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.

12. 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.

13. 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.

Assignments (2)
CHANGE OF NAME Recorded Dec 20, 2021
From: FACEBOOK, INC.
To: META PLATFORMS, INC.
Reel/Frame 058553/0802 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 4, 2012
From: INTERNATIONAL BUSINESS MACHINES CORPORATION
To: FACEBOOK, INC.
Reel/Frame 027991/0554 →