JPH0451332A - Process/task execution time counting circuit - Google Patents

Process/task execution time counting circuit

Info

Publication number
JPH0451332A
JPH0451332A JP2159688A JP15968890A JPH0451332A JP H0451332 A JPH0451332 A JP H0451332A JP 2159688 A JP2159688 A JP 2159688A JP 15968890 A JP15968890 A JP 15968890A JP H0451332 A JPH0451332 A JP H0451332A
Authority
JP
Japan
Prior art keywords
task
timer
execution time
operation level
measurement
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
JP2159688A
Other languages
Japanese (ja)
Inventor
Yoshihiko Shinkawa
新川 吉彦
Masayoshi Matsushita
松下 政好
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 JP2159688A priority Critical patent/JPH0451332A/en
Publication of JPH0451332A publication Critical patent/JPH0451332A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To count only actual execution time by setting an operation level attached on each process/task on a register for timer control, and counting the execution time of the process/tasks in which set operation levels coincide with each other. CONSTITUTION:The operation level of the process/task and the frequency division ratio of a clock for timer are set on the register(TCR) 21 for timer control via an internal bus 31, and an initial value is set on timers 1, 2 as necessary. Then, when the timer operation starting bit of the register TCR 21 is turned on, the timer is operated while the processing of the process/task of specific operation level (for example, in the operation level 2) is performed, and the processing time is integrated. Also, since the timer operation bit can be set at every timer 1, 2, it is possible to set the counting start time of plural process/ tasks individually.

Description

【発明の詳細な説明】 [産業上の利用分野] この発明は、情報処理装置におけるプロセス/タスクの
実行時間測定に関するもので、電子交換機における課金
処理や、O3/アプリケーションソフトウェアの効果的
なタイムスケジュールなどに適用すれば、作業を高効率
化することができる。
[Detailed Description of the Invention] [Industrial Application Field] The present invention relates to measuring the execution time of a process/task in an information processing device, such as billing processing in an electronic exchange and effective time scheduling of O3/application software. If applied to such things, work can be made more efficient.

[従来の技術] 情報の内容に対して加工、変換、計算などを行なう情報
処理装置ではプロセス/タスクの実行を管理するために
プロセス/タスク実行時間の測定が行なわれる。なお、
プロセスとタスクは同じ意味で使われることが多いので
、ここではプロセス/タスクという表記を用いる。
[Prior Art] In an information processing device that processes, converts, calculates, etc. on the contents of information, the process/task execution time is measured in order to manage the execution of the process/task. In addition,
Since processes and tasks are often used interchangeably, the notation process/task will be used here.

一般に、プロセス/タスクの実行時間の測定は第2図に
示すように、特定動作レベルのプロセス/タスクの実行
時間を積算することで行う。図示例では動作レベル2の
実行時間を測定している。
Generally, the execution time of a process/task is measured by integrating the execution time of a process/task at a specific operation level, as shown in FIG. In the illustrated example, the execution time of operation level 2 is measured.

このようなプロセス/タスクの実行時間を測定する方法
として、従来、主にソフトウェアによる方法と、専用の
ハードウェアによる方法とがあった。
As methods for measuring the execution time of such processes/tasks, there have conventionally been methods mainly using software and methods using dedicated hardware.

■ソフトウェアによる測定方法 第3図に示すように、一定間隔でタイマ割り込み(To
〜T8)を発生させ、そのときの動作レベルにより実行
時間を積算するものである。
■Measurement method using software As shown in Figure 3, a timer interrupt (To
~T8), and the execution time is accumulated based on the operating level at that time.

この場合、タイマの割り込みのためのハードウェアを持
つ必要がある。また、測定精度を上げるためには割り込
み間隔を短くする必要があるが、間隔を短くするとプロ
セス/タスクの実行時間に与える影響が大きくなるため
、精度と実行時間とのトレードオフを考慮しなけれはな
らない。
In this case, it is necessary to have hardware for timer interrupts. Additionally, in order to improve measurement accuracy, it is necessary to shorten the interrupt interval, but as shorter intervals have a greater impact on process/task execution time, the trade-off between accuracy and execution time must be considered. It won't happen.

■ハードウェアによる測定方法 第4図に示すように、ソフトウェアによって測定条件を
書き込んだり、カウント値を読み出したりする書き込み
/読み出し可能なカウント回路40(カウンタやカウン
タ制御部が含まれる)を設ける。このカウンタ回路40
は情報処理装置に外付けされる。プロセス/タスク切り
替え時の外部割り込み要求に要する時間を測定から排除
するため、割り込み要求以外の場合のみカウントを実行
するような制御を行う。
(2) Measurement method using hardware As shown in FIG. 4, a write/readable count circuit 40 (including a counter and a counter control section) is provided to write measurement conditions and read count values using software. This counter circuit 40
is externally attached to the information processing device. In order to exclude from measurement the time required for an external interrupt request during process/task switching, control is performed so that counting is performed only in cases other than interrupt requests.

この場合、情報処理装置外部に設けられるため、情報処
理装置内部の割り込み処理時間を排除することは出来な
い。
In this case, since it is provided outside the information processing device, it is not possible to eliminate the interrupt processing time inside the information processing device.

[発明が解決しようとする課題] 上述したソフトウェアによる測定方法と、ハードウェア
による測定方法には、次の様な欠点があった。
[Problems to be Solved by the Invention] The above-mentioned software-based measurement method and hardware-based measurement method have the following drawbacks.

(1)ソフトウェアによる測定方法 タイマからの割り込み毎にタイマ加算処理が生じるため
処理時間及び処理用プロセス等のオーバJ\ットが大き
い。
(1) Measuring method using software Since timer addition processing occurs every time there is an interrupt from the timer, processing time and processing process overhead are large.

プロセス/タスクへのタイマ割り込みの影響を極力抑え
るためには、割り込みの頻度を小さくする必要があるが
、そのようにすると測定誤差が大きくなる。そのためm
s単位での測定が限界となる。
In order to minimize the influence of timer interrupts on processes/tasks, it is necessary to reduce the frequency of interrupts, but this increases measurement errors. Therefore m
The limit is measurement in units of seconds.

(2)ハードウェアによる測定方法 プロセス/タスクへの割り込み起動から実際の処理終了
までを測定するため、割り込み処理時間が測定に含まれ
測定誤差が生じる。
(2) Measurement method using hardware Since the period from the start of an interrupt to a process/task to the actual completion of processing is measured, the interrupt processing time is included in the measurement, resulting in a measurement error.

また、情報処理装置外部にあって、ソフトウェアからの
読み出し/書き込み機能を有するため、ハードウェア規
模が大きくなる。
Furthermore, since it is located outside the information processing device and has read/write functions from software, the hardware scale becomes large.

本発明の目的は、プロセス/タスクの実行時間測定を情
報処理装置内部のハードウェアで実現することによって
、上記した従来技術の問題点を解消して、正確な実行時
間の測定と、ソフトウェアを含むシステム構成の簡便化
とが可能なプロセス/タスク実行時間測定回路を提供す
ることにある。
An object of the present invention is to solve the above-mentioned problems of the prior art by measuring the execution time of a process/task using hardware inside an information processing device, thereby enabling accurate execution time measurement and software implementation. An object of the present invention is to provide a process/task execution time measuring circuit that allows for a simplified system configuration.

[課題を解決するための手段] この発明のプロセス/タスク実行時間測定回路は、実行
プロセス/タスクに対して設定できる動作レベルを複数
持つ情報処理装置内に設けられる。
[Means for Solving the Problems] A process/task execution time measurement circuit of the present invention is provided in an information processing device that has a plurality of operation levels that can be set for executing processes/tasks.

そして、その構成は、プロセス/タスクの実行時間を測
定するタイマと、タイマを動作させるクロックを生成す
るカウンタと、実行プロセス/タスクを特定する動作レ
ベルとプロセス/タスクの実行時間の測定単位を特定す
るクロックの分周率とを設定するタイマ制御用のレジス
タとを備えて、タイマ制御用レジスタに設定された動作
レベルとクロックの分周率とに基づいて特定のプロセス
/タスクの実行時間を特定の測定単位で測定するように
したものである。
The configuration includes a timer that measures the execution time of a process/task, a counter that generates a clock that operates the timer, an operation level that specifies the executed process/task, and a unit of measurement for the execution time of the process/task. and a timer control register that sets a clock frequency division ratio to specify the execution time of a specific process/task based on the operation level set in the timer control register and the clock frequency division ratio. It is designed to be measured in units of measurement.

また、上記タイマを複数個設けて、動作レベル毎にプロ
セス/タスクの実行時間を個々に設定した測定単位で測
定できるようにすることが好ましい。
Further, it is preferable to provide a plurality of the above-mentioned timers so that the execution time of a process/task can be measured in individually set measurement units for each operation level.

[作用] まず、プロセス/タスクの動作レベルと、タイマ用クロ
ックの分周率とをタイマ制御用レジスタに設定して、タ
イマに対してハードウェア(タイマ制御用レジスタ)か
らの書き込みを可能にしておく。続いて、プロセス/タ
スクの処理の間、タイマ制御用レジスタに設定された特
定動作レベルとクロック分周率とに基づいてタイマが動
作し、処理時間が積算される。最後に、タイマ値が読み
出され、クロックの周期及び分周率からプロセス/タス
クの処理時間が正確に測定される。
[Operation] First, set the operation level of the process/task and the frequency division ratio of the timer clock in the timer control register to enable writing to the timer from the hardware (timer control register). put. Subsequently, during processing of the process/task, the timer operates based on the specific operation level and clock frequency division rate set in the timer control register, and the processing time is accumulated. Finally, the timer value is read and the processing time of the process/task is accurately measured from the clock period and frequency division ratio.

また、タイマが複数個備えられ、動作レベル毎にプロセ
ス/タスクの実行時間を測定するようにした場合には、
各タイマ毎に複数のプロセス/タスクの測定条件をタイ
マ制御用レジスタに個々に設定することにより、動作レ
ベル毎のプロセス/タスクの処理時間が正確に測定され
る。
Additionally, if multiple timers are provided to measure the execution time of processes/tasks for each operating level,
By individually setting measurement conditions for a plurality of processes/tasks in the timer control register for each timer, the processing time of processes/tasks for each operation level can be accurately measured.

[実施例] 以下、本発明の実施例を第1図を用いて説明する。[Example] Embodiments of the present invention will be described below with reference to FIG.

第1図は本発明のプロセス/タスク実行時間測定回路の
実施例を示すブロック図である。本測定回路は情報処理
装置内部に組込まれ、プロセス/タスクの実行時間を測
定する複数のタイマ1,2と、これらタイマ1,2を動
作させるクロックを生成するためのカウンタ11と、実
行プロセス/タスクを特定する動作レベル、及びプロセ
ス/タスクの実行時間の測定単位を特定するクロックの
分周率、並びにタイマ動作開始ビットを設定するタイマ
制御用のレジスタ21と、これらタイマ1゜2、カウン
タ11.タイマ制御用レジスタ21を制御するタイマ制
御部22とから構成される。
FIG. 1 is a block diagram showing an embodiment of a process/task execution time measuring circuit according to the present invention. This measurement circuit is built into an information processing device, and includes a plurality of timers 1 and 2 that measure the execution time of processes/tasks, a counter 11 that generates a clock that operates these timers 1 and 2, and an execution process/task. A register 21 for timer control that sets an operation level that specifies a task, a clock division rate that specifies a unit of measurement of execution time of a process/task, and a timer operation start bit, and these timer 1.2 and counter 11. .. It is composed of a timer control section 22 that controls a timer control register 21.

このうち、タイマ制御用レジスタ21とタイマ1.2は
情報処理装置の内部バス31に接続され、読み出し/書
き込みが可能である。タイマ1及び2は全く同一構成の
タイマであり、同時に複数のプロセス/タスクの実行時
間を測定することが可能である。タイマはハードウェア
の容量の許す限り増設することができる。
Of these, the timer control register 21 and timer 1.2 are connected to the internal bus 31 of the information processing device and can be read/written. Timers 1 and 2 have exactly the same configuration and can measure the execution time of multiple processes/tasks at the same time. The timer can be added as much as the hardware capacity allows.

複数のタイマ1,2の動作制御は、各プロセス/タスク
に付加されている動作レベルをタイマ制御用レジスタ2
1に設定することで行う。タイマ1.2を動作させるク
ロックはプロセッサ(図示せず)のシステムクロックを
分周して生成し、その分周率も制御用レジスタ21に任
意に設定することができる。
To control the operation of multiple timers 1 and 2, the operation level added to each process/task is controlled by the timer control register 2.
This is done by setting it to 1. The clock for operating the timer 1.2 is generated by frequency-dividing the system clock of the processor (not shown), and the frequency division ratio can also be arbitrarily set in the control register 21.

次に、第1図の構成によるプロセス/タスク実行時間測
定回路の動作について説明する。
Next, the operation of the process/task execution time measuring circuit having the configuration shown in FIG. 1 will be explained.

まず、内部バス31を介してタイマ制御用レジスタ21
にプロセス/タスクの動作レベル、タイマ用クロックの
分周率を設定し、タイマ1,2に必要に応じて初期値を
設定する。続いて、タイマ制御用レジスタ21のタイマ
動作開始ビットをOnにする。タイマ動作開始ビットが
Onになると特定動作レベルのプロセス/タスクの処理
の間タイマが動作し、処理時間が積算される。
First, the timer control register 21 is connected via the internal bus 31.
Set the operation level of the process/task and the frequency division rate of the timer clock, and set initial values for timers 1 and 2 as necessary. Subsequently, the timer operation start bit of the timer control register 21 is turned on. When the timer operation start bit is turned on, the timer operates during processing of a process/task at a specific operation level, and the processing time is accumulated.

なお、タイマ動作開始ビットは各タイマ1,2毎に設定
できるため、複数のプロセス/タスクの測定開始時間を
個々に設定することが出来る。
Note that since the timer operation start bit can be set for each timer 1 and 2, the measurement start time of a plurality of processes/tasks can be set individually.

第2図に示すような流れでプロセス/タスクが処理され
た場合、タイマ制御用レジスタ21に設定された動作レ
ベル(この場合では動作レベル2)と実際のレベルが一
致した場合のみタイマが動作する。
When a process/task is processed according to the flow shown in Figure 2, the timer operates only when the operation level set in the timer control register 21 (operation level 2 in this case) matches the actual level. .

最後に、内部バス31を介してプロセッサ(図示せず)
に読み取ったタイマ値と、システムクロックの周期及び
分周率から、プロセス/タスクの処理時間を正確に知る
ことができる。なお、これらの動作はタイマ制御部22
の制御下で行なわれる。
Finally, a processor (not shown) via an internal bus 31
The processing time of a process/task can be accurately determined from the timer value read in the system clock and the period and frequency division ratio of the system clock. Note that these operations are performed by the timer control section 22.
It is carried out under the control of

以上述べたように本実施例によれば、ハードウェアによ
る測定法を採用しているので、処理時間及び処理用プロ
セス等のオーバヘッドが小さく、精度と実行時間のトレ
ードオフを考慮する必要もなく、ms単位よりも小さい
単位での誤差の小さい測定が可能となる。
As described above, according to this embodiment, since a hardware measurement method is adopted, the processing time and overhead of processing processes are small, and there is no need to consider the trade-off between accuracy and execution time. Measurement with small errors in units smaller than the ms unit is possible.

また、測定回路を情報処理装置内部に設けたので、情報
処理装置内部の割込み処理時間を測定時間から排除する
ことができる。
Furthermore, since the measurement circuit is provided inside the information processing device, the interrupt processing time inside the information processing device can be excluded from the measurement time.

また、各プロセス/タスクに付加されている動作レベル
をタイマ制御用レジスタに設定し、設定した動作レベル
が一致したプロセス/タスクの実行時間を測定するよう
にしたので、実際の実行時間のみが測定され、従って割
込み処理時間が測定に含まれて誤差が生じるということ
がない。
In addition, the operation level added to each process/task is set in the timer control register, and the execution time of processes/tasks that match the set operation level is measured, so only the actual execution time is measured. Therefore, the interrupt processing time is not included in the measurement and no errors occur.

さらに各プロセス/タスクに付加されている動作レベル
と、タイマを動作させるクロックの分周率とを設定登録
するタイマ制御用レジスタを設けて、このタイマ制御用
レジスタからタイマに書き込みを行なうようにすると共
に、このレジスタ及びタイマを内部バスに接続してタイ
マの値を読み出すようにしたので、ソフトウェアからの
読出し/書き込み機能を有するものと異なり、ハードウ
ェア規模を格段に小さくすることができる。
Furthermore, a timer control register is provided to set and register the operation level added to each process/task and the frequency division ratio of the clock that operates the timer, and writing to the timer is performed from this timer control register. In addition, since the register and timer are connected to an internal bus to read the timer value, the hardware scale can be significantly reduced, unlike those having read/write functions from software.

[発明の効果] 以上述へたように本発明によれば、次のような優れた効
果を発揮する。
[Effects of the Invention] As described above, according to the present invention, the following excellent effects are exhibited.

(1)請求項1に記載のプロセス/タスク実行時間測定
回路によれば、正確な実行時間の測定を行なうことがで
きる。また、クロックの分周率を適宜変更することで、
短く正確さを要するプロセス/タスクから処理時間の非
常に長いものまで、同一のハードウェア/ソフトウェア
で測定できる。さらに、ソフトウェア/外部ハードウェ
アへの負担がほとんどない。
(1) According to the process/task execution time measurement circuit according to the first aspect, execution time can be accurately measured. In addition, by changing the clock division ratio appropriately,
The same hardware/software can measure processes/tasks ranging from short and precise processes/tasks to very long processing times. Furthermore, there is almost no burden on software/external hardware.

(2)請求項2に記載のプロセス/タスク実行時間測定
回路によれば、タイマを複数個設けたので、動作レベル
毎のプロセス/タスクの処理時間を同時に測定できる。
(2) According to the process/task execution time measuring circuit according to the second aspect, since a plurality of timers are provided, the processing time of the process/task for each operation level can be measured simultaneously.

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

第1図は本実施例によるプロセス/タスク実行時間測定
回路を示すブロック図、第2図はプロセス/タスク実行
時間の測定原理を示す説明図、第3図は従来例のソフト
ウェアによるプロセス/タスク実行時間の測定方法を示
す説明図、第4図はハードウェアによりプロセス/タス
ク実行時間の測定方法を示す説明図である。 1.2はタイマ、11はタイマ用クロック生成カウンタ
、21はタイマ制御用レジスタ、22はタイマ制御部、
31は内部バスである。
FIG. 1 is a block diagram showing the process/task execution time measuring circuit according to this embodiment, FIG. 2 is an explanatory diagram showing the principle of measuring process/task execution time, and FIG. 3 is process/task execution by software in the conventional example. FIG. 4 is an explanatory diagram showing a method for measuring time. FIG. 4 is an explanatory diagram showing a method for measuring process/task execution time using hardware. 1.2 is a timer, 11 is a timer clock generation counter, 21 is a timer control register, 22 is a timer control unit,
31 is an internal bus.

Claims (1)

【特許請求の範囲】 1、実行プロセス/タスクに対して設定できる動作レベ
ルを複数持つ情報処理装置のプロセス/タスク実行時間
測定回路において、 プロセス/タスクの実行時間を測定するタイマと、 タイマを動作させるクロックを生成するカウンタと、 実行プロセス/タスクを特定する動作レベルとプロセス
/タスクの実行時間の測定単位を特定するクロックの分
周率とを設定するタイマ制御用のレジスタとを情報処理
装置内に備え、 タイマ制御用レジスタに設定された動作レベルとクロッ
クの分周率とに基づいて特定のプロセス/タスクの実行
時間を特定の測定単位で測定するようにした ことを特徴とするプロセス/タスク実行時間測定回路。 2、上記タイマが複数個備えられ、 動作レベル毎にプロセス/タスクの実行時間を個々に設
定した測定単位で測定するようにしたことを特徴とする
請求項1に記載のプロセス/タスク実行時間測定回路。
[Claims] 1. In a process/task execution time measurement circuit of an information processing device having multiple operation levels that can be set for execution processes/tasks, a timer for measuring the execution time of a process/task; A counter that generates a clock to execute the process, and a register for timer control that sets the operation level that specifies the executed process/task and the clock division rate that specifies the measurement unit of the process/task execution time. In preparation for this, a process/task is characterized in that the execution time of a specific process/task is measured in a specific measurement unit based on an operation level set in a timer control register and a clock division rate. Execution time measurement circuit. 2. Process/task execution time measurement according to claim 1, wherein a plurality of the timers are provided, and the execution time of the process/task is measured in individually set measurement units for each operation level. circuit.
JP2159688A 1990-06-20 1990-06-20 Process/task execution time counting circuit Pending JPH0451332A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2159688A JPH0451332A (en) 1990-06-20 1990-06-20 Process/task execution time counting circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2159688A JPH0451332A (en) 1990-06-20 1990-06-20 Process/task execution time counting circuit

Publications (1)

Publication Number Publication Date
JPH0451332A true JPH0451332A (en) 1992-02-19

Family

ID=15699150

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2159688A Pending JPH0451332A (en) 1990-06-20 1990-06-20 Process/task execution time counting circuit

Country Status (1)

Country Link
JP (1) JPH0451332A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8700956B2 (en) 2010-11-29 2014-04-15 Denso Corporation Microcomputer

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8700956B2 (en) 2010-11-29 2014-04-15 Denso Corporation Microcomputer

Similar Documents

Publication Publication Date Title
JPH0451332A (en) Process/task execution time counting circuit
CN107423206A (en) A kind of method and device for weighing the system management interrupt time
JPH11212830A (en) Measuring device for performance of processor
JP2557785Y2 (en) Single chip microcomputer
JP2961199B2 (en) Pulse train input processor
JPH0251749A (en) Circuit for measuring processor application rate
JPH07260845A (en) Pulse period measuring circuit
JPH10161908A (en) Detection of run-away of microcomputer
JPH0357970A (en) Pulse input apparatus
JPS61276039A (en) Processor using ratio measuring system
JPS61117633A (en) Capture ratio measuring system
SU960781A1 (en) Device for calculating microprocessor system time intervals
JPH0296848A (en) Method for measuring execution time of instruction
JPH0875877A (en) Timer circuit
JPS62266630A (en) Execution time accounting system for information processor
JPH02244346A (en) Measurement system for monitor overhead
JPS59204789A (en) Timer device
JPH08292822A (en) Intelligent timer
JPS6172304A (en) Programmable controller
JPS6010355A (en) Measuring system of activity ratio of central processing unit
JPS62257547A (en) System for measuring load of computer system
JPH0933579A (en) Frequency measuring circuit
JPH02253410A (en) Interval timer
JPH0659910A (en) Timer device
JPS59116864A (en) Measurement system for use rate of central processing unit