JPS60542A - Program tracing device - Google Patents

Program tracing device

Info

Publication number
JPS60542A
JPS60542A JP58107731A JP10773183A JPS60542A JP S60542 A JPS60542 A JP S60542A JP 58107731 A JP58107731 A JP 58107731A JP 10773183 A JP10773183 A JP 10773183A JP S60542 A JPS60542 A JP S60542A
Authority
JP
Japan
Prior art keywords
memory
gate
counter
program
information
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
JP58107731A
Other languages
Japanese (ja)
Inventor
Sumihisa Saitou
純寿 斉藤
Tadashi Okamoto
正 岡本
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP58107731A priority Critical patent/JPS60542A/en
Publication of JPS60542A publication Critical patent/JPS60542A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To perform a program tracing process at a high speed, by appointing the writing in and reading out from a memory under an endless condition by one point by means of a counter and connecting the memory with a data bus through a gate. CONSTITUTION:When the address alphaAB of a program tracing device 10 is transmitted to an address bus (AB) 11 from a computer 9, a decoder 20 detects this and makes a signal 41 high level. When a strobe signal (SBT) 14 successively becomes high level, an AND gate 40 is turned on and, since a read/write signal (R/W) 13 is low level, another AND gate 60 is turned on. When the AND gate 60 is turned on, a gate 80 is opened and data are transmitted to a memory 90 from a data bus (DB) 12. A counter 30 indicates a memory writing point and increases the writing point one by one whenever the writing is made. Thus the counter 30 appoints endlessly the writing point in the memory. Since the R/W13 is high level when data are read out from the memory 90, an AND gate 50 is turned on and the data of the memory 90 are sent to the computer 9 through a gate 70 and DB12.

Description

【発明の詳細な説明】 〔発明の利用分野〕 本発明は、プログラムの実行経過をトレースすることに
より、検査員に対しトラプルシューテイング情報を提供
するプログラムトレース装置−に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Application of the Invention] The present invention relates to a program tracing device that provides troubleshooting information to an inspector by tracing the execution progress of a program.

〔発明のR景〕[R scene of invention]

割込に対する一般のオペレーティングシステムの処理を
第1図に示す。第1図は、タスク八を実行中に割込が発
生し、タスクAが中断Sされ、オペレーティングシステ
ムが起動され、割込に対するサービスを実行後、タスク
Aが再開されるまでの処理の流れを示す。
FIG. 1 shows a typical operating system process for interrupts. Figure 1 shows the flow of processing from when an interrupt occurs while task 8 is being executed, task A is suspended, the operating system is started, and task A is restarted after servicing the interrupt. show.

オペレーティングシステムは、先ず、割込情報を記録す
るプログラムトレース処理100を実行する。割込情報
は、最低限下記の情報が必要であり、複数ワードに及ぶ
The operating system first executes a program trace process 100 to record interrupt information. The interrupt information requires at least the following information and spans multiple words.

l)割込要因 11)タスクの中断ケ所 m >計算機のスティタス情報 +V )各種レジスタおよびカウンタの内容(以上、第
1図のフローチャートのブロック5100)。
l) Interruption factor 11) Task interruption point m>computer status information +V) Contents of various registers and counters (block 5100 of the flowchart in FIG. 1).

また、オペレーティングシステムからタスクへの復帰時
にタスク復帰情報を記録するプログラムトレース処理を
実行する。タスク復帰情報も同様に複数ワードに及ぶ、
(ブロックA 120 )。
It also executes program trace processing to record task return information when the operating system returns to a task. Task return information also spans multiple words.
(Block A 120).

これらのプログラムトレース処理によって記録される情
報は、計算機の処理経過をトレースする上で必要な情報
である。特に、随時、任意のケ所で発生する割込は、こ
れらの情報なくてはトレースすることが不可能である。
The information recorded by these program trace processes is information necessary for tracing the progress of computer processing. In particular, it is impossible to trace interrupts that occur at any time and at any location without this information.

しかし、プログラムトレース処理時間は、オペレーティ
ングシステムにおける全処理時間の40%を占めており
、オーツく−ヘッド増大の原因となっている。オーバー
ヘッドの短縮を図るうえで、プログラムトレース処理を
高速化する心安が生じている。
However, the program trace processing time occupies 40% of the total processing time in the operating system, and is a cause of automatic head increase. In order to reduce overhead, there is a sense of security in speeding up program trace processing.

プログラムでよく用いる分岐処理を第2図に示す。第2
図は、システム条件200がA、B、Cの時にそれぞれ
A、B、Cに対する処理を実行する。すなわち、への時
、210,220、Bの時、230.240、Cの時、
250,260゜フローチャートを示す。システム条件
は、A、 B、 Cのいずれもとりうる可能性があり、
計算機の処理経過をトレースするには分岐情報を記録す
る必要がある。
Figure 2 shows branch processing often used in programs. Second
In the figure, when the system conditions 200 are A, B, and C, processes are executed for A, B, and C, respectively. That is, at the time of 210,220, at the time of B, at the time of 230.240, at the time of C,
250, 260° flowchart is shown. System conditions may be A, B, or C.
To trace the progress of computer processing, it is necessary to record branch information.

プログラムの重要ポイントは、分岐の他に、ジャンプ、
ザブルーチンコール、サブルーチンからのリターンなど
がある。計算機の処理経過を完全にトレースするには、
これら重要ポイント通過時の情報を全て記録する必要が
ある。しかし、プログラムトレース処理を実行すると計
算機の処理時間が延びるので、高速処理が要求されるプ
ログラムでは、特に重要なポイントを除いて、プログラ
ムトレース処理を実行することが不可能であった。
In addition to branching, the important points of the program are jumps,
These include subroutine calls and returns from subroutines. To fully trace the progress of a computer's processing,
It is necessary to record all information when passing through these important points. However, since executing the program trace process increases the processing time of the computer, it has been impossible to execute the program trace process except for particularly important points in programs that require high-speed processing.

トレースを完全に行なうには、プログラムトレース処理
を簡単化し、かつ、処理時間を短縮する必要がある。
In order to perform tracing completely, it is necessary to simplify the program tracing process and shorten the processing time.

次に、一般的プログラムトレース処理を第3図、第4図
により説明する。第3図は記1禄エリアを、第4図は処
理フローを示す。
Next, general program tracing processing will be explained with reference to FIGS. 3 and 4. FIG. 3 shows the area and FIG. 4 shows the processing flow.

記録エリアは、記録エリアの先頭アドレスα、記録エリ
アの最終アドレスγにより区切られ、先頭アドレスαよ
り順次記録されていく。次に、記録を行なうアドレスが
記録アドレスβである。
The recording area is divided by a starting address α of the recording area and a final address γ of the recording area, and recording is performed sequentially from the starting address α. Next, the address for recording is recording address β.

プログラムトレース処理では、先ず、残シエリアのワー
ド数が記録ワード数以上存在するかどうかをチェックす
る(第4図フローチャートのブロック煮300)。
In the program trace processing, first, it is checked whether the number of words in the remaining area is greater than or equal to the number of recorded words (block 300 in the flowchart of FIG. 4).

残りエリアのワード数が記録ワード数より少ない場合に
は、残シエリアをゼロクリアしくブロックA 310 
) 、記録アドレスβに記録エリアの先頭アドレスαを
設定する(ブロックA 320 )。
If the number of words in the remaining area is less than the number of recorded words, the remaining area is cleared to zero.Block A 310
), sets the start address α of the recording area to the recording address β (block A 320 ).

情報の記録は、記録アドレスβより順次必要なワード数
分だけ行なう(ブロックA 330 )。
Information is recorded sequentially from the recording address β for the necessary number of words (block A 330 ).

最後に、記録アドレスを記録ワード数分だけ加算する(
ブロック盃340)。
Finally, add the recorded address by the number of recorded words (
Block cup 340).

以上が、プログラムトレースの処理内容であり、全処理
時間に対して、前処理(ブロックA300゜310.3
20)が約50%を占め、記録処理(ブロックA 33
0 )が約30%を占め、後処理(ブロックA 340
 )が約20%を占めている。
The above is the processing content of program trace, and the preprocessing (block A300°310.3
20) accounts for approximately 50%, and recording processing (block A 33)
0) accounts for approximately 30%, and post-processing (block A 340
) account for approximately 20%.

従って、前処理時間の短縮がプログラムトレースの処理
時間短縮につながる。
Therefore, a reduction in preprocessing time leads to a reduction in program trace processing time.

〔発明の目的〕[Purpose of the invention]

本発明の目的は、プログラムの1’9ポイント通過時の
情報、または、割込発生時の割込情報をエンドレスに記
録するプログラムトレース処理を高速で行なうためのプ
ログラムトレース装置を提供するにある。
SUMMARY OF THE INVENTION An object of the present invention is to provide a program tracing device for performing high-speed program tracing processing for endlessly recording information when a program passes the 1'9 point or interrupt information when an interrupt occurs.

〔発明の概要〕[Summary of the invention]

本発明の特徴は、プログラムトレース処理の内、情報記
録は各情報(割込情報、分岐情報、ジャンプ情報、サブ
ルーチンコール情報、ザブルーチンリターン情報、その
他)により記録内容が異なるため汎用性をもたせてソフ
ト処理とし、残りの処理全てをハード化し、しかも、簡
単なハードで高速に実行するにある。
A feature of the present invention is that in program trace processing, information recording differs depending on each piece of information (interrupt information, branch information, jump information, subroutine call information, subroutine return information, etc.), so it provides versatility. The goal is to perform software processing, convert all remaining processing to hardware, and execute it at high speed with simple hardware.

〔発明の実施例〕 以下、本発明の一実施例を第ダ図ないし第8図により説
明する。
[Embodiment of the Invention] Hereinafter, an embodiment of the present invention will be described with reference to FIGS.

第5図は、本発明の一実施例の回路図を示みす。グログ
ラムトレース装置10は、γ′ドレスパス11(以下A
Bとする)、データバス112(以下DBとする)、リ
ード・ライト信号13(以下R/W)とする、ストロー
ブ信号14(以下STBとする)によって計算機9と接
続される。
FIG. 5 shows a circuit diagram of one embodiment of the present invention. The glogram tracing device 10 has a γ' dress path 11 (hereinafter A
It is connected to the computer 9 by a data bus 112 (hereinafter referred to as DB), a read/write signal 13 (hereinafter referred to as R/W), and a strobe signal 14 (hereinafter referred to as STB).

プログラムトレース装置1oは、デコーダ20゜カウン
タ30、ANDゲー)40,50,60゜ゲート70,
80.メモリ9oにより構成される。
The program trace device 1o includes a decoder 20, a counter 30, an AND gate 40, 50, 60, a gate 70,
80. It is composed of a memory 9o.

なお、図中31はバス、51は信号である。In the figure, 31 is a bus, and 51 is a signal.

第6図は、計算機9からメモリ9oにデータ書込みを行
なう時のタイムチャートを示し、本タイムチャートによ
り、プログラムトレース装置1゜の動作を説明する。A
BII上にプログラムトレース装置1oのアドレスαム
Bが送信されると、デコーダ20はアドレスαムBを検
出して信号21を1Hレベル”とする。つづいて、5T
B14が′″HHレベルなると、ANDゲート4oがO
Nし、信号41が″((レベル”となる。R/W13が
1Lレベル”であるから、へNDゲー)60がONし、
信号61が@Hレベル”となシ、ゲート80がONし、
DB12−+ゲート8o→バス81を経てDATAがメ
モリ90に送信される。カウンタ30のカウント値βム
Bけメモリ90のデータ書込ポイントを示してお、!2
、DAIはポイント1人Bに書込まれる。5TB14が
′″LLレベルなると、信号41が′″LLレベルなり
、メモリ90への書込動作を終了すると同時にカウンタ
の内容を+1加算する。
FIG. 6 shows a time chart when data is written from the computer 9 to the memory 9o, and the operation of the program tracing device 1° will be explained using this time chart. A
When the address αmB of the program trace device 1o is transmitted on the BII, the decoder 20 detects the address αmB and sets the signal 21 to the 1H level.Subsequently, the 5T
When B14 goes to ``HH level, AND gate 4o goes to O.
N, the signal 41 becomes ``(level''. Since R/W 13 is at 1L level, ND game) 60 turns ON,
When the signal 61 becomes @H level, the gate 80 turns on.
DATA is transmitted to the memory 90 via the DB12-+gate 8o→bus 81. The count value β of the counter 30 indicates the data writing point of the memory 90. 2
, DAI is written to point one person B. When the 5TB14 reaches the ``''LL level, the signal 41 goes to the ``''LL level, and at the same time the write operation to the memory 90 is completed, the contents of the counter are incremented by +1.

第7図は、メモリ90のエリアとカウント値の関係を示
したものである。メモリ90の容量とカウンタ30Dカ
ウント範囲は同等の大きさをもち、カウンタ30のカウ
ンタ値′09(カウンタの初期値)がメモリ90の初期
ポイントに対応し、カウント値−最大”(カウンタの最
終値)が最終ポイントに対応する。カウント1直がメモ
リへの畳込ミホイントおよび読出しポイントを示す。カ
ウント値が最大値をこえると、カウンタ3oは桁上りを
起こし、カウント値は10”にもどる。
FIG. 7 shows the relationship between the areas of the memory 90 and count values. The capacity of the memory 90 and the count range of the counter 30D have the same size, and the counter value '09 of the counter 30 (the initial value of the counter) corresponds to the initial point of the memory 90, and the count value - maximum'' (the final value of the counter) ) corresponds to the final point. Count 1 indicates the convolution into the memory and the read point. When the count value exceeds the maximum value, the counter 3o carries over and the count value returns to 10''.

第8図は、メモリ90からデータを読出す時のタイムチ
ャートを示す。読出し時にはR/W13が′″HHレベ
ルあるから、ANDゲート50がONし、信号51が1
Hレベル”となシ、バス81→ゲート70→DB12を
経てDA’l’A’は計算機に送信される。
FIG. 8 shows a time chart when reading data from the memory 90. Since the R/W 13 is at ``HH level'' during reading, the AND gate 50 is turned on and the signal 51 becomes 1.
At "H level", DA'l'A' is transmitted to the computer via bus 81 → gate 70 → DB12.

第9図は、本発明の他の実施例を示す。プログラムの実
行は、アドレスを更新しながらアドレスの大きい方向に
実行されていく。従って、プログラムのトレースは簡単
に行なえる。ただし、ジャンプ等によってアドレスが飛
ぶ場合には、プログラムトレース処理が必要である。本
実施例は、アドレスが飛ぶ場合に、自動的に飛び先アド
レスの記録処理を行なう。
FIG. 9 shows another embodiment of the invention. The program is executed in the direction of larger addresses while updating the addresses. Therefore, program tracing can be easily performed. However, if an address is skipped due to a jump or the like, program trace processing is required. In this embodiment, when an address jumps, the jump destination address is automatically recorded.

次に、本実施例の動作を説明する。プログラムトレース
装置iooは、AB、DB、R/W。
Next, the operation of this embodiment will be explained. The program trace device ioo has AB, DB, and R/W.

STB、信号150によって計g機91と接続される。The STB is connected to the g meter 91 by a signal 150.

信号150は計算機91がジャンプ処理を実行後に送信
され、計算機91がAB上に飛び先アドレスを送信する
と、飛び先アドレスをAB→ゲート800→バス810
を経てメモリ900に記録する。本実施例によると、計
算機91がメモリ900に情報書込み処理を行なうこと
なく、自動的に書込まれるため計算機91の負荷が軽く
なる。
The signal 150 is sent after the computer 91 executes the jump process, and when the computer 91 sends the jump destination address on AB, the jump destination address is transferred from AB → gate 800 → bus 810.
The data is recorded in the memory 900 through the process. According to this embodiment, information is automatically written into the memory 900 without the computer 91 performing information writing processing, so that the load on the computer 91 is lightened.

図中、300はカウンタ、400,450゜500.6
00はANDゲート、700,800はゲート、310
はバス、410,510,610は信号である。
In the figure, 300 is a counter, 400, 450° 500.6
00 is an AND gate, 700,800 is a gate, 310
is a bus, and 410, 510, and 610 are signals.

〔発明の効果〕〔Effect of the invention〕

本発明によれば、プログラムトレース処理時間が、従来
の方法に比べて短縮される。
According to the present invention, program trace processing time is reduced compared to conventional methods.

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

第1図、第2図は従来方式のフローチャート、第3図は
記録エリア図、第4図は従来の情報記録処理のフローチ
ャート、第5図は本発明の一実施例の回路図、第6図、
第8図は第5図の動作を説明するタイムチャート、第7
図はメモリエリア図、第9図は本発明の他の実施例の回
−図である。 9・・・計算機、20・・・デコーダ、30・・・カウ
ンタ、40.50.60・・・ANDゲート、 70.
80・・・第 l 国 早 2 区 第 5 目 I 第 6 口 孕 7 圀 榛 δ 凹 八λ31 βA ・ βハB、+l
1 and 2 are flowcharts of the conventional method, FIG. 3 is a recording area diagram, FIG. 4 is a flowchart of conventional information recording processing, FIG. 5 is a circuit diagram of an embodiment of the present invention, and FIG. 6 ,
Figure 8 is a time chart explaining the operation of Figure 5;
This figure is a memory area diagram, and FIG. 9 is a circuit diagram of another embodiment of the present invention. 9... Computer, 20... Decoder, 30... Counter, 40.50.60... AND gate, 70.
80... No. 1 Kunihaya 2 Ward 5th I No. 6 Pregnancy 7 Kuniyoshi δ Kouhachi λ31 βA ・βHAB, +l

Claims (1)

【特許請求の範囲】[Claims] 1、 プログラムの重要ポイント通過時の情報、または
、割込発生時の割込情報をエンドレスに記録するプログ
ラムトレース装置において、前記情報を記録するメモリ
と、このメモリへの書込みまたは読出しを実行するごと
に1つずつ増加してゆき、最終値になると初期値にもど
ることによジエンドレスに前記メモリ内の1ポイントを
指定するカウンタと、前記メモリと外部データバスを接
続するゲートと、アドレスを検出するデコーダと、前記
メモリ、前記カウンタ、前記ゲートを制御する回路とか
らなることを特徴とするプログラムトレース装置。
1. In a program trace device that endlessly records information when important points of a program are passed or interrupt information when an interrupt occurs, there is a memory that records the information, and each time writing or reading to this memory is executed. a counter that specifies one point in the memory endlessly by incrementing by one and returning to the initial value when the final value is reached; a gate that connects the memory and an external data bus; and a gate that detects an address. A program trace device comprising: a decoder for controlling the memory; a circuit for controlling the memory, the counter, and the gate.
JP58107731A 1983-06-17 1983-06-17 Program tracing device Pending JPS60542A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP58107731A JPS60542A (en) 1983-06-17 1983-06-17 Program tracing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP58107731A JPS60542A (en) 1983-06-17 1983-06-17 Program tracing device

Publications (1)

Publication Number Publication Date
JPS60542A true JPS60542A (en) 1985-01-05

Family

ID=14466518

Family Applications (1)

Application Number Title Priority Date Filing Date
JP58107731A Pending JPS60542A (en) 1983-06-17 1983-06-17 Program tracing device

Country Status (1)

Country Link
JP (1) JPS60542A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002236595A (en) * 2001-02-09 2002-08-23 Fujitsu Ten Ltd Electronic equipment and its device and method for debugging assistance

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002236595A (en) * 2001-02-09 2002-08-23 Fujitsu Ten Ltd Electronic equipment and its device and method for debugging assistance

Similar Documents

Publication Publication Date Title
US4423508A (en) Logic tracing apparatus
DE60224774T2 (en) Data processing system with read, modify and write unit
JPS61202269A (en) Data processing system
DE10136724A1 (en) Trace control circuit
DE68926701T2 (en) Data processing device for parallel decoding and parallel execution of commands with variable word length
JPS60542A (en) Program tracing device
JPS6383841A (en) Central processing unit of computer capable of program test
JPS6033634A (en) Data processing device
JPH01177644A (en) Debugging device
DE3856049T2 (en) Device and method for signaling a data-induced state
JPH04167146A (en) Address tracing system for information processor
JPH0724009B2 (en) Double data writing method by disk controller
JPH04328644A (en) Debug back-up device
JPH04260139A (en) File access rpocessor
JPH02281341A (en) Write data confirming method for debugging
JP2501393B2 (en) Direct memory access device
JPS6252898B2 (en)
JPS6136253B2 (en)
JPH03240137A (en) Reproducing method for execution of parallel program
JPS6341950A (en) Branch instruction execution measurement controlling system
JPS59161747A (en) Program analyzer
JPH01142836A (en) Debugging system for parallel processing system
JPS6225340A (en) Inspection device
JPS6234238A (en) Microprocessor
JPS63231629A (en) Stack check system for computer system