← Back to Patent Explorer
US5938778A Expired / Lapsed US ⏱️ 0.0 years remaining

System and method for tracing instructions in an information handling system without changing the system source code

Assignee: International Business Machines Corp
•
Filing: 1997-11-10
•
Granted: 1999-08-17
•
Expires: 2017-11-10
📄 Original PDF 🌐 Google Patents 🔄 Sync Now

Abstract

Abstract The present invention is directed to a system and method for tracing operations in an information handling system without changing the operating system code. Certain machine registers are shadowed during critical machine state transitions (e.g., taking and returning from interrupts), so that the tracing program does not lose control of the system. The system is interrupted before each instruction is executed, and a tracing program determines if a change in program flow has occurred. If a change in program flow has occured, a record is written to a trace log. The record contains the number of consecutive instructions executed before the program flow change, along with a displacement field indicating the number of bytes from the end of the record to the beginning of the next record. Executed instructions are also embedded in the trace log, allowing for high compression ratios and less complex post-processing of the trace data.

Inventors

  • 👤 Chester Charles John, Jr.
  • 👤 Robert J. Urquhart

Bibliographic Details

Application Number —
Jurisdiction US
Data Source google_patents
Last Synchronized 2026-10-30 10:15
CPC Classifications
G; G06; G06F; G06F11/00; G06F11/30; G06F11/34; G06F11/3466

Claims Analysis

Total Claims: 29
Claim 1
Independent Claim 145 words
A method for tracing operations in an information handling system, comprising the steps of: creating a virtual machine layer between an operating system and hardware of the information handling system; shadowing identified machine registers during machine transition states using the virtual machine layer; determining by a tracing program if a change in program flow has occurred, wherein said determining step includes the following steps: reading a first instruction address of a first instruction; calculating a length of the first instruction; adding the first instruction address to the length of the first instruction to determine an expected address; comparing the expected address to the next instruction address; and if the expected address is not equal to the next instruction address, concluding that a change in program flow has occurred; and writing a trace record to a trace log if a change in program flow has occurred.
Claim 2
Independent Claim 145 words
A method for tracing operations in an information handling system, comprising the steps of: creating a virtual machine layer between an operating system and hardware of the information handling system; shadowing identified machine registers during machine transition states using the virtual machine layer; determining by a tracing program if a change in program flow has occurred, wherein said determining step includes the following steps: reading a first instruction address of a first instruction; calculating a length of the first instruction; adding the first instruction address to the length of the first instruction to determine an expected address; comparing the expected address to the next instruction address; and if the expected address is not equal to the next instruction address, concluding that a change in program flow has occurred; and writing a trace record to a trace log if a change in program flow has occurred.
Claim 3
Dependent Claim 26 words
A method for tracing according to claim 1, wherein the trace record contains a number of instructions executed and a displacement to a next trace record.
Claim 4
Dependent Claim 27 words
A method for tracing according to claim 1, wherein said writing step further comprises the step of writing one or more executable instructions into the trace log.
Claim 5
Dependent Claim 21 words
A method for tracing according to claim 1, further comprising the step of writing the trace log to an output file.
Claim 6
Dependent Claim 133 words
An information handling system, comprising: one or more processors; memory means for storing instructions and data for use by the processors; one or more images of an operating system for controlling the operation of the processors; an input/output system for communicating information to and from peripheral devices; at least one system bus connecting the elements of the system for efficient operation; a virtual machine layer between an operating system and hardware of the information handling system, the virtual machine layer for shadowing an identified machine register during processor transition states; reporting means for providing processor transition state information to a requesting process; a tracing program for determining if a change in program flow has occurred; and a trace log in which trace records are written if a change in program flow has occurred.
Claim 7
Dependent Claim 133 words
An information handling system, comprising: one or more processors; memory means for storing instructions and data for use by the processors; one or more images of an operating system for controlling the operation of the processors; an input/output system for communicating information to and from peripheral devices; at least one system bus connecting the elements of the system for efficient operation; a virtual machine layer between an operating system and hardware of the information handling system, the virtual machine layer for shadowing an identified machine register during processor transition states; reporting means for providing processor transition state information to a requesting process; a tracing program for determining if a change in program flow has occurred; and a trace log in which trace records are written if a change in program flow has occurred.
Claim 8
Dependent Claim 76 words
An information handling system according to claim 5, wherein said means for determining comprises: means for reading a first instruction address of a first instruction; means for calculating a length of the first instruction; means for adding the first instruction address to the length of the first instruction to determine an expected address; means for comparing the expected address to the next instruction address; and means for concluding that a change in program flow has occurred.
Claim 9
Dependent Claim 26 words
An information handling system according to claim 5, wherein the trace record contains a number of instructions executed and a displacement to a next trace record.
Claim 10
Dependent Claim 26 words
An information handling system according to claim 5, wherein said means for writing further comprises means for writing one or more executable instructions into the log.
Claim 11
Dependent Claim 20 words
An information handling system according to claim 5, further comprising means for writing the trace log to an output file.
Claim 12
Dependent Claim 117 words
A computer readable medium, comprising: means for shadowing identified machine registers during machine transition states; means for determining by a tracing program if a change in program flow has occurred, wherein said means for determining includes: means for reading a first instruction address of a first instruction; means for calculating a length of the first instruction; means for adding the first instruction address to the length of the first instruction to determine an expected address; means for comparing the expected address to the next instruction address; and means for concluding that a chance in program flow has occurred; and means for writing a trace record to a trace log if a change in program flow has occurred.
Claim 13
Dependent Claim 117 words
A computer readable medium, comprising: means for shadowing identified machine registers during machine transition states; means for determining by a tracing program if a change in program flow has occurred, wherein said means for determining includes: means for reading a first instruction address of a first instruction; means for calculating a length of the first instruction; means for adding the first instruction address to the length of the first instruction to determine an expected address; means for comparing the expected address to the next instruction address; and means for concluding that a chance in program flow has occurred; and means for writing a trace record to a trace log if a change in program flow has occurred.
Claim 14
Dependent Claim 17 words
A computer readable medium, according to claim 10, wherein the shadowing means comprises a virtual machine layer.
Claim 15
Dependent Claim 26 words
A computer readable medium according to claim 10, wherein the trace record contains a number of instructions executed and a displacement to a next trace record.
Claim 16
Dependent Claim 26 words
A computer readable medium according to claim 10, wherein said means for writing further comprises means for writing one or more executable instructions into the log.
Claim 17
Dependent Claim 20 words
A computer readable medium according to claim 10, further comprising means for writing the trace log to an output file.
Claim 18
Dependent Claim 29 words
A computer readable medium according to claim 10, wherein the means for shadowing further comprises: means for reading a next instruction address of a next instruction to be executed.
Claim 19
Dependent Claim 30 words
A computer readable medium according to claim 15, further comprising: means for executing the next instruction; means for decoding the next instruction; and means for emulating the instruction in software.
Claim 20
Dependent Claim 55 words
A computer readable medium according to claim 15, further comprising: means for determining if the next instruction address crosses a memory boundary into a new memory region; means for determining if the new memory region already exists in a memory log record; and means for writing the new memory region to the memory log record.
Claim 21
Dependent Claim 20 words
A computer readable medium according to claim 17, further comprising: means for determining if the new memory region has changed.
Claim 22
Independent Claim 115 words
A method for tracing operations in an information handling system, comprising the steps of: creating a virtual machine layer between an operating system and hardware of the information handling system; shadowing identified machine registers during machine transition states using the virtual machine layer, wherein said shadowing step includes the following steps: reading a next instruction address of a next instruction to be executed; decoding the next instruction; and if the next instruction is one of a predetermined set of instructions, emulating the instruction in software; determining by a tracing program if a change in program flow has occurred; and writing a trace record to a trace log if a change in program flow has occurred.
Claim 23
Independent Claim 115 words
A method for tracing operations in an information handling system, comprising the steps of: creating a virtual machine layer between an operating system and hardware of the information handling system; shadowing identified machine registers during machine transition states using the virtual machine layer, wherein said shadowing step includes the following steps: reading a next instruction address of a next instruction to be executed; decoding the next instruction; and if the next instruction is one of a predetermined set of instructions, emulating the instruction in software; determining by a tracing program if a change in program flow has occurred; and writing a trace record to a trace log if a change in program flow has occurred.
Claim 24
Dependent Claim 75 words
A method for tracing according to claim 19, further comprising the steps of: determining if the next instruction address crosses a memory boundary into a new memory region; if the next instruction address crosses a memory boundary, determining if the new memory region already exists in a memory log record; and if the new memory region does not already exist in the memory log record, writing the new memory region to the memory log record.
Claim 25
Dependent Claim 52 words
A method for tracing according to claim 20, further comprising the steps of: if the new memory region does already exist in the memory log record, determining if the new memory region has changed; and if the new memory region has changed, writing the new memory region to the memory log record.
Claim 26
Dependent Claim 145 words
An information handling system, comprising: one or more processors; memory means for storing instructions and data for use by the processors; one or more images of an operating system for controlling the operation of the processors; an input/output system for communicating information to and from peripheral devices; at least one system bus connecting the elements of the system for efficient operation; a virtual machine layer between an operating system and hardware of the information handling system, the virtual machine layer including means for shadowing an identified machine register during processor transition states, wherein said means for shadowing further includes: means for reading a next instruction address of a next instruction to be executed; means for executing the instruction; means for decoding the next instruction; and means for emulating the instruction in software; and reporting means for providing processor transition state information to a requesting process.
Claim 27
Dependent Claim 145 words
An information handling system, comprising: one or more processors; memory means for storing instructions and data for use by the processors; one or more images of an operating system for controlling the operation of the processors; an input/output system for communicating information to and from peripheral devices; at least one system bus connecting the elements of the system for efficient operation; a virtual machine layer between an operating system and hardware of the information handling system, the virtual machine layer including means for shadowing an identified machine register during processor transition states, wherein said means for shadowing further includes: means for reading a next instruction address of a next instruction to be executed; means for executing the instruction; means for decoding the next instruction; and means for emulating the instruction in software; and reporting means for providing processor transition state information to a requesting process.
Claim 28
Dependent Claim 55 words
An information handling system according to claim 22, further comprising: means for determining if the next instruction address crosses a memory boundary into a new memory region; means for determining if the new memory region already exists in a memory log record; and means for writing the new memory region to the memory log record.
Claim 29
Dependent Claim 20 words
An information handling system according to claim 23, further comprising: means for determining if the new memory region has changed.

References Cited (Backward Citations)

US4205370A Cited
US5073968A Cited
JPH03280134A Cited
US5701486A Cited
US5454086A Cited
US5671402A Cited
US5446876A Cited
US5560013A Cited
US5574937A Cited

USPTO Annuity & Maintenance Windows

Annuity Stage Window Opens Payment Deadline Surcharge Period Until Estimated Fee Status
3.5 Years (Year 4) 2002-08-16 2003-02-15 2003-08-17 $2000.00 Window Closed / Lapsed
7.5 Years (Year 8) 2006-08-16 2007-02-15 2007-08-17 $3760.00 Window Closed / Lapsed
11.5 Years (Year 12) 2010-08-16 2011-02-15 2011-08-17 $7700.00 Window Closed / Lapsed

Assigned Categories & Tags

No categories assigned to this patent yet.

Assign Category Tag