JPH02272647A - System for measuring execution time of program - Google Patents

System for measuring execution time of program

Info

Publication number
JPH02272647A
JPH02272647A JP1092814A JP9281489A JPH02272647A JP H02272647 A JPH02272647 A JP H02272647A JP 1092814 A JP1092814 A JP 1092814A JP 9281489 A JP9281489 A JP 9281489A JP H02272647 A JPH02272647 A JP H02272647A
Authority
JP
Japan
Prior art keywords
task
execution time
program
identification number
processing unit
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
JP1092814A
Other languages
Japanese (ja)
Inventor
Koichi Haniyuda
羽入田 貢一
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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry Co 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 Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP1092814A priority Critical patent/JPH02272647A/en
Publication of JPH02272647A publication Critical patent/JPH02272647A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To prevent the processing performance of a CPU or the like from being deteriorated by measuring execution time by hardware processing. CONSTITUTION:A time measuring instrument 11 has a decoder circuit 15 decoding the microprogram addresses of the CPU 10 and detecting identification(ID) number rewriting instructions MA to M0 included in a program to be measured, a register 16 whose stored contents are rewritten to task ID numbers T following the instructions MA to M0 and a memory circuit 17 for successively storing the number of clocks counted up to the end of the processing of a task corresponding to each task ID number T stored in the register 16 as the execution time. Consequently, the execution time can be known in each task from the number of clocks stored in the memory circuit 17 in each task ID number and the processing performance of the CPU or the like can be prevented from being deteriorated.

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明は、電子計算機におけるプログラムの実行時間を
計測する装置に関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a device for measuring the execution time of a program in an electronic computer.

[従来の技術1 これまで、電子計算機におけるプログラムの実行時間を
計測する装置として、ソースプログラムを目的プログラ
ムに翻訳するコンパイラを利用する実行時間計測システ
ムが開発された。
[Prior Art 1] Until now, as a device for measuring the execution time of a program in an electronic computer, an execution time measurement system that uses a compiler that translates a source program into a target program has been developed.

この実行時間計測システムは、特開昭62−24544
3号公報に記載された技術で、コンパイラによって翻訳
する場合に、第2図に示すように、目的プログラムを構
成するそれぞれのモジュールlに、他のモジュールと識
別するためのモジュール名2と、実行時間計測前処理ル
ーチンの呼び出し命令(CALL  LIBA)3と、
ソースフログラムのモジュールの内容に対応した実行命
令コード4と、実行時間計測後処理ルーチンの呼び出し
命令(CALL  LIBB)5とを備えた構成とする
This execution time measurement system is based on Japanese Patent Application Laid-Open No. 62-24544.
When translating by a compiler using the technology described in Publication No. 3, as shown in Figure 2, each module l that makes up the target program is given a module name 2 to distinguish it from other modules, and an execution A time measurement preprocessing routine call instruction (CALL LIBA) 3;
The configuration includes an execution command code 4 corresponding to the contents of the module of the source program, and a call command (CALL LIBB) 5 for the execution time measurement post-processing routine.

そして、目的プログラムの実行に際しては、各モジュー
ル毎に、呼び出し命令3によって前処理ルーチンが呼び
出された時刻(即ち、実行開始時の時刻)tIと呼び出
し命令5によって後処理ルーチンが呼び出された時刻(
即ら、実行終了時の時刻)11とを記憶させておいて、
後処理ルーチン内で、当該モジュールの実行時間1=1
.−11を演算させるようにしたものである。
When executing the target program, for each module, the time tI when the preprocessing routine is called by the call instruction 3 (i.e., the time at the start of execution) and the time tI when the postprocessing routine is called by the call instruction 5 (
That is, the time at the end of execution) 11 is stored,
In the post-processing routine, the execution time of the module 1 = 1
.. -11 is calculated.

[発明が解決しようとする課題1 ところが、前述の実行時間計測システノ・では、各モジ
ュール毎に、ソフトウェアによる処理である実行時間計
測前処理ルーチンおよび実行時間計測後処理ルーチンを
実行しなければならないため、実行時間計測によってプ
ログラムを実施する中央処理装置等における処理性能が
低下する虞れがあった。
[Problem to be Solved by the Invention 1] However, in the above-mentioned execution time measurement system, the execution time measurement pre-processing routine and the execution time measurement post-processing routine, which are software processes, must be executed for each module. , there is a risk that processing performance in a central processing unit or the like that executes a program may be degraded due to execution time measurement.

また、多重プロセソ/ング等を実現するために複数のタ
スクを並行して処理するマルチタスキングシステム等に
おいては、プログラムを構成するタスク毎に実行時間を
計測する要求があるが、前述の手法の場合では、相異な
るタスクが同一モジュールを共用しているような場合に
は、タスク単位での実行時間の計測が不可能になるとい
った欠点もあった。
In addition, in multitasking systems that process multiple tasks in parallel to realize multiprocessing, there is a need to measure the execution time for each task that makes up a program. In some cases, when different tasks share the same module, there is a drawback that it is impossible to measure the execution time on a task-by-task basis.

本発明は、前記事情に鑑みてなされたもので、ソフトウ
ェアによ°る処理である実行時間計測用のルーチンを使
わずにプログラムの実行時間の計測を行うことができ、
従って、実行時間計測のために中央処理装置等における
処理性能が低下するような事態を防止することができ、
また、いわゆるマルチタスキングシステムにおいて、並
行して処理するタスクが同一のモジュールを共用するP
5ehでも、タスク単位で実行時間の計測を行うことが
できるプログラムの実行時間計測システムを提供するこ
とを目的とする。
The present invention has been made in view of the above circumstances, and it is possible to measure the execution time of a program without using a routine for measuring execution time, which is a software process.
Therefore, it is possible to prevent a situation where the processing performance of the central processing unit etc. decreases due to execution time measurement.
In addition, in a so-called multitasking system, P
5eh also aims to provide a program execution time measurement system that can measure execution time on a task-by-task basis.

[課題を解決するための手段] 本発明に係るプログラムの実行時間計測システムは、中
央処理装置におけるプログラムの実行時間を、該中央処
理装置に接続した時間計測装置を使って計測するもので
、前述の目的を達成することから、計測対象であるプロ
グラムと前記時間計測装置の双方に工夫を凝らしたもの
である。
[Means for Solving the Problems] A program execution time measuring system according to the present invention measures the execution time of a program in a central processing unit using a time measuring device connected to the central processing unit. In order to achieve this purpose, both the program to be measured and the time measuring device have been devised.

ここに、計測対象であるプログラムは、予め該プログラ
ムを構成するタスク毎に、他のタスクと識別するための
タスク識別番号を識別番号書き換え命令とともに組み込
んだ構成としている。
Here, the program to be measured has a configuration in which a task identification number for distinguishing it from other tasks is incorporated in advance for each task constituting the program together with an identification number rewriting instruction.

一方、…1記時間計測装置は、中央処理装置のマイクロ
プログラムアドレスを解読して計測対象であるプログラ
ムに組み込まれた識別番号書き換え命令を検出するデコ
ーダ回路と、該デコーダ回路の検出した識別番号書き換
え命令に付随するタスク識別番号に記憶内容が書き換え
られるレジスタと、該レジスタに保持されたタスク識別
番号別にそのタスク識別番号に対応するタスクの処理が
終了するまでにカウントされたクロック数を実行時間と
して順次格納してゆくメモリ回路とを具備した構成とし
ている。
On the other hand, the time measurement device described in 1. includes a decoder circuit that decodes the microprogram address of the central processing unit and detects an identification number rewriting instruction incorporated in the program to be measured, and an identification number rewriting instruction detected by the decoder circuit. The execution time is the number of clocks counted until the processing of the task corresponding to the task identification number is completed for each register whose memory contents are rewritten to the task identification number attached to the instruction and the task identification number held in the register. The configuration includes a memory circuit that sequentially stores data.

[作用] 本発明に係るプログラムの実行時間計測システムにおい
ては、計測対象であるプログラムが中央処理装置によっ
て実行された場合に、識別番号書き換え命令の有無から
タスクの切り替わりをデコーダ回路によって検出して、
レジスタの記憶内容を切り替わった新しいタスクのタス
ク識別番号に書き換える。
[Operation] In the program execution time measurement system according to the present invention, when a program to be measured is executed by a central processing unit, a decoder circuit detects a task switch based on the presence or absence of an identification number rewriting instruction,
Rewrite the contents of the register with the task identification number of the new task.

そして、時間計測装置のメモリ回路には、前記レジスタ
に1呆持されたタスク識別番号別に、そのタスク識別番
号のタスクに対する処理が終了するまでのクロック数を
、当該タスクの実行時間として順次格納する。
Then, in the memory circuit of the time measuring device, for each task identification number held in the register, the number of clocks until the processing for the task with that task identification number is completed is sequentially stored as the execution time of the task. .

従って、本発明に係るプログラムの実行時間計測システ
ムでは、前記メモリ回路においてタスク識別番号別に格
納されたクロック数から、タスク毎に実行時間を知るこ
とができ、いわゆるマルチタスキングシステムにおいて
、並行して処理するタスクが同一のモジュールを共用す
る場合でも、プログラムP@摺成するタスク単位で正確
に実行時間の計測を行うことができる。
Therefore, in the program execution time measurement system according to the present invention, it is possible to know the execution time for each task from the number of clocks stored for each task identification number in the memory circuit. Even if the tasks to be processed share the same module, the execution time can be accurately measured for each task that is created by the program P@.

しかも、この実施例の実行時間計測システムは、前述の
如く、ハードウェアによる処理によって実行時間の計測
を行うため、実行時間計測用の処理ルーチン等のソフト
ウェアを使って処理する従来の場合と異なり、実行時間
計測によって中央処理装置等における処理性能が低下す
る虞れもない。
Moreover, as described above, the execution time measurement system of this embodiment measures execution time by processing using hardware, unlike the conventional case in which processing is performed using software such as a processing routine for measuring execution time. There is no risk that the processing performance of the central processing unit or the like will deteriorate due to execution time measurement.

[実施例] 第1図および第3図〜第5図は、本発明に係るプログラ
ムの実行時間計測システムの一実施例を説明するための
ものである。
[Embodiment] FIG. 1 and FIGS. 3 to 5 are for explaining an embodiment of a program execution time measuring system according to the present invention.

一実施例であるプログラムの実行時間計測システムは、
第1図に示す如(中央処理装置(以下、CPUと呼ぶ)
10に時間計測装置11を接続しておいて、複数のタス
クから構成されるプログラムP(第3図参照)の中央処
理装置IOによる実行時間を、前記時間計測装置11を
使って計測するもので、計測対象であるプログラムPの
構成と時間計測装置l!の構成とに特徴を有している。
An example of a program execution time measurement system is as follows:
As shown in Figure 1 (central processing unit (hereinafter referred to as CPU))
10 is connected to a time measuring device 11, and the time measuring device 11 is used to measure the execution time by the central processing unit IO of a program P (see FIG. 3) consisting of a plurality of tasks. , the configuration of the program P to be measured and the time measurement device l! It is characterized by its structure.

計測対象であるプログラムPは、第3図に示すように、
複数のタスクA、B、C・・・・・・によって形成され
ている場合に、それぞれのタスク毎に、識別番号書き換
え命令MA、M、、Me・・・・・・を設けておく。こ
れらの命令MA、 Ma、 Me・・・・・・は、各タ
スクの構成(内容)の先頭に位置させ、オペランドとし
て自己のタスク識別番号Tを保有させておく(第3図に
おいては、命令MAにおける番号O11命令M、におけ
る番号02、命令Mcにおける番号03が、タスク識別
番号Tを示している)。
The program P to be measured is as shown in FIG.
When the task is formed by a plurality of tasks A, B, C, . . . , identification number rewriting instructions MA, M, Me, . . . are provided for each task. These instructions MA, Ma, Me... are placed at the beginning of the configuration (contents) of each task, and have their own task identification number T as an operand (in Fig. 3, the instructions Number O11 in MA, number 02 in instruction M, and number 03 in instruction Mc indicate the task identification number T).

なお、タスク識別番号Tとしては、00,01゜02.
03・・・・・・3Fを使用し、プログラムPの最終に
は、識別番号書き換え命令M0と、タスク識別番号OO
を設けてお(。このタスク識別番号00は、全てのタス
クが終了したことを意味し、時間計測装置11における
計測動作の終了に使う。
Note that the task identification number T is 00,01°02.
03...3F is used, and at the end of the program P, an identification number rewrite instruction M0 and a task identification number OO are used.
This task identification number 00 means that all tasks have been completed, and is used to end the measurement operation in the time measurement device 11.

前記CPUl0は、複数のタスクA、B、C・・・、・
・からなるプログラムPを、マイクロプログラムによっ
て実行するものである。
The CPU 10 has multiple tasks A, B, C, . . .
A program P consisting of: is executed by a microprogram.

前記時間計測装置11は、第1図に示すように、前記C
PUl0のマイクロプログラムアドレス(以下、mpル
アドレス記す)を受けるためのインタフェース回路(以
下、アドレスインタフェースと呼ぶ)12、およびマイ
クロプログラムの各命令(マイクロ命令)に同期したク
ロック信号を受けるためのインタフェース回路(以下、
クロックインタフェースと呼ぶ)13を介して、前記C
PU10に結合されている。
The time measuring device 11, as shown in FIG.
An interface circuit (hereinafter referred to as address interface) 12 for receiving the microprogram address (hereinafter referred to as mpl address) of PUl0, and an interface circuit (hereinafter referred to as address interface) 12 for receiving a clock signal synchronized with each instruction (microinstruction) of the microprogram ( below,
13 (referred to as a clock interface).
It is coupled to PU10.

また、この時間計測装置llは、アドレスラッチ回路1
4と、デコーダ回路15と、レジスタ(プログラムコー
ドレジスタ)16と、メモリ回路(イベントストアメモ
リ)17と、加算器18と、分配器19とを具備した構
成とされている。
Further, this time measuring device ll includes an address latch circuit 1
4, a decoder circuit 15, a register (program code register) 16, a memory circuit (event store memory) 17, an adder 18, and a distributor 19.

前記アドレスラッチ回路14は、前記アドレスインタフ
ェース12を介して、前記CPUl0のmpルアドレス
保持(ラッチ)する。
The address latch circuit 14 holds (latches) the multiple address of the CPU10 via the address interface 12.

前記デコーダ回路15は、前記ラッチ回路14に保持さ
れたmpルアドレス解読して、前記プログラムPに組み
込まれた職別番号書き換え命令の存在を検出する。しか
も、この検出に伴って、前述のレジスタ16やメモリ1
7へのライトイネーブル信号(W E )の送出や、前
記加算器18に+1を加算させるための信号の送出を行
って、これらの回路°16,17.18の動作を制御す
るコントローラとしても機能する。
The decoder circuit 15 decodes the mpl address held in the latch circuit 14 and detects the presence of a job classification number rewriting instruction incorporated in the program P. Moreover, along with this detection, the aforementioned register 16 and memory 1
It also functions as a controller that controls the operations of these circuits 16, 17, and 18 by sending a write enable signal (W E ) to 7 and sending a signal for causing the adder 18 to add +1. do.

このデコーダ回路15はROMを内蔵しており、このR
OMは、前述のプログラムPを構成する各タスクにおけ
る識別番号書き換え命令が、前記CPUl0におけるど
のmpルアドレス対応しているかを記憶している。
This decoder circuit 15 has a built-in ROM, and this R
The OM stores which address in the CPU 10 corresponds to the identification number rewriting instruction in each task constituting the program P described above.

従って、該デコーダ回路15では、前記ラッチ回路14
に保持されたmpルアドレスROMに記憶された内容と
照合することによって、前記識別番号書き換え命令の存
在を検出する。
Therefore, in the decoder circuit 15, the latch circuit 14
The existence of the identification number rewriting instruction is detected by comparing the contents stored in the simple address ROM held in the ROM.

前記レジスタ16は、前記デコーダ回路15が識別番号
書き換え命令を検出した場合に、その書き換え命令を持
つタスクのタスク識別番号を記憶するものである。従っ
て、このレジスタ16の記憶内容の書き換えのタイミン
グは、前記デコーダ回路15か識別番号書き換え命令を
検出する毎に、前記デコーダ回路15からのライトイネ
ーブル信号によって与えられる。
The register 16 stores, when the decoder circuit 15 detects an identification number rewriting instruction, the task identification number of the task that has the rewriting instruction. Therefore, the timing for rewriting the contents of the register 16 is given by the write enable signal from the decoder circuit 15 every time the decoder circuit 15 detects an identification number rewriting command.

該レジスタ16に保持されるタスク識別番号としては、
具体的には、mpルアドレス下位6ビツト(この下位6
ビツトが、前述のプログラムPにおけるタスク識別番号
Tを意味する)が相当する。
The task identification number held in the register 16 is as follows:
Specifically, the lower 6 bits of the mpl address (this lower 6
This bit corresponds to the task identification number T in the program P described above.

前記メモリ回路17は、第4図に示すように、前記レジ
スタ16に保持されたタスク識別番号別に、そのタスク
識別番号Tに対応するタスクの処理が終了するまでにカ
ウントされたクロック数Nを実行時間として順次格納し
てゆくものである。
As shown in FIG. 4, the memory circuit 17 executes the number of clocks N counted until the processing of the task corresponding to the task identification number T is completed for each task identification number held in the register 16. It is stored sequentially as time.

識別番号書き換え命令によってレジスタ16に保持され
るタスク識別番号Tが書き換えられた場合には、それに
応じて、前記メモリ回路17における格納位置(アドレ
ス)が更新される。
When the task identification number T held in the register 16 is rewritten by the identification number rewriting instruction, the storage location (address) in the memory circuit 17 is updated accordingly.

前記加算)) 18は、一つのタスクの処理が継続して
いる間、前記メモリ回路17に格納されたそのタスクの
クロック数Nをカウントアツプしてゆくもので、加算動
作は前記クロックインタフェース13から前記分配器1
9に入るクロック信号に同期している。
The addition) 18 counts up the number of clocks N for the task stored in the memory circuit 17 while the processing of one task continues. Said distributor 1
It is synchronized with the clock signal entering 9.

具体的な加算動作は、新たにクロック信号が入るfηに
、メモリ回路[7から読み出したクロック数Nに1を加
算して、再びメモリ回路17に戻すもので、一つのタス
クが終了するまで繰り返されることによって、その間の
クロックが累積されて、実行時間となる。
The specific addition operation is to add 1 to the clock number N read out from the memory circuit [7] to fη, where a new clock signal is input, and return it to the memory circuit 17 again.This is repeated until one task is completed. As a result, the clocks during that time are accumulated and become the execution time.

加算器18による加算動作は、タスク別に行われ、前記
レジスタ16に保持されるタスク識別番号Tが、00に
なった時点で終了する。
The addition operation by the adder 18 is performed for each task, and ends when the task identification number T held in the register 16 reaches 00.

前記分配器19は、前記クロックインタフェース13か
らのクロック信号を、ラッチ回路14、デコーダ回路1
5、レジスタ16等に分配している。
The distributor 19 distributes the clock signal from the clock interface 13 to the latch circuit 14 and the decoder circuit 1.
5, distributed to register 16, etc.

前記一実施例の計測時におけるCPUl0のマイクロプ
ログラムの動作は、第5図の如くである。
The operation of the microprogram of the CPU 10 during measurement in the above embodiment is as shown in FIG.

即ち、中央処理装置10がプログラムPの実行を開始す
ると、まず、識別番号書き換え命令の有無を判断しくス
テップ1ot)、識別番号書き換え命令が無い場合には
、次の処理に進む(ステップ102)。
That is, when the central processing unit 10 starts executing the program P, it first determines whether there is an identification number rewriting command (step 1ot), and if there is no identification number rewriting command, it proceeds to the next process (step 102).

識別番号書き換え命令が有る場合には、命令で指定され
たタスク識別番号Tを検出して(ステップ103)、そ
のタスク識別番号TがOOであるか否かを判断しくステ
ップ104)、T=00の場合には計測を終了する(ス
テップ105)。
If there is an identification number rewriting instruction, the task identification number T specified by the instruction is detected (step 103), and it is determined whether the task identification number T is OO or not (step 104), and T=00. In this case, the measurement is ended (step 105).

T≠00の場合(即ち、T−01〜3Fの場合)には、
各タスク識別番号毎に、A+Tの特定アドレス(mpル
アドレスにジャンプさせて(ステップ106)、この特
定アドレスによって次の処理をする(ステップ107)
In the case of T≠00 (that is, in the case of T-01 to 3F),
For each task identification number, jump to the specific address (mpl address) of A+T (step 106), and perform the next process using this specific address (step 107).
.

なお、前記Aは、下位6ビツトが0のアドレスである。Note that the above A is an address in which the lower 6 bits are 0.

前記一実施例において、デコーダ回路15がレジスタ1
6やメモリ回路17にライトイネーブル信号を発生する
のは、前述のマイクロプログラムによるステップ107
の動作時であり、このときのmpルアドレス下位6ビツ
トがレジスタに書き込まれる。
In the above embodiment, the decoder circuit 15 is the register 1
6 and the memory circuit 17 are generated in step 107 by the microprogram described above.
The lower 6 bits of the mpl address at this time are written into the register.

この一実施例におけるプログラムの実行時間計測システ
ムにおいては、計測対象であるプログラムPが中央処理
装置10によって実行された場合に、識別番号書き換え
命令の有無からタスクの切り替わりをデコーダ回路15
によって検出して、レジスタ16の記憶内容を切り替わ
った新しいタスクのタスク識別番号Tに書き換える。
In the program execution time measuring system in this embodiment, when the program P to be measured is executed by the central processing unit 10, the decoder circuit 15 determines whether or not the task is switched based on the presence or absence of an identification number rewriting instruction.
, and the stored contents of the register 16 are rewritten to the task identification number T of the new task that has been switched.

そして、時間計測装置11のメモリ回路17には、前記
レジスタ16に保持されたタスク識別番号別に、そのタ
スク識別番号Tのタスクに対する処理が終了するまでの
クロック数Nを、当該タスクの実行時間として順次格納
する。
Then, for each task identification number held in the register 16, the memory circuit 17 of the time measurement device 11 stores the number of clocks N until the processing for the task with the task identification number T is completed as the execution time of the task. Store sequentially.

従って、この実施例の実行時間計測システムでは、前記
メモリ回路17においてタスク識別番号別に格納された
クロック数から、タスク毎に実行時間を知ることができ
、いわゆるマルチタスキングシステムにおいて、並行し
て処理するタスクが同一のモジュールを共用する場合で
も、プログラムPを構成するタスク単位で正確に実行時
間の計測を行うことができる。
Therefore, in the execution time measuring system of this embodiment, the execution time can be known for each task from the clock number stored for each task identification number in the memory circuit 17, and in a so-called multitasking system, processing can be performed in parallel. Even if the tasks to be executed share the same module, the execution time can be accurately measured for each task making up the program P.

しかも、この実施例の実行時間計11111システムは
、前述の如く、ハードウェアによる処理によって実行時
間の計測を行うため、実行時間計測用の処理ルーチン等
のソフトウェアを使って処理する従来の場合と異なり、
実行時間計測によって中央処理装置等における処理性能
が低下する虞れもない。
Moreover, as described above, the execution time meter 11111 system of this embodiment measures execution time through hardware processing, unlike the conventional case where processing is performed using software such as a processing routine for measuring execution time. ,
There is no risk that the processing performance of the central processing unit or the like will deteriorate due to execution time measurement.

[発明の効果] 以上の説明から明らかなように、本発明に係るプログラ
ムの実行時間計測システムにおいては、計測対象である
プログラムが中央処理装置によって実行された場合に、
識別番号書き換え命令の有無からタスクの切り替わりを
デコーダ回路によって検出して、レジスタの記憶内容を
切り替わった新しいタスクのタスク識別番号に書き換え
る。
[Effects of the Invention] As is clear from the above description, in the program execution time measurement system according to the present invention, when the program to be measured is executed by the central processing unit,
A decoder circuit detects task switching based on the presence or absence of an identification number rewriting instruction, and rewrites the stored contents of the register with the task identification number of the new task that has been switched.

そして、時間計測装置のメモリ回路には、前記レジスタ
に保持されたタスク識別計量刑に、そのタスク識別番号
のタスクに対する処理が終了するまでのクロック数を、
当該タスクの実行時間として順次格納する。
Then, in the memory circuit of the time measuring device, the number of clocks until the processing for the task with that task identification number is completed is stored in the task identification number held in the register.
Stored sequentially as the execution time of the task.

従って、本発明に係るプログラムの実行時間計1111
1ンステムでは、前記メモリ回路においてタスク識別計
り別に格納されたクロック数から、タスクtηに実行時
間を知ることかでき、いわゆるマルチタスキングシステ
ムにおいて、−312行して処理するタスクか同一のモ
ジュールを共用する場合でも、プログラムPを構成する
タスク単位で正確に実行時間の計測を行うことができる
Therefore, the program execution time meter 1111 according to the present invention
In one system, it is possible to know the execution time of a task tη from the number of clocks stored for each task identification time in the memory circuit. Even when shared, the execution time can be accurately measured for each task that makes up the program P.

しかも、この実施例の実行時間計測ンステムは、前述の
如く、ハードウェアによる処理によって実行時間の計測
を行うため、実行時間計11+++用の処理ルーチン等
のソフトウェアを使って処理する従来の場合と異なり、
実行時間計測によって中央処理装置等における処理性能
が低下する虞れもない。
Moreover, as described above, the execution time measuring system of this embodiment measures the execution time through processing by hardware, which is different from the conventional case where processing is performed using software such as a processing routine for the execution time meter 11+++. ,
There is no risk that the processing performance of the central processing unit or the like will deteriorate due to execution time measurement.

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

第1図は本発明の一実施例における時間計測装置の構成
説明図、第2図は従来のプログラムの実行時間計測シス
テムの説明図、第3図は前記一実施例におけるプログラ
ムの構成説明図、第4図は前記一実施例におけるメモリ
回路の説明図、第5図は一実施例による計測時における
マイクロブミグラムの動作の流れ図である。 10・・・・・中央処理装置(CPtJ)、11・・・
・・・時間計測装置、P・・・・・プログラム、M^、
 Ma+ Mc・・・・・・識別番号書き換え命令、T
・・・・・・タスク識別番号、12・・・・・アドレス
インタフェース、13・・・・クロックインタフェース
、14・・・・・アドレスラッチ回路、15・・・・・
・デコーダ回路、16・・・・・・レジスタ、17・・
・・・メモリ回路、18・・・・・・加算器、19・・
分配器。
FIG. 1 is an explanatory diagram of the configuration of a time measurement device according to an embodiment of the present invention, FIG. 2 is an explanatory diagram of a conventional program execution time measurement system, and FIG. 3 is an explanatory diagram of the configuration of a program in the embodiment, FIG. 4 is an explanatory diagram of the memory circuit in the embodiment, and FIG. 5 is a flowchart of the operation of the microbumigram during measurement according to the embodiment. 10...Central processing unit (CPtJ), 11...
...Time measuring device, P...Program, M^,
Ma+ Mc...Identification number rewriting command, T
...Task identification number, 12...Address interface, 13...Clock interface, 14...Address latch circuit, 15...
・Decoder circuit, 16...Register, 17...
...Memory circuit, 18...Adder, 19...
Distributor.

Claims (1)

【特許請求の範囲】 中央処理装置におけるプログラムの実行時間を、該中央
処理装置に接続した時間計測装置を使って計測するプロ
グラムの実行時間計測システムであって、 計測対象であるプログラムは、予め該プログラムを構成
するタスク毎に、他のタスクと識別するためのタスク識
別番号を識別番号書き換え命令とともに組み込んだ構成
とし、 一方、前記時間計測装置は、中央処理装置のマイクロプ
ログラムアドレスを解読して計測対象であるプログラム
に組み込まれた識別番号書き換え命令を検出するデコー
ダ回路と、該デコーダ回路の検出した識別番号書き換え
命令に付随するタスク識別番号に記憶内容が書き換えら
れるレジスタと、該レジスタに保持されたタスク識別番
号別にそのタスク識別番号に対応するタスクの処理が終
了するまでにカウントされたクロック数を実行時間とし
て順次格納してゆくメモリ回路とを具備した構成として
、 前記計測対象であるプログラムの前記中央処理装置によ
る実行時間を計測することを特徴としたプログラムの実
行時間計測システム。
[Claims] A program execution time measuring system for measuring the execution time of a program in a central processing unit using a time measuring device connected to the central processing unit, wherein the program to be measured is measured in advance by a time measuring device connected to the central processing unit. Each task constituting the program is configured to include a task identification number to distinguish it from other tasks along with an identification number rewriting instruction, and the time measurement device decodes and measures the microprogram address of the central processing unit. A decoder circuit that detects an identification number rewriting instruction incorporated in a target program, a register whose memory contents are rewritten to a task identification number associated with the identification number rewriting instruction detected by the decoder circuit, and a The configuration includes a memory circuit that sequentially stores, as an execution time, the number of clocks counted until the processing of the task corresponding to the task identification number is completed for each task identification number. A program execution time measurement system characterized by measuring execution time by a central processing unit.
JP1092814A 1989-04-14 1989-04-14 System for measuring execution time of program Pending JPH02272647A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1092814A JPH02272647A (en) 1989-04-14 1989-04-14 System for measuring execution time of program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1092814A JPH02272647A (en) 1989-04-14 1989-04-14 System for measuring execution time of program

Publications (1)

Publication Number Publication Date
JPH02272647A true JPH02272647A (en) 1990-11-07

Family

ID=14064886

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1092814A Pending JPH02272647A (en) 1989-04-14 1989-04-14 System for measuring execution time of program

Country Status (1)

Country Link
JP (1) JPH02272647A (en)

Similar Documents

Publication Publication Date Title
JP2746549B2 (en) Computer system and operation method thereof
US6754856B2 (en) Memory access debug facility
KR100588790B1 (en) Method and apparatus for acting on subsequent command processing in data processor
EP0135844A2 (en) A data processor with a branch target instruction storage
EP0155211A2 (en) System for by-pass control in pipeline operation of computer
JPS5911943B2 (en) Trap mechanism for data processing equipment
JPH08505725A (en) System and method for assigning tags to instructions to control instruction execution
US5502827A (en) Pipelined data processor for floating point and integer operation with exception handling
EP0402856B1 (en) Instruction execution control system
JPH0574099B2 (en)
US5996059A (en) System for monitoring an execution pipeline utilizing an address pipeline in parallel with the execution pipeline
US4093983A (en) Fast and normal rate instruction fetching
JPH02272647A (en) System for measuring execution time of program
US5404499A (en) Semi-automatic program execution error detection
JPH01125633A (en) System for debugging multi-processing system
EP0525672A2 (en) Microprocessor with program tracing
JPS621041A (en) Diagnosis circuit of information processor
JPS6045853A (en) History diagnosing system
JPS6158049A (en) Error detection
SU849218A1 (en) Device for debugging programs
JPH0666055B2 (en) History memory control method
JPS626341A (en) Information processor
JPH0357970A (en) Pulse input apparatus
JPS638841A (en) Interruption accepting system
JPH0258648B2 (en)