PROFILING APPARATUS AND PROFILING PROGRAM
A profiling apparatus including a program execution section that executes an target program, an interrupt generation section that generates an interruption every predetermined time, a gathering section that is activated upon occurrence of the interruption to gather a data access destination in the target program and a number of interruptions at the data access destination, and a display section that displays information gathered by the gathering section.
1 . A profiling apparatus comprising:
a program execution section executing an target program;
an interrupt generation section generating an interruption every predetermined time;
a gathering section activated upon occurrence of the interruption to gather a data access destination in the target program and a number of interruptions at the data access destination; and
a display section displaying information gathered by the gathering section.
2 . The profiling apparatus according to claim 1 , wherein the gathering section acquires a program counter where the interruption has occurred, and determines a machine language of the acquired program counter to gather the data access destination.
3 . The profiling apparatus according to claim 2 , wherein the gathering section gathers the data access destination when a type of the machine language of the acquired program counter is a load instruction or a store instruction.
4 . The profiling apparatus according to claim 1 , wherein upon occurrence of the interruption, the gathering section gathers the data access destination by referring to a register at a time of occurrence of the interruption.
5 . The profiling apparatus according to claim 1 , wherein in case where the profiling apparatus has an operating system, upon occurrence of the interruption, the gathering section gathers the data access destination by referring to an area saved in an internal area of the operating system.
6 . The profiling apparatus according to claim 1 , further comprising display data creating section that calculates a data definition position corresponding to the data access destination and creates display data for displaying the calculated data definition position on the display section in comparison with the number of interruptions.
7 . The profiling apparatus according to claim 1 , wherein the gathering section acquires a program counter where the interruption has occurred, and
the profiling apparatus further comprises display data creating section that calculates a program definition position comprised of granularity units of a corresponding function, process and assembler instruction from the acquired program counter, and creates display data for displaying the calculated program definition position on the display section together with the data access destination and the number of interruptions in comparison therewith.
8 . The profiling apparatus according to claim 1 , wherein the gathering section gathers differential information between a previous access time and a current access time for the same data access destination, and
the profiling apparatus further comprises display data creating section that calculates a data definition position corresponding to the data access destination and creates display data for displaying the calculated data definition position on the display section together with the gathered differential information in comparison therewith.
9 . The profiling apparatus according to claim 1 , wherein the interrupt generation section generates the interruption, triggered by occurrence of an arbitrary event of a hardware counter.
10 . A profiling program that allows a computer to function as:
a program execution section that executes an target program;
an interrupt generation section that generates an interruption every predetermined time;
a gathering section that is activated upon occurrence of the interruption to gather a data access destination in the target program and a number of interruptions at the data access destination; and
a display section that displays information gathered by the gathering section.
11 . A profiling method comprising:
executing an target program;
generating an interruption every predetermined time;
gathering a data access destination in the target program upon occurrence of the interruption and a number of interruptions at the data access destination; and
displaying information gathered by the gathering section.