Profiling method and computer product

Information

  • Patent Application
  • 20070234298
  • Publication Number
    20070234298
  • Date Filed
    July 27, 2006
    18 years ago
  • Date Published
    October 04, 2007
    17 years ago
Abstract
Information on an execution status of an information-collection target program is collected with an interrupt handler that is activated by an interrupt generated when a predetermined condition is satisfied. A target range for collecting the information with the interrupt handler is specified, and information to be collected by the interrupt handler when the interrupt is generated within the specified target range is set.
Description

BRIEF DESCRIPTION OF THE DRAWINGS


FIG. 1 is a schematic of a profiling system according to a first embodiment of the present invention;



FIG. 2 is an example of a flag-management table;



FIG. 3 is an example of an interrupt-handler-record table;



FIG. 4 is a flowchart of a process procedure performed by the profiling system according to the first embodiment;



FIG. 5 is a schematic for illustrating an example of an operation of a profiling program according to the first embodiment;



FIG. 6 is a schematic of a profiling system according to a second embodiment of the present invention;



FIG. 7 is an example of a transition-management table;



FIG. 8 is a schematic for illustrating an example of an operation of a profiling program according to the second embodiment;



FIG. 9 is a block diagram of a computer that executes a profiling program according to the present invention; and



FIGS. 10A and 10B are schematics for illustrating a conventional profiling method.


Claims
  • 1. A computer-readable recording medium that stores therein a computer program for collecting information on an execution status of an information-collection target program with an interrupt handler that is activated by an interrupt generated when a predetermined condition is satisfied, wherein the computer program causes a computer to execute: specifying a target range for collecting the information with the interrupt handler; andsetting information to be collected by the interrupt handler when the interrupt is generated within the target range specified at the specifying.
  • 2. The computer-readable recording medium according to claim 1, wherein the computer program further causes the computer to execute: initial processing including requesting an operating system for setting of the predetermined condition and registering of the interrupt handler.
  • 3. The computer-readable recording medium according to claim 1, wherein the computer program further causes the computer to execute: function replacing including detecting a function call transited to the target range from the information-collection target program;replacing the function call detected at the detecting with a call for the setting; andrecording information on an execution transition by the function call, andthe setting includes setting a part of the information on the execution transition recorded at the recording as the information to be collected.
  • 4. The computer-readable recording medium according to claim 3, wherein the recording includes recording a transition identifier for identifying each transition as the part of the information on the execution transition, andthe setting includes setting the transition identifier recorded at the recording as the information to be collected.
  • 5. The computer-readable recording medium according to claim 3, wherein the recording includes recording information including a transition source address and a transition destination address as the information on the execution transition.
  • 6. The computer-readable recording medium according to claim 3, wherein the detecting includes detecting the function call based on a specified number of stages of function calls until a transition to the target range is completed.
  • 7. The computer-readable recording medium according to claim 1, wherein the information set at the setting is collected with an execution address at a time when the interrupt is generated.
  • 8. The computer-readable recording medium according to claim 1, wherein the specifying includes specifying the target range based on a function name.
  • 9. The computer-readable recording medium according to claim 1, wherein the information set at the setting is formed with a plurality of values, andthe interrupt handler collects the values.
  • 10. The computer-readable recording medium according to claim 1, wherein the specifying and the setting are performed by a library function called from the information-collection target program by an application program interface.
  • 11. A profiling method of collecting information on an execution status of an information-collection target program with an interrupt handler that is activated by an interrupt generated when a predetermined condition is satisfied, the method comprising: specifying a target range for collecting the information with the interrupt handler; andsetting information to be collected by the interrupt handler when the interrupt is generated within the target range specified at the specifying.
  • 12. The profiling method according to claim 11, further comprising: initial processing including requesting an operating system for setting of the predetermined condition and registering of the interrupt handler.
  • 13. The profiling method according to claim 11, further comprising: function replacing including detecting a function call transited to the target range from the information-collection target program;replacing the function call detected at the detecting with a call for the setting; andrecording information on an execution transition by the function call, whereinthe setting includes setting a part of the information on the execution transition recorded at the recording as the information to be collected.
  • 14. The profiling method according to claim 13, wherein the recording includes recording a transition identifier for identifying each transition as the part of the information on the execution transition, andthe setting includes setting the transition identifier recorded at the recording as the information to be collected.
  • 15. The profiling method according to claim 13, wherein the recording includes recording information including a transition source address and a transition destination address as the information on the execution transition.
  • 16. The profiling method according to claim 13, wherein the detecting includes detecting the function call based on a specified number of stages of function calls until a transition to the target range is completed.
  • 17. The profiling method according to claim 11, wherein the information set at the setting is collected with an execution address at a time when the interrupt is generated.
  • 18. The profiling method according to claim 11, wherein the specifying includes specifying the target range based on a function name.
  • 19. The profiling method according to claim 11, wherein the information set at the setting is formed with a plurality of values, andthe interrupt handler collects the values.
  • 20. The profiling method according to claim 11, wherein the specifying and the setting are performed by a library function called from the information-collection target program by an application program interface.
Priority Claims (1)
Number Date Country Kind
2006-099350 Mar 2006 JP national