JP2000112782A - Performance measurement device, storage medium recording performance measurement program and performance measurement method - Google Patents

Performance measurement device, storage medium recording performance measurement program and performance measurement method

Info

Publication number
JP2000112782A
JP2000112782A JP10285108A JP28510898A JP2000112782A JP 2000112782 A JP2000112782 A JP 2000112782A JP 10285108 A JP10285108 A JP 10285108A JP 28510898 A JP28510898 A JP 28510898A JP 2000112782 A JP2000112782 A JP 2000112782A
Authority
JP
Japan
Prior art keywords
program
performance measurement
performance
register
register window
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP10285108A
Other languages
Japanese (ja)
Other versions
JP3941848B2 (en
Inventor
Hiroyuki Agata
博之 縣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP28510898A priority Critical patent/JP3941848B2/en
Publication of JP2000112782A publication Critical patent/JP2000112782A/en
Application granted granted Critical
Publication of JP3941848B2 publication Critical patent/JP3941848B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PROBLEM TO BE SOLVED: To efficiently sample performance data of a program including a running program with interruption prohibited. SOLUTION: A register window 1 is the one for performing switch of a register group by calling and recovering a program. When a performance measurement start instruction is inputted, a performance measurement start processing means 2 changes environments of the register window 1 so that a trap is generated whenever calling of the program and recovery occur. A performance measurement information sampling means 3 executes a measurement object program 4 by the environments of the register window 1 which the performance measurement start processing means 2 sets, and samples performance measurement information 5 with generation of a trap as an opportunity. A performance measurement completion processing means 6 returns the environments of the register window 1 to the one before performance measurement start when execution of the program by the performance measurement information sampling means 3 is completed.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明はソフトウェアの性能
測定装置、性能測定プログラムを記録したコンピュータ
読み取り可能な記録媒体及び性能測定方法に関し、特に
レジスタウィンドウを備えたCPU(Central Processin
g Unit) を利用したソフトウェアの性能測定装置、性能
測定プログラムを記録したコンピュータ読み取り可能な
記録媒体及び性能測定方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a software performance measuring device, a computer readable recording medium storing a performance measuring program, and a performance measuring method, and more particularly to a CPU (Central Processin) having a register window.
g unit), a computer-readable recording medium storing a performance measurement program, and a performance measurement method.

【0002】[0002]

【従来の技術】ソフトウェアの開発段階では、少しでも
高速処理が可能なアルゴリズムでプログラムを組む必要
がある。そこで、完成したプログラムの性能を測定する
技術が必要となる。プログラムの性能を測定するには、
そのプログラム中の特定の処理を実行するのに、命令が
何ステップ実行されたのか(機械語の命令がいくつ実行
したのか)をカウントすればよい。
2. Description of the Related Art In the development stage of software, it is necessary to form a program with an algorithm which can perform a high-speed processing even a little. Therefore, a technique for measuring the performance of the completed program is required. To measure program performance,
What is necessary is just to count how many steps the instruction is executed (how many machine language instructions are executed) to execute a specific process in the program.

【0003】レジスタウィンドウを備えたCPUでは、
レジスタウィンドウを利用することで、ステップ数のカ
ウントを行うことができる。以下、SPARC architecture
Version9 に準拠したレジスタウィンドウについて説明
する。
In a CPU having a register window,
By using the register window, the number of steps can be counted. Below, SPARC architecture
The register window conforming to Version 9 is described.

【0004】図10は、レジスタウィンドウの利用例を
示す図である。レジスタウィンドウを用いたアーキテク
チャでは、CPU内のレジスタウィンドウを16個のレ
ジスタ集合に分ける。各レジスタ集合には、8個のレジ
スタが含まれる。レジスタウィンドウは、実行されるプ
ログラムから使用可能なレジスタ群を管理するのに用い
られる。ここでは、8個のレジスタウィンドウW0〜W
7が設けられている。
FIG. 10 is a diagram showing an example of using a register window. In the architecture using the register window, the register window in the CPU is divided into 16 register sets. Each register set includes eight registers. The register window is used to manage a group of registers available from a program to be executed. Here, eight register windows W0 to W
7 are provided.

【0005】各レジスタウィンドウは3つのレジスタ集
合に対応している。レジスタウィンドウに対応するレジ
スタ群は、「イン」、「ローカル」、「アウト」の3種
類の用途に分けられる。このとき、隣接するレジスタウ
ィンドウの「アウト」と「イン」とは、同じレジスタ集
合を共有する。「イン」のレジスタは、呼び出し元のプ
ログラムから受け取るべき値が格納されるレジスタであ
る。「ローカル」のレジスタは、そのプログラム内での
み使用する値を格納するレジスタである。「アウト」の
レジスタは、呼び出すプログラムへ渡すべき値を格納す
るレジスタである。実行中のプログラムが使用するレジ
スタ群は、カレントウィンドウポインタ(CWP)によ
って決定される。
Each register window corresponds to three register sets. The register group corresponding to the register window is divided into three types of uses: “in”, “local”, and “out”. At this time, “out” and “in” of adjacent register windows share the same register set. The “in” register is a register in which a value to be received from the calling program is stored. The “local” register is a register that stores a value used only in the program. The “out” register is a register that stores a value to be passed to the calling program. The registers used by the program being executed are determined by the current window pointer (CWP).

【0006】なお、レジスタウィンドウにはOTHER
WINの領域が設定されており、この領域は、実行中の
プログラムが使用するためのレジスタ群として用いるこ
とができない。
[0006] In the register window, OTHER is displayed.
A WIN area is set, and this area cannot be used as a group of registers for use by a program being executed.

【0007】また、ほとんどのプログラムの呼び出しで
は、SAVE命令またはRESTORE命令を使用して
レジスタウィンドウを切り換え、プログラムの遷移を行
っている。SAVE命令の場合、レジスタウィンドウは
「W0→W1→W2→W3→W4→W5→W6→W7」
という順番で遷移する。また、RESTORE命令の場
合、逆に「W7→W6→W5→W4→W3→W2→W1
→W0」という順番で遷移する。
[0007] In most program calls, the register window is switched using a SAVE instruction or a RESTORE instruction, and the program transitions. In the case of the SAVE instruction, the register window is “W0 → W1 → W2 → W3 → W4 → W5 → W6 → W7”
It changes in the order of. On the other hand, in the case of the RESTORE instruction, conversely, “W7 → W6 → W5 → W4 → W3 → W2 → W1
→ W0 ”.

【0008】レジスタウィンドウには、CANSAVE
とCANRESTOREという2つのパラメータがあ
る。CANSAVEは、トラップを発生せずに何回のS
AVE命令を実行できるのかを示す値である。また、C
ANRESTOREは、トラップを発生させずに何回の
RESTORE命令が実行できるのかを示す値である。
In the register window, CANSAVE
And CANRESTORE. CANSAVE is a function of the number of S
This is a value indicating whether the AVE instruction can be executed. Also, C
ANRESTORE is a value indicating how many times a RESTORE instruction can be executed without generating a trap.

【0009】あるプログラムを実行中に別のプログラム
が呼び出される場合、呼び出し元のプログラムが、自己
のレジスタウィンドウのアウトレジスタに引数を設定
し、その後、プログラムの呼び出し処理を行う。する
と、呼び出されたプログラムがSAVE命令を発行す
る。これにより、レジスタウィンドウがSAVE方向に
切り換えられる。すなわち、CWPがSEVA方向に1
つ変更され、CANSAVEがデクリメントされ、さら
にCANRESTOREがインクリメントされる。そし
て、呼び出されたプログラムは、インレジスタより引数
を受け取り、プログラムに記述された処理を実行する。
When another program is called while a certain program is being executed, the calling program sets an argument in an out register of its own register window, and then performs a process of calling the program. Then, the called program issues a SAVE instruction. As a result, the register window is switched in the SAVE direction. That is, CWP is 1 in the SEVA direction.
Is changed, CANSAVE is decremented, and CANRESTORE is incremented. Then, the called program receives the argument from the in-register and executes the processing described in the program.

【0010】また、呼び出されたプログラムから呼び出
し元のプログラムに復帰する場合、インレジスタに復帰
値を設定し、RESTORE命令を発行する。これによ
り、レジスタウィンドウがRESTORE方向に切り換
えられる。すなわち、CWPがRESTORE方向に1
つ変更され、CANSAVEがインクリメントされ、さ
らに、CANRESTOREがデクリメントされる。復
帰先のプログラムは、アウトレジスタにより復帰情報を
受け取り、中断していた処理の続きを行う。
When returning from the called program to the calling program, a return value is set in the in-register and a RESTORE instruction is issued. As a result, the register window is switched in the RESTORE direction. That is, CWP becomes 1 in the RESTORE direction.
Is changed, CANSAVE is incremented, and CANRESTORE is further decremented. The return destination program receives the return information through the out register and continues the interrupted processing.

【0011】このようなレジスタウィンドウを用い、あ
るレジスタウィンドウの環境になってから、次にレジス
タウィンドウの切り換えが行われるまでの間に何ステッ
プ分の処理が行われたのかをトレースすれば、ソフトウ
ェアの部分的な性能を測定することができる。一般的
に、レジスタウィンドウの切り換えに際しては、トラッ
プが発生しないようにOS(Operating System)で制御さ
れている。そこで、従来は、プログラムが1ステップ実
行する度に割り込みを発生させ、この割り込み処理によ
って、プログラムカウンタをトレースし、スッテプ数や
その他の各種情報をトレースすることができる。
By using such a register window and tracing how many steps have been performed between the time when the environment of a certain register window is established and the time when the next register window is switched, the software Partial performance can be measured. Generally, when the register window is switched, it is controlled by an OS (Operating System) so that a trap does not occur. Therefore, conventionally, an interrupt is generated each time the program executes one step, and by this interrupt processing, the program counter can be traced, and the number of steps and other various information can be traced.

【0012】[0012]

【発明が解決しようとする課題】しかし、割り込みを発
生させることでトレースデータの収集を行うと、1ステ
ップを実行するのに通常処理の何倍もの時間がかかると
共に、トレースデータが多量となり、トレースデータを
格納するための記憶装置の容量が多量に必要になるとい
う問題点がある。
However, if trace data is collected by generating an interrupt, it takes many times longer than usual processing to execute one step, and the amount of trace data becomes large. There is a problem that a large capacity of a storage device for storing data is required.

【0013】また、すべての割り込みを禁止して走行す
るプログラムの性能データは、採取することができな
い。本発明はこのような点に鑑みなされたものであり、
割り込みを禁止して走行するプログラムも含め、プログ
ラムの性能データを効率よく採取できる性能測定装置を
提供することを目的とする。
Further, performance data of a program running with all interrupts disabled cannot be collected. The present invention has been made in view of such a point,
It is an object of the present invention to provide a performance measuring device capable of efficiently collecting performance data of a program, including a program that runs with interrupts prohibited.

【0014】また、本発明の別の目的は、割り込みを禁
止して走行するプログラムも含め、プログラムの性能デ
ータを効率よく採取するための性能測定プログラムを記
録したコンピュータ読み取り可能な記録媒体を提供する
ことである。
Another object of the present invention is to provide a computer-readable recording medium on which a performance measurement program for efficiently collecting performance data of a program, including a program running with interrupts disabled, is recorded. That is.

【0015】また、本発明の他の目的は、割り込みを禁
止して走行するプログラムも含め、プログラムの性能デ
ータを効率よく採取するための性能測定方法を提供する
ことである。
It is another object of the present invention to provide a performance measuring method for efficiently collecting performance data of a program, including a program running with interrupts disabled.

【0016】[0016]

【課題を解決するための手段】本発明では上記課題を解
決するために、任意のプログラムが動作するときに使用
するレジスタ群が複数個設けられ、プログラムの呼び出
し及び復帰の際に実行中のプログラムで使用可能なレジ
スタ群の切り換えが行われるレジスタウィンドウを備え
たプロセッサによってプログラムの性能を測定する性能
測定装置において、性能測定開始指令により、プログラ
ムの呼び出し及び復帰処理が発生した際にはトラップが
発生するようにレジスタウィンドウの環境を変更する性
能測定開始処理手段と、前記性能測定開始処理手段が設
定した前記レジスタウィンドウの環境により測定対象プ
ログラムを実行し、トラップの発生を契機として性能測
定情報を採取する性能測定情報採取手段と、を有するこ
とを特徴とする性能測定装置が提供される。
According to the present invention, in order to solve the above-mentioned problems, a plurality of registers for use when an arbitrary program operates are provided, and a program being executed at the time of calling and returning the program is provided. In a performance measurement device that measures the performance of a program using a processor that has a register window that switches the group of registers that can be used in the program, a trap is generated when a program call and return processing occurs due to a performance measurement start command. Performance measurement start processing means for changing the environment of the register window so as to execute the program to be measured according to the environment of the register window set by the performance measurement start processing means, and collect performance measurement information upon occurrence of a trap. Means for collecting performance measurement information that performs Measuring device is provided.

【0017】このような性能測定装置によれば、性能測
定開始指令が入力されると、性能測定開始処理手段によ
り、プログラムの呼び出し及び復帰処理が発生した際に
はトラップが発生するように、レジスタウィンドウの環
境が変更される。その後、性能測定情報採取手段によ
り、性能測定開始処理手段が設定したレジスタウィンド
ウの環境により測定対象プログラムが実行され、トラッ
プの発生を契機として性能測定情報が採取される。
According to such a performance measuring device, when the performance measurement start command is input, the performance measurement start processing means sets the register so that a trap is generated when a program call and a return process occur. The window environment changes. Thereafter, the performance measurement information collecting means executes the measurement target program in the environment of the register window set by the performance measurement start processing means, and collects the performance measurement information triggered by the occurrence of the trap.

【0018】また、上記課題を解決するために、任意の
プログラムが動作するときに使用するレジスタ群が複数
個設けられ、プログラムの呼び出し及び復帰の際に実行
中のプログラムで使用可能なレジスタ群の切り換えが行
われるレジスタウィンドウを備えたプロセッサによっ
て、プログラムの性能を測定するための性能測定プログ
ラムを記録したコンピュータ読み取り可能な記録媒体に
おいて、性能測定開始指令が入力されると、プログラム
の呼び出し及び復帰処理が発生した際にはトラップが発
生するようにレジスタウィンドウの環境を変更する性能
測定開始処理手段、前記性能測定開始処理手段が設定し
た前記レジスタウィンドウの環境により測定対象プログ
ラムを実行し、トラップの発生を契機として性能測定情
報を採取する性能測定情報採取手段、を有することを特
徴とする性能測定プログラムを記録したコンピュータ読
み取り可能な記録媒体が提供される。
In order to solve the above-mentioned problem, a plurality of register groups used when an arbitrary program operates are provided, and a register group usable in the program being executed at the time of calling and returning of the program is provided. When a performance measurement start command is input to a computer-readable recording medium on which a performance measurement program for measuring the performance of a program is recorded by a processor having a register window in which switching is performed, a program call and a return process are performed. When the error occurs, the performance measurement start processing means for changing the environment of the register window so that a trap is generated. The program to be measured is executed according to the environment of the register window set by the performance measurement start processing means. Performance information that collects performance measurement information Information collecting means, a computer-readable recording medium recording a performance measurement program and having a is provided.

【0019】このような記録媒体に記録された性能測定
プログラムをコンピュータで実行することにより、上記
本発明に係る性能測定装置の機能がコンピュータ上に構
築される。
By executing the performance measuring program recorded on such a recording medium by a computer, the functions of the performance measuring apparatus according to the present invention are constructed on the computer.

【0020】また、上記課題を解決するために、任意の
プログラムが動作するときに使用するレジスタ群が複数
個設けられ、プログラムの呼び出し及び復帰の際に実行
中のプログラムで使用可能なレジスタ群の切り換えが行
われるレジスタウィンドウを備えたプロセッサを用い
て、プログラムの性能を測定する性能測定方法におい
て、プログラムの呼び出し及び復帰処理が発生した際に
はトラップが発生するようにレジスタウィンドウの環境
を変更し、変更後の前記レジスタウィンドウの環境によ
り測定対象プログラムを実行し、トラップの発生を契機
として性能測定情報を採取する、ことを特徴とする性能
測定方法が提供される。
In order to solve the above-mentioned problem, a plurality of register groups used when an arbitrary program operates are provided, and a register group usable in the program being executed at the time of calling and returning of the program is provided. In a performance measurement method for measuring the performance of a program using a processor having a register window in which switching is performed, the environment of the register window is changed so that a trap is generated when a program call and a return process occur. And executing a program to be measured in accordance with the environment of the register window after the change, and collecting performance measurement information upon occurrence of a trap.

【0021】このような性能測定方法によれば、プログ
ラムの呼び出し及び復帰処理が発生した際にはトラップ
が発生するようなレジスタウィンドウの環境により、測
定対象プログラムを実行されるため、プログラムの呼び
出し及び復帰処理の度にトラップが発生する。そして、
トラップが発生することで、性能測定情報が採取され
る。
According to such a performance measuring method, the program to be measured is executed in an environment of the register window in which a trap is generated when a program call and a return process occur. A trap is generated each time return processing is performed. And
When a trap is generated, performance measurement information is collected.

【0022】[0022]

【発明の実施の形態】以下、本発明の実施の形態を図面
を参照して説明する。図1は、本発明の原理構成図であ
る。レジスタウィンドウ1は、プログラムの呼び出し、
復帰によりレジスタ群の切り換えを行うためのものであ
る。性能測定開始処理手段2は、性能測定開始指令が入
力されると、プログラムの呼び出し及び復帰が発生した
際には必ずトラップが発生するように、レジスタウィン
ドウ1の環境を変更する。性能測定情報採取手段3は、
性能測定開始処理手段2が設定したレジスタウィンドウ
1の環境により測定対象プログラム4を実行し、トラッ
プの発生を契機として性能測定情報5を採取する。性能
測定終了処理手段6は、性能測定情報採取手段3による
プログラムの実行が終了したら、レジスタウィンドウの
環境を性能測定開始前の状態に戻す。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a diagram illustrating the principle of the present invention. Register window 1 is a program call,
This is for switching the register group by return. When the performance measurement start command is input, the performance measurement start processing means 2 changes the environment of the register window 1 so that a trap is generated whenever a program is called or returned. The performance measurement information collecting means 3
The measurement target program 4 is executed according to the environment of the register window 1 set by the performance measurement start processing means 2, and the performance measurement information 5 is collected when a trap is generated. When the execution of the program by the performance measurement information collecting means 3 ends, the performance measurement end processing means 6 returns the environment of the register window to the state before the start of the performance measurement.

【0023】このような性能測定装置によれば、性能測
定開始指令が入力されると、性能測定開始処理手段2に
よって、プログラムの呼び出し及び復帰が発生した際に
は必ずトラップが発生するように、レジスタウィンドウ
1の環境が変更される。レジスタウィンドウに設定すべ
き環境の設定値は、具体的には、以下のようにして定め
られる。
According to such a performance measuring device, when a performance measurement start command is input, the performance measurement start processing means 2 causes a trap to be generated whenever a program is called and returned. The environment of the register window 1 is changed. The setting value of the environment to be set in the register window is specifically determined as follows.

【0024】レジスタウィンドウは、常に「CANSA
VE+CANRESTORE+OTHERWIN」の値
が、「レジスタウィンドウ数−2」になるように制御さ
れている。したがって、OTHERWINに設定すべき
値をメモりに退避しておき、レジスタウィンドウの環境
を作成する際には、そのメモリの値と、退避したレジス
タウィンドウの数を利用してレジスタウィンドウの環境
を作成する。つまり、退避したレジスタウィンドウの数
は、CANRESTOREに入るべき値である。そのた
め、8個のレジスタウィンドウを有する場合、「6−メ
モリの値−退避したレジスタウィンドウの個数」がCA
NSAVEに設定すべき値となる。したがって、ソフト
ウェアトラップのハンドラからトラップ発生元に復帰す
るときは、上記の式によりレジスタウィンドウの環境を
作成する。定常的にシステムが動作しているときには、
OTHERWINの値を0にしておき、性能測定を開始
したときには、OTHERWINの値を6にしておく。
The register window is always "CANSA
The value of “VE + CANRESTORE + OTHERWIN” is controlled to be “the number of register windows−2”. Therefore, the value to be set in OTHERWIN is saved in memory, and when creating the environment of the register window, the environment of the register window is created by using the memory value and the number of saved register windows. I do. That is, the number of saved register windows is a value that should be included in CANSTORE. Therefore, when there are eight register windows, “6-memory value−the number of saved register windows” is CA
This is the value to be set in NSAVE. Therefore, when returning from the software trap handler to the trap generation source, the environment of the register window is created by the above equation. When the system is operating regularly,
The value of OTHERWIN is set to 0, and when the performance measurement is started, the value of OTHERWIN is set to 6.

【0025】図2は、本発明による性能測定時のレジス
タウィンドウの状態を示す図である。このように、CA
NSAVEとCANRESTOREとの値が、共に0と
されている。また、この例ではCWPの値が2であり、
レジスタウィンドウW2が有効なレジスタ群である。
FIG. 2 is a diagram showing a state of a register window at the time of performance measurement according to the present invention. Thus, CA
The values of NSAVE and CANSTORE are both set to 0. Also, in this example, the value of CWP is 2,
The register window W2 is a valid register group.

【0026】このような環境において、性能測定情報採
取手段3によって測定対象プログラム4が実行される。
すると、プログラムの呼び出しや復帰がある度にレジス
タウィンドウの切り換えが必要となる。ところが、使用
可能なレジスタ群が1つしかないため、隣接したレジス
タ群へ切り換えが行われる際には、必ずトラップが発生
し、呼び出し元のレジスタ群をスタックに退避し、呼び
出し先のプログラムがレジスタウィンドウW3またはW
1を使用できるようにする。すると、トラップの発生を
契機として、性能測定情報採取手段3によって性能測定
情報5が採取される。すなわち、プログラムの呼び出し
や復帰の度に、性能測定情報5が採取される。
In such an environment, the performance measurement information collecting means 3 executes the program 4 to be measured.
Then, every time the program is called or returned, the register window needs to be switched. However, since there is only one available register group, a trap always occurs when switching to an adjacent register group is performed, the register group of the caller is saved on the stack, and the program of the callee registers the register. Window W3 or W
Make 1 available. Then, the performance measurement information collection unit 3 collects the performance measurement information 5 triggered by the occurrence of the trap. That is, the performance measurement information 5 is collected every time the program is called or restored.

【0027】性能測定情報採取手段3による測定対象プ
ログラム4の実行が終了すると、性能測定終了処理手段
6により、レジスタウィンドウ1の環境が性能測定開始
前の状態に戻される。以後は、通常通りにレジスタウィ
ンドウ1が利用される。すなわち、プログラムの呼び出
しや復帰があっても、一定回数以内であればトラップを
発生させずにレジスタウィンドウの切り換えが行われ
る。
When the execution of the measurement target program 4 by the performance measurement information collecting means 3 is completed, the performance measurement termination processing means 6 returns the environment of the register window 1 to the state before the start of the performance measurement. Thereafter, the register window 1 is used as usual. That is, even if the program is called or returned, the register window is switched without generating a trap within a certain number of times.

【0028】以上のようにして、性能測定情報5を採取
することができ、この性能測定情報5を解析すること
で、測定対象プログラム4中の特定区間における性能が
測定できる。例えば、性能測定情報として命令のステッ
プ数を採取しておけば、各区間でのステップ数を比較す
ることで、処理負荷の大きい区間が特定できる。
As described above, the performance measurement information 5 can be collected. By analyzing the performance measurement information 5, the performance in a specific section in the program 4 to be measured can be measured. For example, if the number of steps of an instruction is collected as performance measurement information, a section having a large processing load can be specified by comparing the number of steps in each section.

【0029】次に、本発明の実施の形態をより具体的に
説明する。図3は、本発明を実施するためのシステム構
成図である。この図には、マルチCPUシステムの構成
を示している。このシステムには、複数のプロセッサモ
ジュール10,20,30がバス41を介して互いに接
続されている。各プロセッサモジュール10,20,3
0には、CPU11,21,31とローカルメモリ1
2,22,32が搭載されている。この実施の形態で
は、CPU11,21,31は、SPARC architecture V
ersion9 に準拠したCPUであるものとする。さらに、
バス41には、共有メモリ42、ハードディスク装置
(HDD)43、入力装置44、表示装置45が接続さ
れている。共有メモリ42は、各プロセッサモジュール
10,20,30で共通で使用するデータが格納され
る。HDD43には、OSや新たに作成したプログラム
等、電源遮断時においても保存しておくべきデータが格
納される。
Next, embodiments of the present invention will be described more specifically. FIG. 3 is a system configuration diagram for implementing the present invention. FIG. 1 shows the configuration of a multi-CPU system. In this system, a plurality of processor modules 10, 20, 30 are connected to each other via a bus 41. Each processor module 10, 20, 3
0, the CPU 11, 21, 31, and the local memory 1
2, 22, and 32 are mounted. In this embodiment, the CPUs 11, 21, and 31 use the SPARC architecture V
It is assumed that the CPU conforms to ersion9. further,
To the bus 41, a shared memory 42, a hard disk device (HDD) 43, an input device 44, and a display device 45 are connected. The shared memory 42 stores data commonly used by the processor modules 10, 20, and 30. The HDD 43 stores data to be stored even when the power is turned off, such as the OS and a newly created program.

【0030】このようなシステムでは、電源投入時にO
Sが起動される。OSはアプリケーションプログラム等
の分散処理を制御する。そして、ユーザが入力装置44
より性能測定開始の指示を入力すると、OSがレジスタ
ウィンドウの環境を変更し、指定されたプログラムを各
CPU11,21,31において処理する。その処理中
に、各CPU11,21,31におけるトレースデータ
が収集され、それぞれのローカルメモリ12,22,3
2に格納される。プログラムの実行が終了すると、プロ
セッサモジュール10,20,30毎に収集されたトレ
ースデータが共有メモリ42に集められ、HDD43に
保存される。そして、集められたトレースデータを解析
することで、実行したプログラムのどの処理にどれだけ
のステップを要したのかが分かる。
In such a system, when power is turned on, O
S is started. The OS controls distributed processing of application programs and the like. Then, the user operates the input device 44.
When the instruction for starting the performance measurement is input, the OS changes the environment of the register window, and the specified programs are processed by the CPUs 11, 21, and 31. During the processing, trace data in each of the CPUs 11, 21, and 31 is collected, and the respective local memories 12, 22, and 3 are collected.
2 is stored. When the execution of the program is completed, the trace data collected for each of the processor modules 10, 20, and 30 is collected in the shared memory 42 and stored in the HDD 43. Then, by analyzing the collected trace data, it is possible to know which process of the executed program and how many steps were required.

【0031】図4は、各プロセッサモジュールのCPU
がOSを起動することで構築される性能測定機能を示す
ブロック図である。この処理機能は、OSの一部として
設けられた機能であり、この機能を実現するためのプロ
グラムを各CPU11,21,31が実行することによ
り実現される。
FIG. 4 shows the CPU of each processor module.
FIG. 2 is a block diagram showing a performance measurement function constructed by activating an OS. This processing function is a function provided as a part of the OS, and is realized by each of the CPUs 11, 21 and 31 executing a program for realizing this function.

【0032】性能測定開始処理部51は、性能測定開始
指示が出された際に性能測定環境を整えるための機能を
有している。すなわち、図2に示したようなレジスタウ
ィンドウの環境を整える。また、性能情報をトレースす
るバッファ領域をローカルメモリ12,22,32内に
確保する。さらに、CPU11,21,31に対して、
性能情報をカウントするように指示し、性能測定中であ
ることを示すフラグを設定する。
The performance measurement start processing unit 51 has a function for preparing a performance measurement environment when a performance measurement start instruction is issued. That is, the environment of the register window as shown in FIG. 2 is prepared. Also, buffer areas for tracing performance information are secured in the local memories 12, 22, 32. Further, for the CPUs 11, 21 and 31,
Instructs to count the performance information, and sets a flag indicating that the performance is being measured.

【0033】性能測定情報採取部52は、レジスタウィ
ンドウが切り換わる度に発生するトラップを契機とし
て、性能情報をトレースするものである。具体的には、
CPU10,20,30がカウントした性能情報の値を
トレースのための情報に加工し、性能付加情報設定部5
4の情報と併せてトレースする。
The performance measurement information collecting section 52 traces performance information triggered by a trap generated each time the register window is switched. In particular,
The performance information values counted by the CPUs 10, 20, and 30 are processed into information for tracing, and the performance additional information setting unit 5
Trace along with the information of 4.

【0034】性能測定終了処理部53は、性能測定終了
指示が行われたときに性能測定を開始する前の環境に復
元するものである。すなわち、図2に示したような環境
を、通常のレジスタウィンドウの環境に戻すと共に、各
ローカルメモリ12,22,32内のバッファに格納さ
れたトレース情報を共有メモリ42内で統合し、その内
容をHDD43に格納する。そして、バッファを解放す
るとともに、CPU11,21,31に対して性能情報
をカウントしないように指示し、性能測定中であること
を示すフラグをクリアする。
The performance measurement termination processing unit 53 restores the environment before the performance measurement is started when the performance measurement termination instruction is issued. That is, the environment as shown in FIG. 2 is returned to the normal register window environment, and the trace information stored in the buffers in the local memories 12, 22, 32 is integrated in the shared memory 42, and the contents Is stored in the HDD 43. Then, while releasing the buffer, the CPU 11, 21, 31 is instructed not to count the performance information, and the flag indicating that the performance is being measured is cleared.

【0035】性能付加情報設定部54は、システムの動
作状況を示す一定の付加情報や、定常的に採取すべき情
報等を採取する。付加情報としては、例えば、コンテキ
ストスイッチに関する情報、仮想メモリ空間の情報、ロ
ードモジュールのバインド情報などである。また、定常
的に採取する情報としては、時刻情報などがある。
The additional performance information setting section 54 collects certain additional information indicating the operation status of the system, information to be constantly collected, and the like. Examples of the additional information include information on a context switch, information on a virtual memory space, bind information on a load module, and the like. The information that is regularly collected includes time information.

【0036】図5は、性能測定開始処理部の処理手順を
示すフローチャートである。このフローチャートの処理
は、すべて性能測定開始処理部51が行う処理である。 [S1]システム全体の性能測定開始指示を行うための
専用ソフトウェアトラップを発行する。 [S2]ソフトウェアトラップのハンドラに指示を出
し、発行元の動作環境を退避する。 [S3]レジスタウィンドウが切り換わる度にトラップ
が発生するように退避した発行元の動作環境を変更す
る。すなわち、トラップ発生元の有効レジスタウィンド
ウ数が1以外ならば、カレントウィンドウのみ残して、
他のレジスタウィンドウの環境をスタック内に強制退避
する。トラップ発生元の有効レジスタウィンドウ数が1
であれば、そのままの状態でレジスタウィンドウが切り
換わる度にトラップが発生するため、状態の変更は行わ
ない。 [S4]トレースデータ採取用バッファ領域を、ローカ
ルメモリ上に用意する。 [S5]性能情報の付加情報となる性能測定開始時の仮
想メモリの空間情報、ロードモジュールバインド情報等
をトレースデータ採取用のバッファに格納する。 [S6]性能測定開始中であるフラグをメモリに設定し
ておく。さらに、CPUのレジスタを操作し、性能情報
をカウントするように設定する。 [S7]ソフトウェアトラップを発行したプログラムの
動作環境を復元して、トラップ発生元に復帰する。復帰
後、レジスタウィンドウが切り換わる度にトラップが発
生する。
FIG. 5 is a flowchart showing a processing procedure of the performance measurement start processing unit. The processes in this flowchart are all processes performed by the performance measurement start processing unit 51. [S1] A dedicated software trap for issuing a performance measurement start instruction for the entire system is issued. [S2] An instruction is issued to the software trap handler, and the operating environment of the issue source is saved. [S3] The operating environment of the issue source that has been saved is changed so that a trap is generated each time the register window is switched. That is, if the number of valid register windows from which traps are generated is other than 1, only the current window is left
The environment of another register window is forcibly saved in the stack. The number of valid register windows at the trap source is 1
If this is the case, a trap is generated each time the register window is switched as it is, so that the state is not changed. [S4] A buffer area for collecting trace data is prepared on the local memory. [S5] Space information of the virtual memory at the start of the performance measurement, load module bind information, and the like, which are additional information of the performance information, are stored in a buffer for collecting trace data. [S6] The performance measurement start flag is set in the memory. Further, the CPU sets a register of the CPU to count the performance information. [S7] The operating environment of the program that issued the software trap is restored, and the program returns to the trap source. After the return, a trap is generated every time the register window is switched.

【0037】次に、性能測定情報採取部52で行われる
処理の内容を説明する。図6は、性能情報採取部の処理
を示すフローチャートである。性能測定情報採取部52
は、レジスタウィンドウが切り換わる度に発生するトラ
ップ、あるいは外部割り込みなど定常的に発生するトラ
ップが発生した際に動作を開始する。このフローチャー
トの処理は、すべて性能測定情報採取部52が実行す
る。 [S11]性能測定中か否かを判断する。これは、性能
測定中を示すフラグが設定されているか否かによって判
断する。性能測定中の場合にはステップS12に進み、
そうでなければステップS21に進む。 [S12]CPUがカウントしている性能情報を一時的
にローカルメモリに退避する。 [S13]性能情報採取中に性能測定用のトラップが発
生しないように、レジスタウィンドウの環境を情報採取
プログラム用に設定する。 [S14]コンテキスト情報、仮想メモリの空間情報、
ロードモジュールのバインド情報等の付加情報を採取す
る必要があるか否かを判断する。必要であればステップ
S15に進み、不要であればステップS16に進む。 [S15]性能付加情報設定部54が採取している付加
情報を、バッファに格納する。 [S16]退避したCPUの性能情報を加工してバッフ
ァに格納する。 [S17]システムが定常的に採取している情報を性能
付加情報設定部54から取得し、性能情報に含めて格納
する。 [S18]シミュレーションが必要か否かを判断する。
これは、レジスタウィンドウを切り換える度に発生する
トラップであるか否かによって判定する。すなわち、S
AVE命令かRESTORE命令は、レジスタウィンド
ウを切り換える命令である。ところが、この時点では、
情報採取プログラム用の動作環境が設定されているた
め、そのまま実行するとレジスタウィンドウの環境の整
合性が保てなくなる。そのため、SAVE命令かRES
TORE命令については、シミュレーションを行う必要
がある。レジスタウィンドウを切り換える度に発生する
トラップであれば、シミュレーションが必要であると判
断してステップS19に進み、そうでなければシミュレ
ーションは不要であると判断してステップS21に進
む。 [S19]命令のシミュレーションを行う。 [S20]トラップ元に復帰する。 [S21]ソフトウェアトラップのハンドラに指示を出
し、通常のハンドラの処理を行わせる。
Next, the contents of the processing performed by the performance measurement information collecting section 52 will be described. FIG. 6 is a flowchart illustrating the processing of the performance information collection unit. Performance measurement information collection unit 52
Starts operation when a trap that is generated each time the register window is switched or a trap that constantly occurs such as an external interrupt occurs. All the processes in this flowchart are executed by the performance measurement information collecting unit 52. [S11] It is determined whether the performance is being measured. This is determined based on whether or not a flag indicating that the performance is being measured is set. If the performance is being measured, the process proceeds to step S12,
Otherwise, the process proceeds to step S21. [S12] The performance information counted by the CPU is temporarily saved in the local memory. [S13] The environment of the register window is set for the information collection program so that a trap for performance measurement does not occur during performance information collection. [S14] Context information, virtual memory space information,
It is determined whether it is necessary to collect additional information such as the binding information of the load module. If necessary, the process proceeds to step S15, and if not, the process proceeds to step S16. [S15] The additional information collected by the performance additional information setting unit 54 is stored in the buffer. [S16] The saved CPU performance information is processed and stored in the buffer. [S17] The information that the system constantly collects is acquired from the additional performance information setting unit 54, and is included in the performance information and stored. [S18] It is determined whether a simulation is necessary.
This is determined by whether or not the trap is generated each time the register window is switched. That is, S
The AVE instruction or the RESTORE instruction is an instruction for switching the register window. However, at this point,
Since the operating environment for the information collection program is set, if it is executed as it is, the consistency of the environment of the register window cannot be maintained. Therefore, SAVE instruction or RES
It is necessary to simulate the TORE instruction. If the trap is generated each time the register window is switched, it is determined that the simulation is necessary, and the process proceeds to step S19. Otherwise, the simulation is determined to be unnecessary and the process proceeds to step S21. [S19] Instruction simulation is performed. [S20] Return to the trap source. [S21] An instruction is issued to the software trap handler to perform the normal handler process.

【0038】次に、性能測定終了処理部53で行われる
処理を説明する。図7は、性能測定指示部の処理手順を
示すフローチャートである。このフローチャートの処理
は、すべて性能測定終了処理部53で行われる処理であ
る。 [S31]システム全体の性能測定終了指示を行うため
のソフトウェアトラップを発行する。 [S32]ソフトウェアトラップのハンドラに指示を出
し、発生元の動作環境を退避する。 [S33]レジスタウィンドウを切り換える度にトラッ
プが発生しないように、退避した内容を変更する。 [S34]バッファ領域の内容をディスクに格納する。 [S35]バッファ領域を開放する。 [S36]性能測定開始フラグをクリアする。 [S37]CPUのレジスタを操作し、性能情報カウン
トすることを停止させる。 [S38]ソフトウェアトラップを発行したプログラム
の動作環境を元に、トラップ発生元に復帰する。
Next, the processing performed by the performance measurement termination processing section 53 will be described. FIG. 7 is a flowchart illustrating a processing procedure of the performance measurement instruction unit. The processes in this flowchart are all processes performed by the performance measurement termination processing unit 53. [S31] A software trap for issuing an instruction to end performance measurement of the entire system is issued. [S32] An instruction is issued to the handler of the software trap, and the operating environment of the source is saved. [S33] The saved contents are changed so that a trap does not occur every time the register window is switched. [S34] The contents of the buffer area are stored on the disk. [S35] The buffer area is released. [S36] The performance measurement start flag is cleared. [S37] The CPU operates the register to stop counting the performance information. [S38] Return to the trap source based on the operating environment of the program that issued the software trap.

【0039】復帰後は、レジスタウィンドウが切り換わ
る度にトラップが発生するということがなくなり、通常
のシステム動作に戻る。図8は、性能測定情報採取例を
示す図である。この例では、性能を測定すべきプログラ
ムが、3つのモジュール61〜63で構成されている。
そして、モジュール61からモジュール62が呼び出さ
れている。さらに、モジュール62の実行中にトラップ
が発生しハンドラ63によって処理が行われた後、モジ
ュール61に戻る。図中、A1〜A4、B1〜B4、H
1,H2は、プログラムカウンタの値を示している。
After the return, no trap is generated every time the register window is switched, and the operation returns to the normal system operation. FIG. 8 is a diagram illustrating an example of collecting performance measurement information. In this example, a program whose performance is to be measured is composed of three modules 61 to 63.
Then, the module 62 is called from the module 61. Further, after a trap is generated during the execution of the module 62 and the processing is performed by the handler 63, the process returns to the module 61. In the figure, A1 to A4, B1 to B4, H
1, H2 indicates the value of the program counter.

【0040】T1の時点では、モジュール61において
CALL命令が発行される。CALL命令では、次の命
令を実行してからプログラムの遷移が行われ、モジュー
ル62が呼び出される。するとB1でトラップが発生
し、A1〜A3に走行したときの性能情報がトレースさ
れる。
At the time T1, a CALL instruction is issued in the module 61. In the CALL instruction, the transition of the program is performed after executing the next instruction, and the module 62 is called. Then, a trap is generated at B1, and the performance information when traveling to A1 to A3 is traced.

【0041】T2の時点は、B3でトラップが発生した
時点であり、ハンドラ63に制御が移行し、B1〜B2
に走行した際の性能情報がトレースされる。T3の時点
は、ハンドラ63からモジュール62に復帰するときで
あり、H1〜H2に走行した際の性能情報がトレースさ
れる。
The point in time T2 is the point in time when a trap occurs in B3, and the control is transferred to the handler 63, and B1 to B2
The performance information when traveling is traced. The time point of T3 is when returning from the handler 63 to the module 62, and the performance information when traveling from H1 to H2 is traced.

【0042】T4の時点は、モジュール62からモジュ
ール61に復帰するときであり、B4でトラップが発生
し、B3〜B4に走行した際の性能情報がトレースされ
る。図9は、トレースされた性能情報の内容を示す図で
ある。性能情報71には、その情報を採取した時刻、呼
び出し元PC(プログラムカウンタ)値、呼び出し先P
C値、走行ステップ数及びその他の各種イベント数が登
録されている。イベント数としては、命令サイクル数
(CPUの動作クロックのサイクル数)、キャッシュ参
照回数、キャッシュ更新回数、キャッシュヒット回数、
TLB(Translation Lookaside Buffer)ミス回数などが
ある。なお、図には示していないが、キャッシュミス回
数、Copy back 回数、バスの使用回数、共有メモリの参
照回数、共有メモリの更新回数などのイベント数を採取
することもできる。
The time T4 is the time when the module 62 returns to the module 61. A trap is generated at B4, and the performance information when traveling from B3 to B4 is traced. FIG. 9 is a diagram showing the contents of the traced performance information. The performance information 71 includes the time at which the information was collected, the caller PC (program counter) value, and the callee P
The C value, the number of running steps, and the number of other various events are registered. The number of events includes the number of instruction cycles (the number of cycles of the CPU operating clock), the number of cache references, the number of cache updates, the number of cache hits,
There are TLB (Translation Lookaside Buffer) mistakes. Although not shown in the figure, the number of events such as the number of cache misses, the number of copy backs, the number of uses of the bus, the number of references to the shared memory, and the number of updates of the shared memory can also be collected.

【0043】レジスタウィンドウが切り換わる度に採取
されたこれらの情報を解析することにより、実行したプ
ログラムのどの区間でどれだけのステップが実行された
のかが分かる。さらに、特定の区間を実行するのに要し
た命令サイクル数や、その間に発生したキャッシュ参照
回数、キャッシュ更新回数、キャッシュヒット回数、T
LBミス回数なども分かる。
By analyzing these pieces of information collected each time the register window is switched, it is possible to know which section of the executed program has been executed and how many steps have been executed. Further, the number of instruction cycles required to execute a specific section, the number of cache references, the number of cache updates, the number of cache hits,
The number of LB misses is also known.

【0044】その結果、システム及び測定対象プログラ
ムの変更をすることなく性能測定を行うことができ、性
能測定に費やす時間を削減することができる。しかも、
プログラム毎の性能を詳細に知ることができるので、性
能に影響を与えているプログラムを特定することができ
る。
As a result, the performance can be measured without changing the system and the program to be measured, and the time spent for the performance measurement can be reduced. Moreover,
Since it is possible to know the performance of each program in detail, it is possible to specify the program that is affecting the performance.

【0045】さらに、本発明による性能測定情報の採取
には割り込み処理を必要としないため、割り込みを禁止
したプログラムの性能を測定することができる。なお、
上記の処理機能はOSに含まれており、該当する機能の
処理内容を記述したプログラムをコンピュータで実行す
ることにより、実現される。その場合、性能測定装置が
有すべき機能の処理内容が記述されたプログラムは、コ
ンピュータで読み取り可能な記録媒体に記録しておく。
コンピュータで読み取り可能な記録媒体としては、磁気
記録装置や半導体メモリ等がある。市場に流通させる場
合には、CD−ROM(Compact Disk Read Only Memor
y) やフロッピーディスク等の可搬型記録媒体にプログ
ラムを格納して流通させたり、ネットワークを介して接
続されたコンピュータの記憶装置に格納しておき、ネッ
トワークを通じて他のコンピュータに転送することもで
きる。コンピュータで実行する際には、コンピュータ内
のハードディスク装置等にプログラムを格納しておき、
メインメモリにロードして実行する。
Furthermore, since the collection of performance measurement information according to the present invention does not require interrupt processing, the performance of a program in which interrupts are prohibited can be measured. In addition,
The above-described processing functions are included in the OS, and are realized by executing, by a computer, a program describing the processing contents of the corresponding functions. In this case, the program in which the processing contents of the functions that the performance measuring device should have are described is recorded on a computer-readable recording medium.
Examples of the computer-readable recording medium include a magnetic recording device and a semiconductor memory. When distributing to the market, CD-ROM (Compact Disk Read Only Memory)
The program may be stored and distributed on a portable recording medium such as y) or a floppy disk, or stored in a storage device of a computer connected via a network, and transferred to another computer via the network. When executing the program on a computer, store the program on a hard disk device in the computer,
Load into main memory and execute.

【0046】[0046]

【発明の効果】以上説明したように本発明では、本発明
の性能測定装置では、プログラムの呼び出し及び復帰処
理が発生した際にはトラップが発生するように、レジス
タウィンドウの環境を変更しておき、測定対象プログラ
ムを実行中にトラップが発生すると、その時点の性能測
定情報を採取するようにしたため、測定対象プログラム
の変更をすることなく性能測定情報を採取できる。その
結果、効率よく性能測定を行うことができる。
As described above, according to the present invention, in the performance measuring apparatus of the present invention, the environment of the register window is changed so that a trap is generated when a program call and a return process occur. When a trap occurs during execution of the measurement target program, the performance measurement information at that time is collected, so that the performance measurement information can be collected without changing the measurement target program. As a result, the performance can be measured efficiently.

【0047】また、本発明の性能測定プログラムを記録
したコンピュータ読み取り可能な記録媒体では、記録さ
れた性能測定プログラムをコンピュータに実行させるこ
とにより、プログラムの呼び出し及び復帰処理が発生し
た際にはトラップが発生するようにレジスタウィンドウ
の環境を変更しておき、測定対象プログラムを実行中に
トラップが発生すると、その時点の性能測定情報を採取
するような処理をコンピュータに行わせることができる
ようになり、コンピュータを用いた効率のよい性能測定
が可能となる。
In a computer-readable recording medium on which the performance measurement program of the present invention is recorded, the computer executes the recorded performance measurement program so that a trap is generated when a program call and a return process occur. By changing the environment of the register window so that it occurs, if a trap occurs during the execution of the program to be measured, the computer can perform processing such as collecting performance measurement information at that time, Efficient performance measurement using a computer becomes possible.

【0048】また、本発明の性能測定方法では、プログ
ラムの呼び出し及び復帰処理が発生した際にはトラップ
が発生するようなレジスタウィンドウの環境により、測
定対象プログラムを実行することで、プログラムの呼び
出し及び復帰処理の度にトラップを発生させ、トラップ
が発生した際に性能測定情報を採取するようにしたた
め、効率よく性能測定を行うことができる。
In the performance measurement method of the present invention, the program to be measured and executed is executed by executing the program to be measured in an environment of a register window in which a trap is generated when a program calling and returning process occurs. Since a trap is generated each time the return processing is performed, and the performance measurement information is collected when the trap occurs, the performance can be measured efficiently.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の原理構成図である。FIG. 1 is a principle configuration diagram of the present invention.

【図2】本発明による性能測定時のレジスタウィンドウ
の状態を示す図である。
FIG. 2 is a diagram showing a state of a register window during performance measurement according to the present invention.

【図3】本発明を実施するためのシステム構成図であ
る。
FIG. 3 is a system configuration diagram for implementing the present invention.

【図4】各プロセッサモジュールのCPUがOSを起動
することで構築される性能測定機能を示すブロック図で
ある。
FIG. 4 is a block diagram illustrating a performance measurement function constructed by activating an OS by a CPU of each processor module.

【図5】性能測定開始処理部の処理手順を示すフローチ
ャートである。
FIG. 5 is a flowchart illustrating a processing procedure of a performance measurement start processing unit.

【図6】性能情報採取部の処理を示すフローチャートで
ある。
FIG. 6 is a flowchart illustrating a process of a performance information collecting unit.

【図7】性能測定指示部の処理手順を示すフローチャー
トである。
FIG. 7 is a flowchart illustrating a processing procedure of a performance measurement instruction unit.

【図8】性能測定情報採取例を示す図である。FIG. 8 is a diagram showing an example of collecting performance measurement information.

【図9】トレースされた性能情報の内容を示す図であ
る。
FIG. 9 is a diagram showing the contents of traced performance information.

【図10】レジスタウィンドウの利用例を示す図であ
る。
FIG. 10 illustrates an example of using a register window.

【符号の説明】[Explanation of symbols]

1 レジスタウィンドウ 2 性能測定開始処理手段 3 性能測定情報採取手段 4 測定対象プログラム 5 性能測定情報 6 性能測定終了処理手段 1 register window 2 performance measurement start processing means 3 performance measurement information collection means 4 measurement target program 5 performance measurement information 6 performance measurement end processing means

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】 任意のプログラムが動作するときに使用
するレジスタ群が複数個設けられ、プログラムの呼び出
し及び復帰の際に実行中のプログラムで使用可能なレジ
スタ群の切り換えが行われるレジスタウィンドウを備え
たプロセッサによってプログラムの性能を測定する性能
測定装置において、 性能測定開始指令により、プログラムの呼び出し及び復
帰処理が発生した際にはトラップが発生するように前記
レジスタウィンドウの環境を変更する性能測定開始処理
手段と、 前記性能測定開始処理手段が設定した前記レジスタウィ
ンドウの環境により測定対象プログラムを実行し、トラ
ップの発生を契機として性能測定情報を採取する性能測
定情報採取手段と、 を有することを特徴とする性能測定装置。
A register window is provided in which a plurality of registers used when an arbitrary program operates is provided, and a register group used in a program being executed is switched at the time of calling and returning of the program. A performance measurement device for measuring the performance of a program by a processor, wherein a performance measurement start command changes the environment of the register window so that a trap is generated when a program call and a return process occur. Means, and a performance measurement information collecting means for executing a program to be measured according to the environment of the register window set by the performance measurement start processing means, and collecting performance measurement information in response to the occurrence of a trap. Performance measurement device.
【請求項2】 前記性能測定情報採取手段による前記測
定対象プログラムの実行が終了したら、性能測定終了指
令により前記レジスタウィンドウの環境を性能測定開始
前の状態に戻す性能測定終了処理手段をさらに有するこ
とを特徴とする請求項1記載の性能測定装置。
2. A performance measurement end processing means for returning the environment of the register window to a state before the start of performance measurement by a performance measurement end command when execution of the measurement target program by the performance measurement information collecting means is completed. The performance measuring device according to claim 1, wherein:
【請求項3】 前記性能測定開始処理手段は、システム
全体のプログラムがトラップなしで使用できるレジスタ
ウィンドウの個数を1つにすることで、プログラムの呼
び出し及び復帰が発生した際には必ずトラップが発生す
るようにすることを特徴とする請求項1記載の性能測定
装置。
3. The performance measurement start processing means sets the number of register windows that can be used by the program of the entire system without trapping to one, so that a trap is generated whenever a program is called or returned. 2. The performance measuring device according to claim 1, wherein the performance is measured.
【請求項4】 前記性能測定情報採取手段は、前記性能
測定情報として、前記測定対象プログラム上の特定の区
間が実行されたときに処理された命令のステップ数を採
取することを特徴とする請求項1記載の性能測定装置。
4. The performance measurement information collecting unit collects, as the performance measurement information, the number of steps of an instruction processed when a specific section on the measurement target program is executed. Item 2. The performance measuring device according to Item 1.
【請求項5】 前記性能測定情報採取手段は、前記性能
測定情報として、前記測定対象プログラム上の特定の区
間が実行される間のイベント数を採取することを特徴と
する請求項1記載の性能測定装置。
5. The performance according to claim 1, wherein the performance measurement information collecting means collects, as the performance measurement information, the number of events during execution of a specific section on the measurement target program. measuring device.
【請求項6】 前記性能測定開始処理手段は、前記性能
測定情報として、複数の種類の情報を同時に採取するこ
とを特徴とする請求項1記載の性能測定装置。
6. The performance measurement apparatus according to claim 1, wherein said performance measurement start processing means simultaneously collects a plurality of types of information as said performance measurement information.
【請求項7】 任意のプログラムが動作するときに使用
するレジスタ群が複数個設けられ、プログラムの呼び出
し及び復帰の際に実行中のプログラムで使用可能なレジ
スタ群の切り換えが行われるレジスタウィンドウを備え
たプロセッサによって、プログラムの性能を測定するた
めの性能測定プログラムを記録したコンピュータ読み取
り可能な記録媒体において、 性能測定開始指令が入力されると、プログラムの呼び出
し及び復帰処理が発生した際にはトラップが発生するよ
うに前記レジスタウィンドウの環境を変更する性能測定
開始処理手段、 前記性能測定開始処理手段が設定した前記レジスタウィ
ンドウの環境により測定対象プログラムを実行し、トラ
ップの発生を契機として性能測定情報を採取する性能測
定情報採取手段、 を有することを特徴とする性能測定プログラムを記録し
たコンピュータ読み取り可能な記録媒体。
7. A register window provided with a plurality of registers for use when an arbitrary program operates, and a register window for switching registers available for the program being executed when the program is called and returned. When a performance measurement start command is input to a computer-readable recording medium that records a performance measurement program for measuring the performance of a program by a processor, a trap is generated when a program call and return processing occur. A performance measurement start processing means for changing an environment of the register window so as to generate, executing a program to be measured according to the environment of the register window set by the performance measurement start processing means, and generating performance measurement information upon occurrence of a trap. Means for collecting performance measurement information to be collected A computer-readable recording medium having recorded thereon a performance measurement program.
【請求項8】 任意のプログラムが動作するときに使用
するレジスタ群が複数個設けられ、プログラムの呼び出
し、及び復帰の際に実行中のプログラムで使用可能なレ
ジスタ群の切り換えが行われるレジスタウィンドウを備
えたプロセッサを用いて、プログラムの性能を測定する
性能測定方法において、 プログラムの呼び出し及び復帰処理が発生した際にはト
ラップが発生するように前記レジスタウィンドウの環境
を変更し、 変更後の前記レジスタウィンドウの環境により測定対象
プログラムを実行し、トラップの発生を契機として性能
測定情報を採取する、 ことを特徴とする性能測定方法。
8. A register window in which a plurality of registers used when an arbitrary program operates is provided, and a register window in which registers usable in a program being executed are switched at the time of calling and returning of the program. In a performance measurement method for measuring the performance of a program using a processor provided with the processor, the environment of the register window is changed so that a trap is generated when a program call and a return process occur, and the register after the change is changed. A performance measurement method comprising: executing a program to be measured according to a window environment; and collecting performance measurement information when a trap is generated.
JP28510898A 1998-10-07 1998-10-07 Performance measuring apparatus, recording medium storing performance measuring program, and performance measuring method Expired - Fee Related JP3941848B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP28510898A JP3941848B2 (en) 1998-10-07 1998-10-07 Performance measuring apparatus, recording medium storing performance measuring program, and performance measuring method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP28510898A JP3941848B2 (en) 1998-10-07 1998-10-07 Performance measuring apparatus, recording medium storing performance measuring program, and performance measuring method

Publications (2)

Publication Number Publication Date
JP2000112782A true JP2000112782A (en) 2000-04-21
JP3941848B2 JP3941848B2 (en) 2007-07-04

Family

ID=17687231

Family Applications (1)

Application Number Title Priority Date Filing Date
JP28510898A Expired - Fee Related JP3941848B2 (en) 1998-10-07 1998-10-07 Performance measuring apparatus, recording medium storing performance measuring program, and performance measuring method

Country Status (1)

Country Link
JP (1) JP3941848B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010152458A (en) * 2008-12-24 2010-07-08 Fujitsu Ltd Performance measurement program, performance measurement method, and information processor having performance measurement function

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010152458A (en) * 2008-12-24 2010-07-08 Fujitsu Ltd Performance measurement program, performance measurement method, and information processor having performance measurement function

Also Published As

Publication number Publication date
JP3941848B2 (en) 2007-07-04

Similar Documents

Publication Publication Date Title
JP4209959B2 (en) Apparatus and method for high frequency sampling of performance counter
US11036611B2 (en) Virtualization of a central processing unit measurement facility
JP4225851B2 (en) Trace element generation system for data processor
US10620877B2 (en) Managing a collection of data
EP2682873A2 (en) Efficient recording and replaying of non-deterministic instructions in a virtual machine and CPU therefor
US5412799A (en) Efficient data processor instrumentation for systematic program debugging and development
US10613895B2 (en) Virtualization of storage buffers used by asynchronous processes
JP2000112782A (en) Performance measurement device, storage medium recording performance measurement program and performance measurement method
JP2001290860A (en) Hardware/software cooperation simulator
JPS61173358A (en) Register recovery device
JPH0668725B2 (en) Device for responding to interrupt condition in data processing system and method for responding to asynchronous interrupt condition
SE524799C2 (en) Debugging method for single or multi process real time systems, identifies significant event break off point with unique marker comprising check sum
JPH11338744A (en) Software development supporting device
Timmerman et al. Can Windows NT 4.0 be used as an RTOS?
JPH08320813A (en) Program simulator device and program debugging method
Xinidis et al. Virtual timers: Using hardware physical timers for profiling kernel code-paths
JPH10260872A (en) Computer system and recording medium
JPH0354369B2 (en)

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060306

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060328

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060529

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20061010

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20061207

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20070109

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070305

A911 Transfer of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20070312

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20070327

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20070305

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070327

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110413

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110413

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120413

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130413

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140413

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees