Claims
- 1. A method in a data processing system for instrumenting a target program comprising routines running in the data processing system, the method comprising the steps of:
indicating a routine in the target program as a root routine to profile; identifying a transitive closure of routines called by the root routine; and adding profiling code into at least one routine in the transitive closure of routines.
- 2. The method according to claim 1, wherein:
the step of identifying a transitive closure includes the steps of identifying the routines of the target program called directly by the root routine and wherein the step of adding profiling code comprises the step of adding profiling code into the routines called directly by the root routine.
- 3. The method according to claim 1, wherein:
the step of identifying a transitive closure includes the steps of identifying the routines of the target program called transitively by the root routine and wherein the step of adding profiling code comprises the step of adding profiling code into the routines called transitively by the root routine.
- 4. The method according to claim 1, wherein the step of adding profiling code comprises the step of adding execution time measurement code into at least one routine in the transitive closure of routines.
- 5. The method according to claim 1, wherein the step of adding profiling code comprises the step of statically adding profiling code into the target program.
- 6. The method according to claim 1, wherein the step of adding profiling code comprises the step of dynamically adding profiling code into the target program.
- 7. The method according to claim 1, further comprising the step of executing the target program and collecting profiling measurements.
- 8. A computer-readable medium containing instructions that cause a data processing system to perform a method for instrumenting of a target program comprising routines running in the data processing system, the method comprising the steps of:
indicating a routine in the target program as a root routine to profile; identifying a first portion of the target program called directly by the root routine; identifying a second portion of the target program called transitively by the root routine; and adding profiling code into the first portion and second portion of the target program.
- 9. The computer-readable medium of claim 8, wherein the steps of identifying a first portion and a second portion comprise the step of identifying a transitive closure of routines in the target program called by the root routine.
- 10. The computer-readable medium of claim 9, wherein the step of adding profiling code comprises the step of adding profiling code into each routine in the transitive closure of routines.
- 11. The computer-readable medium of claim 8, wherein the step of adding profiling code comprises the step of adding execution time measurement code into the target program.
- 12. The computer-readable medium of claim 8, wherein adding further comprises adding profiling flag code in the root routine.
- 13. A data processing system comprising:
a memory comprising a profiling program for indicating a root routine to profile, identifying a transitive closure of routines called by the root routine, and adding profiling code to at least one routine in the transitive closure of routines; and a processor that runs the profiling program.
- 14. The data processing system of claim 13, wherein the transitive closure of routines includes first routines called directly by the root routine and second routines called transitively by the root routine.
- 15. The data processing system of claim 13, wherien the profiling code comprises execution time measurement code.
- 16. The data processing system of claim 13, wherein the profiling program adds profiling code into each routine in the transitive closure of routines
- 17. The data processing system of claim 13, wherien the profiling program dynamically adds the profiling code.
- 18. The data processing system of claim 13, wherein the profiling program statically adds the profiling code.
- 19. A computer-readable memory device encoded with a data structure created by a profiling program that is encoded in the computer-readable memory device and that is run by a processor in a data processing system, the data structure comprising profiling fields for at least one routine in a transitive closure of routines called by a root routine of a target program, each profiling field comprising:
a profiling measurement field for a routine in the transitive closure of routines, wherein the profiling program accesses the data structure to store a profiling measurement in the profiling measurement field to collect profiling data on the routine.
- 20. A data processing system comprising:
means for selecting a root routine in a target program to profile; means for identifying a transitive closure of routines called by the root routine; and means for adding profiling code into at least a portion of the transitive closure of routines of the target program.
- 21. A method in a data processing system for code based instrumentation of a target program running in the data processing system, the method comprising the steps of:
selecting a root routine in a target program to profile; identifying a transitive closure of routines called by the root routine; creating a data structure in memory, the data structure comprising profiling fields for storing profiling measurements for at least a portion of the transitive closure of routines; adding profiling code into each routine in the transitive closure of routines; and during execution of the target program,
collecting profiling measurements obtained with the profiling code; and storing the profiling measurements in the data structure.
- 22. The method according to claim 22, wherein:
the step of adding profiling code comprises the step of adding execution time measurement profiling code.
- 23. The method according to claim 22, wherein the step of adding profiling code comprises the step of statically adding profiling code.
- 24. The method according to claim 22, wherein the step of adding profiling code comprises the step of dynamically adding profiling code.
CROSS-REFERENCE TO RELATED APPLICATIONS
[0001] This application claims the benefit of, and incorporates by reference in its entirety, Provisional Application Ser. No. 60/365,631 titled “Methods And Systems For Reducing Performance Overhead Of Code Instrumentation Based Profiling”, filed Mar. 19, 2002.
Provisional Applications (1)
|
Number |
Date |
Country |
|
60365631 |
Mar 2002 |
US |