JP2690486B2 - Program execution status monitoring method - Google Patents

Program execution status monitoring method

Info

Publication number
JP2690486B2
JP2690486B2 JP62245063A JP24506387A JP2690486B2 JP 2690486 B2 JP2690486 B2 JP 2690486B2 JP 62245063 A JP62245063 A JP 62245063A JP 24506387 A JP24506387 A JP 24506387A JP 2690486 B2 JP2690486 B2 JP 2690486B2
Authority
JP
Japan
Prior art keywords
instruction
interrupt
program
monitoring
executed
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.)
Expired - Lifetime
Application number
JP62245063A
Other languages
Japanese (ja)
Other versions
JPS6486250A (en
Inventor
信二 吉原
茂 古澤
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 JP62245063A priority Critical patent/JP2690486B2/en
Publication of JPS6486250A publication Critical patent/JPS6486250A/en
Application granted granted Critical
Publication of JP2690486B2 publication Critical patent/JP2690486B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はプログラム実行状態監視方式に関し、特にリ
エントラントプログラムを含むプログラムのプログラム
実行状態監視方式に関する。 〔従来の技術〕 目的プログラムの実行状態を監視する手段としては、
実行状態にある目的プログラムの中にモニタへの割込み
命令を挿入し、その割込み命令が実行されたときに、そ
のプログラムの実行状態を監視するための情報を採取す
る手段が一般に知られている。 これを行う従来のプログラム実行状態監視方式は、次
の三つの動作を繰返し行っている。 (a)目的プログラムからその実行状態を監視するため
に設けた監視位置にあるもとの命令を取出し、その監視
位置に第1の割込み命令である割込み命令Iを挿入し、
目的プログラムの実行を継続させる。 (b)割込み命令Iが実行されたときに、目的プログラ
ムの実行状態を監視するための情報を採取し、割込み命
令Iをもとの命令にもどすとともに、その次の位置にあ
る命令を取出し、そこの位置に第2の割込み命令である
割込み命令IIを挿入し、目的プログラムの実行をもとの
命令の位置から継続させる。 (c)割込み命令IIが実行されたときに、割込み命令II
をもとの命令の次の命令にもどすとともに、また、上記
(a)の動作を行う。 第4図は従来のプログラム実行状態監視方式の動作を
示す動作説明図である。 第4図において、目的プログラム1aは、上記(a)の
動作で、割込み命令Iが挿入された状態を示している。 また、目的プログラム1bは、上記(b)の動作で、割
込み命令Iが実行されたとき、割込み処理部4cが割込み
命令Iをもとの命令にもどしてその次の位置に割込み命
令IIを挿入した状態を示している。 さらに、上記(c)の動作で割込み命令IIが実行され
たとき、割込み処理部4cが割込み命令IIをもとの命令の
次の命令にもどして、割込み命令Iを挿入する上記
(a)の動作を行うことを示している。 〔発明が解決しようとする問題点〕 上述した従来のプログラム実行状態監視方式は、目的
プログラムがリエントラントである場合に、割込み命令
Iをもとの命令にもどして割込み命令IIを挿入した目的
プログラム1bの状態になったとき、他の優先度の高い別
のタスクが稼働状態になっていれば、その別のタスクが
目的プログラム1bを働かせて、先にこれらもとの命令と
割込み命令IIとを実行する可能性があり、実行した場合
には割込み命令Iを実行してないこととなり、このとき
の目的プログラムの実行状態を監視するための情報が採
取されないこととなる。 このように、上述した従来のプログラム実行状態監視
方式は、目的プログラムがリエントラントであるとき、
目的プログラムの実行状態を監視するための情報を採取
しない場合が生ずるという問題点がある。 本発明の目的は、目的プログラムがリエントラントで
あっても、目的プログラムの実行状態を監視するための
情報を必ず採取することができるプログラム実行状態監
視方式を提供することにある。 〔問題点を解決するための手段〕 本発明のプログラム実行状態監視方式は、 (A)或るタスクにより実行中であっても幾つでも別の
タスクにより並行して実行することができるプログラム
であるリエントラントプログラムを含む目的プログラ
ム、 (B)あらかじめ前記目的プログラムを実行させる前
に、前記目的プログラムからその実行状態を監視するた
めに設けた監視位置にあるもとの命令を取出し、その監
視位置に第1の割込み命令を挿入し、前記もとの命令に
第2の割込み命令を付加して送出する割込み命令挿入
部、 (C)あらかじめ前記目的プログラムを実行させる前
に、前記割込み命令挿入部から送出された前記もとの命
令およびこれに続く前記第2の割込み命令を受取って、
これらを前記目的プログラムとともに実行することが可
能な形態で保持する割込み管理表保持部、 (D)前記目的プログラムの実行時に、前記第1の割込
み命令による割込みが生じたとき、前記目的プログラム
の実行状態を監視する処理を行なった後に、前記割込み
管理表保持部にある前記もとの命令および前記第2の割
込み命令を実行させ、前記第2の割込み命令による割込
みが生じたとき、取出した前記もとの命令があった位置
の次の命令から前記目的プログラムを引続き実行させる
割込み処理部、 を備えて構成されている。 〔実施例〕 次に本発明の実施例について図面を参照して説明す
る。 第1図は本発明のプログラム実行状態監視方式の一実
施例を示すブロック図である。 目的プログラム1は、リエントラントプログラムを含
む実行状態を監視されるプログラムである。 割込み命令挿入部2は、目的プログラム1の中からそ
の実行状態を監視するために設けた監視位置あるもとの
命令を取出し、その監視位置に第1の割込み命令である
割込み命令Iを挿入する。 もとの命令は、第2の割込み命令である割込み命令II
を付加して、割込み命令挿入部2から割込み管理表保持
部3に送られる。 第2図は割込み管理表保持部3の内容の一例を示す情
報構成図である。 また、第3図は本発明の動作を示す動作説明図であ
る。 第3図に示すように、目的プログラム1に割込み命令
Iが挿入され、割込み管理表保持部3にもとの命令およ
び割込み命令IIが実行可能な形態で保持される。 なお、実行状態を監視するために設ける監視位置は複
数個設けることができるので、割込み管理表保持部3の
内容は、第2図に示すように、各監視位置のアドレス
と、その各々のもとの命令−(1),(2),…………
…および割込み命令II−(1),(2),……………が
保持される。 割込み処理部4は、第3図に示すように、目的プログ
ラム1を実行中に割込み命令Iによる割込みが生じたと
きに起動され、目的プログラム1の実行状態を調べる。 実行状態を示す様々な情報は、その情報内容により、
メモリ5あるいは外部記憶6に保存される。 割込み処理部4は、目的プログラム1の実行状態を調
べた後に、第3図に示すように、割込み管理表保持部3
の当該監視位置のアドレスを有するもとの命令および割
込み命令IIがある位置に制御を渡してこれらを実行させ
る。 この結果、割込み命令IIによる割込みが生じたとき、
第3図に示すように、割込み処理部4が再び起動される
ので、割込み処理部4は、第3図に示すように、目的プ
ログラム1に制御をもどして、取出したもとの命令があ
った位置の次の命令から引続き目的プログラム1を実行
させる。 〔発明の効果〕 以上説明したように、本発明のプログラム実行状態監
視方式は、第1の割込み命令を監視位置に挿入して目的
プログラムを実行させ、挿入した位置にあったもとの命
令を割込み管理表保持部で実行させることにより、目的
プログラムがリエントラントであっても、第1の割込み
命令による割込みで目的プログラムの実行状態を監視す
るための情報を必ず採取することができるという効果を
有している。
The present invention relates to a program execution state monitoring method, and more particularly to a program execution state monitoring method for a program including a reentrant program. [Prior Art] As means for monitoring the execution state of a target program,
There is generally known means for inserting an interrupt instruction to a monitor in a target program in an execution state and collecting information for monitoring the execution state of the program when the interrupt instruction is executed. In the conventional program execution state monitoring method for doing this, the following three operations are repeated. (A) The original instruction at the monitoring position provided to monitor the execution state of the target program is taken out, and the interrupt instruction I which is the first interrupt instruction is inserted at the monitoring position,
Continue execution of the target program. (B) When the interrupt instruction I is executed, the information for monitoring the execution state of the target program is collected, the interrupt instruction I is returned to the original instruction, and the instruction at the next position is taken out. An interrupt instruction II, which is a second interrupt instruction, is inserted at that position and execution of the target program is continued from the original instruction position. (C) When the interrupt instruction II is executed, the interrupt instruction II
Is returned to the instruction next to the original instruction, and the operation (a) is performed. FIG. 4 is an operation explanatory view showing the operation of the conventional program execution state monitoring method. In FIG. 4, the object program 1a shows a state in which the interrupt instruction I is inserted in the operation (a). In the target program 1b, when the interrupt instruction I is executed in the operation of (b) above, the interrupt processing unit 4c restores the interrupt instruction I to the original instruction and inserts the interrupt instruction II at the next position. It shows the state of being done. Further, when the interrupt instruction II is executed in the operation of (c), the interrupt processing unit 4c returns the interrupt instruction II to the instruction next to the original instruction and inserts the interrupt instruction I. It indicates that the operation is performed. [Problems to be Solved by the Invention] In the conventional program execution state monitoring method described above, when the target program is reentrant, the target program 1b in which the interrupt instruction I is restored to the original instruction and the interrupt instruction II is inserted. If another task with a higher priority is active when the status becomes, the other task activates the target program 1b, and the original instruction and interrupt instruction II are executed first. There is a possibility that it will be executed, and if it has been executed, the interrupt instruction I has not been executed, and the information for monitoring the execution state of the target program at this time will not be collected. As described above, the conventional program execution state monitoring method described above, when the target program is reentrant,
There is a problem that the information for monitoring the execution state of the target program may not be collected. An object of the present invention is to provide a program execution state monitoring method capable of always collecting information for monitoring the execution state of a target program even if the target program is reentrant. [Means for Solving Problems] The program execution state monitoring method of the present invention is (A) a program that can be executed in parallel by any number of tasks even if it is being executed by another task. A target program including a reentrant program, (B) before executing the target program in advance, the original instruction at the monitoring position provided for monitoring the execution state of the target program is taken out, and the first instruction is stored at the monitoring position. An interrupt instruction insertion unit that inserts an interrupt instruction of No. 1 and adds a second interrupt instruction to the original instruction and sends the interrupt instruction; (C) Sends from the interrupt instruction insertion unit before executing the target program in advance. Received the original instruction that was followed by the second interrupt instruction that follows,
An interrupt management table holding unit for holding these in a form capable of being executed together with the object program, (D) Executing the object program when an interrupt occurs due to the first interrupt instruction during execution of the object program After performing the process of monitoring the state, the original instruction and the second interrupt instruction in the interrupt management table holding unit are executed, and when the interrupt by the second interrupt instruction occurs, the extracted instruction And an interrupt processing unit for continuously executing the target program from the next instruction at the position where the original instruction was. Embodiment Next, an embodiment of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram showing an embodiment of a program execution state monitoring system of the present invention. The target program 1 is a program whose execution state is monitored including a reentrant program. The interrupt instruction insertion unit 2 takes out an original instruction at a monitoring position provided to monitor the execution state from the object program 1 and inserts an interrupt instruction I which is a first interrupt instruction at the monitoring position. . The original instruction is the second interrupt instruction, interrupt instruction II.
Is added to the interrupt management table holding unit 3 from the interrupt instruction insertion unit 2. FIG. 2 is an information structure diagram showing an example of the contents of the interrupt management table holding unit 3. FIG. 3 is an operation explanatory view showing the operation of the present invention. As shown in FIG. 3, the interrupt instruction I is inserted into the object program 1, and the original instruction and the interrupt instruction II are held in an executable form in the interrupt management table holding unit 3. Since a plurality of monitoring positions provided to monitor the execution state can be provided, the contents of the interrupt management table holding unit 3 are, as shown in FIG. 2, the addresses of the respective monitoring positions and their respective addresses. Command- (1), (2), …………
... and interrupt instruction II- (1), (2), ..... As shown in FIG. 3, the interrupt processing unit 4 is activated when the interrupt by the interrupt instruction I occurs during execution of the object program 1, and checks the execution state of the object program 1. Various information indicating the execution status depends on the information content.
It is stored in the memory 5 or the external storage 6. After checking the execution state of the object program 1, the interrupt processing unit 4 determines whether the interrupt management table holding unit 3 is present as shown in FIG.
Control is passed to the position where the original instruction and the interrupt instruction II having the address of the corresponding monitoring position of the above are executed and these are executed. As a result, when an interrupt due to interrupt instruction II occurs,
As shown in FIG. 3, since the interrupt processing unit 4 is activated again, the interrupt processing unit 4 returns control to the object program 1 as shown in FIG. The target program 1 is continuously executed from the next instruction at the specified position. [Effects of the Invention] As described above, in the program execution state monitoring method of the present invention, the first interrupt instruction is inserted at the monitoring position to execute the target program, and the original instruction at the inserted position is managed as an interrupt. By executing in the table holding unit, even if the target program is reentrant, it is possible to always collect the information for monitoring the execution state of the target program by the interrupt by the first interrupt instruction. There is.

【図面の簡単な説明】 第1図は本発明のプログラム実行状態監視方式の一実施
例を示すブロック図、第2図は割込み管理表保持部の内
容の一例を示す情報構成図、第3図は本発明の動作を示
す動作説明図、第4図は従来のプログラム実行状態監視
方式の動作を示す動作説明図である。 1,1a,1b……目的プログラム、2……割込み命令挿入
部、3……割込み管理表保持部、4,4c……割込み処理
部、5……メモリ、6……外部記憶。
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram showing an embodiment of a program execution state monitoring system of the present invention, FIG. 2 is an information structure diagram showing an example of contents of an interrupt management table holding unit, and FIG. Is an operation explanatory view showing an operation of the present invention, and FIG. 4 is an operation explanatory view showing an operation of a conventional program execution state monitoring system. 1, 1a, 1b ...... Purpose program, 2 ...... Interrupt instruction insertion part, 3 ...... Interrupt management table holding part, 4, 4c ...... Interrupt processing part, 5 ...... Memory, 6 ...... External storage.

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 昭58−96355(JP,A) 特開 昭57−50058(JP,A) 特開 昭58−4461(JP,A) 特開 昭61−279949(JP,A) 特開 昭61−40648(JP,A)   ────────────────────────────────────────────────── ─── Continuation of front page    (56) References JP-A-58-96355 (JP, A)                 JP-A-57-50058 (JP, A)                 JP-A-58-4461 (JP, A)                 JP-A-61-279949 (JP, A)                 JP-A-61-40648 (JP, A)

Claims (1)

(57)【特許請求の範囲】 1.(A)或るタスクにより実行中であっても幾つでも
別のタスクにより並行して実行することができるプログ
ラムであるリエントラントプログラムを含む目的プログ
ラム、 (B)あらかじめ前記目的プログラムを実行させる前
に、前記目的プログラムからその実行状態を監視するた
めに設けた監視位置にあるもとの命令を取出し、その監
視位置に第1の割込み命令を挿入し、前記もとの命令に
第2の割込み命令を付加して送出する割込み命令挿入
部、 (C)あらかじめ前記目的プログラムを実行させる前
に、前記割込み命令挿入部から送出された前記もとの命
令およびこれに続く前記第2の割込み命令を受取って、
これらを前記目的プログラムとともに実行することが可
能な形態で保持する割込み管理表保持部、 (D)前記目的プログラムの実行時に、前記第1の割込
み命令による割込みが生じたとき、前記目的プログラム
の実行状態を監視する処理を行なった後に、前記割込み
管理表保持部にある前記もとの命令および前記第2の割
込み命令を実行させ、前記第2の割込み命令による割込
みが生じたとき、取出した前記もとの命令があった位置
の次の命令から前記目的プログラムを引続き実行させる
割込み処理部、 を備えることを特徴とするプログラム実行状態監視方
式。
(57) [Claims] (A) a target program including a reentrant program that is a program that can be executed in parallel by any number of tasks even if it is being executed by a certain task, (B) before executing the target program in advance, The original instruction at the monitoring position provided for monitoring the execution state of the object program is taken out, the first interrupt instruction is inserted at the monitoring position, and the second interrupt instruction is added to the original instruction. An interrupt instruction inserting section to be additionally transmitted, (C) receiving the original instruction and the second interrupt instruction following the original instruction transmitted from the interrupt instruction inserting section before executing the target program in advance; ,
An interrupt management table holding unit for holding these in a form capable of being executed together with the object program, (D) Executing the object program when an interrupt occurs due to the first interrupt instruction during execution of the object program After performing the process of monitoring the state, the original instruction and the second interrupt instruction in the interrupt management table holding unit are executed, and when the interrupt by the second interrupt instruction occurs, the extracted instruction A program execution state monitoring method, comprising: an interrupt processing unit that continuously executes the target program from the next instruction at the position where the original instruction was.
JP62245063A 1987-09-28 1987-09-28 Program execution status monitoring method Expired - Lifetime JP2690486B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62245063A JP2690486B2 (en) 1987-09-28 1987-09-28 Program execution status monitoring method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62245063A JP2690486B2 (en) 1987-09-28 1987-09-28 Program execution status monitoring method

Publications (2)

Publication Number Publication Date
JPS6486250A JPS6486250A (en) 1989-03-30
JP2690486B2 true JP2690486B2 (en) 1997-12-10

Family

ID=17128037

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62245063A Expired - Lifetime JP2690486B2 (en) 1987-09-28 1987-09-28 Program execution status monitoring method

Country Status (1)

Country Link
JP (1) JP2690486B2 (en)

Also Published As

Publication number Publication date
JPS6486250A (en) 1989-03-30

Similar Documents

Publication Publication Date Title
JP3481737B2 (en) Dump collection device and dump collection method
JP2690486B2 (en) Program execution status monitoring method
JP2723604B2 (en) Data processing device
JP2507579B2 (en) Logging information storage method by occurrence frequency
JP2518390B2 (en) System performance monitoring method
JPS63825B2 (en)
JP2595697B2 (en) Message processing system
JPH0520104A (en) Inter-virtual cluster communication processor
JPS6211920A (en) Command recovery system
JPH0196752A (en) Multi-processor device
JPH03231338A (en) Control system for memory dump area
JP3373323B2 (en) Automatic collection method of communication control device information
JPH096623A (en) Overlay control method for program
JPS5822765B2 (en) Program loading method in electronic computer system
JPS60539A (en) Monitoring system of process progress
JPH0477840A (en) Collection system for fault analysis system
JPH0239143B2 (en)
JPH06187217A (en) System for synchronization between data base and normal file
JPH0343841A (en) Fault information store system
JPH04293131A (en) Alternate processing method for information processor
JPS5977553A (en) Data gathering system
JPH01315841A (en) Information processor
JPH04239962A (en) Transaction execution anaysis information output system
JPH0373012B2 (en)
JPH01120639A (en) Virtual computer system