JPS6211746B2 - - Google Patents

Info

Publication number
JPS6211746B2
JPS6211746B2 JP56151250A JP15125081A JPS6211746B2 JP S6211746 B2 JPS6211746 B2 JP S6211746B2 JP 56151250 A JP56151250 A JP 56151250A JP 15125081 A JP15125081 A JP 15125081A JP S6211746 B2 JPS6211746 B2 JP S6211746B2
Authority
JP
Japan
Prior art keywords
address
program
data
analysis device
instruction
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
Application number
JP56151250A
Other languages
Japanese (ja)
Other versions
JPS5852760A (en
Inventor
Hideji Watanabe
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP56151250A priority Critical patent/JPS5852760A/en
Publication of JPS5852760A publication Critical patent/JPS5852760A/en
Publication of JPS6211746B2 publication Critical patent/JPS6211746B2/ja
Granted 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)

Description

【発明の詳細な説明】 この発明はプログラムの動特性を解析する装置
に関するものである。プログラムの動特性とは、
電子計算機によるプログラムの実行において、こ
れにともなう制御の流れ、データの値の変化を意
味し、これを解析するにはプログラム実行回数及
びデータを参照設定の回数ならびに設定されたデ
ータの値の記録が必要であり、プログラム動特性
解析装置はプログラムの実行中に上述の記録を作
成するために用いられる。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to an apparatus for analyzing dynamic characteristics of a program. What is the dynamic characteristic of a program?
In the execution of a program by a computer, it refers to the flow of control and changes in data values, and to analyze this, it is necessary to record the number of program executions, the number of data reference settings, and the set data values. A program dynamics analyzer is necessary and used to create the above-mentioned records during program execution.

上述の記録は従来は電子計算機の中央処理装置
4以下CPUと略記する)によつて作成された。
この記録作業の為にCPUに過大な負荷をかける
ことは好ましくないので、普通の場合、同時に多
くのアドレスを対象とした記録を行うことはなか
つた。
The above-mentioned records have conventionally been created by a central processing unit (4 or below, abbreviated as CPU) of an electronic computer.
Since it is undesirable to place an excessive load on the CPU for this recording work, it is usually not possible to record many addresses at the same time.

1つのアドレスには命令文かデータが記憶され
ているので、上述の記録としては、所定のアドレ
スから命令文を読出したかどうかを調査して記録
するのか、所定のアドレスからデータを読出して
利用したかどうかを調査して記録するのか、所定
のアドレスにデータを書込んだかどうかを調査し
て記録するのか、3種類のアドレスサーチ種類が
ある。このアドレスサーチ種類とサーチすべき当
該アドレス(アドレスサーチ用アドレスという)
とがあらかじめ設定される。
Since a command statement or data is stored in one address, the above-mentioned record is either to investigate and record whether a command statement has been read from a predetermined address, or to check whether data has been read from a predetermined address and used. There are three types of address searches: checking and recording whether data has been written to a predetermined address, and checking and recording whether data has been written to a predetermined address. This address search type and the address to be searched (referred to as address search address)
is set in advance.

〓〓〓〓〓
第1図は従来の方法を示すフロー図で、1〜1
1は各プログラムステツプである。CPUによつ
て読出された命令の内容が「命令取出しか」、「デ
ータ読出しか」、「データ書込みか」のいずれかで
あるかをステツプ1,4,7で判定し、その命令
の内容とあらかじめ設定されているアドレスサー
チ種類とが一致するか否かがステツプ2,5,8
でそれぞれ判定され一致しなければ通常の処理へ
制御をもどす。読出された命令の内容とアドレス
サーチ種類とが一致した場合(ステツプ2,5,
8のYES)、ステツプ2からはステツプ3にうつ
りプログラムカウンタの数値(これが当該命令の
アドレスになる)を取出し、ステツプ5からはス
テツプ6にうつりデータ読出しアドレスを取出
し、ステツプ8からはステツプ9にうつりデータ
書込みアドレスを取出し、そのアドレスが予め設
定してあるアドレスサーチ用アドレスと一致する
かどうかを判定する(ステツプ10)。一致しな
ければ通常の処理へ制御をもどし、一致した場合
はステツプ11において所定の割込み処理を行つ
た後通常の処理へ制御を戻す。ステツプ11にお
ける割込み処理ではたとえばアドレスサーチ用ア
ドレスと一致するアドレスの発生回路、データ書
込みモードのアドレスサーチであればその時に書
込まれたデータを記録する等の処理である。
〓〓〓〓〓
Figure 1 is a flow diagram showing the conventional method.
1 is each program step. It is determined in steps 1, 4, and 7 whether the content of the instruction read by the CPU is "instruction fetch,""dataread," or "data write," and the content of the instruction is determined. Steps 2, 5, and 8 determine whether the address search type matches the preset address search type.
If they do not match, control is returned to normal processing. If the content of the read instruction matches the address search type (steps 2, 5,
8), from step 2, the program counter value is transferred to step 3 (this becomes the address of the instruction), from step 5, the data read address is transferred to step 6, and from step 8 to step 9. The transfer data write address is extracted and it is determined whether the address matches a preset address search address (step 10). If they do not match, control is returned to normal processing; if they match, a predetermined interrupt processing is performed in step 11, and then control is returned to normal processing. The interrupt processing in step 11 includes, for example, a circuit for generating an address that matches the address for address search, and in the case of an address search in data write mode, recording the data written at that time.

従来の方法では第1図に示す作業が全部CPU
によつて行われ、第1図に示すようにプログラム
実行途中でアドレス取出し比較を行わねばなら
ず、多数のアドレスに対する制御を同時に行うた
めにはプログラムの実行時間を長びかせることに
なるなどの欠点があつた。
In the conventional method, all the work shown in Figure 1 is performed by the CPU.
As shown in Figure 1, addresses must be fetched and compared during program execution, and the program execution time becomes longer in order to control multiple addresses at the same time. There were flaws.

この発明は上記のような従来のものの欠点を除
去するためになされたもので、CPUとは別に
CPUの動作と並行して所望のアドレスに対する
情報収集を行うプログラム動特性解析装置を設
け、プログラム実行時に複数個のアドレスに対す
る情報収集を同時に行うことを目的とするもので
ある。
This invention was made in order to eliminate the drawbacks of the conventional ones as mentioned above, and apart from the CPU,
The purpose is to provide a program dynamic characteristic analysis device that collects information on a desired address in parallel with the operation of the CPU, and to collect information on a plurality of addresses simultaneously during program execution.

以下図面についてこの発明の実施例を説明す
る。第2図はこの発明の一実施例を示すブロツク
図で、12はCPU、13はCPUとは別に設けら
れたプログラム動特性解析装置、14はアドレス
サーチ用アドレステーブル、15は記録テーブ
ル、aはアドレスサーチ種類を示すコード、bは
アドレス、cはアドレスサーチ種類がデータ書込
みであつた場合のデータを表す。
Embodiments of the invention will be described below with reference to the drawings. FIG. 2 is a block diagram showing an embodiment of the present invention, in which 12 is a CPU, 13 is a program dynamic characteristic analysis device provided separately from the CPU, 14 is an address table for address search, 15 is a recording table, and a is a A code indicating the type of address search, b represents an address, and c represents data when the address search type is data writing.

テーブル14,15は記憶装置の所定領域に設
けられ、アドレスサーチ用アドレステーブル14
は命令取出しテーブル、データ読出しテーブル、
データ書込みテーブルに分類され、それぞれのテ
ーブルは第3図に示す内容を持つている。また記
録テーブル15に命令取出し、データ読出し、デ
ータ書込みのそれぞれについての回数記録を行う
回数記録テーブルとアドレスの実行順を記録する
実行記録テーブルとが含まれる。第4図aは回数
記録テーブルの1つの内容を示し、第4図bは実
行記録テーブルの内容を示す。第4図において1
6はアドレスらん、17はカウントらん、18は
アドレス記録らん、19は種別らん、20はデー
タ記録らんである。
The tables 14 and 15 are provided in a predetermined area of the storage device, and the address table 14 for address search
are instruction fetch table, data read table,
It is classified into data write tables, and each table has the contents shown in FIG. The recording table 15 also includes a number recording table for recording the number of times each of instruction fetching, data reading, and data writing is performed, and an execution recording table for recording the address execution order. FIG. 4a shows the contents of one of the number of times record table, and FIG. 4b shows the contents of the execution record table. In Figure 4, 1
6 is no address, 17 is no count, 18 is no address recording, 19 is no type, and 20 is data recording.

また、第5図は第2図のプログラム動特性解析
装置13で行われる動作を示すフロー図で、21
〜31は各ステツプを表す。
Further, FIG. 5 is a flowchart showing the operation performed by the program dynamic characteristic analysis device 13 of FIG.
-31 represent each step.

次に第2図に示す装置の動作について説明す
る。CPU12はa,b,cの情報をプログラム
動特性解析装置13に入力するだけの動作を行い
其他の動作はすべて解析装置13によつて行われ
る。解析装置13はCPU12からのデータa,
b,cを一時記憶した後、ステツプ21でaの取
出しを行い、ステツプ22,26,29でaの示
すモードが何であるかを調べる。aの示すモード
に従つてアドレスサーチ用アドレステーブル14
のうちの該当テーブル中のアドレス値中にbの値
と一致するものがあるか否かを調べる。これがス
テツプ23,27,30の動作である。一致する
ものがなければ解析装置13の動作を終り、次の
アドレスに対しステツプ21の動作を開始する。
一致するものがあれば、記録テーブル15中のa
の示すモードに該当する回数記録テーブル(第4
図a)の当該アドレスのカウンタらん17の数値
に1を加算する。カウントらん17の数値は初期
値設定においてすべて0にリセツトされている。
これがステツプ24,28,31の動作である。
Next, the operation of the apparatus shown in FIG. 2 will be explained. The CPU 12 only operates to input information a, b, and c to the program dynamic characteristic analysis device 13, and all other operations are performed by the analysis device 13. The analysis device 13 receives data a from the CPU 12,
After temporarily storing b and c, a is taken out in step 21, and the mode indicated by a is checked in steps 22, 26, and 29. Address table 14 for address search according to the mode indicated by a.
It is checked whether there is any address value in the corresponding table that matches the value of b. This is the operation of steps 23, 27, and 30. If there is no match, the operation of the analysis device 13 is terminated and the operation of step 21 is started for the next address.
If there is a match, a in the record table 15
The number of times recording table corresponding to the mode indicated by (4th
Add 1 to the value in the counter 17 of the address in Figure a). All the numerical values in the counter 17 are reset to 0 in the initial value setting.
This is the operation of steps 24, 28, and 31.

この動作が終了した後記録テーブル15中の実
行記録テーブル(第4図b)への書込みを行う。
これがステツプ25であつて、アドレス記録らん
18に当該アドレスを記録し、aがデータ書込み
を示す場合は種別らんに「1」、其他の場合は
〓〓〓〓〓
「0」を書込み、データ記録らん20にcの値を
書込む。
After this operation is completed, writing is performed to the execution record table (FIG. 4b) in the record table 15.
This is step 25, in which the address is recorded in the address record field 18, and if a indicates data writing, "1" is entered in the type field, otherwise 〓〓〓〓〓〓
Write "0" and write the value of c to the data recording register 20.

記録テーブル15に記憶されているデータを使
用してプログラムの動的特性を解析することがで
きる。
The data stored in the recording table 15 can be used to analyze the dynamic characteristics of the program.

以上のように、第2図の回路によれば、CPU
12からa,b,cのデータを得た後は、CPU
12におけるプログラム実行とは全く別に動作し
てCPU12の動作を妨げることなくプログラム
の動特性解析を行うことができる。
As described above, according to the circuit shown in Figure 2, the CPU
After obtaining data a, b, c from 12, the CPU
The dynamic characteristic analysis of the program can be performed without interfering with the operation of the CPU 12 by operating completely separately from the program execution in the CPU 12.

なお、第4図に示す記録テーブル15の記録例
は1つの好適な実施例を示すものであつて、プロ
グラム動特性の解析に好適なデータ記録という目
的の範内において記録テーブル15の種々の記録
例が存在し得ることは言うまでもない。
Note that the record example of the record table 15 shown in FIG. It goes without saying that examples may exist.

以上のようにこの発明によればCPUにおける
プログラムの実行とは別にプログラムの動特性解
析を実行することができるので、プログラム実行
速度に影響を及ぼすことなく、かつ記録の蓄積を
容易に行うことができるという利点がある。
As described above, according to the present invention, it is possible to perform dynamic characteristic analysis of a program separately from the execution of the program in the CPU, so it is possible to easily accumulate records without affecting the program execution speed. It has the advantage of being possible.

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

第1図は従来の方法を示すフロー図、第2図は
この発明の一実施例を示すブロツク図、第3図は
第2図におけるプログラムサーチ用プログラムテ
ーブルの一例を示す図、第4図は第2図における
記録テーブルの一例を示す図、第5図は第2図の
回路の動作を示すフロー図である。 12……CPU、13……プログラム動特性解
析装置、14……プログラムサーチ用プログラム
テーブル、15……記録テーブル。 〓〓〓〓〓
FIG. 1 is a flow diagram showing a conventional method, FIG. 2 is a block diagram showing an embodiment of the present invention, FIG. 3 is a diagram showing an example of a program table for program search in FIG. 2, and FIG. FIG. 2 is a diagram showing an example of the recording table, and FIG. 5 is a flowchart showing the operation of the circuit in FIG. 2. 12...CPU, 13...Program dynamic characteristic analysis device, 14...Program table for program search, 15...Record table. 〓〓〓〓〓

Claims (1)

【特許請求の範囲】 1 電子計算機によつて実行されるプログラムの
動特性を解析するプログラム動特性解析装置にお
いて、 当該プログラムを実行する中央処理装置の外
に、この中央処理装置に付属するプログラム動特
性解析装置を設け、 このプログラム動特性解析装置は、 上記中央処理装置において読出した命令文に対
し、当該命令文が命令取出しであるか、データ読
出しであるか、データ書込みであるかを示すデー
タ種類と、当該命令文のアドレスと、当該命令文
の上記種類がデータ書込みである場合の書込むベ
きデータとを上記中央処理装置から入力して一時
記憶する記憶回路、 プログラム動特性を解析するために調査すべき
アドレスを、当該アドレスの記憶内容が命令取出
しであるか、データ読出しであるか、データ書込
みであるかの種類に従つて分類して記憶するアド
レスサーチ用アドレステーブル、 上記記憶回路の記憶内容に従つて上記アドレス
サーチ用アドレステーブルを調査し、上記記憶内
容のアドレスと一致するアドレスが上記アドレス
サーチ用アドレステーブルに存在するときプログ
ラム動特性の解析に必要なデータを記録テーブル
に書込む手段、 を備えたことを特徴とするプログラム動特性解析
装置。
[Scope of Claims] 1. In a program dynamic characteristic analysis device that analyzes the dynamic characteristics of a program executed by an electronic computer, in addition to a central processing unit that executes the program, a program dynamic characteristic attached to this central processing unit is provided. A characteristic analysis device is provided, and the program dynamic characteristic analysis device analyzes the instruction statement read by the central processing unit with data indicating whether the instruction statement is an instruction fetch, a data read, or a data write. A memory circuit that inputs and temporarily stores the type, the address of the instruction statement, and the data to be written when the type of the instruction statement is data writing from the central processing unit, and analyzes the program dynamic characteristics. an address table for address search, which stores addresses to be searched for by classifying them according to whether the stored content of the address is instruction fetching, data reading, or data writing; The address table for address search is investigated according to the memory contents of , and when an address matching the address of the memory contents exists in the address table for address search, the data necessary for analyzing the program dynamic characteristics is written to the recording table. A program dynamic characteristic analysis device characterized by comprising: means for inputting a program.
JP56151250A 1981-09-24 1981-09-24 Analyzing device for program dynamic characteristics Granted JPS5852760A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP56151250A JPS5852760A (en) 1981-09-24 1981-09-24 Analyzing device for program dynamic characteristics

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP56151250A JPS5852760A (en) 1981-09-24 1981-09-24 Analyzing device for program dynamic characteristics

Publications (2)

Publication Number Publication Date
JPS5852760A JPS5852760A (en) 1983-03-29
JPS6211746B2 true JPS6211746B2 (en) 1987-03-14

Family

ID=15514549

Family Applications (1)

Application Number Title Priority Date Filing Date
JP56151250A Granted JPS5852760A (en) 1981-09-24 1981-09-24 Analyzing device for program dynamic characteristics

Country Status (1)

Country Link
JP (1) JPS5852760A (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60150144A (en) * 1984-01-17 1985-08-07 Fujitsu Ltd Data processor
JPS61279953A (en) * 1985-06-06 1986-12-10 Nec Corp Information hysteresis storage device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5160127A (en) * 1974-11-22 1976-05-25 Hitachi Ltd

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5160127A (en) * 1974-11-22 1976-05-25 Hitachi Ltd

Also Published As

Publication number Publication date
JPS5852760A (en) 1983-03-29

Similar Documents

Publication Publication Date Title
JP2727976B2 (en) In-circuit emulator
US5819024A (en) Fault analysis system
JPS6211746B2 (en)
JPS60159951A (en) Tracing system in information processing device
JPS5853763B2 (en) Program loading processing method
JP3055271B2 (en) Task identification method
JPH05165680A (en) Memory operation tracing device
JPS588363A (en) Collecting system for program execution career information
JPH04338840A (en) Program debug back-up processor
JP2892663B2 (en) Autonomous failure diagnosis type analysis method
JPH0981460A (en) Data calling method
JPS6274130A (en) Data generating system for program structure
JPH04242455A (en) Inter-processor communication trace circuit
JPS61199126A (en) Microprogram check system
JPH0883200A (en) Programmable controller
JPH02242439A (en) Program load control system
JPH05216718A (en) Debugging method
JPS626341A (en) Information processor
JPH11203166A (en) Stack pointer tracing device and its method, and recording medium
JPS58223854A (en) Data processing system
JPS6375848A (en) Debugging log recording system
JPH01233526A (en) Data access and program calling system
JPS631621B2 (en)
JPH01118934A (en) Analysis/editing output system for error information
JPS6269329A (en) Detecting system for breakage position of memory