← Back to Patent Explorer
EP0501076A2 Expired / Lapsed EP ⏱️ 0.0 years remaining

System and method for computer system profiling

Assignee: International Business Machines Corp
•
Filing: 1991-12-20
•
Granted: —
•
Expires: 2011-12-20
📄 Original PDF 🌐 Google Patents 🔄 Sync Now

Abstract

Abstract The invention disclosed herein is a system and method for comprehensive, non-invasive profiling of a processor whereby feedback is provided to a programmer of the execution dynamics of a program. In a preferred embodiment a partial real-time reduction (40) is provided of selected trace events employing the environment's trace facility, and a post-processing function (42) is then performed. A trace hook is provided in the environment's periodic clock routine which captures the address to be returned to following this timer's interrupt, and further captures the address of the caller of the routine represented by the first address. The frequency of occurrences of the first address is collected and correlated (39) to various virtual address spaces and corresponding subroutine offsets within those virtual address spaces. By employing the assembly and source code listing of programs, the address frequencies are then correlated back to specific instructions (49), and from information in the assembly listing accumulated time is further correlated against specific lines of source code. A profile is generated (55) indicating the amount of time spent by the processor in various processes, kernel, shared library, and user spaces, and subroutines correlated to the lines of source code for negligible additional processor run time.

Inventors

  • 👤 Thomas Walter Keller
  • 👤 Robert John Urquhart

Bibliographic Details

Application Number —
Jurisdiction EP
Data Source google_patents
Last Synchronized 2026-11-04 07:27
CPC Classifications
G; G06; G06F; G06F11/00; G06F11/30; G06F11/34; G06F11/3409; G06F11/3419; G06F11/3466; G06F2201/00; G06F2201/815; G06F2201/86; G06F2201/865; G06F2201/88

Claims Analysis

Total Claims: 29
Claim 1
Independent Claim 72 words
A method of profiling code being executed in a computer system having a processor and a program counter for registering addresses for instructions executed by said processor generated by said code, said method comprising: sampling said addresses from said program counter corresponding to said instructions; generating a frequency count of said sampled addresses; and deriving from said count indications of time spent by said processor executing said instructions corresponding to said addresses.
Claim 2
Dependent Claim 15 words
The method of Claim 1 wherein said addresses are sampled for substantially all said instructions.
Claim 3
Dependent Claim 20 words
The method of Claim 1 or 2 wherein said indications are measurements of time spent executing components of said code.
Claim 4
Dependent Claim 18 words
The method of Claim 3 wherein each of said components is a different process implemented by said code.
Claim 5
Dependent Claim 22 words
The method of Claim 3 or 4 wherein each of said components is a routine in a process implemented by said code.
Claim 6
Dependent Claim 19 words
The method of Claim 3 wherein each of said components corresponds to a source program statement of said code.
Claim 7
Dependent Claim 18 words
The method of Claim 3 wherein each of said components corresponds to an assembly statement of said code.
Claim 8
Independent Claim 39 words
The method of any preceding Claim wherein said step of generating said frequency counts includes maintaining a count memory space for registering said counts wherein said space has a magnitude functionally related to counts occurring in a profiling interval.
Claim 9
Dependent Claim 81 words
A computer system for executing code having a processor and a program counter for registering addresses for instructions executed by said processor generated by said code, and comprising a means for profiling said code for said environment comprising: means for sampling said addresses from said program counter corresponding to said instructions; means for generating a frequency count of said sampled addresses; and means for deriving from said count indications of time spent by said processor executing instructions corresponding to said addresses.
Claim 10
Dependent Claim 16 words
The computer system of Claim 9 wherein said addresses are samples for substantially all said instructions.
Claim 11
Dependent Claim 21 words
The computer system of Claim 9 or 10 wherein said indications are measurements of time spent executing components of said code.
Claim 12
Dependent Claim 19 words
The computer system of Claim 11 wherein each of said components is a different process implemented by said code.
Claim 13
Dependent Claim 23 words
The computer system of Claim 11 or 12 wherein each of said components is a routine in a process implemented by said code.
Claim 14
Dependent Claim 20 words
The computer system of Claim 11 wherein each of said components corresponds to a source program statement of said code.
Claim 15
Dependent Claim 19 words
The computer system of Claim 11 wherein each of said components corresponds to an assembly statement of said code.
Claim 16
Independent Claim 44 words
The system of any of Claims 9 to 15 wherein said means for generating said frequency count includes means for maintaining a count memory space for registering said counts wherein said space has a magnitude functionally related to counts occurring in a profiling interval.
Claim 17
Dependent Claim 48 words
In a computer system for execution of program code implementing a plurality of processes, a method for profiling all of said processes, comprising: capturing all data for said profiling during a single run-time execution of said code; and generating said profiling as a function of said captured data.
Claim 18
Dependent Claim 39 words
The method of Claim 17 wherein said capturing step comprises: generating state information comprised of a plurality of 〈PID, SID, PCN〉 tuples for each of a different one of said plurality of processes during said execution of said code.
Claim 19
Dependent Claim 27 words
The method of Claim 18 wherein said step of generating profiling includes: correlating a cumulative count of identical said tuples to a corresponding address in said system.
Claim 20
Dependent Claim 80 words
For multiple process program code executing in a computer environment, a method for profiling said code having a run-time and post-processing interval, comprising: generating a first user-specified global command during said run-time interval indicating profiling of all of said multiple processes; generating a second user-specified global command during said post-processing interval indicating said profiling of all of said multiple processes; and deriving said profiling of all of said multiple processes in response to said first and said second global commands.
Claim 21
Dependent Claim 62 words
In a computer system executing multiple processes, a method for profiling program executing in said system, comprising: generating an indication of profiles to be executed; capturing data for said profiles during a single run-time execution; thereafter generating an indication of detailed sub-process level profiling to be executed; and generating said detailed sub-process level profiling in a post-processing interval from said captured data.
Claim 22
Dependent Claim 35 words
The method of Claim 21 further including the step of recompiling said code to generate an assembly listing; and wherein said step of said detailed sub-process level profiling is also generated from said assembly listing.
Claim 23
Dependent Claim 31 words
The method of Claim 22 wherein said sub-process profiling comprises at least one profile from a group comprised of: a routine profile, a source statement profile, or an assembly statement profile.
Claim 24
Dependent Claim 48 words
In a computer system for executing program code, a method for profiling said code comprising: non-invasively compiling said code to generate executable code; running said executable code; collecting profiling data during said running of said executable code; and generating a profile as a function of said collected data.
Claim 25
Dependent Claim 176 words
In a computer system having an operating system kernel in a process executing multiple processes, a method for use during execution of said multiple processes in profiling said multiple processes, comprising: establishing a trace hook mechanism in a periodic clock routine of said operating system kernel; establishing additional trace hook mechanisms in the said operating system kernel sufficient to initialize and maintain process identity, name, and current running process correspondences; generating trace events in response to said trace hook and additional trace hook mechanisms at predetermined time intervals; generating trace events in response to changes in process state at their times of occurrence of said changes; creating and maintaining a trace buffer as a function of said trace events comprised of: a plurality of fields of program counter hook data, each corresponding to each unique instance of 〈current executing process identity, program counter value〉 tuples and a count of the number of repetitions of each said unique instance; a plurality of fields maintaining correspondences between process names, identities, and said fields of program counter hook data.
Claim 26
Dependent Claim 27 words
The method of Claim 25 further comprising in a postprocessing interval the steps of: generating correlations of program counter frequency counts to a plurality of programming constructs.
Claim 27
Dependent Claim 27 words
The method of Claim 26 wherein said constructs comprise at least one from a group of: process; space identity; routine; source line of code; and assembly instruction.
Claim 28
Dependent Claim 61 words
In a system for executing a program which has been compiled to produce executables for execution on said system for non-profiling purposes, a method for profiling said system comprising: executing said executables on said system; collecting profiling data during said executing of said executables on said system; and generating a profiling of said executables as a function of said collected data.
Claim 29
Dependent Claim 28 words
The method of Claim 28 wherein said executables for which said profiling is generated are unmodified from said executables for executing on said system for said non-profiling purpose.

References Cited (Backward Citations)

No citation records indexed.

USPTO Annuity & Maintenance Windows

Maintenance schedule is calculated for granted US utility patents.

Assigned Categories & Tags

No categories assigned to this patent yet.

Assign Category Tag