JPH05257735A - Function trace analyzing system - Google Patents

Function trace analyzing system

Info

Publication number
JPH05257735A
JPH05257735A JP4053284A JP5328492A JPH05257735A JP H05257735 A JPH05257735 A JP H05257735A JP 4053284 A JP4053284 A JP 4053284A JP 5328492 A JP5328492 A JP 5328492A JP H05257735 A JPH05257735 A JP H05257735A
Authority
JP
Japan
Prior art keywords
trace
function
information
result
analysis
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
JP4053284A
Other languages
Japanese (ja)
Inventor
Takahisa Miyamoto
貴久 宮本
Hidemitsu Higuchi
秀光 樋口
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 JP4053284A priority Critical patent/JPH05257735A/en
Publication of JPH05257735A publication Critical patent/JPH05257735A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To output the call relation of functions and processing time so as to be visually recognized by acquiring trace information excluding the influences of an interruption processing or the other process. CONSTITUTION:A trace part 102 provided at a program 101 to be traced outputs trace information to a trace information storage part 105, and a trace position extraction part 104 outputs the position of trace information corresponding to any arbitrary event among the outputted results to a trace position storage part 106. Then, a trace result analysis part 100 outputs the trace information stored in the trace information storage part 105, the trace position information stored in the trace position storage part 106 and the result of analyzing an in-function call function table 107 as input information to an analyzed result storage part 113, and an analyzed result output part 108 outputs the call relation of functions as the analyzed results and the processing time to a display device 109 in a certain display form so as to be visually recognized.

Description

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

【0001】[0001]

【産業上の利用分野】本発明はシステム起動後は絶えず
動いているか、又は割込み処理や他プロセスの影響を受
ける可能性のあるプログラムのトレ−スを行った際、割
込みや他プロセスの影響を排除した任意のイベントに対
するトレ−ス結果のみを抽出し、トレ−ス結果から関数
のコ−ル関係と処理時間を自動的に解析し、その結果を
視覚的に認識できるように出力させることにより、該プ
ログラムの性能測定やデバッグ作業の正確さと効率を高
める関数トレ−ス解析方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention does not affect interrupts or other processes when tracing a program that is constantly running after the system is started up or may be affected by interrupt processing or other processes. By extracting only the trace result for any excluded event, automatically analyzing the function call relationship and processing time from the trace result, and outputting the result so that it can be visually recognized. , A function trace analysis method for improving the accuracy and efficiency of performance measurement and debugging of the program.

【0002】[0002]

【従来の技術】従来の関数トレ−ス解析方式では、トレ
−ス情報として関数の開始情報と終了情報及びタイマ時
刻情報を出力し、そのトレ−ス情報から解析を行い、関
数のコ−ル関係と処理時間をリスト形式で表示してい
た。なお、この種の方法として関連するものには、特願
昭63-244392号、特願平1-158886号があげられる。
2. Description of the Related Art In a conventional function trace analysis method, start information and end information of a function and timer time information are output as trace information, analysis is performed from the trace information, and a function call is analyzed. Relationships and processing times were displayed in list format. Note that Japanese Patent Application No. 63-244392 and Japanese Patent Application No. 1-158886 are related to this type of method.

【0003】[0003]

【発明が解決しようとする課題】上記従来技術では、ト
レ−ス情報として関数の開始情報と終了情報及びタイマ
時刻情報しか出力していなく、そのトレ−ス情報だけを
トレ−ス結果解析部の入力情報としていたために次のよ
うな問題があった。
In the above prior art, only the start information and the end information of the function and the timer time information are output as the trace information, and only the trace information is output to the trace result analysis section. Since it was input information, there were the following problems.

【0004】1.トレ−スの対象となるプログラムが絶
えず動いているような場合、任意のイベントに対するト
レ−ス結果を抽出することができない。
1. If the program to be traced is constantly running, the trace result for any event cannot be extracted.

【0005】2.自関数をコ−ルした関数に復帰する命
令文の中で関数コ−ルをしている場合、正しい関数のコ
−ル関係及び処理時間を得ることができない。
2. When a function call is made in a command statement that restores the self-function to the called function, the correct function relation and processing time cannot be obtained.

【0006】3.割込み処理が実行されても、トレ−ス
結果からは割込み処理によるものと通常処理によるもの
との区別が付かないために、それを考慮に入れたトレ−
ス解析結果を得ることができない。
3. Even if the interrupt processing is executed, the trace result does not distinguish between the interrupt processing and the normal processing.
It is not possible to obtain the analysis result.

【0007】4.正しいトレ−ス結果が得られても関数
のコ−ル関係や処理時間がリスト形式で出力されている
ため、解析結果が理解しづらく分析作業の効率が悪い。
4. Even if a correct trace result is obtained, the call result of the function and the processing time are output in the form of a list, so the analysis result is difficult to understand and the efficiency of the analysis work is poor.

【0008】本発明の目的は、上記のような問題点を解
決することにある。
An object of the present invention is to solve the above problems.

【0009】[0009]

【課題を解決するための手段】上記目的を達成するため
に、トレ−スの対象となるプログラムにトレ−ス情報と
してトレ−スが行われた順番を示すシ−ケンシャルナン
バ及びリタ−ン文中で関数コ−ルを行っていることを示
すフラグを出力するトレ−ス部と、トレ−ス情報を格納
するトレ−ス情報格納部と、トレ−ス情報格納部に格納
されたトレ−ス情報の中から任意のイベントに対するト
レ−ス情報を抽出するトレ−ス位置抽出部と、抽出した
結果を格納するトレ−ス位置格納部と、トレ−ス情報格
納部に格納されたトレ−ス情報と、トレ−ス位置格納部
に格納されたトレ−ス位置情報と、予め用意しておいた
関数内コ−ル関数テ−ブルを入力情報として解析するト
レ−ス結果解析部と、解析結果を格納する解析結果格納
部と、解析結果である関数のコ−ル関係と処理時間を視
覚的に認識できるように表示装置に出力する解析結果出
力部を設けることにより達成される。
In order to achieve the above-mentioned object, a sequential number and a return indicating the order in which a trace to be traced is performed as trace information in a program to be traced. A trace unit that outputs a flag indicating that a function call is being performed in the sentence, a trace information storage unit that stores trace information, and a trace stored in the trace information storage unit. A trace position extraction unit for extracting trace information for an arbitrary event from the trace information, a trace position storage unit for storing the extracted result, and a trace position stored in the trace information storage unit. Trace information, trace position information stored in the trace position storage unit, and a trace result analysis unit that analyzes the in-function call function table prepared in advance as input information, The analysis result storage section that stores the analysis results and the analysis results That function co - are achieved by providing an analysis result output unit for outputting to the display device so as to be visually recognized Le relationship between processing time.

【0010】[0010]

【作用】上記手段を実行すると、対象となるプログラム
に設けたトレ−ス部がトレ−ス情報格納部にトレ−ス情
報を出力し、トレ−ス位置抽出部がその出力結果の中か
ら任意のイベントに対するトレ−ス情報の位置をトレ−
ス位置格納部に出力し、トレ−ス結果解析部がトレ−ス
情報格納部に格納されたトレ−ス情報と、トレ−ス位置
格納部に格納されたトレ−ス位置情報と、関数内コ−ル
関数テ−ブルを入力情報として解析した結果を解析結果
格納部に出力し、解析結果出力部が解析結果である関数
のコ−ル関係と処理時間を視覚的に認識できる表示形式
で表示装置に出力する。
When the above means is executed, the trace section provided in the target program outputs the trace information to the trace information storage section, and the trace position extraction section selects any of the output results. Trace the position of the trace information for the event
Output to the trace position storage unit and the trace result analysis unit stores the trace information stored in the trace information storage unit, the trace position information stored in the trace position storage unit, and The result of analyzing the call function table as the input information is output to the analysis result storage section, and the analysis result output section can display the call relationship of the function as the analysis result and the processing time visually. Output to the display device.

【0011】[0011]

【実施例】以下、本発明の一実施例を説明する。EXAMPLE An example of the present invention will be described below.

【0012】図1は関数トレ−ス解析方式の全体構成を
示すブロック図である。まず各ブロックの機能について
説明する。被トレ−スプログラム101は本方式により関
数トレ−スが行われるプログラムであり、システム立ち
上げ時に起動された後は、イベント発生プログラム103
により動作する。トレ−ス部102は、被トレ−スプログ
ラム101内に存在し、被トレ−スプログラム101のトレ−
ス情報をトレ−ス情報格納部105に出力する。図6及び
図10にトレ−ス部102により出力されたトレ−ス情報
の一例を示す。トレ−ス位置抽出部104はイベント発生
プログラム103内に存在し、トレ−ス情報格納部105に格
納されているトレ−ス情報を入力情報として、任意のイ
ベントに対するトレ−スの位置情報をトレ−ス位置格納
部106へ出力する。図11にトレ−ス位置抽出部104によ
り出力されたトレ−ス位置情報の一例を示す。関数内コ
−ル関数テ−ブル107は、割込みや他プロセスの影響を
考慮に入れた解析結果を得るために用いるもので、関数
内部でコ−ルしている関数の一覧が登録されているテ−
ブルである。トレ−ス結果解析部100は関数の深さを示
す深さポインタ110と、解析結果格納部113に格納する場
所を示す格納ポインタ111と、関数のコ−ル関係と処理
時間を求めるワ−ク部112が設けられており、トレ−ス
情報格納部105に格納されているトレ−ス情報と、トレ
−ス位置格納部106に格納されているトレ−ス位置情報
と、関数内コ−ル関数テ−ブル107を入力情報として解
析を行い、解析結果格納部113に解析した結果を格納す
る。解析結果出力部108は解析結果格納部113に格納され
ている関数のコ−ル関係と処理時間を、視覚的に認識で
きるような表示形式で表示装置109に出力するものであ
る。
FIG. 1 is a block diagram showing the overall structure of the function trace analysis system. First, the function of each block will be described. The traced program 101 is a program in which the function trace is performed by this method, and the event generation program 103 is executed after it is started at the time of system startup.
Works by. The trace unit 102 exists in the traced program 101, and is a trace of the traced program 101.
The trace information is output to the trace information storage unit 105. 6 and 10 show an example of the trace information output by the trace unit 102. The trace position extraction unit 104 exists in the event generation program 103, and uses the trace information stored in the trace information storage unit 105 as input information to trace the trace position information for an arbitrary event. Output to the storage position storage unit 106. FIG. 11 shows an example of the trace position information output by the trace position extraction unit 104. The in-function call function table 107 is used to obtain an analysis result that takes into account the influence of interrupts and other processes, and a list of functions that are called inside the function is registered. Tee
Bull. The trace result analysis unit 100 includes a depth pointer 110 indicating the depth of the function, a storage pointer 111 indicating the location to be stored in the analysis result storage unit 113, and a work point for obtaining the function call relationship and the processing time. A unit 112 is provided, which includes trace information stored in the trace information storage unit 105, trace position information stored in the trace position storage unit 106, and an in-function call. Analysis is performed using the function table 107 as input information, and the analysis result is stored in the analysis result storage unit 113. The analysis result output unit 108 outputs the call relationship and the processing time of the functions stored in the analysis result storage unit 113 to the display device 109 in a display format that can be visually recognized.

【0013】次に被トレ−スプログラムの関数トレ−ス
及びその解析処理の流れについて説明する。まずオペレ
−タがイベント発生プログラム103を起動すると、イベ
ント発生プログラム103は被トレ−スプログラム101を起
動する。被トレ−スプログラム101内のトレ−ス部102は
トレ−ス情報をトレ−ス情報格納部105に格納する。被
トレ−スプログラム101はシステムに常駐するプログラ
ムであり、任意のプログラムからの起動により動作する
ため、イベント発生プログラム103内のトレ−ス位置抽
出部104が、トレ−ス情報をトレ−ス情報格納部105から
読みだし、トレ−ス位置格納部106に格納する。次にオ
ペレ−タがトレ−ス結果解析部100を起動すると、トレ
−ス結果解析部100はトレ−ス情報格納部105に格納され
たトレ−ス情報と、トレ−ス位置格納部106に格納され
たトレ−ス位置情報と、関数内コ−ル関数テ−ブル107
を入力情報とし、解析結果を解析結果格納部113に格納
する。解析処理終了後、解析結果出力部108は解析結果
格納部113に格納されている関数のコ−ル関係と処理時
間を入力情報とし、表示装置109に出力する。
Next, the function trace of the traced program and the flow of its analysis processing will be described. First, when the operator starts the event generation program 103, the event generation program 103 starts the traced program 101. The trace unit 102 in the traced program 101 stores the trace information in the trace information storage unit 105. The traced program 101 is a program resident in the system and operates by being started by an arbitrary program, so the trace position extraction unit 104 in the event generation program 103 uses the trace information as trace information. It is read from the storage unit 105 and stored in the trace position storage unit 106. Next, when the operator activates the trace result analysis unit 100, the trace result analysis unit 100 stores the trace information stored in the trace information storage unit 105 and the trace position storage unit 106. Stored trace position information and in-function call function table 107
Is used as input information, and the analysis result is stored in the analysis result storage unit 113. After the analysis processing is completed, the analysis result output unit 108 outputs the display information to the display device 109 using the function call relationship and the processing time stored in the analysis result storage unit 113 as input information.

【0014】次にトレ−ス結果解析部100が行ってい
る、任意のイベントのトレ−ス情報を抽出する方法を図
1、図10、図11を使って説明する。トレ−ス結果解
析部100はトレ−ス部102によってトレ−ス情報格納部10
5に格納されたトレ−ス情報を入力情報として解析を行
うが、被トレ−スプログラム101は該プログラムが動作
するシステムが立ち上がった後は絶えず動いているた
め、そのままでは該プログラムが動作するシステムが立
ち上がってからトレ−ス結果解析部100がトレ−ス情報
格納部105を読みにいった時点までのトレ−ス情報が全
てトレ−ス結果解析部100の入力情報になってしまい、
求めたいイベントに対するもの以外のトレ−ス情報もそ
れには含まれてしまう。そこでトレ−ス結果解析部100
は、イベント発生プログラム103に設けられているトレ
−ス位置抽出部104により、トレ−ス位置格納部106に格
納されたトレ−ス位置情報で示されるシ−ケンシャルナ
ンバに対応したトレ−ス情報を、トレ−ス情報格納部10
5から抽出して入力情報とすることにより、求めたいイ
ベントによるトレ−ス情報のみを得ることが可能にな
る。トレ−ス情報格納部105に格納された内容が図10
のような場合、図11のトレ−ス位置抽出部により出力
されたトレ−ス位置情報により、トレ−ス情報のうちシ
−ケンシャルナンバ500から1400までをトレ−ス
結果解析部100の入力情報とし、任意のイベントのトレ
−ス結果のみを解析することができる。
Next, a method of extracting trace information of an arbitrary event, which is performed by the trace result analysis unit 100, will be described with reference to FIGS. 1, 10 and 11. The trace result analysis unit 100 is composed of a trace information storage unit 10 by a trace unit 102.
The trace information stored in 5 is used as input information for analysis, but since the traced program 101 is constantly running after the system on which the program operates has started up, the system on which the program operates as it is. The trace information from the start of the trace result analysis unit 100 to the time when the trace information storage unit 105 is read becomes all the input information of the trace result analysis unit 100.
Trace information other than that for the desired event is also included in it. Therefore, the trace result analysis unit 100
Is a trace corresponding to the sequential number indicated by the trace position information stored in the trace position storage unit 106 by the trace position extraction unit 104 provided in the event generation program 103. Information is stored in the trace information storage unit 10
By extracting from 5 and using it as input information, it is possible to obtain only the trace information according to the desired event. The contents stored in the trace information storage unit 105 are shown in FIG.
In such a case, according to the trace position information output by the trace position extraction unit of FIG. 11, the sequential number 500 to 1400 of the trace information is input to the trace result analysis unit 100. As information, only the trace result of any event can be analyzed.

【0015】次にトレ−ス結果より関数のコ−ル関係と
処理時間を求める方法を、図3、図6、図7、図8を使
って説明する。図3はトレ−ス部102a〜102hを設けた被
トレ−スプログラムであり、図6はトレ−スした結果ト
レ−ス情報格納部105に出力されたトレ−ス情報であ
る。図7のワ−ク部は、関数名、時刻、格納ポインタを
登録した一例で、登録する位置は関数の深さを示す深さ
ポインタと同じワ−クナンバのところである。関数の深
さと処理時間を求めるために使用する。図8の解析結果
格納部は、関数の深さ、関数名、処理時間を登録した一
例で、解析結果を格納する位置を示す格納ポインタと同
じ格納ナンバの位置に格納される。トレ−ス部102a〜10
2hは関数がコ−ルされた時とコ−ル元へリタ−ンする寸
前の2回コ−ルされるので、その2つのトレ−ス結果に
より関数のコ−ル関係と処理時間を自動的に解析するこ
とができる。まず初期値として0に設定されている深さ
ポインタ110の値と格納ポインタ111の値を1インクリメ
ントして1にした後、トレ−ス情報のシ−ケンシャルナ
ンバ(1)の関数名aと、時刻(t(a1))と、格納ポインタ
111の値(1)を、深さポインタ110の値(1)と同じ、ワ−
ク部112のワ−クナンバ(1)の位置に登録する。次に深
さポインタ110の値(1)と同じワ−ク部112のワ−クナン
バ(1)の関数名aと、トレ−ス情報のシ−ケンシャルナ
ンバ(2)の関数名bを比較すると、違っているので深さ
ポインタ110と格納ポインタ111の値を1インクリメント
して2にした後、トレ−ス情報の関数名bと、時刻(t(b
1))と、格納ポインタ111の値(2)を、深さポインタ110
の値(2)と同じ、ワ−ク部112のワ−クナンバ(2)の位
置に登録する。次に深さポインタ110の値(2)と同じ、
ワ−ク部112のワ−クナンバ(2)の関数名bとトレ−ス
情報のシ−ケンシャルナンバ(3)の関数名bを比較する
と、同じなので関数の深さとして深さポインタ110の値
(2)と、関数名bと、関数bの処理時間として現在比較
しているトレ−ス情報のシ−ケンシャルナンバ(3)の時
刻(t(b2))からワ−ク部112のワ−クナンバ(2)の時刻(t
(b1))を引いた値(Tb)を、ワ−ク部112のワ−クナンバ
(2)の格納ポインタ111の値(2)と同じ、解析結果格納
部113の格納ナンバ(2)の位置に登録し、深さポインタ1
10の値を1ディクリメントして1にする。後は同様にし
て、深さポインタ110の値と同じ、ワ−ク部112のワ−ク
ナンバの位置の関数名とトレ−ス情報の関数名を比較し
ていき、違うときは深さポインタ110と格納ポインタ111
の値を1インクリメントしてから、深さポインタ110の
値と同じ、ワ−ク部のワ−クナンバの位置にトレ−ス情
報の関数名と時刻と格納ポインタ111の値を登録し、同
じときはワ−ク部112の格納ポインタ111の値と同じ、解
析結果格納部113の格納ナンバの位置に深さと関数名と
処理時間を順次格納した後、深さポインタ110の値を1
ディクリメントすることにより関数の深さと処理時間が
求まる。解析結果格納部113に格納された結果より、深
さが1の関数が一番上位の関数で、それ以外の関数は自
分の深さポインタより1小さくて一番近い関数にコ−ル
されている。図8の場合、関数aが一番上位の関数で、
関数b、cが関数aからコ−ルされていて、関数dが関
数cからコ−ルされていることが分かる。こうして求め
た解析結果は解析結果出力部108により関数のコ−ル関
係と処理時間が視覚的に分かるように表示装置109に出
力される。その一例が図9だが、関数の長さを処理時間
に比例させることにより各部の処理にかかった時間を、
表示位置を段付けしたことにより関数のコ−ル関係、順
序を容易に得ることができる。
Next, a method for obtaining the function call relationship and the processing time from the trace result will be described with reference to FIGS. 3, 6, 7, and 8. FIG. 3 shows a traced program provided with the trace units 102a to 102h, and FIG. 6 shows the trace information output to the trace information storage unit 105 as a result of the trace. The work part of FIG. 7 is an example in which the function name, time, and storage pointer are registered, and the registration position is at the same work number as the depth pointer indicating the depth of the function. It is used to calculate the function depth and processing time. The analysis result storage unit of FIG. 8 is an example in which the depth of the function, the function name, and the processing time are registered, and is stored at the same storage number position as the storage pointer indicating the position for storing the analysis result. Trace part 102a ~ 10
Since 2h is called twice when the function is called and just before returning to the call source, the call relationship of the function and the processing time are automatically calculated by the two trace results. Can be analyzed. First, the value of the depth pointer 110 and the value of the storage pointer 111, which are set to 0 as an initial value, are incremented by 1 to 1, and then the function name a of the sequential number (1) of the trace information is set. , Time (t (a1)) and storage pointer
The value (1) of 111 is the same as the value (1) of the depth pointer 110.
It is registered at the work number (1) position of the clock section 112. Next, the function name a of the work number (1) of the work part 112 having the same value (1) of the depth pointer 110 and the function name b of the sequential number (2) of the trace information are compared. Then, since they are different, the values of the depth pointer 110 and the storage pointer 111 are incremented by 1 to be 2, and then the function name b of the trace information and the time (t (b
1)) and the value (2) of the storage pointer 111, the depth pointer 110
It is registered at the same work number (2) position of the work section 112 as the value (2). Next, the same as the value (2) of the depth pointer 110,
When the function name b of the work number (2) of the work unit 112 and the function name b of the sequential number (3) of the trace information are compared, they are the same and the depth of the depth pointer 110 value
(2), the function name b, and the work number of the work unit 112 from the time (t (b2)) of the sequential number (3) of the trace information currently being compared as the processing time of the function b. -Time of Kunam (2) (t
The value (Tb) obtained by subtracting (b1)) is used as the work number of the work section 112.
The same as the value (2) of the storage pointer 111 of (2), it is registered at the position of the storage number (2) of the analysis result storage unit 113 and the depth pointer 1
Decrement the value of 10 by 1 to 1. After that, similarly, the function name at the work number position of the work section 112, which is the same as the value of the depth pointer 110, and the function name of the trace information are compared, and if they are different, the depth pointer 110 And storage pointer 111
After incrementing the value of 1 by 1, the function name and time of the trace information and the value of the storage pointer 111 are registered at the same work number position of the work part as the value of the depth pointer 110. Stores the depth, the function name, and the processing time in the same storage pointer position of the analysis result storage unit 113 as the value of the storage pointer 111 of the work unit 112, and then sets the value of the depth pointer 110 to 1
The function depth and processing time can be obtained by decrementing. According to the result stored in the analysis result storage unit 113, the function having the depth of 1 is the highest function, and the other functions are called the closest function which is smaller than the depth pointer by one. There is. In the case of FIG. 8, the function a is the highest-level function,
It can be seen that the functions b and c are called from the function a, and the function d is called from the function c. The analysis result thus obtained is output to the display device 109 by the analysis result output unit 108 so that the function call relationship and the processing time can be visually recognized. An example of this is shown in FIG. 9, but by making the length of the function proportional to the processing time,
By arranging the display positions, the call relationship and order of the functions can be easily obtained.

【0016】次にリタ−ン文の中で関数コ−ルをしてい
る場合の解析方法を図1、図13を使って説明する。示
す。トレ−ス部102は基本的には関数の先頭と末尾、又
はリタ−ン文の寸前で設ける。通常の場合はその位置に
トレ−ス部を設けておけば、正しい関数のコ−ル関係と
処理時間を求めることができるが、図13のようにリタ
−ン文の中で関数をコ−ルしていると、関数bは関数a
からコ−ルされているにもかかわらず、トレ−ス結果は
関数a終了後に、関数aをコ−ルしている上位の関数が
関数bをコ−ルしたかのように出力されてしまう。これ
を解決するためにトレ−ス結果解析部100に、トレ−ス
情報のフラグがリタ−ン文中で関数をコ−ルしているこ
とを示している時は、その後にトレ−スされた内容はリ
タ−ン後にコ−ルされたものではなく、リタ−ンする前
にコ−ルされたように自動的にトレ−スの順序を入れ替
える機能を持たせた。トレ−ス結果解析部100はこの入
れ替えを行った後に改めて関数のコ−ル関係と処理時間
を解析するので、正しい解析結果を得ることができる。
Next, an analysis method when a function call is made in the return sentence will be described with reference to FIGS. Show. The trace unit 102 is basically provided at the beginning and end of the function, or just before the return sentence. Normally, if a trace portion is provided at that position, the correct call relationship and processing time can be obtained, but as shown in FIG. 13, the function is called in the return sentence. Function b, function b
Despite being called from, the trace result is output as if the upper function calling the function a called the function b after the function a ended. .. In order to solve this, when the trace information flag indicates to the trace result analysis unit 100 that the function is called in the return sentence, the trace is performed after that. The contents are not called after the return, but have the function of automatically changing the order of the traces as if they were called before the return. Since the trace result analysis unit 100 analyzes the function call relationship and the processing time again after this replacement, a correct analysis result can be obtained.

【0017】最後に割込み処理や他プロセスの影響があ
る場合の解析方法を図1、図12により説明する。被ト
レ−スプログラム101のように割り込みや他プロセスの
影響を受ける可能性がある場合、トレ−ス情報格納部10
5に格納されているトレ−ス情報と、トレ−ス位置格納
部106に格納されているトレ−ス位置情報のみをトレ−
ス結果解析部100の入力情報にしていると、求めたいイ
ベントによるものかそうでないのかが判別できない場合
がある。例えば図12のような場合、関数Bを処理中に
関数Xの割込み処理が行われると、トレ−ス結果はあた
かも関数Bが関数Xをコ−ルしたかの様に出力されてし
まう。これを解決するために関数内コ−ル関数テ−ブル
107をトレ−ス結果解析部100が解析時に参照することに
より、現在解析中の関数の中で本当にコ−ルされた関数
のトレ−ス結果か、割込みや他プロセスによるものなの
かを調べ、前者の場合はそのまま解析を続け、後者の場
合はそこからのトレ−ス結果は別のプロセスによるもの
として解析を行うことにより、正しい解析結果を得るこ
とができる。図12の場合、関数Bが関数Xをコ−ルし
ているかどうかをトレ−ス結果解析部100が解析処理中
に調べることにより、割込み処理の影響を考慮した解析
結果を得ることができる。
Finally, an analysis method when there is an influence of interrupt processing or another process will be described with reference to FIGS. When there is a possibility of being affected by an interrupt or another process like the traced program 101, the trace information storage unit 10
Only the trace information stored in 5 and the trace position information stored in the trace position storage unit 106 are traced.
If the input information of the result analysis unit 100 is used, it may not be possible to determine whether it is due to the desired event or not. For example, in the case of FIG. 12, if the interrupt processing of the function X is performed during the processing of the function B, the trace result is output as if the function B called the function X. To solve this, an in-function call function table
The trace result analysis unit 100 refers to 107 at the time of analysis to check whether the trace result of the function actually copied in the function currently being analyzed, or whether it is due to an interrupt or another process, In the former case, the analysis is continued as it is, and in the latter case, the trace result from it is analyzed by another process, and the correct analysis result can be obtained. In the case of FIG. 12, the trace result analysis unit 100 checks whether or not the function B is calling the function X during the analysis processing, so that the analysis result considering the influence of the interrupt processing can be obtained.

【0018】[0018]

【発明の効果】【The invention's effect】

(1)求めたいイベントに対応した関数の正確な処理時
間を得ることができる。
(1) The accurate processing time of the function corresponding to the desired event can be obtained.

【0019】(2)求めたいイベントに対応した関数の
コ−ル関係を得ることができる。
(2) It is possible to obtain the call relationship of the function corresponding to the desired event.

【0020】(3)1、2で得られた結果は割込み処理
や他プロセスの影響を考慮したものになっている。
(3) The results obtained in 1 and 2 take into consideration the influence of interrupt processing and other processes.

【0021】(4)1、2の結果を視覚的に認識するこ
とができる。
(4) The results of 1 and 2 can be visually recognized.

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

【図1】本発明の一実施例の関数トレ−ス解析方式の構
成を示すブロック図である。
FIG. 1 is a block diagram showing the configuration of a function trace analysis system according to an embodiment of the present invention.

【図2】トレ−ス位置抽出部を設けたイベント発生プロ
グラムの一例を示す図である。
FIG. 2 is a diagram showing an example of an event generation program provided with a trace position extraction unit.

【図3】トレ−ス部を設けた被トレ−スプログラムの一
例を示す図である。
FIG. 3 is a diagram showing an example of a traced program provided with a trace unit.

【図4】トレ−ス部によりトレ−ス情報格納部へ出力さ
れる、トレ−ス情報出力フォ−マットを示す図である。
FIG. 4 is a diagram showing a trace information output format which is output by a trace unit to a trace information storage unit.

【図5】トレ−ス位置抽出部によりトレ−ス位置格納部
に出力される、トレ−ス位置情報出力フォ−マットを示
す図である。
FIG. 5 is a diagram showing a trace position information output format which is output to a trace position storage unit by a trace position extraction unit.

【図6】図3の被トレ−スプログラムをトレ−スした結
果トレ−ス情報格納部へ出力された、トレ−ス情報を示
す図である。
6 is a diagram showing trace information output to a trace information storage unit as a result of tracing the traced program shown in FIG. 3;

【図7】トレ−ス結果解析部に設けられているワ−ク部
のフォ−マットと出力例を示す図である。
FIG. 7 is a diagram showing a format and an output example of a work unit provided in a trace result analysis unit.

【図8】トレ−ス結果解析部により解析結果格納部に出
力されるフォ−マットと出力例を示す図である。
FIG. 8 is a diagram showing a format and an output example output to the analysis result storage unit by the trace result analysis unit.

【図9】図2のイベント発生プログラムの起動により図
3の被トレ−スプログラムが動作した際にトレ−スされ
た結果を、トレ−ス結果解析部で解析し、解析結果を解
析結果出力部より表示装置に出力した一例を示す図であ
る。
9 is a trace result analysis unit for analyzing a traced result when the traced program shown in FIG. 3 is activated by starting the event generation program shown in FIG. 2 and outputting the analysis result. It is a figure which shows an example output to the display device from the part.

【図10】トレ−ス部によりトレ−ス結果格納部に出力
されたトレ−ス情報の一例を示す図である。
FIG. 10 is a diagram showing an example of trace information output from a trace unit to a trace result storage unit.

【図11】トレ−ス位置抽出部によりトレ−ス位置格納
部に出力されたトレ−ス位置情報の一例を示す図であ
る。
FIG. 11 is a diagram showing an example of trace position information output to a trace position storage unit by a trace position extraction unit.

【図12】割込み処理が行われたときの例を示す図であ
る。
FIG. 12 is a diagram illustrating an example when interrupt processing is performed.

【図13】リタ−ン文中で関数コ−ルを行っている例を
示す図である。
FIG. 13 is a diagram showing an example of performing a function call in a return sentence.

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

100…トレ−ス結果解析部、 101…被トレ−スプログラム、 102…トレ−ス部、 103…イベント発生プログラム、 104…トレ−ス位置抽出部、 105…トレ−ス情報格納部、 106…トレ−ス位置格納部、 107…関数内コ−ル関数テ−ブル、 108…解析結果出力部、 109…表示装置、 110…深さポインタ、 111…格納ポインタ、 112…ワ−ク部、 113…解析結果格納部、 A…ヘッダ部(関数名、処理時間1:関数全体の処理時
間)、 B…解析結果部(処理時間2:各部分の処理時間)、 X…イベント発生プログラムの求めたいイベント以外に
よってトレ−スされた結果、 Y…イベント発生プログラムの求めたいイベントによっ
てトレ−スされた結果。
Reference numeral 100 ... Trace result analysis unit, 101 ... Traced program, 102 ... Trace unit, 103 ... Event generation program, 104 ... Trace position extraction unit, 105 ... Trace information storage unit, 106 ... Trace position storage unit, 107 ... In-function call function table, 108 ... Analysis result output unit, 109 ... Display device, 110 ... Depth pointer, 111 ... Storage pointer, 112 ... Work unit, 113 ... Analysis result storage section, A ... Header section (function name, processing time 1: processing time of the entire function), B ... Analysis result section (processing time 2: processing time of each section), X ... Want to obtain event generation program The result traced by other than the event, Y ... The result traced by the event desired by the event generation program.

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】関数トレ−スの対象となるプログラムにト
レ−ス情報として開始、終了情報及びタイマ時刻情報を
出力する処理を埋込み、トレ−ス情報をトレ−ス情報格
納部に出力するシステムにおいて、新たにトレ−ス情報
としてトレ−スが行われた順番を示すシ−ケンシャルナ
ンバと、リタ−ン文中で関数コ−ルを行っていることを
示すフラグを出力するトレ−ス部を設けたことを特徴と
した関数トレース解析方式。
1. A system for embedding a process for outputting start and end information and timer time information as trace information in a program to be a function trace target, and outputting the trace information to a trace information storage section. , A trace part for outputting a sequential number as a new trace information indicating the order in which the trace is performed and a flag indicating that the function call is being performed in the return sentence. A function trace analysis method characterized by the provision of.
【請求項2】請求項1のシステムで、トレ−ス情報格納
部に格納されたトレ−ス情報の中から任意のイベントに
対するトレ−ス情報を抽出する手段として、トレ−ス位
置抽出部と、抽出した結果を格納するトレ−ス位置格納
部を設け、前記トレ−ス位置格納部に格納されている情
報を元に、関数のコ−ル関係と処理時間を求めるトレ−
ス結果解析部を設けたことを特徴とした関数トレース解
析方式。
2. A trace position extracting section as means for extracting trace information for an arbitrary event from the trace information stored in the trace information storing section in the system according to claim 1. A trace position storage unit for storing the extracted result is provided, and a trace position for obtaining a function call relation and a processing time based on the information stored in the trace position storage unit.
A function trace analysis method featuring a result analysis unit.
【請求項3】請求項1のシステムで、請求項2に記載の
トレ−ス結果解析部の出力情報を元に、関数のコ−ル関
係と処理時間が視覚的に認識できるように表示装置に出
力する解析結果出力部を設けたことを特徴とした関数ト
レース解析方式。
3. The display device according to claim 1, wherein the function call relation and the processing time can be visually recognized based on the output information of the trace result analysis unit according to claim 2. A function trace analysis method characterized by having an analysis result output section for outputting to.
【請求項4】請求項1のシステムで、関数内部でコ−ル
している関数の一覧を登録する関数内コ−ル関数テ−ブ
ルを予め用意しておき、それを請求項2のトレ−ス結果
解析部の入力情報とすることにより、割込み処理や他プ
ロセスの影響を考慮した解析結果を求めることを特徴と
した関数トレース解析方式。
4. The system according to claim 1, wherein an in-function call function table for registering a list of functions that are called inside the function is prepared in advance, and this is stored in the tray according to claim 2. -A function trace analysis method characterized by obtaining an analysis result considering the influence of interrupt processing and other processes by using the input information of the result analysis unit.
JP4053284A 1992-03-12 1992-03-12 Function trace analyzing system Pending JPH05257735A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4053284A JPH05257735A (en) 1992-03-12 1992-03-12 Function trace analyzing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4053284A JPH05257735A (en) 1992-03-12 1992-03-12 Function trace analyzing system

Publications (1)

Publication Number Publication Date
JPH05257735A true JPH05257735A (en) 1993-10-08

Family

ID=12938437

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4053284A Pending JPH05257735A (en) 1992-03-12 1992-03-12 Function trace analyzing system

Country Status (1)

Country Link
JP (1) JPH05257735A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007264753A (en) * 2006-03-27 2007-10-11 Ns Solutions Corp Log data acquisition device, log data acquisition method, and program
JP2009205484A (en) * 2008-02-28 2009-09-10 Nec Corp Failure cause analysis support device and method, and program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007264753A (en) * 2006-03-27 2007-10-11 Ns Solutions Corp Log data acquisition device, log data acquisition method, and program
JP2009205484A (en) * 2008-02-28 2009-09-10 Nec Corp Failure cause analysis support device and method, and program

Similar Documents

Publication Publication Date Title
KR950027565A (en) Processing system and method of operation thereof
JPH05257735A (en) Function trace analyzing system
JP2005339204A (en) Information processor, and program testing method
JP2595718B2 (en) In-circuit emulator
JP2543215Y2 (en) Logic circuit simulation waveform display
JPS56114061A (en) Program electronic computer
JP3011115B2 (en) Debug system
JPH04153742A (en) Measurement system for program performance
JPS6254337A (en) Specification displaying system for program hierarchy
JPS63289654A (en) Program branching instruction monitoring system
JPH07109586B2 (en) Program structure material creation processor
JPH02216546A (en) Program debugging supporting system for information processing system
JPS63208167A (en) Handling system for unregistered word in natural word analysis
CN115185844A (en) Method and device for testing application program
JPH01316842A (en) Batch program and debugging tool
JPH02226441A (en) Software test device
KR970007640A (en) How to measure program run time on a computer
JPS59140556A (en) Display control system
JPS54129947A (en) Data processor
JPH02202646A (en) Micro program controller
JPS63201734A (en) Data processor testing system
JPS62241069A (en) Mechanical translation system
JPH062453U (en) Program test operating time measurement circuit
JPS61279951A (en) Instrumentation system for program including factor
JPH03225437A (en) Display system for stop frequency of break point