JPH11272499A - Parallel processor system equipped with performance measuring circuit and method for measuring performance of program - Google Patents

Parallel processor system equipped with performance measuring circuit and method for measuring performance of program

Info

Publication number
JPH11272499A
JPH11272499A JP10074476A JP7447698A JPH11272499A JP H11272499 A JPH11272499 A JP H11272499A JP 10074476 A JP10074476 A JP 10074476A JP 7447698 A JP7447698 A JP 7447698A JP H11272499 A JPH11272499 A JP H11272499A
Authority
JP
Japan
Prior art keywords
measurement
processor
value
register
counter
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.)
Pending
Application number
JP10074476A
Other languages
Japanese (ja)
Inventor
Manabu Yamaguchi
山口  学
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.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP10074476A priority Critical patent/JPH11272499A/en
Publication of JPH11272499A publication Critical patent/JPH11272499A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Multi Processors (AREA)

Abstract

PROBLEM TO BE SOLVED: To measure an access time or the number of times of access for each processing or each processor. SOLUTION: The values of measuring counters 51 and 52 are initialized, and a measuring ID value corresponding to a processing content is set in measuring ID registers 71-73 of each processor 61-63. When a processor performs access to a synchronizing register 2, the measuring ID value is transmitted to a measuring counter control circuit 3, and when any processor succeeds in access a shared resource a count-up circuit 4 outputs a prescribed count-up instruction signals to the measuring counter 51 or 52 corresponding to the inputted measuring ID value. The measuring counter measures a clock signal in a prescribed procedure, and when all the prescribed processing are ended, the measured values of the measuring counters 51 and 52 are read, and transmitted to a prescribed processor.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は並列プロセッサシス
テムのプログラムの性能向上に関し、特にプログラムの
性能測定回路に関する。
The present invention relates to improving the performance of a program in a parallel processor system, and more particularly to a circuit for measuring the performance of a program.

【0002】[0002]

【従来の技術】システムの性能を引き出すために、プロ
グラムの性能を向上させるようにプログラムを改善する
プログラムのチューニングは、並列プログラムの高速化
においても非常に重要な作業である。このチューニング
作業を行うためには、事前にプログラムの性能測定を行
い、最もチューニングの必要な部分を特定しておくこと
が重要である。
2. Description of the Related Art Tuning a program for improving the program so as to improve the performance of the program in order to bring out the performance of the system is a very important task even in increasing the speed of a parallel program. In order to perform this tuning work, it is important to measure the performance of the program in advance and to specify the parts that require the most tuning.

【0003】一般的にマルチプロセッサシステムは、プ
ロセス間の通信やタスク間制御を実現するために、全て
のプロセッサからアクセスできる共有レジスタや、共有
メモリのような共有リソースを有する。これらの共有リ
ソースへのアクセス回数や、アクセス時間は、並列処理
性能全体に大きな影響を与える。
Generally, a multiprocessor system has shared resources such as a shared register and a shared memory that can be accessed from all processors in order to realize communication between processes and control between tasks. The number of accesses to these shared resources and the access time greatly affect the overall parallel processing performance.

【0004】共通リソースのアクセス時間が、全体の性
能に影響を与える例として、同期レジスタを用いてプロ
セッサ間の排他制御を実現する場合がある。あるプロセ
ッサが、排他処理部を実行するためにロックを取得して
いる間、他のプロセッサは排他処理部を実行できないた
め、同期レジスタがロックされている時間が長いと、シ
ステムの性能が低下する。そのため同期レジスタがロッ
クされている時間を測定し、ロックされている時間が短
くなるようプログラムをチューニングすることは、プロ
グラム全体の性能向上のために重要である。
As an example in which the access time of the common resource affects the overall performance, there is a case where exclusive control between processors is realized using a synchronization register. While one processor acquires the lock to execute the exclusive processing unit, the other processor cannot execute the exclusive processing unit. Therefore, if the synchronization register is locked for a long time, the performance of the system deteriorates. . Therefore, it is important to measure the time during which the synchronization register is locked and tune the program so as to shorten the time during which the synchronization register is locked, in order to improve the performance of the entire program.

【0005】このため、従来の大型の情報処理装置に
は、プログラムの性能を測定するために、演算処理時間
や演算回数等をカウントする性能測定用カウンタが準備
されているシステムが多い。
For this reason, many conventional large-sized information processing apparatuses are provided with a performance measurement counter for counting the operation processing time, the number of operations, and the like in order to measure the performance of a program.

【0006】[0006]

【発明が解決しようとする課題】しかし、従来のシステ
ムのように、複数のプロセッサからアクセスされる共有
リソースに対して、1個の性能測定用カウンタを設けた
場合、性能測定用カウンタには、共有リソースが各プロ
セッサからアクセスされた時間の総和が記録されるた
め、各プロセッサごとのアクセス時間や、アクセス回数
などを測定することができないので、システムの性能低
下の原因となっているプログラムを特定できないという
問題点があった。
However, when a single performance measurement counter is provided for a shared resource accessed by a plurality of processors as in the conventional system, the performance measurement counter includes: Since the total time of shared resources accessed by each processor is recorded, it is not possible to measure the access time and the number of accesses for each processor, so identify programs that are causing system performance degradation There was a problem that it was not possible.

【0007】本発明の目的は、各処理や各プロセッサご
とのアクセス時間や、アクセス回数などを測定すること
ができる性能測定回路を備えた並列システムとプログラ
ムの性能測定方法を提供することにある。
An object of the present invention is to provide a parallel system provided with a performance measuring circuit capable of measuring an access time of each process or each processor, an access frequency, and the like, and a method of measuring the performance of a program.

【0008】[0008]

【課題を解決するための手段】本発明の性能測定回路を
備えた並列プロセッサシステムは、計測用ID値をソフ
トウェアで設定可能な計測用IDレジスタを有する複数
のプロセッサと、全てのプロセッサからアクセス可能な
共有リソースと、その共有リソースのアクセスを制御す
る共有リソース制御回路と、プロセッサ内部の計測用I
Dレジスタに設定された計測用ID値別に、プロセッサ
から共有リソースへのアクセス時間を計測するための性
能測定回路を有する。この性能測定回路は、複数の計測
カウンタと、プロセッサから共有リソースへのアクセス
要求を処理して計測用IDレジスタ値を格納し、計測用
カウンタに書き込みを指示し、計測カウンタのカウンタ
値を読み出しプロセッサに送信する計測カウンタ制御回
路と、計測カウンタを制御して、計測用ID値に対応す
るプロセッサの共有リソースへのアクセス状態を対応す
る計測カウンタに記録させるカウントアップ制御回路と
を備える。
A parallel processor system having a performance measuring circuit according to the present invention has a plurality of processors having a measurement ID register capable of setting a measurement ID value by software, and can be accessed from all processors. Resource, a shared resource control circuit for controlling access to the shared resource, and a measuring I
A performance measurement circuit is provided for measuring the access time from the processor to the shared resource for each measurement ID value set in the D register. This performance measurement circuit processes a plurality of measurement counters and an access request from a processor to a shared resource, stores a measurement ID register value, instructs the measurement counter to write, reads a measurement counter counter value, and reads the measurement counter value. And a count-up control circuit that controls the measurement counter and records the state of access to the shared resource of the processor corresponding to the measurement ID value to the corresponding measurement counter.

【0009】計測カウンタに記録する共有リソースへの
アクセス状態がアクセス時間であってもよく、アクセス
回数であってもよい。
The state of access to the shared resource recorded in the measurement counter may be an access time or the number of accesses.

【0010】プロセッサの計測用IDレジスタに設定さ
れる計測用ID値が、プログラムの処理の種類に対応し
た値であり、処理の種類に対応した計測値が計測カウン
タに記録されてもよく、プロセッサを識別する値であ
り、各プロセッサに対応した計測値が計測カウンタに記
録されてもよい。
The measurement ID value set in the measurement ID register of the processor is a value corresponding to the type of processing of the program, and the measured value corresponding to the type of processing may be recorded in the measurement counter. And a measurement value corresponding to each processor may be recorded in the measurement counter.

【0011】共有リソースは同期レジスタであってもよ
く、共有メモリであってもよく、プロセッサ間ネットワ
ークであり、計側値がそのネットワークの使用時間であ
ってもよく、周辺装置であり、計側値がその周辺機器の
使用時間であってもよい。
[0011] The shared resource may be a synchronous register or a shared memory, a network between processors, the measured value may be the use time of the network, a peripheral device, or a peripheral device. The value may be the usage time of the peripheral device.

【0012】本発明のプログラムの性能測定方法は、性
能測定回路を備えた並列プロセッサシステムの性能測定
方法であって、性能測定回路の計測カウンタの値を初期
化し、各プロセッサのそれぞれの計測用IDレジスタに
それぞれのプロセッサの処理内容に対応した計測用ID
値を設定し、プロセッサが共有リソースをアクセスする
際、そのプロセッサが内部の計測用IDレジスタに設定
された計測用ID値を、性能測定回路の計測カウンタ制
御回路へ送出し、いずれかのプロセッサが共有リソース
へのアクセスに成功すると、そのプロセッサから送付さ
れた計測用ID値を計測カウンタ制御回路の計測用レジ
スタへ格納してカウントアップ制御回路に送出し、カウ
ントアップ制御回路は、入力した計測用ID値に対応し
た計測カウンタに対し、所定のカウントアップ指示信号
を出力し、カウントアップ指示信号を入力した計測カウ
ンタは、所定の手順でクロック信号を計測し、共有リソ
ースのアクセスが解除されるとカウントアップ制御回路
はカウントアップ信号の出力を停止し、所定の処理が終
了すると、計測カウンタの計側値を読み出して所定のプ
ロセッサへ送出する。
A method for measuring the performance of a program according to the present invention is a method for measuring the performance of a parallel processor system provided with a performance measuring circuit. Measurement ID corresponding to the processing content of each processor in the register
When the processor sets the value and accesses the shared resource, the processor sends the measurement ID value set in the internal measurement ID register to the measurement counter control circuit of the performance measurement circuit. If the access to the shared resource succeeds, the measurement ID value sent from the processor is stored in the measurement register of the measurement counter control circuit and transmitted to the count-up control circuit. A predetermined count-up instruction signal is output to the measurement counter corresponding to the ID value, and the measurement counter that inputs the count-up instruction signal measures the clock signal in a predetermined procedure, and when the access of the shared resource is released. The count-up control circuit stops outputting the count-up signal. It reads the total side value of the printer to be sent to a predetermined processor.

【0013】本発明の測定回路は、各プロセッサに個別
の計測用ID値を設定し、そのID値ごとに共有リソー
スのアクセス時間を計測することが可能で、共有リソー
スへのアクセス時間を、システム内のプロセッサの合計
時間でなく、処理内容やプロセッサごとに知ることがで
き、個々のプログラムの性能を測定することができる。
The measurement circuit of the present invention can set an individual measurement ID value for each processor and measure the access time of the shared resource for each ID value. It is possible to know not only the total time of the processors within, but also the processing contents and each processor, and it is possible to measure the performance of each program.

【0014】プロセッサ間のアクセス時間の偏りなど、
従来の測定方法よりも詳細な性能情報を得ることができ
るため、並列プログラムのチューニングを行うべき部分
を特定しやすい。
[0014] Uneven access time between processors, etc.
Since it is possible to obtain more detailed performance information than the conventional measurement method, it is easy to specify a portion where the parallel program should be tuned.

【0015】[0015]

【発明の実施の形態】次に、本発明の実施の形態につい
て図面を参照して説明する。図1は本発明の第1の実施
の形態の性能測定回路を備えた並列プロセッサシステム
のブロック構成図である。
Next, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram of a parallel processor system including a performance measuring circuit according to the first embodiment of the present invention.

【0016】(構成)本発明の性能測定回路を備えた並
列プロセッサシステムの第1の実施の形態を、3個のプ
ロセッサと、2個の計測用カウンタを備えた並列プロセ
ッサシステムにおいて、同期レジスタを用いて排他制御
を行う場合を例として説明する。
(Configuration) In a parallel processor system having a performance measuring circuit according to the first embodiment of the present invention, a synchronous processor is provided in a parallel processor system having three processors and two measurement counters. A case in which exclusive control is performed using the above will be described as an example.

【0017】図1に示す本発明の性能測定回路を備えた
並列プロセッサシステムは、計測用IDレジスタ71を
有する第1のプロセッサ61、計測用IDレジスタ72
を有する第2のプロセッサ62、計測用IDレジスタ7
3を有する第3のプロセッサ63の3個のプロセッサ
と、同期レジスタ2と、同期レジスタ制御回路1と、性
能測定回路9とから構成されている。
A parallel processor system provided with the performance measuring circuit of the present invention shown in FIG. 1 comprises a first processor 61 having a measurement ID register 71, and a measurement ID register 72.
Processor 62 having ID and measurement ID register 7
3, a third processor 63 having three, a synchronization register 2, a synchronization register control circuit 1, and a performance measurement circuit 9.

【0018】性能測定回路9は、計測用ID保持レジス
タ31を有する計測カウンタ制御回路3と、カウントア
ップ制御回路4と、第1の計測カウンタ51、第2の計
測カウンタ52の2個の計測カウンタとを有する。
The performance measurement circuit 9 includes a measurement counter control circuit 3 having a measurement ID holding register 31, a count-up control circuit 4, a first measurement counter 51, and a second measurement counter 52. And

【0019】同期レジスタ制御回路1と、第1〜第3の
プロセッサ61〜63とは、同期レジスタアクセス要求
パスA1〜A3、同期レジスタリプライパスB1〜B3
で接続される。また同期レジスタ制御回路1と、同期レ
ジスタ2とは、同期レジスタ書き込みパスC、同期レジ
スタ読み出しパスD、同期レジスタ制御信号Eで接続さ
れる。
The synchronous register control circuit 1 and the first to third processors 61 to 63 are provided with synchronous register access request paths A1 to A3 and synchronous register reply paths B1 to B3.
Connected by The synchronous register control circuit 1 and the synchronous register 2 are connected by a synchronous register write path C, a synchronous register read path D, and a synchronous register control signal E.

【0020】同期レジスタ制御信号Eは、同期レジスタ
2の読み出し、書き込みのための制御を行う読み出し信
号と、書き込み信号である。同期レジスタ制御回路1
は、第1〜第3のプロセッサ61〜63からの同期レジ
スタ2へのアクセス要求に従い、同期レジスタ2へのア
クセスを行い、結果をプロセッサへ送出する。
The synchronous register control signal E is a read signal for controlling the reading and writing of the synchronous register 2 and a write signal. Synchronous register control circuit 1
Performs an access to the synchronization register 2 in accordance with an access request to the synchronization register 2 from the first to third processors 61 to 63, and sends the result to the processor.

【0021】計測カウンタ制御回路3は、内部に計測用
ID保持レジスタ31を有する。計測カウンタ制御回路
3と、第1〜第3のプロセッサ61〜63とは、計測カ
ウンタアクセス要求パスL1〜L3、計測カウンタリプ
ライパスM1〜M3とで接続される。
The measurement counter control circuit 3 has a measurement ID holding register 31 therein. The measurement counter control circuit 3 and the first to third processors 61 to 63 are connected by measurement counter access request paths L1 to L3 and measurement counter reply paths M1 to M3.

【0022】また計測カウンタ制御回路3と、第1の計
測カウンタ51、第2の計測カウンタ52は、計測カウ
ンタ書き込みパスJ、計測カウンタ読み出しパスKで接
続される。計測カウンタ制御回路3は、第1〜第3のプ
ロセッサ61〜63からの計測カウンタのアクセス要求
に従い、第1の計測カウンタ51、第2の計測カウンタ
52の読み出し、書き込みを制御する。
The measurement counter control circuit 3, the first measurement counter 51, and the second measurement counter 52 are connected by a measurement counter write path J and a measurement counter read path K. The measurement counter control circuit 3 controls reading and writing of the first measurement counter 51 and the second measurement counter 52 in accordance with the access requests of the measurement counters from the first to third processors 61 to 63.

【0023】また計測カウンタ制御回路3は、第1〜第
3のプロセッサ61〜63のいずれかが、同期レジスタ
2をアクセスする時に、送出するそのプロセッサの計測
用IDレジスタ71〜73の計測用ID値を、計測用I
D保持レジスタ31へ書き込む。
When one of the first to third processors 61 to 63 accesses the synchronization register 2, the measurement counter control circuit 3 sends out the measurement ID of the measurement ID register 71 to 73 of that processor. Value for measurement I
Write to the D holding register 31.

【0024】カウントアップ制御回路4は、計測用ID
保持レジスタ31の出力Fと、同期レジスタ2の出力G
とに接続される。同期レジスタ2の出力Gは、同期レジ
スタ2がいずれかのプロセッサによりアクセスのために
ロックされて、第1の計測カウンタ51、または第2の
計測カウンタ52をカウントアップする時間を示す信号
である。カウントアップ制御回路4は、同期レジスタ2
の出力Gにより、同期レジスタ2がロックされている間
だけ、計測用ID保持レジスタ31の保持する計測用I
D値に対応する第1の計測カウンタ51、または第2の
計測カウンタ52にカウントアップ指示信号H1、また
はH2を排他的に出力する。
The count-up control circuit 4 has a measurement ID
The output F of the holding register 31 and the output G of the synchronization register 2
And connected to. The output G of the synchronization register 2 is a signal indicating the time when the synchronization register 2 is locked for access by any processor and the first measurement counter 51 or the second measurement counter 52 is counted up. The count-up control circuit 4 controls the synchronization register 2
Of the measurement ID held by the measurement ID holding register 31 only while the synchronization register 2 is locked.
The count-up instruction signal H1 or H2 is exclusively output to the first measurement counter 51 or the second measurement counter 52 corresponding to the D value.

【0025】第1の計測カウンタ51、第2の計測カウ
ンタ52は、それぞれカウントアップ制御回路4の出力
H1、またはH2で選択されている間だけクロックをカ
ウントする。
The first measurement counter 51 and the second measurement counter 52 count clocks only while being selected by the output H1 or H2 of the count-up control circuit 4, respectively.

【0026】(動作の説明)図1の本発明の構成例と、
図2の簡単な並列プログラムの例を用いて、本発明の並
列プロセッサシステムの動作を説明する。
(Explanation of Operation) An example of the configuration of the present invention shown in FIG.
The operation of the parallel processor system of the present invention will be described with reference to the simple parallel program example shown in FIG.

【0027】図2は図1の並列プロセッサシステムの並
列プログラムの一例のフローチャートである。図中符号
P、Q1〜Q3、R1〜R3、Sはプログラムのルーチ
ンを示す。
FIG. 2 is a flowchart of an example of a parallel program of the parallel processor system of FIG. In the figure, symbols P, Q1 to Q3, R1 to R3, and S indicate a program routine.

【0028】図2の並列プログラムは、処理Xと処理Y
からなり、処理Xは第1のプロセッサ61、第2のプロ
セッサ62の2台のプロセッサで並列処理される。処理
Xと処理Yのそれぞれの処理は排他的に処理する必要が
あり、同期レジスタ2を用いたロック制御方式により、
排他制御を実現する。本実施の形態の性能測定回路の説
明では、排他制御のためにロックが取得されている時間
を、処理X、処理Y別に測定するものとする。
The parallel program shown in FIG.
The processing X is performed in parallel by two processors, a first processor 61 and a second processor 62. Each of the processing X and the processing Y needs to be processed exclusively, and by the lock control method using the synchronization register 2,
Implement exclusive control. In the description of the performance measurement circuit of the present embodiment, the time during which a lock is acquired for exclusive control is measured for each of the processing X and the processing Y.

【0029】まず性能測定に先立って第1のプロセッサ
61は、計測カウンタの初期化ルーチンPを実行する。
第1のプロセッサ61は、第1の計測カウンタ51、第
2の計測カウンタ52の初期化要求を、計測カウンタア
クセス要求パスL1を通して、計測カウンタ制御回路3
へ送出する。
First, prior to performance measurement, the first processor 61 executes a measurement counter initialization routine P.
The first processor 61 sends a request to initialize the first measurement counter 51 and the second measurement counter 52 to the measurement counter control circuit 3 through the measurement counter access request path L1.
Send to

【0030】計測カウンタ制御回路3は、計測カウンタ
書き込みパスJを通して、適当な初期値を第1の計測カ
ウンタ51、第2の計測カウンタ52へ書き込むことに
より、第1の計測カウンタ51、第2の計測カウンタ5
2の初期化を行う。
The measurement counter control circuit 3 writes an appropriate initial value into the first measurement counter 51 and the second measurement counter 52 through the measurement counter write path J, thereby obtaining the first measurement counter 51 and the second measurement counter 52. Measurement counter 5
2 is initialized.

【0031】次に並列ルーチンR1〜R3の実行に先立
って、第1〜第3のプロセッサ61〜63は、プロセッ
サ内部の計測用IDレジスタ71〜73に、計測用ID
値を設定する。
Next, prior to execution of the parallel routines R1 to R3, the first to third processors 61 to 63 store the measurement IDs in the measurement ID registers 71 to 73 inside the processors.
Set the value.

【0032】第1のプロセッサ61は、ルーチンQ1を
実行し、処理Xを示す計測用ID値“1”を、計測用I
Dレジスタ71へ設定する。同様に、第2のプロセッサ
62も、処理Xを示す計測用ID値“1”を、計測用I
Dレジスタ72へ設定する。第3のプロセッサ63は、
ルーチンQ3を実行し、計測用IDレジスタ73へ、処
理Yを示す計測用ID値“2”を設定する。プロセッサ
内部のレジスタへ、計測用ID値を設定するための処理
時間は、プログラムの性能へ与える影響を無視できるほ
ど短い。
The first processor 61 executes the routine Q1 and outputs the measurement ID value “1” indicating the processing X to the measurement I
Set in the D register 71. Similarly, the second processor 62 also converts the measurement ID value “1” indicating the process X into the measurement ID value “1”.
Set to D register 72. The third processor 63 includes:
The routine Q3 is executed, and the measurement ID value “2” indicating the process Y is set in the measurement ID register 73. The processing time for setting the measurement ID value in the register inside the processor is so short that the influence on the performance of the program can be ignored.

【0033】計測用ID値の設定後、第1のプロセッサ
61は、並列ルーチンR1を実行する。排他処理Xを実
行する前に、第1のプロセッサ61は、同期レジスタ2
に対してロック要求を行う。第1のプロセッサ61は、
同期レジスタアクセス要求パスA1を通して、同期レジ
スタ制御回路1へロック要求を送出する。同時に、第1
のプロセッサ61は、内部の計測用IDレジスタ71が
保持する計測用ID値“1”を、計測カウンタアクセス
要求パスL1を通して、計測カウンタ制御回路3へ送出
する。
After setting the measurement ID value, the first processor 61 executes the parallel routine R1. Before executing the exclusive processing X, the first processor 61
Make a lock request to. The first processor 61 includes:
The lock request is sent to the synchronous register control circuit 1 through the synchronous register access request path A1. At the same time, the first
The processor 61 transmits the measurement ID value “1” held in the internal measurement ID register 71 to the measurement counter control circuit 3 through the measurement counter access request path L1.

【0034】同期レジスタ制御回路1は、第1〜第3の
プロセッサ61〜63から非同期に送られてくる同期レ
ジスタのアクセス要求の調停を行い、同期レジスタ2の
アクセス要求を処理する。
The synchronous register control circuit 1 arbitrates access requests for the synchronous register asynchronously sent from the first to third processors 61 to 63, and processes the access request for the synchronous register 2.

【0035】同期レジスタ制御回路1が、第1のプロセ
ッサ61からのロック要求を処理する場合、同期レジス
タ制御回路1は、同期レジスタ読み出しパスDを用い
て、同期レジスタ2の値を読み出す。同期レジスタ2か
ら読み出した値を、同期レジスタリプライパスB1を通
して、第1のプロセッサ61へ送出する。さらに、同期
レジスタ制御回路1は、同期レジスタ書き込みパスCを
通して、同期レジスタ2へロック中であることを示す
“1”を書き込む。
When the synchronous register control circuit 1 processes a lock request from the first processor 61, the synchronous register control circuit 1 reads the value of the synchronous register 2 using the synchronous register read path D. The value read from the synchronization register 2 is sent to the first processor 61 via the synchronization register reply path B1. Further, the synchronization register control circuit 1 writes “1” indicating that locking is being performed to the synchronization register 2 through the synchronization register writing path C.

【0036】第1のプロセッサ61のロック要求に対し
て、同期レジスタ2から読み出した値が“1”であれ
ば、ロックの取得に失敗したため、第1のプロセッサ6
1は処理Xを実行できない。ロックの取得に成功するま
で、第1のプロセッサ61は同期レジスタ制御回路1に
対して、ロック要求を繰り返す。
If the value read from the synchronization register 2 in response to the lock request from the first processor 61 is "1", the acquisition of the lock has failed.
No. 1 cannot execute the process X. Until the lock is successfully acquired, the first processor 61 repeats the lock request to the synchronization register control circuit 1.

【0037】第1のプロセッサ61のロック要求に対し
て、同期レジスタ2から読み出した値が“0”であれ
ば、ロックの取得に成功し、第1のプロセッサ61は排
他処理Xを実行できる。
If the value read from the synchronization register 2 is "0" in response to the lock request from the first processor 61, the lock is successfully acquired, and the first processor 61 can execute the exclusive processing X.

【0038】第1のプロセッサ61がロックの取得に成
功すると、計測カウンタ制御回路3は、第1のプロセッ
サ61から送られてきた計測用ID値“1”を、計測用
ID保持レジスタ31へ格納する。計測用ID保持レジ
スタ31は、保持する値“1”をカウントアップ制御回
路4へ出力する。
When the first processor 61 succeeds in acquiring the lock, the measurement counter control circuit 3 stores the measurement ID value “1” sent from the first processor 61 in the measurement ID holding register 31. I do. The measurement ID holding register 31 outputs the held value “1” to the count-up control circuit 4.

【0039】カウントアップ制御回路4は、計測用ID
保持レジスタ31の出力Fと、同期レジスタ2の出力G
とを用いて、計測用ID保持レジスタ31の保持する値
“1”に対応するカウントアップ指示信号H1を第1の
計測カウンタ51に出力する。カウントアップ指示信号
H1を受けた第1の計測カウンタ51は、カウントアッ
プ指示信号H1が与えられている間、クロック信号をカ
ウントする。
The count-up control circuit 4 has a measurement ID
The output F of the holding register 31 and the output G of the synchronization register 2
The count-up instruction signal H1 corresponding to the value “1” held in the measurement ID holding register 31 is output to the first measurement counter 51 using The first measurement counter 51 that has received the count-up instruction signal H1 counts the clock signal while the count-up instruction signal H1 is being supplied.

【0040】第1のプロセッサ61が、排他処理Xの実
行を終了し、同期レジスタ制御回路1へアンロック要求
を出すと、同期レジスタ制御回路1は、同期レジスタ書
き込みパスCを通して、同期レジスタ2へ“0”を書き
込む。同期レジスタ2へ“0”が書き込まれ、ロックが
解除されると、カウントアップ制御回路4は、カウント
アップ指示信号H1の出力を停止する。
When the first processor 61 terminates the execution of the exclusive processing X and issues an unlock request to the synchronous register control circuit 1, the synchronous register control circuit 1 sends the unlock request to the synchronous register 2 through the synchronous register write path C. Write “0”. When "0" is written to the synchronization register 2 and the lock is released, the count-up control circuit 4 stops outputting the count-up instruction signal H1.

【0041】以上の動作により、第1のプロセッサ61
がロックを取得している時間を、第1の計測カウンタ5
1で計測できる。
By the above operation, the first processor 61
The time during which the lock is acquired is determined by the first measurement counter 5
1 can be measured.

【0042】第2のプロセッサ62が、ルーチンR2の
排他処理Xを開始する場合、第2のプロセッサ62は、
同期レジスタ制御回路1へ、同期レジスタアクセス要求
パスA2を通して、ロック要求を送出する。同時に計測
用IDレジスタ72が保持する計測用ID値“1”も、
計測カウンタアクセス要求パスL2を通して、計測カウ
ンタ制御回路3へ送出される。
When the second processor 62 starts the exclusive processing X of the routine R2, the second processor 62
The lock request is sent to the synchronous register control circuit 1 through the synchronous register access request path A2. At the same time, the measurement ID value “1” held by the measurement ID register 72 is
It is sent to the measurement counter control circuit 3 through the measurement counter access request path L2.

【0043】同期レジスタ制御回路1は、第2のプロセ
ッサ62からのロック要求により、同期レジスタ2の値
を読み出し、その値を計測カウンタアクセス要求パスL
2を通して、第2のプロセッサ62へ送出する。同時
に、同期レジスタ制御回路1は、同期レジスタ書き込み
パスCを通して、同期レジスタ2へ、ロック中であるこ
とを示す“1”を書き込む。
The synchronous register control circuit 1 reads the value of the synchronous register 2 in response to a lock request from the second processor 62, and stores the value in the measurement counter access request path L
2 to the second processor 62. At the same time, the synchronization register control circuit 1 writes “1” indicating that locking is being performed to the synchronization register 2 through the synchronization register write path C.

【0044】同期レジスタ2から読み出した値が“0”
で、第2のプロセッサ62がロックの取得に成功した場
合、計測カウンタ制御回路3は、第2のプロセッサ62
から送られてきた計測用ID値“1”を、計測用ID保
持レジスタ31へ格納する。計測用ID保持レジスタ3
1は、計測用ID値“1”をカウントアップ制御回路4
へ出力する。
The value read from the synchronization register 2 is "0"
Then, when the second processor 62 succeeds in acquiring the lock, the measurement counter control circuit 3 sets the second processor 62
Is stored in the measurement ID holding register 31. Measurement ID holding register 3
1 is a counter for counting up the measurement ID value “1”.
Output to

【0045】カウントアップ制御回路4は、計測用ID
保持レジスタ31の出力Fと、ロック中であることを示
す同期レジスタ2の出力Gを用いて、計測用ID保持レ
ジスタ31の保持する“1”に対応するカウントアップ
指示信号H1を第1の計測カウンタ51に出力する。カ
ウントアップ指示信号H1を受けた第1の計測カウンタ
51は、カウントアップ指示信号H1が与えられている
間、クロック信号をカウントする。
The count-up control circuit 4 has a measurement ID
Using the output F of the holding register 31 and the output G of the synchronization register 2 indicating that locking is being performed, the count-up instruction signal H1 corresponding to “1” held in the measurement ID holding register 31 is subjected to the first measurement. Output to the counter 51. The first measurement counter 51 that has received the count-up instruction signal H1 counts the clock signal while the count-up instruction signal H1 is being supplied.

【0046】第2のプロセッサ62が、処理Xの実行を
終了し、同期レジスタ制御回路1へアンロック要求を出
すと、同期レジスタ制御回路1は、同期レジスタ書き込
みパスCを通して、同期レジスタ2へ“0”を書き込
む。同期レジスタ2へ“0”が書き込まれると、カウン
トアップ制御回路4はカウントアップ指示信号H1の出
力を停止する。
When the second processor 62 terminates the execution of the process X and issues an unlock request to the synchronous register control circuit 1, the synchronous register control circuit 1 sends the unlock request to the synchronous register 2 through the synchronous register write path C. Write "0". When "0" is written to the synchronization register 2, the count-up control circuit 4 stops outputting the count-up instruction signal H1.

【0047】以上の動作により、第2のプロセッサ62
がロックを取得している時間を、第1の計測カウンタ5
1で計測できる。
By the above operation, the second processor 62
The time during which the lock is acquired is determined by the first measurement counter 5
1 can be measured.

【0048】同様に第3のプロセッサ63が、ルーチン
R3の排他処理Yを開始するとき、ロックを取得するた
めに、第3のプロセッサ63は、同期レジスタアクセス
要求パスA3を通して、同期レジスタ制御回路1へ、ロ
ック要求を送出する。同時に第3のプロセッサ63は、
計測カウンタアクセス要求パスL3を通して、計測カウ
ンタ制御回路3へ、計測用ID値“2”を送出する。
Similarly, when the third processor 63 starts the exclusion process Y of the routine R3, in order to acquire the lock, the third processor 63 transmits the synchronous register control circuit 1 through the synchronous register access request path A3. Sends a lock request. At the same time, the third processor 63
The measurement ID value “2” is transmitted to the measurement counter control circuit 3 through the measurement counter access request path L3.

【0049】同期レジスタ制御回路1は、第3のプロセ
ッサ63からのロック要求により、同期レジスタ2の値
を読み出し、その値を同期レジスタリプライパスB3を
通して、第3のプロセッサ63へ送出する。同時に、同
期レジスタ制御回路1は、同期レジスタ書き込みパスC
を通して、同期レジスタ2へ、ロック中であることを示
す“1”を書き込む。
The synchronous register control circuit 1 reads the value of the synchronous register 2 in response to a lock request from the third processor 63, and sends the value to the third processor 63 via the synchronous register reply path B3. At the same time, the synchronization register control circuit 1
Is written to the synchronization register 2 through the process, indicating that locking is being performed.

【0050】同期レジスタ2から読み出した値が“0”
で、第3のプロセッサ63がロックの取得に成功した場
合、計測カウンタ制御回路3は、第3のプロセッサ63
から送られてきた計測用ID値“2”を、計測用ID保
持レジスタ31へ格納する。計測用ID保持レジスタ3
1は、計測用ID値“2”をカウントアップ制御回路4
へ出力する。
The value read from the synchronization register 2 is "0"
When the third processor 63 succeeds in acquiring the lock, the measurement counter control circuit 3
Is stored in the measurement ID holding register 31. Measurement ID holding register 3
1 is a count-up control circuit 4 for counting the measurement ID value “2”.
Output to

【0051】カウントアップ制御回路4は、計測用ID
保持レジスタ31の出力Fと、同期レジスタ2の出力G
を用いて、計測用ID保持レジスタ31の保持する第3
のプロセッサ63の計測用ID値“2”に対応するカウ
ントアップ指示信号H2を第2の計測カウンタ52に出
力する。カウントアップ指示信号H2を受けた第2の計
測カウンタ52は、カウントアップ指示信号H2が与え
られている間、クロック信号をカウントする。
The count-up control circuit 4 has a measurement ID
The output F of the holding register 31 and the output G of the synchronization register 2
The third ID held by the measurement ID holding register 31 using
The count-up instruction signal H2 corresponding to the measurement ID value “2” of the processor 63 is output to the second measurement counter 52. The second measurement counter 52 that has received the count-up instruction signal H2 counts the clock signal while the count-up instruction signal H2 is being supplied.

【0052】以上の動作により、第3のプロセッサ63
がロックを取得している時間だけを、第2の計測カウン
タ52で計測できる。
By the above operation, the third processor 63
The second measurement counter 52 can measure only the time during which the lock is acquired.

【0053】第1〜第3のプロセッサ61〜63が、並
列ルーチンR1〜R3の実行を終了した後、計測カウン
タ読み出しルーチンSにより、第1のプロセッサ61は
第1の計測カウンタ51、第2の計測カウンタ52の値
の読み出しを行う。第1のプロセッサ61は、計測カウ
ンタアクセス要求パスL1を通して、計測カウンタ制御
回路3へ、第1の計測カウンタ51の値の読み出し要求
を送出する。計測カウンタ制御回路3は、計測カウンタ
読み出しパスKを通して、第1の計測カウンタ51の値
を読み出す。計測カウンタ制御回路3は、計測カウンタ
リプライパスM1を通して、第1の計測カウンタ51か
ら読み出した値を、第1のプロセッサ61へ送出する。
次に同様にして第2の計測カウンタ52の値を読み出し
て送出する。
After the first to third processors 61 to 63 complete execution of the parallel routines R1 to R3, the first processor 61 executes the first measurement counter 51 and the second The value of the measurement counter 52 is read. The first processor 61 sends a request to read the value of the first measurement counter 51 to the measurement counter control circuit 3 through the measurement counter access request path L1. The measurement counter control circuit 3 reads the value of the first measurement counter 51 through the measurement counter read path K. The measurement counter control circuit 3 sends the value read from the first measurement counter 51 to the first processor 61 via the measurement counter reply path M1.
Next, similarly, the value of the second measurement counter 52 is read and transmitted.

【0054】第1のプロセッサ61が、全ての第1の計
測カウンタ51および第2の計測カウンタ52の値を読
み出すことにより、同期レジスタ2へのアクセス時間
を、計測用ID値ごと、即ち処理X、処理Yごとに得る
ことができる。
The first processor 61 reads out the values of all the first measurement counters 51 and the second measurement counters 52 to determine the access time to the synchronization register 2 for each measurement ID value, that is, the processing X , For each process Y.

【0055】第1の実施の形態の説明では、プロセッサ
数を3、計測カウンタ数を2として説明したが、プロセ
ッサの数と計測カウンタの数は任意に設計できる。
In the description of the first embodiment, the number of processors is 3 and the number of measurement counters is 2. However, the number of processors and the number of measurement counters can be arbitrarily designed.

【0056】以上説明したように、本発明の測定回路
は、各プロセッサに個別の計測用ID値を設定し、その
ID値ごとに共有リソースのアクセス時間を計測するこ
とが可能であり、共有リソースへのアクセス時間を、シ
ステム内のプロセッサの合計時間でなく、プロセッサご
とに知ることができ、プログラムの性能を測定すること
ができる。
As described above, the measurement circuit of the present invention can set an individual measurement ID value for each processor and measure the access time of the shared resource for each ID value. Access time can be known for each processor, not the total time of the processors in the system, and the performance of the program can be measured.

【0057】プロセッサ間のアクセス時間の偏りなど、
従来の測定方法よりも詳細な性能情報を得ることができ
るため、並列プログラムのチューニングを行うべき部分
を特定しやすい。例えば、第1の実施の形態において、
第2の計測カウンタ52の値が第1の計測カウンタ51
の値より大きくなる場合、第3のプロセッサ63のロッ
ク時間が長くなっているので、処理Yのチューニングを
行えば全体の処理時間を削減できることが分かる。
For example, access time deviation between processors
Since it is possible to obtain more detailed performance information than the conventional measurement method, it is easy to specify a portion where the parallel program should be tuned. For example, in the first embodiment,
When the value of the second measurement counter 52 is equal to the value of the first measurement counter 51,
If the value is larger than the value, the lock time of the third processor 63 is long, and it can be seen that the entire processing time can be reduced by tuning the processing Y.

【0058】制御プログラムは記録媒体62から制御部
61のデータ処理装置(不図示)に読み込まれデータ処
理装置の動作を制御する。制御部61は制御プログラム
の制御により以下の処理を実行する。
The control program is read from the recording medium 62 into a data processing device (not shown) of the control unit 61 and controls the operation of the data processing device. The control unit 61 executes the following processing under the control of the control program.

【0059】即ち、計測カウンタ制御回路3を経由した
プロセッサの指示により第1の計測カウンタ51、第2
の計測カウンタ52の値を初期化する処理と、各プロセ
ッサ61〜63に対しそれぞれの計測用IDレジスタ7
1〜73にそれぞれのプロセッサの処理内容に対応した
計測用ID値を設定させる処理と、各プロセッサが共有
リソース2をアクセスする際、その各プロセッサから計
測用IDレジスタ71〜73に設定した計測用ID値を
計測カウンタ制御回路4に送出させる処理と、いずれか
のプロセッサが同期レジスタ2の排他処理用のアクセス
に成功してロックするとそのプロセッサから送られてき
た計測用ID値を計測カウンタ制御回路3の計測用レジ
スタ31へ格納してカウントアップ制御回路4に送出さ
せ、カウントアップ制御回路4に、入力した計測用ID
値に対応した計測カウンタ51〜52のいずれかに対
し、同期レジスタ2がロックされている間カウントアッ
プ指示信号を出力させ、カウントアップ指示信号を入力
したいずれかの計測カウンタ51〜52にクロック信号
をカウントさせる処理と、同期レジスタ2のロックが解
除されるとカウントアップ制御回路4にカウントアップ
信号の出力を停止させる処理と、計測カウンタ制御回路
3を経由したプロセッサの指示により、計測カウンタ5
1〜52の計側値を読み出し、計測カウンタ制御回路3
を経由してプロセッサへ送出する処理とを実行する。
That is, the first measurement counter 51 and the second measurement counter 51 are instructed by the processor via the measurement counter control circuit 3.
For initializing the value of the measurement counter 52 of each of the above,
1 to 73 to set a measurement ID value corresponding to the processing content of each processor; and, when each processor accesses the shared resource 2, the measurement ID value set in the measurement ID register 71 to 73 from each processor. When the ID value is sent to the measurement counter control circuit 4, and when one of the processors successfully locks the access of the synchronization register 2 for exclusive processing, the measurement ID value sent from the processor is sent to the measurement counter control circuit 4. 3 is sent to the count-up control circuit 4 and sent to the count-up control circuit 4.
A count-up instruction signal is output to any of the measurement counters 51 to 52 corresponding to the value while the synchronization register 2 is locked, and a clock signal is sent to any of the measurement counters 51 to 52 to which the count-up instruction signal is input. , The process of stopping the output of the count-up signal to the count-up control circuit 4 when the synchronization register 2 is unlocked, and the instruction of the processor via the measurement counter control circuit 3.
1 to 52 are read, and the measurement counter control circuit 3
And sending it to the processor via

【0060】次に第2の実施の形態について説明する。
第1の実施の形態では、プロセッサ数を3、計測カウン
タ数を2としたが、第2の実施の形態ではプロセッサの
数と同数の計測カウンタを準備し、図2のQ1〜Q3の
ルーチンでプロセッサの物理番号や、論理番号のよう
な、プロセッサ個別の値を計測用ID値として与えるこ
とにより、計測カウンタにそれぞれのプロセッサのアク
セス時間をカウントさせ、プロセッサごとのアクセス時
間を測定する。第1の実施の形態では処理の種類ごとの
アクセス時間を測定したが、第2の実施の形態では個々
のプロセッサごとのアクセス時間を計測する。
Next, a second embodiment will be described.
In the first embodiment, the number of processors is 3 and the number of measurement counters is 2. However, in the second embodiment, the same number of measurement counters as the number of processors are prepared, and the number of processors is determined by the routine of Q1 to Q3 in FIG. By giving a processor-specific value, such as a processor physical number or a logical number, as a measurement ID value, a measurement counter is made to count the access time of each processor, and the access time of each processor is measured. In the first embodiment, the access time for each type of processing is measured. In the second embodiment, the access time for each processor is measured.

【0061】次に第3の実施の形態について説明する。
第1の実施の形態では、同期レジスタ2がロックされて
いる時間を測定する場合を例に説明を行ったが、第3の
実施の形態では同期レジスタのアクセス回数を測定す
る。第1の実施の形態ではカウントアップ制御回路4
は、計測用ID保持レジスタ31の出力Fと、同期レジ
スタ2の出力Gを用いて、計測用ID保持レジスタ31
の保持するプロセッサの計測用ID値に対応するカウン
トアップ指示信号H1またはH2を第1の計測カウンタ
51または第2の計測カウンタ52に出力し、カウント
アップ指示信号を受けた計測カウンタは、カウントアッ
プ指示信号が与えられている間、クロック信号をカウン
トしていたが、第3の実施の形態ではカウントアップ制
御回路4が、カウントアップ指示信号H1またはH2を
生成する条件を変更して、同期レジスタの立ち上がりク
ロックのみを計測カウンタへのカウントアップ指示信号
とすることで、同期レジスタ2のアクセス回数も計測用
ID値別に容易に測定できる。次に第4の実施の形態に
ついて説明する。第1の実施の形態の性能測定回路は同
期レジスタを対象としてのアクセス時間の測定であった
が、第4の実施の形態では同期レジスタ以外の共有リソ
ースのアクセス時間やアクセス回数の測定を行う。図1
の同期レジスタ2と同期レジスタ制御回路1を、共有メ
モリ、プロセス間のネットワーク、周辺機器等およびそ
の制御回路に置きかえると、共有メモリのアクセス時間
や、プロセッサ間ネットワークの使用時間、周辺装置の
使用時間などの測定を行うことができる。
Next, a third embodiment will be described.
In the first embodiment, the case where the time during which the synchronization register 2 is locked is described as an example, but in the third embodiment, the number of accesses to the synchronization register is measured. In the first embodiment, the count-up control circuit 4
Uses the output F of the measurement ID holding register 31 and the output G of the synchronization register 2 to calculate the measurement ID holding register 31
And outputs a count-up instruction signal H1 or H2 corresponding to the measurement ID value of the processor held by the processor to the first measurement counter 51 or the second measurement counter 52, and the measurement counter receiving the count-up instruction signal counts up. While the clock signal was counted while the instruction signal was supplied, in the third embodiment, the count-up control circuit 4 changes the condition for generating the count-up instruction signal H1 or H2, and Is used as a count-up instruction signal to the measurement counter, the number of accesses to the synchronization register 2 can be easily measured for each measurement ID value. Next, a fourth embodiment will be described. Although the performance measurement circuit of the first embodiment measures the access time for the synchronization register, the fourth embodiment measures the access time and the number of accesses of the shared resources other than the synchronization register. FIG.
When the synchronous register 2 and the synchronous register control circuit 1 are replaced with a shared memory, a network between processes, peripheral devices and the like and their control circuits, the access time of the shared memory, the usage time of the network between processors, and the usage time of the peripheral device And other measurements.

【0062】次に第5の実施の形態について説明する。
図3は第5の実施の形態の並列プロセッサシステムの並
列プログラムの一例のフローチャートであり、図中符号
P、Q1、Q2、R1、R2、Sはプログラムのルーチ
ンである。本実施の形態ではルーチンごとのアクセス時
間を測定する。
Next, a fifth embodiment will be described.
FIG. 3 is a flowchart of an example of a parallel program of the parallel processor system according to the fifth embodiment. In the figure, reference numerals P, Q1, Q2, R1, R2, and S denote program routines. In the present embodiment, the access time for each routine is measured.

【0063】プロセッサ内部の計測用ID値は、ソフト
ウェアによって容易に設定できるので、ルーチンごとに
計測用ID値の設定を切り替える。先ず性能測定に先立
って、計測カウンタの初期化ルーチンPを実行する。次
にルーチンQ1で計測の対象となるプロセッサの計測用
IDレジスタに実行するルーチンのID値X1を設定す
る。その後ルーチンR1を実行する。次にルーチンQ2
で計測の対象となるプロセッサの計測用IDレジスタに
実行するルーチンのID値X2を設定し、その後ルーチ
ンR2を実行し、所望のルーチンが終了した後計測カウ
ンタのカウンタ値を読み出すことでそれぞれのルーチン
ごとのアクセス時間を測定することができる。
Since the measurement ID value inside the processor can be easily set by software, the setting of the measurement ID value is switched for each routine. First, prior to performance measurement, an initialization routine P of a measurement counter is executed. Next, in the routine Q1, the ID value X1 of the routine to be executed is set in the measurement ID register of the processor to be measured. Thereafter, the routine R1 is executed. Next, the routine Q2
The routine sets the ID value X2 of the routine to be executed in the measurement ID register of the processor to be measured, executes the routine R2, and reads the counter value of the measurement counter after the desired routine is completed. The access time for each can be measured.

【0064】[0064]

【発明の効果】以上説明したように、本発明の並列シス
テム用性能測定回路は並列プロセッサシステムにおいて
各プロセッサや各処理ごとのアクセス時間や、アクセス
回数などを測定することができるので、プログラムのチ
ューニングを行う場合容易に最もチューニングの必要な
部分を特定でき、効率よくプログラムの改善を行いプロ
グラムの性能を向上させることができるという効果があ
る。
As described above, the performance measuring circuit for a parallel system according to the present invention can measure the access time and the number of accesses for each processor and each process in a parallel processor system, so that the tuning of the program can be performed. In this case, it is possible to easily specify the part that requires the most tuning, and to improve the program efficiently and improve the performance of the program.

【0065】従来は性能測定用カウンタを設けても、各
プロセッサが共有リソースをアクセスした時間の合計し
か得ることができなかった。これに対し本発明の測定回
路は、各プロセッサに個別の計測用ID値を設定し、そ
のID値ごとに共有リソースのアクセス時間を計測する
ことが可能で、共有リソースへのアクセス時間を、シス
テム内のプロセッサの合計時間でなく、プロセッサごと
に知ることができる。プロセッサ間のアクセス時間の偏
りなど、従来の測定方法よりも詳細な性能情報を得るこ
とができるため、並列プログラムのチューニングを行う
べき部分を特定しやすい。
Conventionally, even if a performance measurement counter is provided, only the total time during which each processor accesses the shared resource can be obtained. On the other hand, the measurement circuit of the present invention can set an individual measurement ID value for each processor and measure the access time of the shared resource for each ID value. Not only the total time of the processors within, but per processor. Since it is possible to obtain more detailed performance information than the conventional measurement method, such as a bias in the access time between processors, it is easy to specify a part where the parallel program should be tuned.

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

【図1】本発明の第1の実施の形態の性能測定回路を備
えた並列プロセッサシステムのブロック構成図である。
FIG. 1 is a block diagram of a parallel processor system including a performance measuring circuit according to a first embodiment of the present invention.

【図2】図1の並列プロセッサシステムの並列プログラ
ムの一例のフローチャートである。
FIG. 2 is a flowchart of an example of a parallel program of the parallel processor system of FIG. 1;

【図3】は第5の実施の形態の並列プロセッサシステム
の並列プログラムの一例のフローチャートである。
FIG. 3 is a flowchart illustrating an example of a parallel program of a parallel processor system according to a fifth embodiment;

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

1 同期レジスタ制御回路 2 同期レジスタ 3 計測カウンタ制御回路 31 計測用ID保持レジスタ 4 カウントアップ制御回路 51 第1の計測カウンタ 52 第2の計測カウンタ 61 第1のプロセッサ 62 第2のプロセッサ 63 第3のプロセッサ 71〜73 計測用IDレジスタ 9 性能測定回路 A1〜A3 同期レジスタアクセス要求パス B1〜B3 同期レジスタリプライパス C 同期レジスタ書き込みパス D 同期レジスタ読み出しパス E 同期レジスタ制御信号 F 計測用ID保持レジスタ出力 G 同期レジスタ出力 H1〜H2 カウントアップ指示信号 J 計測カウンタ書き込みパス K 計測カウンタ読み出しパス L1〜L3 計測カウンタアクセス要求パス M1〜Mn 計測カウンタリプライパス P、Q1〜Q3、R1〜R3、S プログラムのルー
チン
Reference Signs List 1 synchronization register control circuit 2 synchronization register 3 measurement counter control circuit 31 measurement ID holding register 4 count-up control circuit 51 first measurement counter 52 second measurement counter 61 first processor 62 second processor 63 third Processor 71 to 73 Measurement ID register 9 Performance measurement circuit A1 to A3 Synchronous register access request path B1 to B3 Synchronous register reply path C Synchronous register write path D Synchronous register read path E Synchronous register control signal F Measurement ID holding register output G Synchronous register output H1 to H2 Count up instruction signal J Measurement counter write path K Measurement counter read path L1 to L3 Measurement counter access request path M1 to Mn Measurement counter reply path P, Q1 to Q3, R1 to R3, S Program routine

Claims (11)

【特許請求の範囲】[Claims] 【請求項1】 プログラムの性能測定回路を備えた並列
プロセッサシステムであって、 計測用ID値をソフトウェアで設定可能な計測用IDレ
ジスタを有する複数のプロセッサと、 全ての前記プロセッサからアクセス可能な共有リソース
と、該共有リソースのアクセスを制御する共有リソース
制御回路と、 前記プロセッサ内部の前記計測用IDレジスタに設定さ
れた計測用ID値別に、前記プロセッサから前記共有リ
ソースへのアクセス時間を計測するための性能測定回路
を有し、 前記性能測定回路は、 複数の計測カウンタと、 前記プロセッサから前記共有リソースへのアクセス要求
を処理して計測用IDレジスタ値を格納し、前記計測用
カウンタに書き込みを指示し、前記計測カウンタのカウ
ンタ値を読み出し前記プロセッサに送信する計測カウン
タ制御回路と、 前記計測カウンタを制御して、計測用ID値に対応する
前記プロセッサの前記共有リソースへのアクセス状態を
対応する前記計測カウンタに記録させるカウントアップ
制御回路と、を備えることを特徴とする性能測定回路を
備えた並列プロセッサシステム。
1. A parallel processor system having a program performance measurement circuit, comprising: a plurality of processors having a measurement ID register capable of setting a measurement ID value by software; and a shared processor accessible from all the processors. A resource, a shared resource control circuit that controls access to the shared resource, and an access time from the processor to the shared resource for each measurement ID value set in the measurement ID register inside the processor. The performance measurement circuit has a plurality of measurement counters, processes an access request from the processor to the shared resource, stores a measurement ID register value, and writes the measurement counter. Instructs and reads the counter value of the measurement counter and sends it to the processor A measurement counter control circuit, and a count-up control circuit that controls the measurement counter to cause the corresponding measurement counter to record an access state of the processor to the shared resource corresponding to the measurement ID value. A parallel processor system equipped with a characteristic performance measurement circuit.
【請求項2】 前記計測カウンタに記録する前記共有リ
ソースへのアクセス状態がアクセス時間である請求項1
に記載の性能測定回路を備えた並列プロセッサシステ
ム。
2. The access state to the shared resource recorded in the measurement counter is an access time.
A parallel processor system comprising the performance measurement circuit according to item 1.
【請求項3】 前記計測カウンタに記録する前記共有リ
ソースへのアクセス状態がアクセス回数である請求項1
に記載の性能測定回路を備えた並列プロセッサシステ
ム。
3. The access status of the shared resource recorded in the measurement counter is an access count.
A parallel processor system comprising the performance measurement circuit according to item 1.
【請求項4】 前記プロセッサの前記計測用IDレジス
タに設定される計測用ID値が、プログラムの処理の種
類に対応した値であり、処理の種類に対応した計測値が
前記計測カウンタに記録される請求項1に記載の性能測
定回路を備えた並列プロセッサシステム。
4. A measurement ID value set in the measurement ID register of the processor is a value corresponding to a type of processing of a program, and a measurement value corresponding to the type of processing is recorded in the measurement counter. A parallel processor system comprising the performance measuring circuit according to claim 1.
【請求項5】 前記プロセッサの前記計測用IDレジス
タに設定される計測用ID値が、前記プロセッサを識別
する値であり、各プロセッサに対応した計測値が前記計
測カウンタに記録される請求項1に記載の性能測定回路
を備えた並列プロセッサシステム。
5. The measurement ID value set in the measurement ID register of the processor is a value for identifying the processor, and a measurement value corresponding to each processor is recorded in the measurement counter. A parallel processor system comprising the performance measurement circuit according to item 1.
【請求項6】 前記共有リソースが同期レジスタである
請求項1に記載の性能測定回路を備えた並列プロセッサ
システム。
6. The parallel processor system according to claim 1, wherein said shared resource is a synchronization register.
【請求項7】 前記共有リソースが共有メモリである請
求項1に記載の性能測定回路を備えた並列プロセッサシ
ステム。
7. The parallel processor system according to claim 1, wherein the shared resource is a shared memory.
【請求項8】 前記共有リソースがプロセッサ間ネット
ワークであり、計側値が該ネットワークの使用時間であ
る請求項1に記載の性能測定回路を備えた並列プロセッ
サシステム。
8. The parallel processor system according to claim 1, wherein the shared resource is an inter-processor network, and the measured value is a use time of the network.
【請求項9】 前記共有リソースが周辺装置であり、計
側値が該周辺機器の使用時間である請求項1に記載の性
能測定回路を備えた並列プロセッサシステム。
9. The parallel processor system according to claim 1, wherein the shared resource is a peripheral device, and the measured value is a usage time of the peripheral device.
【請求項10】 性能測定回路を備えた並列プロセッサ
システムのプログラムの性能測定方法であって、 前記性能測定回路の計測カウンタの値を初期化し、 各プロセッサのそれぞれの計測用IDレジスタにそれぞ
れのプロセッサの処理内容に対応した計測用ID値を設
定し、 前記プロセッサが共有リソースをアクセスする際、該プ
ロセッサが内部の前記計測用IDレジスタに設定された
計測用ID値を、前記性能測定回路の計測カウンタ制御
回路へ送出し、 いずれかの前記プロセッサが前記共有リソースへのアク
セスに成功すると、該プロセッサから送付された計測用
ID値を前記計測カウンタ制御回路の計測用レジスタへ
格納してカウントアップ制御回路に送出し、 前記カウントアップ制御回路は、入力した計測用ID値
に対応した前記計測カウンタに対し、所定のカウントア
ップ指示信号を出力し、 カウントアップ指示信号を入力した前記計測カウンタ
は、所定の手順でクロック信号を計測し、 前記共有リソースのアクセスが解除されるとカウントア
ップ制御回路はカウントアップ信号の出力を停止し、 所定の処理が終了すると、前記計測カウンタの計側値を
読み出して所定のプロセッサへ送出する、ことを特徴と
する並列プロセッサシステムのプログラムの性能測定方
法。
10. A method for measuring the performance of a program of a parallel processor system provided with a performance measuring circuit, wherein a value of a measurement counter of the performance measuring circuit is initialized, and each processor is stored in a measurement ID register of each processor. When the processor accesses a shared resource, the processor sets the measurement ID value set in the internal measurement ID register to the measurement ID value of the performance measurement circuit. Sends to the counter control circuit, and if any of the processors succeeds in accessing the shared resource, stores the measurement ID value sent from the processor in the measurement register of the measurement counter control circuit and counts up. Circuit, and the count-up control circuit outputs the measurement ID value corresponding to the input measurement ID value. The measurement counter outputs a predetermined count-up instruction signal to the measurement counter, and the measurement counter that has received the count-up instruction signal measures the clock signal in a predetermined procedure, and counts up when the access to the shared resource is released. A method for measuring the performance of a program of a parallel processor system, wherein the circuit stops outputting the count-up signal, and upon completion of a predetermined process, reads the measured value of the measurement counter and sends it to a predetermined processor.
【請求項11】 並列プロセッサシステムのプログラム
の性能を測定するための制御プログラムを記録した記録
媒体であって、 計測カウンタ制御回路を経由したプロセッサの指示によ
り各計測カウンタの値を初期化する手順と、 各プロセッサに対しそれぞれの計測用IDレジスタにそ
れぞれのプロセッサの処理内容に対応した計測用ID値
を設定させる手順と、 前記プロセッサが共有リソースをアクセスする際、該プ
ロセッサから前記計測用IDレジスタに設定した計測用
ID値を計測カウンタ制御回路に送出させる手順と、 いずれかのプロセッサが前記共有リソースのアクセスに
成功すると該プロセッサから送られてきた計測用ID値
を前記計測カウンタ制御回路の計測用レジスタへ格納し
てカウントアップ制御回路に送出させ、該カウントアッ
プ制御回路に、入力した計測用ID値に対応した前記計
測カウンタのいずれかに対し、前記共有リソースがアク
セスされている間カウントアップ指示信号を出力させ、
カウントアップ指示信号を入力した前記計測カウンタに
所定の手順でクロック信号を計測させる手順と、 前記共有リソースのロックが解除されるとカウントアッ
プ制御回路にカウントアップ信号の出力を停止させる手
順と、 前記計測カウンタ制御回路を経由した前記プロセッサの
指示により、各前記計測カウンタの計側値を読み出し、
前記計測カウンタ制御回路を経由して該プロセッサへ送
出する手順と、を実行させるためのプログラムを記録し
た記録媒体。
11. A recording medium recording a control program for measuring the performance of a program of a parallel processor system, comprising: a procedure for initializing the value of each measurement counter according to an instruction of a processor via a measurement counter control circuit. A procedure for causing each processor to set a measurement ID value corresponding to the processing content of each processor in each measurement ID register; and when the processor accesses a shared resource, the processor sends the measurement ID register to the measurement ID register. A procedure for sending the set measurement ID value to the measurement counter control circuit; and when any of the processors succeeds in accessing the shared resource, the measurement ID value sent from the processor is used for measurement by the measurement counter control circuit. It is stored in a register and sent to the count-up control circuit. The setup control circuit, to one of said measurement counter corresponding to the measurement ID value received, to output a count-up instruction signal while said shared resource is accessed,
A step of causing the measurement counter to input the count-up instruction signal to measure a clock signal in a predetermined procedure, a step of stopping the count-up control circuit from outputting the count-up signal when the lock of the shared resource is released, According to the instruction of the processor via a measurement counter control circuit, read the measurement side value of each measurement counter,
A recording medium for recording a program for executing a procedure of sending the measurement counter control circuit to the processor via the measurement counter control circuit.
JP10074476A 1998-03-23 1998-03-23 Parallel processor system equipped with performance measuring circuit and method for measuring performance of program Pending JPH11272499A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10074476A JPH11272499A (en) 1998-03-23 1998-03-23 Parallel processor system equipped with performance measuring circuit and method for measuring performance of program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10074476A JPH11272499A (en) 1998-03-23 1998-03-23 Parallel processor system equipped with performance measuring circuit and method for measuring performance of program

Publications (1)

Publication Number Publication Date
JPH11272499A true JPH11272499A (en) 1999-10-08

Family

ID=13548370

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10074476A Pending JPH11272499A (en) 1998-03-23 1998-03-23 Parallel processor system equipped with performance measuring circuit and method for measuring performance of program

Country Status (1)

Country Link
JP (1) JPH11272499A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100386902B1 (en) * 1999-12-22 2003-06-12 닛폰 덴키(주) External bus controller
JP2008071237A (en) * 2006-09-15 2008-03-27 Hitachi Ltd Performance evaluation system using hardware monitor, and reconstructible computer system
JP2008529114A (en) * 2005-01-24 2008-07-31 インターナショナル・ビジネス・マシーンズ・コーポレーション Method for optimizing logging and playback of multitasking applications in a single processor or multiprocessor computer system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100386902B1 (en) * 1999-12-22 2003-06-12 닛폰 덴키(주) External bus controller
JP2008529114A (en) * 2005-01-24 2008-07-31 インターナショナル・ビジネス・マシーンズ・コーポレーション Method for optimizing logging and playback of multitasking applications in a single processor or multiprocessor computer system
JP2013118005A (en) * 2005-01-24 2013-06-13 Internatl Business Mach Corp <Ibm> Method for optimizing logging and replay of multi-task application in single processor or multi-processor computer system
JP2008071237A (en) * 2006-09-15 2008-03-27 Hitachi Ltd Performance evaluation system using hardware monitor, and reconstructible computer system

Similar Documents

Publication Publication Date Title
EP0528585B1 (en) Data processing system with internal instruction cache
US6604060B1 (en) Method and apparatus for determining CC-NUMA intra-processor delays
US8140925B2 (en) Method and apparatus to debug an integrated circuit chip via synchronous clock stop and scan
US5802378A (en) Performance monitoring in multiprocessor system with interrupt masking
US6502209B1 (en) Chip with debug capability
US7861093B2 (en) Managing data access via a loop only if changed locking facility
US20090259875A1 (en) Store Clock and Store Clock Fast Instruction Execution
US5875320A (en) System and method for synchronizing plural processor clocks in a multiprocessor system
TW201145016A (en) Non-intrusive debugging framework for parallel software based on super multi-core framework
JP2022550697A (en) Tracking the status of programmable devices
US6985980B1 (en) Diagnostic scheme for programmable logic in a system on a chip
JPS58501346A (en) Microprocessor type with internal access function
US6654908B1 (en) Method for and system producing shared usage of intercommunication fabric error logging registers in a multiprocessor environment
CN110727664A (en) Method and device for executing target operation on public cloud data
US20170277613A1 (en) Multiple mode testing in a vector memory restricted test environment
US5615374A (en) Lock control method for resource
JPH11272499A (en) Parallel processor system equipped with performance measuring circuit and method for measuring performance of program
WO2018042935A1 (en) Electronic control device and analysis system
TWI840631B (en) Multi-threads tracking method, multi-threads tracking system for operating system and electronic device using the same
US20060161699A1 (en) Identifying a processor in a multiprocessor system
US11734085B2 (en) Managing concurrent accesses by a set of tasks to a shared resource of a computer system
Caspin Evaluating and Optimizing Real-Time Software Transactional Memory
CN115048220A (en) Dynamic data competition detection method, device, terminal and storage medium
CN114138503A (en) TMS320C6678 distributed system-based event tracking synchronization method
TW202221502A (en) Multi-threads tracking method, multi-threads tracking system for operating system and electronic device using the same