JPH0561720A - Trace data collector - Google Patents

Trace data collector

Info

Publication number
JPH0561720A
JPH0561720A JP3224016A JP22401691A JPH0561720A JP H0561720 A JPH0561720 A JP H0561720A JP 3224016 A JP3224016 A JP 3224016A JP 22401691 A JP22401691 A JP 22401691A JP H0561720 A JPH0561720 A JP H0561720A
Authority
JP
Japan
Prior art keywords
data
trace
memory
unit
trace data
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.)
Withdrawn
Application number
JP3224016A
Other languages
Japanese (ja)
Inventor
Kazunori Handa
和紀 半田
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP3224016A priority Critical patent/JPH0561720A/en
Publication of JPH0561720A publication Critical patent/JPH0561720A/en
Withdrawn legal-status Critical Current

Links

Abstract

PURPOSE:To reduce the capacity of a trace memory and to improve work efficiency concerning the device for collecting trace data used for the evaluation test or analysis of a program. CONSTITUTION:This device is equipped with a collection part 3 to collect the trace data by simulating a program 2 to be tested, compression part 4 to compress the trace data from the collection part 3 so as to be restored, restorage part 5 to restore the compressed data to a state before the compression and to transfer the data to an external device 8, and memory area monitor part 7 to record the compressed data from the compression part 4 in a trace memory 6 while monitoring the remaining memory capacity of the trace memory 6 when there is a space in the memory, to interrupt the processing of the collection part 3 when there is no space and to restart the processing of the collection part 3 after restoring/transferring all the data in the trace memory 6 by activating the restorage part 5.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明はトレースデータ収集装置
に関する。コンピュータプログラムの開発においては、
プログラムの評価試験や解析を十分に実施し、高信頼
化、高品質化を図るためトレースデータが収集される。
トレースデータはプログラム実行時の各動作ステップに
おけるレジスタの設定内容やアクセスしたメモリの番地
等を羅列したデータであり、主メモリ上の所定の領域
(本願明細書中ではこれをトレースメモリという)に順
次格納される。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a trace data collecting device. In the development of computer programs,
Trace data is collected in order to improve the reliability and quality of the program by sufficiently performing evaluation tests and analysis of the program.
The trace data is data that lists the setting contents of registers and the addresses of the accessed memory at each operation step during program execution, and is sequentially stored in a predetermined area on the main memory (this is referred to as trace memory in this specification). Is stored.

【0002】しかし、近時においては、プログラムの多
様化、高性能化、高品質化の要求によるプログラムの大
規模化、複雑化に伴い、収集すべきトレースデータの量
も膨大なものとなってきており、トレースメモリの容量
が不足する場合が生じ、種々の問題を引き起こしてい
る。従って、この点を改善しなければならない。
However, in recent years, the amount of trace data to be collected has become enormous as the program becomes larger and more complex due to the diversification, high performance, and high quality of the program. The capacity of the trace memory may become insufficient, causing various problems. Therefore, this point must be improved.

【0003】[0003]

【従来の技術】被試験プログラムを模擬的に実行するこ
とにより収集されたトレースデータは、主メモリ上の予
め設定された領域(トレースメモリ)に順次、記録・格
納されるが、従来はこれら全てのトレースデータをその
ままトレースメモリに記録する方式を採用しており、従
って、トレースメモリの容量を増大することにより、被
試験プログラムの大規模化等によるトレースデータ量の
増大に対処していた。
2. Description of the Related Art Trace data collected by simulating execution of a program under test is sequentially recorded and stored in a preset area (trace memory) on a main memory. The above method employs a method of recording the trace data in the trace memory as it is. Therefore, by increasing the capacity of the trace memory, an increase in the amount of trace data due to an increase in the scale of the program under test is dealt with.

【0004】また、トレースメモリへのトレースデータ
の記録に際して、以下のようなデータ圧縮を実施して、
トレースメモリに記録するデータ量の縮小化を図ってい
た。即ち、1動作ステップの実行について、実行アドレ
ス、アクセスメモリ、レジスタの内容等を含む各種のデ
ータが採取されるが、これら一連のデータが1動作ステ
ップ単位で連続して同一である場合に、この連続した個
数を計数し、トレースメモリには1動作ステップについ
てのトレースデータとその個数を記録することにより、
トレースメモリに記録するデータ量を減少させていた。
Further, when recording the trace data in the trace memory, the following data compression is performed,
The amount of data recorded in the trace memory was reduced. That is, various data including the execution address, the access memory, the contents of the register, etc. are collected for the execution of one operation step, and if these series of data are continuously the same in one operation step, By counting the continuous number and recording the trace data and its number for one operation step in the trace memory,
The amount of data recorded in the trace memory was reduced.

【0005】しかし、トレースメモリの容量の拡大には
限度があり、一方、上記のデータ圧縮は、各動作ステッ
プ単位で同一のトレースデータが頻繁に連続する場合に
のみ有効であり、今日の複雑化したプログラムでは各動
作ステップ単位でトレースデータが連続する場合は殆ど
なく、トレースメモリの容量に不足を生じることがあっ
た。
However, there is a limit to the expansion of the capacity of the trace memory, while the above-mentioned data compression is effective only when the same trace data is frequently consecutive in each operation step, and it becomes complicated today. In such a program, there is almost no case where the trace data is continuous in each operation step, and the capacity of the trace memory may be insufficient.

【0006】そこで、従来は、被試験プログラムを適宜
分割して処理し、その都度トレースデータを参照し、あ
るいはトレースメモリから外部記憶装置等にデータを退
避しながら、数回にわたってトレースデータを収集する
という作業を行っていた。
Therefore, conventionally, the program under test is appropriately divided and processed, the trace data is referred to each time, or the trace data is collected several times while saving the data from the trace memory to an external storage device or the like. I was doing the work.

【0007】[0007]

【発明が解決しようとする課題】しかし、被試験プログ
ラムを分割処理するのは、被試験プログラムのアドレス
を求める作業やトレースメモリの内容を外部記憶装置等
に転送する作業が煩雑であるとともに、作業ミスにより
データが欠損する等の問題があった。
However, dividing the program under test is complicated because the work of obtaining the address of the program under test and the work of transferring the contents of the trace memory to an external storage device are complicated. There was a problem such as missing data due to mistakes.

【0008】本発明はこのような点に鑑みてなされたも
のであり、トレースメモリの小容量化を図ることができ
るとともに、効率的且つ正確にトレースデータの収集を
可能にすることを目的としている。
The present invention has been made in view of the above circumstances, and an object thereof is to reduce the capacity of a trace memory and to collect trace data efficiently and accurately. ..

【0009】[0009]

【課題を解決するための手段】上述した課題を解決する
ため、図1に示すようなトレースデータ収集装置を提供
する。
In order to solve the above problems, a trace data collecting apparatus as shown in FIG. 1 is provided.

【0010】即ち、被試験プログラム2を模擬的に実行
し、トレースデータを収集する収集部3と、該収集部3
からのトレースデータを復元可能に圧縮する圧縮部4
と、圧縮されたデータを圧縮前の状態に復元して外部装
置8に転送する復元部5と、トレースメモリ6のメモリ
残量を監視し、空きが有る場合には前記圧縮部4からの
圧縮されたデータを該トレースメモリ6に記録し、空き
が無い場合には前記収集部3による処理を中断せしめる
とともに、前記復元部5を起動して該トレースメモリ6
内の全てのデータを復元・転送させた後、該収集部3に
よる処理を再開させるメモリ領域監視部7とを備えて構
成する。
That is, a collecting section 3 for executing the program under test 2 in a simulated manner and collecting trace data, and the collecting section 3
Compressor 4 that compresses trace data from
And a restoration unit 5 that restores the compressed data to the state before compression and transfers it to the external device 8, and the memory remaining amount of the trace memory 6 is monitored, and if there is a space, the compression from the compression unit 4 is performed. The traced data is recorded in the trace memory 6, and when there is no free space, the processing by the collection unit 3 is interrupted and the restoration unit 5 is activated to start the trace memory 6
A memory area monitoring unit 7 is provided for resuming the processing by the collecting unit 3 after restoring / transferring all the data therein.

【0011】前記圧縮部4は、前記収集部3からのトレ
ースデータが1バイト単位で連続する場合に、該連続す
るトレースデータの個数を計数し、該当する1バイトの
トレースデータと連続する個数を出力することにより、
トレースデータを圧縮するように構成してある。
When the trace data from the collecting unit 3 is continuous in 1-byte units, the compressing unit 4 counts the number of continuous trace data, and determines the number of continuous trace data corresponding to 1 byte. By outputting
It is configured to compress the trace data.

【0012】尚、前記外部装置8は、例えば、ディスプ
レイ表示装置、外部記憶装置、あるいはプリンタ装置等
のデータを表示し又は記憶する装置である。
The external device 8 is a device for displaying or storing data, such as a display device, an external storage device, or a printer device.

【0013】[0013]

【作用】まず、収集部3は被試験プログラム2を模擬的
に実行し、被試験プログラム2の実行アドレス、レジス
タの設定内容、アクセスしたメモリのアドレス等からな
るトレースデータを順次生成・収集し、圧縮部4にわた
す。
First, the collection unit 3 executes the program under test 2 in a simulated manner, and sequentially generates and collects trace data including the execution address of the program under test 2, the setting contents of the registers, the addresses of the accessed memory, etc. Pass to the compression unit 4.

【0014】圧縮部4においては、収集部3から受け取
ったトレースデータを1バイト単位で順次比較し、同一
の1バイトのデータ(以下、バイトデータという)が連
続する場合には、それと異なるバイトデータが出現する
まで、連続するバイトデータの個数を計数し、該バイト
データと該個数をメモリ領域監視部7にわたす。同一の
バイトデータが連続しない場合には、そのままバイトデ
ータをメモリ領域監視部7にわたす。
In the compression unit 4, the trace data received from the collection unit 3 are sequentially compared byte by byte, and if the same 1-byte data (hereinafter referred to as byte data) continues, different byte data The number of continuous byte data is counted until the occurrence of, and the byte data and the number are passed to the memory area monitoring unit 7. When the same byte data is not continuous, the byte data is passed to the memory area monitoring unit 7 as it is.

【0015】メモリ領域監視部7は、圧縮部4から受け
取ったバイトデータ及び個数データ(圧縮データ)をト
レースメモリ6にそのメモリ残量が無くなるまで順次記
録・格納する。そして、メモリ領域監視部7は、トレー
スメモリ6のメモリ残量がなくなった時点で、収集部3
に対してトレースデータの収集を中断するよう指示する
とともに、復元部5に対して起動を指示する。
The memory area monitoring unit 7 sequentially records and stores the byte data and the number data (compressed data) received from the compression unit 4 in the trace memory 6 until the remaining memory capacity is exhausted. The memory area monitoring unit 7 then collects data from the collection unit 3 when the remaining memory in the trace memory 6 is exhausted.
To the suspension unit 5 and to instruct the restoration unit 5 to start.

【0016】これを受けて復元部5はトレースメモリ6
から圧縮データを順次取り出し、前記圧縮部4と逆の処
理を行うことにより、圧縮前と同様のトレースデータに
復元して外部装置8に出力する。復元部5によりトレー
スメモリ6内の全てのデータが復元・出力されたなら
ば、メモリ領域監視部7は収集部3に対してトレースデ
ータの収集を再開するよう指示するものである。
In response to this, the restoration unit 5 causes the trace memory 6
The compressed data is sequentially taken out of the compressed data, and the reverse processing of the compression unit 4 is performed to restore the same trace data as before the compression and output to the external device 8. When all the data in the trace memory 6 has been restored and output by the restoration unit 5, the memory area monitoring unit 7 instructs the collection unit 3 to restart the collection of trace data.

【0017】このように、本発明によるトレースデータ
収集装置は、圧縮部4においてトレースデータが1バイ
ト単位で比較され圧縮されるから、従来の如くプログラ
ムの1動作ステップについてのトレースデータ単位で比
較圧縮するものよりもデータの圧縮率を大きくすること
ができ、効率的である。
As described above, in the trace data collecting apparatus according to the present invention, since the trace data is compared and compressed in the compression unit 4 in units of 1 byte, the comparison and compression is performed in units of trace data for one operation step of the program as in the conventional case. It is more efficient because it can increase the data compression rate more than what it does.

【0018】また、トレースメモリ6が満杯となった場
合には、直ちにトレースデータの収集を中断し、トレー
スメモリ6内のデータを外部装置8に退避した後、収集
を続行するようにしているから、従来の如くトレースメ
モリが満杯となった場合に、あるいは満杯になった場合
を想定して行っていた作業等を省略でき、データの欠損
等の無い正確なトレースデータの収集が可能となる。さ
らに、トレースメモリの容量を小容量化することができ
る。
Further, when the trace memory 6 becomes full, the collection of trace data is immediately interrupted, the data in the trace memory 6 is saved in the external device 8, and then the collection is continued. As described above, it is possible to omit the work or the like that has been performed when the trace memory is full, or when the trace memory is full, and it is possible to collect accurate trace data without data loss. Further, the capacity of the trace memory can be reduced.

【0019】[0019]

【実施例】図2乃至図5は、図1における各部の具体的
な処理の一例を示すフローチャートである。これらフロ
ーチャート中の各記号の意味は以下の通りである。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS FIGS. 2 to 5 are flow charts showing an example of concrete processing of each section in FIG. The meaning of each symbol in these flowcharts is as follows.

【0020】TS_N:収集部3により収集されたトレ
ースデータを格納するバッファ TS_BUFF1:圧縮済みのトレースデータを格納す
るバッファ TS_BUFF2:カウンタデータを格納するバッファ TS_BUFF:圧縮済みのトレースデータとカウンタ
データの双方を称した名称 TS_N[MAX]:TS_Nのバイト数 n:TS_Nを1バイトずつ読むためのカウンタ a:相対バイト数用のカウンタ c:同一データ(バイト)カウント用のカウンタ af:a(相対バイト数)をバッファに格納したか否か
を判断するためのフラグ TS_LST:比較のため、前回の1バイトを格納する
バッファ TS_By:TS_BUFFのバイト数 TS_ALL:現在、トレースメモリに格納されている
トレースデータのバイト数 TS_MAX:トレースメモリの最大バイト数 TS_MEM1:トレースメモリの圧縮データを格納す
る領域 TS_MEM2:トレースメモリのカウンタデータを格
納する領域 尚、以下の説明において、「追加設定する」とは従前に
データが設定されている場合に、これに追加するかたち
でデータを設定することをいい、単に「設定する」とい
うときは従前のデータを破棄して新データを設定するこ
とをいうものとする。
TS_N: A buffer for storing the trace data collected by the collection unit TS_BUFF1: A buffer for storing the compressed trace data TS_BUFF2: A buffer for storing the counter data TS_BUFF: Both the compressed trace data and the counter data Named TS_N [MAX]: Number of bytes of TS_N n: Counter for reading TS_N byte by byte a: Counter for relative number of bytes c: Counter for counting the same data (bytes) af: a (number of relative bytes) Flag for determining whether or not is stored in the buffer TS_LST: The buffer that stores the previous 1 byte for comparison TS_By: The number of bytes in TS_BUFF TS_ALL: The number of bytes of the trace data currently stored in the trace memory T _MAX: maximum number of bytes of trace memory TS_MEM1: area for storing compressed data of trace memory TS_MEM2: area for storing counter data of trace memory In the following description, "additionally set" means that data is set before. In this case, the data is set in the form of being added to this, and when simply “set”, it means that the previous data is discarded and new data is set.

【0021】図2及び図3は、図1における収集部3及
び圧縮部4による処理を示すフローチャートである。ま
ず、図2を参照する。トレースデータ収集装置1が起動
されると、収集部3は、まずトレースデータの収集が禁
止されているか否かを判定し(ステップ「以下STと略
す」1)、被試験プログラム2を模擬的に実行し、トレ
ースデータを収集し、TS_Nに順次設定する(ST
2)。
2 and 3 are flow charts showing the processing by the collection unit 3 and the compression unit 4 in FIG. First, refer to FIG. When the trace data collection device 1 is activated, the collection unit 3 first determines whether or not the collection of trace data is prohibited (step “abbreviated as ST” 1 below) 1 and simulates the program under test 2. Execute, collect trace data, and set TS_N sequentially (ST
2).

【0022】次いで、カウンタn,a,c、フラグaf
を0クリアし(ST3)、TS_LSTとTS_N
[n]とを比較し(ST4)、これらが等しい場合に
は、カウンタafが「0」であるかどうかを判定し(S
T5)、「0」である場合には、カウンタaの値をTS
_BUFF2に追加設定し(ST6)、カウンタaを
「0」とし(ST7)、フラグafを「1」とし(ST
8)、ST9に進む。ST5において、フラグafが
「0」でない場合にはそのままST9に進む。
Next, the counters n, a, c and the flag af
Is cleared to 0 (ST3), TS_LST and TS_N
[N] is compared (ST4), and if they are equal, it is determined whether the counter af is "0" (S).
T5), if it is "0", the value of the counter a is TS
_BUFF2 is additionally set (ST6), the counter a is set to "0" (ST7), and the flag af is set to "1" (ST
8) Go to ST9. When the flag af is not "0" in ST5, the process directly proceeds to ST9.

【0023】ST9において、カウンタcに1を加算
し、次いでカウンタcの値をTS_BUFF2に追加設
定し(ST10)、カウンタcが「0xFF」と等しい
か否かを判定する(ST11)。
In ST9, 1 is added to the counter c, then the value of the counter c is additionally set in TS_BUFF2 (ST10), and it is determined whether the counter c is equal to "0xFF" (ST11).

【0024】ST4において、TS_LSTがTS_N
[n]と等しくない場合、又はST11において、カウ
ンタcが「0xFF」と等しい場合には、図3のST1
2に進む。
At ST4, TS_LST is TS_N.
If it is not equal to [n], or if the counter c is equal to “0xFF” in ST11, ST1 of FIG.
Go to 2.

【0025】ST12において、TS_N[n]をTS
_BUFF1に追加設定し、次いで、カウンタaに1を
加算し(ST13)、カウンタc及びフラグafを0ク
リアする(ST14)。
In ST12, TS_N [n] is set to TS
_BUFF1 is additionally set, then 1 is added to the counter a (ST13), and the counter c and the flag af are cleared to 0 (ST14).

【0026】次いで、カウンタaが「0xFF」である
か否かを判定し(ST15)、等しい場合には、カウン
タaの値をTS_BUFF2に追加設定し(ST1
6)、次いで、「1(カウンタ値)」をTS_BUFF
2に追加設定し(ST17)、カウンタaの値を「1」
とし(ST18)、ST19に進む。ST15におい
て、カウンタaが「0xFF」と等しくない場合には、
ST19に進む。
Next, it is determined whether or not the counter a is "0xFF" (ST15), and if they are equal, the value of the counter a is additionally set in TS_BUFF2 (ST1.
6), then “1 (counter value)” is TS_BUFF
2 is additionally set (ST17), and the value of the counter a is set to "1".
(ST18), and the process proceeds to ST19. In ST15, when the counter a is not equal to “0xFF”,
Go to ST19.

【0027】図2のST11において、カウンタcが
「0xFF」と等しくない場合には、図3のST19に
進む。ST19において、TS_N[n]をTS_LS
Tに設定し、次いで、カウンタnに1を加算して(ST
20)、TS_N[MAX]とカウンタnの値を比較す
る(ST21)。
If the counter c is not equal to "0xFF" in ST11 of FIG. 2, the process proceeds to ST19 of FIG. In ST19, TS_N [n] is changed to TS_LS
Set to T, then add 1 to the counter n (ST
20), TS_N [MAX] is compared with the value of the counter n (ST21).

【0028】ST21において、TS_N[MAX]が
カウンタnの値よりも大きい場合には、図2のST4に
戻り、等しい場合には、TS_BUFFをメモリ領域監
視部7にわたし(ST22)、被試験プログラム2につ
いての全てのトレースデータの収集が終了したか否かを
判定し(ST23)、終了していない場合には図2のS
T1に戻り、終了している場合には収集部3及び圧縮部
4による処理を終了する。
In ST21, if TS_N [MAX] is larger than the value of the counter n, the process returns to ST4 in FIG. 2, and if equal, TS_BUFF is sent to the memory area monitoring section 7 (ST22), and the program under test is tested. It is determined whether or not the collection of all trace data for 2 is completed (ST23), and if not completed, S of FIG.
Returning to T1, if completed, the processing by the collection unit 3 and the compression unit 4 is completed.

【0029】図4は図1におけるメモリ領域監視部7に
よる処理を示すフローチャートである。圧縮部4からT
S_BUFFをわたされると、メモリ領域監視部7は、
まず、TS_BUFFの総バイト数をTS_Byに設定
し(ST24)、TS_ALLにTS_Byを加算し
(ST25)、TS_ALLとTS_MAXとを比較す
る(ST26)。
FIG. 4 is a flow chart showing the processing by the memory area monitoring unit 7 in FIG. Compressor 4 to T
When S_BUFF is passed, the memory area monitoring unit 7
First, the total number of bytes of TS_BUFF is set to TS_By (ST24), TS_By is added to TS_ALL (ST25), and TS_ALL and TS_MAX are compared (ST26).

【0030】ST26において、TS_ALLがTS_
MAXと等しいかそれよりも小さい場合には、TS_B
UFF1の内容をTS_MEM1に全て追加設定し(S
T27)、次いで、TS_BUFF2の内容をTS_M
EM2に全て追加設定し(ST28)、この処理を終了
する。
In ST26, TS_ALL is TS_
TS_B if less than or equal to MAX
Add all the contents of UFF1 to TS_MEM1 (S
T27), then TS_BUFF2 contents TS_M
All the settings are additionally set in EM2 (ST28), and this processing is ended.

【0031】ST26において、TS_ALLがTS_
MAXよりも大きい場合には、収集部3に対してトレー
スデータの収集禁止を通知し(ST29)、TS_BU
FFの内容をデータ一時退避メモリに退避した後(ST
30)、復元部5を起動して、復元部5による処理(後
述する)が終了するまで待機する(ST31)。
At ST26, TS_ALL becomes TS_
If it is larger than MAX, the collection unit 3 is notified that trace data collection is prohibited (ST29), and TS_BU
After saving the contents of FF to the temporary data save memory (ST
30), start the restoration unit 5, and wait until the processing (described later) by the restoration unit 5 ends (ST31).

【0032】復元部5による処理が終了したならば、デ
ータ一時退避メモリに退避していたデータをTS_ME
M1及びTS_MEM2に追加設定し(ST32,ST
33)、収集部3に対してトレースデータの収集禁止の
解除を通知して(ST34)、メモリ領域監視部7によ
る処理を終了する。
When the processing by the restoration unit 5 is completed, the data saved in the data temporary save memory is stored in TS_ME.
Additional setting to M1 and TS_MEM2 (ST32, ST
33) Then, the collection unit 3 is notified of the release of the prohibition of the collection of trace data (ST34), and the processing by the memory area monitoring unit 7 ends.

【0033】図5は図1における復元部5の処理(図4
におけるST31の処理)を示すフローチャートであ
る。復元部5が起動されると、トレースデータの出力先
をディスプレイ装置とするか、あるいはフロッピーディ
スク装置(FPD)とするかの確認を行う(ST3
5)。この確認は、例えば、予めトレースデータの出力
先をオペレータに入力させておき、あるいは必要に応じ
てその都度入力させるように構成することができる。
FIG. 5 shows the processing of the restoration section 5 in FIG.
3 is a flowchart showing the processing of ST31 in FIG. When the restoration unit 5 is activated, it is confirmed whether the output destination of the trace data is the display device or the floppy disk device (FPD) (ST3).
5). For this confirmation, for example, the output destination of the trace data can be input in advance by the operator, or can be input each time as necessary.

【0034】この確認結果に基づき判定を行い(ST3
6)、ディスプレイ装置が指定されている場合にはディ
スプレイ装置に出力するよう処理し(ST37)、フロ
ッピーディスク装置が指定されている場合にはフロッピ
ーディスク装置に出力するよう処理する(ST38)。
A judgment is made based on this confirmation result (ST3
6) If the display device is designated, it is processed to output to the display device (ST37), and if the floppy disk device is designated, it is processed to output to the floppy disk device (ST38).

【0035】次いで、TS_MEM1に設定されている
データがなくなるまで、ST40〜ST43の処理を繰
り返す(ST39)。即ち、TS_MEM2から1バイ
トのデータを読み込む(ST40)。このデータは相対
バイト数である。次に、この相対バイト数の数だけTS
_MEM1内のデータを出力し(ST41)、TS_M
EM2から次の1バイトのデータを読み込む(ST4
2)。このデータはカウンタ値である。次に、TS_M
EM1の現地点における1バイトのデータを、ST42
によるカウンタ値の数だけ出力し(ST43)、ST3
9に戻る。
Then, the processes of ST40 to ST43 are repeated until there is no data set in TS_MEM1 (ST39). That is, 1-byte data is read from TS_MEM2 (ST40). This data is a relative number of bytes. Next, TS for this number of relative bytes
The data in _MEM1 is output (ST41), and TS_M
Read the next 1-byte data from EM2 (ST4
2). This data is a counter value. Next, TS_M
1 byte data at the local point of EM1 is converted to ST42
Output as many as the counter value (ST43), ST3
Return to 9.

【0036】ST39において、TS_MEM1のデー
タが無くなったならば(全て出力したならば)、復元部
5による処理を終了する。図1における各部の処理の具
体例を、図6に示すトレースデータ圧縮遷移図を参照し
てさらに詳述する。
In ST39, when the data of TS_MEM1 is lost (when all data is output), the processing by the restoration unit 5 is terminated. A specific example of the processing of each unit in FIG. 1 will be described in more detail with reference to the trace data compression transition diagram shown in FIG.

【0037】図6のA1は、被試験プログラム2の解析
等に必要とされるトレースデータの表示例を示してお
り、d1はクロック、d2は被試験プログラムの実行ア
ドレス、d3はアセンブルコード、d4はフラグレジス
タの内容、d5はアクセスしたメモリの番地又はレジス
タの設定内容である。
A1 in FIG. 6 shows a display example of trace data required for analysis of the program under test 2 and the like, where d1 is a clock, d2 is an execution address of the program under test, d3 is an assemble code, and d4 is. Is the content of the flag register, and d5 is the address of the accessed memory or the setting content of the register.

【0038】A2は、A1の内容をバイト単位で表現し
て羅列したものであり、図1における復元部5から外部
装置8に対して転送されるべきデータの内容を示してい
る。A2はA1と1:1に対応したデータである。
A2 is a list of the contents of A1 expressed in byte units, and shows the contents of data to be transferred from the restoration unit 5 to the external device 8 in FIG. A2 is data corresponding to A1 and 1: 1.

【0039】B1は、図1における収集部3により収集
されるデータの内容を示している。即ち、収集部3は被
試験プログラムの実行アドレス(d2)、フラグレジス
タの内容(d4)、及びアクセスしたメモリの番地又は
レジスタの設定内容(d5)についてのデータを収集
し、圧縮部4にわたす。ここで、クロック(d1)、ア
センブルコード(d3)についてデータの収集を行わな
いのは、クロック(d1)はアセンブルコード(d3)
とアクセスメモリ又はレジスタの内容(d5)とから逆
算することが可能であり、アセンブルコード(d3)は
被試験プログラムの実行アドレスから検出することがで
きるから、トレースメモリ6を節約するために、これら
のデータは圧縮部4にわたさないようにしている。尚、
収集部3は復元部5からの要求によりアセンブルコード
(d3)を復元部5に渡すものとする(図1には点線矢
印で示している)。
B1 indicates the contents of the data collected by the collection unit 3 in FIG. That is, the collection unit 3 collects data regarding the execution address (d2) of the program under test, the content of the flag register (d4), and the address of the accessed memory or the setting content of the register (d5), and passes the data to the compression unit 4. .. Here, the data is not collected for the clock (d1) and the assemble code (d3) because the clock (d1) is the assemble code (d3).
And the contents of the access memory or the register (d5) can be calculated backward, and the assemble code (d3) can be detected from the execution address of the program under test. Data is not passed to the compression unit 4. still,
The collecting unit 3 transfers the assemble code (d3) to the restoring unit 5 in response to a request from the restoring unit 5 (indicated by a dotted arrow in FIG. 1).

【0040】これらのデータ(B1)は圧縮部4により
圧縮されて、B2及びB3に示されるような圧縮データ
となり、メモリ領域監視部7によりトレースメモリ6
(TS_MEM1,TS_MEM2)に順次設定され
る。
These data (B1) are compressed by the compression unit 4 into compressed data as shown by B2 and B3, and the memory area monitoring unit 7 causes the trace memory 6
(TS_MEM1, TS_MEM2) are sequentially set.

【0041】復元部5は、トレースメモリ6から圧縮デ
ータ(B2,B3)を順次取り出し、図5のST40〜
ST43を繰り返すことにより、B1に示されているよ
うなデータに復元するとともに、アセンブルコード(d
3)を収集部3から受取り、このアセンブルコード(d
3)とアクセスメモリ又はレジスタの内容(d5)とか
らクロック(d1)を算出して、A2に示されているよ
うなデータを生成し、外部装置8に対して転送する。
The decompression section 5 sequentially takes out the compressed data (B2, B3) from the trace memory 6 and starts from ST40 of FIG.
By repeating ST43, the data as shown in B1 is restored and the assemble code (d
3) is received from the collection unit 3, and the assemble code (d
The clock (d1) is calculated from 3) and the content (d5) of the access memory or the register to generate data as shown in A2, and the data is transferred to the external device 8.

【0042】外部装置8は、復元部5から転送されたデ
ータ(A2)を、A1に示されているようなデータに変
換し、オペレータの指示に基づき、ディスプレイ装置又
はフロッピーディスク装置に出力する。
The external device 8 converts the data (A2) transferred from the restoration unit 5 into data as shown in A1 and outputs it to the display device or the floppy disk device based on the instruction of the operator.

【0043】本実施例によると、トレースデータはバイ
ト単位で比較されて圧縮された後にトレースメモリ(T
S_MEM1,TS_MEM2)に順次設定される。そ
して、トレースメモリの最大バイト数(TS_MAX)
を越えると、トレースメモリ(TS_MEM1,TS_
MEM2)内のデータは全て圧縮前の状態に復元されて
ディスプレイ装置あるいはフロッピーディスク装置に自
動的に転送され、その後、残りのトレースデータの収
集、圧縮、トレースメモリへの設定が行われるようにな
っている。
According to the present embodiment, the trace data is compared in byte units and compressed, and then the trace memory (T
S_MEM1 and TS_MEM2) are sequentially set. And the maximum number of bytes of trace memory (TS_MAX)
Trace memory (TS_MEM1, TS_
All the data in MEM2) is restored to the state before compression and automatically transferred to the display device or floppy disk device, after which the remaining trace data is collected, compressed, and set in the trace memory. ing.

【0044】従って、収集すべきトレースデータの量が
トレースメモリの容量を越えた場合であっても、従来の
如くオペレータが特別な処理を実施する必要がなく、効
率的にトレースデータの収集を行うことができるように
なる。
Therefore, even when the amount of trace data to be collected exceeds the capacity of the trace memory, it is not necessary for the operator to perform special processing as in the conventional case, and trace data can be collected efficiently. Will be able to.

【0045】尚、上記実施例においては、復元後のデー
タはディスプレイ装置あるいはフロッピーディスク装置
に転送するようにしているが、プリンタ装置に転送する
ようにしてもよい。
Although the restored data is transferred to the display device or the floppy disk device in the above embodiment, it may be transferred to the printer device.

【0046】[0046]

【発明の効果】本発明は以上詳述したように、トレース
データをバイト単位で圧縮してトレースメモリに順次記
録し、トレースメモリが満杯になると、トレースメモリ
内のデータを全て圧縮前の状態に復元して外部装置に転
送し、その後トレースメモリへの記録を続行するように
しているから、トレースメモリの容量を増大することな
く膨大なトレースデータを収集することが可能であり、
これらの処理は自動的に行われるからトレースデータ収
集に伴う作業工数も少なくなり、効率的且つ正確にトレ
ースデータを収集できるようになるという効果を奏す
る。
As described above in detail, the present invention compresses trace data in byte units and sequentially records it in the trace memory. When the trace memory becomes full, all the data in the trace memory is restored to the state before compression. Since it is restored and transferred to an external device, and then recording to the trace memory is continued, it is possible to collect a huge amount of trace data without increasing the capacity of the trace memory.
Since these processes are automatically performed, the number of man-hours required for collecting the trace data is reduced, and the trace data can be collected efficiently and accurately.

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

【図1】本発明の原理構成を示すブロック図である。FIG. 1 is a block diagram showing a principle configuration of the present invention.

【図2】本発明実施例における収集部及び圧縮部の処理
を示すフローチャート(1)である。
FIG. 2 is a flowchart (1) showing processing of a collecting unit and a compressing unit in the embodiment of the present invention.

【図3】本発明実施例における収集部及び圧縮部の処理
を示すフローチャート(2)である。
FIG. 3 is a flowchart (2) showing the processing of the collection unit and the compression unit in the embodiment of the present invention.

【図4】本発明実施例におけるメモリ領域監視部の処理
を示すフローチャートである。
FIG. 4 is a flowchart showing processing of a memory area monitoring unit in the embodiment of the present invention.

【図5】本発明実施例における復元部の処理を示すフロ
ーチャートである。
FIG. 5 is a flowchart showing the processing of the restoration unit in the embodiment of the present invention.

【図6】本発明実施例におけるトレースデータ圧縮遷移
図である。
FIG. 6 is a trace data compression transition diagram according to the embodiment of the present invention.

【符号の説明】[Explanation of symbols]

1 トレースデータ収集装置 2 被試験プログラム 3 収集部 4 圧縮部 5 復元部 6 トレースメモリ 7 メモリ領域監視部 8 外部装置 1 Trace Data Collection Device 2 Program Under Test 3 Collection Section 4 Compression Section 5 Restoration Section 6 Trace Memory 7 Memory Area Monitoring Section 8 External Device

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 被試験プログラム(2) を模擬的に実行
し、トレースデータを収集する収集部(3) と、 該収集部(3) からのトレースデータを復元可能に圧縮す
る圧縮部(4) と、 圧縮されたデータを圧縮前の状態に復元して外部装置
(8) に転送する復元部(5) と、 トレースメモリ(6) のメモリ残量を監視し、空きが有る
場合には前記圧縮部(4) からの圧縮されたデータを該ト
レースメモリ(6)に記録し、空きが無い場合には前記収
集部(3) による処理を中断せしめるとともに、前記復元
部(5) を起動して該トレースメモリ(6) 内の全てのデー
タを復元・転送させた後、該収集部(3)による処理を再
開させるメモリ領域監視部(7) とを備えて構成したこと
を特徴とするトレースデータ収集装置。
1. A collection unit (3) for simulating execution of a program under test (2) and collecting trace data, and a compression unit (4) for compressing trace data from the collection unit (3) in a recoverable manner. ), And restore the compressed data to the state before
The amount of memory remaining in the decompression unit (5) and the trace memory (6) to be transferred to (8) is monitored, and if there is free space, the compressed data from the compression unit (4) is transferred to the trace memory (6). ), The processing by the collection unit (3) is interrupted when there is no free space, and the restoration unit (5) is activated to restore / transfer all data in the trace memory (6). And a memory area monitoring unit (7) for restarting the processing by the collecting unit (3).
【請求項2】 請求項1に記載のトレースデータ収集装
置において、 前記圧縮部(4) を、前記収集部(3) からのトレースデー
タが1バイト単位で連続する場合に、該連続するトレー
スデータの個数を計数し、該当する1バイトのトレース
データと連続する個数を出力することにより、トレース
データを圧縮するように構成したことを特徴とするトレ
ースデータ収集装置。
2. The trace data collecting device according to claim 1, wherein when the trace data from the collecting unit (3) continues in the compression unit (4) in 1-byte units, the continuous trace data is collected. The trace data collecting device is characterized in that the trace data is compressed by counting the number of the trace data and outputting the number continuous with the corresponding 1-byte trace data.
JP3224016A 1991-09-04 1991-09-04 Trace data collector Withdrawn JPH0561720A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3224016A JPH0561720A (en) 1991-09-04 1991-09-04 Trace data collector

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3224016A JPH0561720A (en) 1991-09-04 1991-09-04 Trace data collector

Publications (1)

Publication Number Publication Date
JPH0561720A true JPH0561720A (en) 1993-03-12

Family

ID=16807268

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3224016A Withdrawn JPH0561720A (en) 1991-09-04 1991-09-04 Trace data collector

Country Status (1)

Country Link
JP (1) JPH0561720A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07200348A (en) * 1993-11-23 1995-08-04 Rockwell Internatl Corp Method and apparatus for compression of program address dataand apparatus for quickening of debugging processing of program
JPH1185571A (en) * 1997-09-03 1999-03-30 Nec Corp System for storing log into flash memory

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07200348A (en) * 1993-11-23 1995-08-04 Rockwell Internatl Corp Method and apparatus for compression of program address dataand apparatus for quickening of debugging processing of program
JPH1185571A (en) * 1997-09-03 1999-03-30 Nec Corp System for storing log into flash memory

Similar Documents

Publication Publication Date Title
EP1187003B1 (en) Program development support apparatus
US5151981A (en) Instruction sampling instrumentation
EP0257241A2 (en) Internal computer performance monitoring by event sampling
JPH07281930A (en) Operation measurement/analysis system for information processor
JPH0561720A (en) Trace data collector
JPH09325903A (en) Fault recording system
JP3181728B2 (en) Air conditioning management system
JP2878264B1 (en) Tracer device, trace data compression method, and compressed trace data reading method
JP3097076B2 (en) Trace data collection method
JPH11161523A (en) Fault information gathering device
JP2882459B2 (en) Error information collection test system
JP2985748B2 (en) Waveform measuring instrument
JPH0934754A (en) Instrument and method for measuring performance of program
JPH05120059A (en) Fault information extraction system
JP3348422B2 (en) Measurement data collection device
JPH0916335A (en) Data processor
JPH09171476A (en) Dump file compressing system
JPH03278246A (en) Processing method for collecting abnormal information
JPH0814798B2 (en) Trace data reading system
JPH06231011A (en) System for measuring number of times of access of peripheral equipment
JPH02242447A (en) Memory dump collecting system
JPH05250228A (en) Fault information collection system
JPH05173846A (en) Fault analysis information tracing method
JPS61267151A (en) Interface monitor
JPH03125237A (en) Memory dump collection system

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 19981203