Method and apparatus for profiling computer program execution
AssigneeInternational Business Machines Corporation
InventorsErik R. Altman, Kemal Ebcioglu, Michael Karl Gschwind, Sumedh Sathaye
Life of this patent
Estimating the term…
Abstract
According to a first aspect of the invention there is provided a method for profiling computer program executions in a computer processing system having a processor and a memory hierarchy. The method includes the step of executing a computer program. Profile counts are stored in a memory array for events associated with the execution of the computer program. The memory array is separate and distinct from the memory hierarchy so as to not perturb normal operations of the memory hierarchy.
Claims35
A method for profiling executions of a plurality of computer programs in a computer processing system having a processor for executing the plurality of computer programs, the processor including a profile matrix controller, a memory hierarchy for aiding in execution of the programs, and a profile matrix that is operatively coupled to the processor via the profile matrix, and that is separate and independent from the memory hierarchy for aiding in the profiling of the computer programs and the processor, the method comprising the steps of:
- executing, by the processor, each of the computer programs to generate an event identifier (EID) for each program, the EID comprising an index and a tag of a profiled event of the computer program;
- sending the EIDs from the CPU to the profile matrix;
- accessing, for each EID, an element of the profile matrix using the index and comparing a part of the element with the tag to determine whether a profile count exists for the profiled event;
- updating, for each EID, the profile count if it exists or creating a new profile count in the profile matrix for the profiled event otherwise;
- and
- optimizing the computer program, based upon the profile counts.
A method for profiling execution of a plurality of computer programs in a computer processing system having a processor for executing the plurality of computer programs, the processor including a profile matrix controller, a memory hierarchy and a profile matrix that is operatively coupled to the processor via the profile matrix, and that is separate and independent from the memory hierarchy and the processor, the method comprising the steps of:
- executing, by the processor, the computer programs to generate an event identifier (EID) for each program, the EID comprising an index to access an element of the profile matrix and a tag to determine whether the element corresponds to a profile count of the profile matrix;
- storing, in the profile matrix, a plurality of event-specific profile counts using the EIDs, each count associated with a profiled event associated with an execution path of the corresponding computer program;
- selecting at least one of the plurality of event-specific profile counts for profiling the path of one of the computer programs;
- and
- if at least one of the selected event-specific profile counts has exceeded a predefined threshold, optimizing the portions of the computer program associated with the event-specific profile counts.
A system for profiling computer program execution, the system comprising:
- a central processing unit (CPU) for executing computer programs, the CPU including a profile matrix controller;
- a main memory;
- a cache hierarchy operatively coupled to the CPU and the main memory;
- and
- a profile matrix operatively coupled to the CPU via the profile matrix controller, the profile matrix including storage for profile counts of events for each of a plurality of the computer programs designated for profiling,
- wherein the profile matrix controller is configured to receive an event identifier (EID) of the events associated with one of the profiled computer programs and an associated profile value from the CPU in response to an occurrence of the profiled event in the CPU and output the EID and the profile value to the profile matrix to update the associated profile count within the profile matrix,
- wherein the profile matrix is separate and independent from the cache hierarchy, the main memory, and the CPU, and
- wherein the EID includes an index to address an element of the profile matrix and a tag to indicate whether a profile count for the EID is present within the profile matrix.
Dependencies are inferred from the claim text.