[go: up one dir, main page]

JP2008090699A - Trace logging method, apparatus and program - Google Patents

Trace logging method, apparatus and program Download PDF

Info

Publication number
JP2008090699A
JP2008090699A JP2006272512A JP2006272512A JP2008090699A JP 2008090699 A JP2008090699 A JP 2008090699A JP 2006272512 A JP2006272512 A JP 2006272512A JP 2006272512 A JP2006272512 A JP 2006272512A JP 2008090699 A JP2008090699 A JP 2008090699A
Authority
JP
Japan
Prior art keywords
execution
trace log
trace
storage device
program
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
JP2006272512A
Other languages
Japanese (ja)
Inventor
Hiroki Shiino
裕樹 椎野
Tomotaka Miyata
智香 宮田
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 JP2006272512A priority Critical patent/JP2008090699A/en
Publication of JP2008090699A publication Critical patent/JP2008090699A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

【課題】 プログラマが事前に予測できなかった稀な状況やコンピュータシステムの負荷状態に応じてトレースログ出力を制御することが可能な技術を提供する。
【解決手段】 プログラム実行時のトレースログを出力するトレースロギング方法において、プログラムの実行時にその動的な情報を示す実行時情報の計測を行ってその計測された実行時情報を記憶装置に格納するステップと、前記記憶装置に格納した実行時情報である計測値を読み出してその計測値を評価するための評価値を計算し、その計算した評価値がポリシー定義テーブルで指定される閾値条件を満たす場合にトレースログを記憶装置へ出力するステップとを有するものである。
【選択図】図1
PROBLEM TO BE SOLVED: To provide a technique capable of controlling trace log output according to a rare situation that a programmer could not predict in advance or a load state of a computer system.
In a trace logging method for outputting a trace log at the time of program execution, runtime information indicating dynamic information is measured at the time of program execution, and the measured runtime information is stored in a storage device. And reading the measurement value, which is runtime information stored in the storage device, and calculating an evaluation value for evaluating the measurement value, and the calculated evaluation value satisfies a threshold condition specified in the policy definition table And a step of outputting a trace log to a storage device.
[Selection] Figure 1

Description

本発明はプログラム実行時のトレースログを出力するトレースロギング技術に関するものである。   The present invention relates to a trace logging technique for outputting a trace log during program execution.

従来、プログラムの実行時の状態を示すトレースログの出力を行う場合、特許文献1に記載の様に、プログラムが処理の対象とするデータのみをトレースログ出力の判定基準としてきた。すなわち、特許文献1のデータトレース方式では、トレースデータの出力を行なうか否かを、プログラム実行中におけるデータが、予め定めるトレース出力条件を満足するか否かによって判断しており、例えば、プログラムaにおいて、トランザクションの入力データが“A”或いは“B”と等しければトレースデータを採取する等、あるデータが事前に想定可能な値に該当する場合にトレースデータを採取している。   Conventionally, when outputting a trace log indicating a state at the time of execution of a program, as described in Patent Document 1, only data to be processed by a program has been used as a criterion for outputting a trace log. That is, in the data trace method of Patent Document 1, it is determined whether or not to output trace data based on whether or not the data during program execution satisfies a predetermined trace output condition. The trace data is collected when a certain data corresponds to a value that can be assumed in advance, for example, if the input data of the transaction is equal to “A” or “B”.

特開平5-241890号公報JP-A-5-241890

上記従来技術ではプログラムは事前に想定可能な範囲のデータのみを処理の対象とするため、この方法ではトレースログ出力の条件も事前に想定可能な範囲に制限されてしまう。プログラマが事前に想定できなかった状況が発生した場合には、トレースログの出力はできないという問題がある。   In the above prior art, since the program targets only data in a range that can be assumed in advance, this method limits the conditions for outputting the trace log to a range that can be assumed in advance. There is a problem that the trace log cannot be output if a situation occurs that the programmer could not assume in advance.

また、上記従来技術ではトレースログの出力量は処理対象のデータのみに依存し、コンピュータシステムの負荷状態を無視してしまう。このため、コンピュータシステムが高負荷状態にある場合に、負荷を軽減させる為にトレースログの出力量を抑制することができないという問題もある。   Further, in the above prior art, the output amount of the trace log depends only on the data to be processed, and ignores the load state of the computer system. For this reason, when the computer system is in a high load state, there is also a problem that the output amount of the trace log cannot be suppressed in order to reduce the load.

本発明の目的は上記問題を解決し、プログラマが事前に予測できなかった稀な状況やコンピュータシステムの負荷状態に応じてトレースログ出力を制御することが可能な技術を提供することにある。   An object of the present invention is to solve the above problems and provide a technique capable of controlling trace log output according to a rare situation that a programmer could not predict in advance or a load state of a computer system.

本発明は、プログラム実行時のトレースログを出力するトレースロギング装置において、プログラムの動的な実行時情報に応じてトレースログの出力を行うものである。   The present invention outputs a trace log in accordance with dynamic runtime information of a program in a trace logging apparatus that outputs a trace log during program execution.

本発明のトレースロギング装置では、トレースロギングの行われるプログラムを実行する際に、その動的な情報を示す実行時情報として、当該プログラムが分岐命令でどの分岐先に何回分岐したのかを計測する。そして分岐先毎の分岐回数の割合、即ち分岐確率を評価値として算出し、その算出した分岐確率がある値以下である場合にトレースログを出力する。   In the trace logging device according to the present invention, when executing a program for which trace logging is performed, the execution time information indicating the dynamic information is measured as to how many times the program branches to which branch destination by a branch instruction. . Then, the ratio of the number of branches for each branch destination, that is, the branch probability is calculated as an evaluation value, and a trace log is output when the calculated branch probability is less than a certain value.

また本発明のトレースロギング装置では、プログラムの目的処理の実行の為に費やした実行ステップ数と、トレースログ出力処理の実行の為に費やした実行ステップ数を測定する。両者の比率がシステムの負荷状態によって決まるある値以上である場合に、トレースログ出力を抑制する。   In the trace logging apparatus according to the present invention, the number of execution steps spent for executing the target process of the program and the number of execution steps spent for executing the trace log output process are measured. Trace log output is suppressed when the ratio between the two is greater than a certain value determined by the load state of the system.

前記の様に本発明では、プログラムの実行時の分岐確率がある値以下である場合にトレースログを出力するので、プログラマが事前に予測できなかった稀な状況においてもトレースログ出力を行うことが可能である。このトレースログによって、稀な状況においても、プログラムの実行履歴を正しく把握することが可能となり、異常の兆候を未然に検知することが可能となる。また障害発生時の原因究明を容易にすることができる。   As described above, in the present invention, since the trace log is output when the branching probability at the time of execution of the program is less than a certain value, the trace log can be output even in a rare situation where the programmer could not predict in advance. Is possible. This trace log makes it possible to correctly grasp the execution history of the program even in rare circumstances, and to detect signs of abnormality in advance. In addition, it is possible to easily investigate the cause when a failure occurs.

また本発明では、コンピュータシステムの負荷状態に応じて、トレースログ出力量を抑制することにより、トレースログ出力に掛かるオーバーヘッドを軽減する。これによりコンピュータシステムの高負荷状態を緩和することが可能となる。   Further, according to the present invention, the overhead of trace log output is reduced by suppressing the amount of trace log output according to the load state of the computer system. As a result, the high load state of the computer system can be alleviated.

本発明によれば、プログラマが事前に予測が困難であった稀な状況やコンピュータシステムの負荷状態に応じてトレースログ出力を制御することが可能となる。   According to the present invention, it is possible to control trace log output in accordance with a rare situation in which it is difficult for a programmer to predict in advance or a load state of a computer system.

以下にプログラム実行時のトレースログを出力する一実施形態のトレースロギング装置について説明する。   A trace logging apparatus according to an embodiment that outputs a trace log during program execution will be described below.

図1は本実施形態のプロファイリング機能付きトレースロギング装置の構成を示す図である。図1に示す様に本実施形態のコンピュータ100は、プロファイラ部112と、トレースログ出力部113とを有している。   FIG. 1 is a diagram showing a configuration of a trace logging apparatus with a profiling function according to the present embodiment. As shown in FIG. 1, the computer 100 according to this embodiment includes a profiler unit 112 and a trace log output unit 113.

プロファイラ部112は、プログラムの実行時にその動的な情報を示す実行時情報の計測を行ってその計測された実行時情報を記憶装置に格納する処理部である。トレースログ出力部113は、前記記憶装置に格納した実行時情報である計測値を読み出してその計測値を評価するための評価値を計算し、その計算した評価値がポリシー定義テーブルで指定される閾値条件を満たす場合にトレースログを記憶装置へ出力する処理部である。   The profiler unit 112 is a processing unit that measures runtime information indicating the dynamic information when executing a program and stores the measured runtime information in a storage device. The trace log output unit 113 reads the measurement value, which is runtime information stored in the storage device, calculates an evaluation value for evaluating the measurement value, and the calculated evaluation value is specified in the policy definition table. A processing unit that outputs a trace log to a storage device when a threshold condition is satisfied.

コンピュータ100をプロファイラ部112及びトレースログ出力部113として機能させる為のプログラムは、CD−ROM等の記録媒体に記録され磁気ディスク等に格納された後、メモリにロードされて実行されるものとする。なお前記プログラムを記録する記録媒体はCD−ROM以外の他の記録媒体でも良い。また前記プログラムを当該記録媒体から情報処理装置にインストールして使用しても良いし、ネットワークを通じて当該記録媒体にアクセスして前記プログラムを使用するものとしても良い。   A program for causing the computer 100 to function as the profiler unit 112 and the trace log output unit 113 is recorded on a recording medium such as a CD-ROM and stored in a magnetic disk or the like, and then loaded into a memory and executed. . The recording medium for recording the program may be a recording medium other than the CD-ROM. The program may be used by installing it from the recording medium into the information processing apparatus, or the program may be used by accessing the recording medium through a network.

図1に示す通り、本実施形態のトレースロギング装置であるコンピュータ100は、CPU101、キーボード102、ディスプレイ103、記憶装置104〜106及び主記憶装置108から構成されており、それぞれがバス107で接続されている。   As shown in FIG. 1, a computer 100 that is a trace logging apparatus according to this embodiment includes a CPU 101, a keyboard 102, a display 103, storage devices 104 to 106, and a main storage device 108, which are connected by a bus 107. ing.

主記憶装置108には、OS109と各アプリケーションプログラム110が展開されており、アプリケーションプログラム110は主処理部111、プロファイラ部112、トレースログ出力部113から構成される。   An OS 109 and application programs 110 are expanded in the main storage device 108. The application program 110 includes a main processing unit 111, a profiler unit 112, and a trace log output unit 113.

アプリケーションプログラム110は、プログラムの目的処理を行う主処理部111と、プログラムの実行情報を収集・記録するプロファイラ部112と、トレースログを出力するかどうかを判定し、その結果によってトレースログを出力するトレースログ出力部113を順に繰り返し実行する。   The application program 110 determines whether or not to output a trace log and a main processing unit 111 that performs target processing of the program, a profiler unit 112 that collects and records program execution information, and outputs a trace log based on the result. The trace log output unit 113 is repeatedly executed in order.

図2は本実施形態の記憶装置104〜106に保存される情報の概要を示す図である。図2に示す様に各記憶装置には分岐確率等の実行時情報が格納されている。   FIG. 2 is a diagram showing an outline of information stored in the storage devices 104 to 106 according to the present embodiment. As shown in FIG. 2, runtime information such as branch probabilities is stored in each storage device.

統計情報記憶装置104は、分岐確率テーブル300、実行ステップ数テーブル400、サブルーチン情報テーブル500を保存する。プロファイラ部112は、プログラムの実行情報をこれらテーブル300〜500に記録する。トレースログ出力部113はこれらテーブル300〜500から情報を取得し、その情報を元にトレースログを出力するかどうかを判定する。   The statistical information storage device 104 stores a branch probability table 300, an execution step number table 400, and a subroutine information table 500. The profiler unit 112 records program execution information in these tables 300 to 500. The trace log output unit 113 acquires information from these tables 300 to 500, and determines whether to output a trace log based on the information.

ポリシー定義記憶装置105は、ポリシー定義テーブル600を保存する。トレースログ出力部113は、ポリシー定義テーブル600に記録されている規則に従い、トレースログを出力するかどうかを判定する。   The policy definition storage device 105 stores a policy definition table 600. The trace log output unit 113 determines whether to output a trace log according to the rules recorded in the policy definition table 600.

トレースログ記憶装置106は、トレースログテーブル700を保存する。トレースログ出力部113は、トレースログをトレースログテーブル700に出力し保存する。   The trace log storage device 106 stores a trace log table 700. The trace log output unit 113 outputs the trace log to the trace log table 700 and stores it.

図3は本実施形態の分岐確率テーブルの一例を示す図である。分岐確率テーブル300は、プログラムの実行において発生した処理の分岐とその回数を記録する。   FIG. 3 is a diagram illustrating an example of a branch probability table according to the present embodiment. The branch probability table 300 records the branch of the process that occurred in the execution of the program and the number of times.

分岐確率テーブル300は、分岐箇所(分岐元)301の一覧、各分岐箇所に対応する分岐先302の一覧、及び各分岐先へと分岐した回数である分岐回数303から構成される。ここで、アプリケーションプログラム110を最初に実行する場合には、そのテスト段階で収集された分岐箇所、分岐先、分岐回数の情報を初期値として格納しておき、以後、アプリケーションプログラム110が実行される度に分岐回数の情報を累積していくものとする。   The branch probability table 300 includes a list of branch locations (branch sources) 301, a list of branch destinations 302 corresponding to each branch location, and the number of branches 303 that is the number of branches to each branch destination. Here, when the application program 110 is executed for the first time, information on the branch location, branch destination, and branch count collected in the test stage is stored as initial values, and thereafter the application program 110 is executed. Assume that information on the number of branches is accumulated every time.

図4は本実施形態の実行ステップ数テーブルの一例を示す図である。実行ステップ数テーブル400は、プログラムが各処理の実行に費やした実行ステップ数を記録する。   FIG. 4 is a diagram showing an example of the execution step number table of the present embodiment. The execution step number table 400 records the number of execution steps that the program has spent executing each process.

実行ステップ数テーブル400は、プログラムが実行した処理種別401及びその実行に要したステップ数402から構成される。   The execution step number table 400 includes a process type 401 executed by the program and a step number 402 required for the execution.

合計実行ステップ数は、プログラムが各処理の実行に要したステップ数の総計を表す。トレースログ出力実行ステップ数は、トレースログを出力するかどうかの判定処理及びトレースログの出力処理に要したステップ数の総計を表す。主処理連続実行ステップ数は、最後にトレースログを出力してからの、プログラムの目的処理である主処理部111の実行に要したステップ数の総計を表す。トレースログ出力部113がトレースログを出力すると、主処理連続実行ステップ数はゼロに戻される。   The total number of execution steps represents the total number of steps required for execution of each process by the program. The number of trace log output execution steps represents the total number of steps required for the process of determining whether to output the trace log and the process of outputting the trace log. The number of main process continuous execution steps represents the total number of steps required to execute the main processing unit 111 as the target process of the program since the trace log was last output. When the trace log output unit 113 outputs the trace log, the number of main process continuous execution steps is returned to zero.

図5は本実施形態のサブルーチン情報テーブル500の一例を示す図である。サブルーチン情報テーブル500は、現在実行しているサブルーチンの情報及びサブルーチンの実行履歴を記録する。   FIG. 5 is a diagram showing an example of the subroutine information table 500 of the present embodiment. The subroutine information table 500 records information on the subroutine currently being executed and the execution history of the subroutine.

サブルーチン情報テーブル500は、サブルーチンの一意な名称であるサブルーチン名501、サブルーチンの処理を決定付けるパラメタ情報502及びサブルーチンの実行開始時刻503から構成される。メインルーチン及びメインルーチンから呼び出されるサブルーチンの呼び出し履歴を呼び出し順に記録する。   The subroutine information table 500 includes a subroutine name 501 that is a unique name of a subroutine, parameter information 502 that determines subroutine processing, and a subroutine execution start time 503. The call history of the main routine and the subroutine called from the main routine is recorded in the order of call.

プロファイラ部112は、サブルーチンの実行を開始した時にサブルーチン情報をサブルーチン情報テーブル500の先頭に追加登録する。またサブルーチンの実行を終了し、呼び出し元に戻る時に、サブルーチン情報テーブル500の先頭から実行していたサブルーチン情報を削除する。この処理によりサブルーチン情報テーブル500は、現在実行しているサブルーチンの情報を先頭に保持する。   The profiler unit 112 additionally registers subroutine information at the top of the subroutine information table 500 when the execution of the subroutine is started. Also, when the execution of the subroutine is finished and the process returns to the caller, the subroutine information that has been executed from the top of the subroutine information table 500 is deleted. By this processing, the subroutine information table 500 holds information on the currently executed subroutine at the top.

図6は本実施形態のポリシー定義テーブルの一例を示す図である。ポリシー定義テーブル600は、トレースログを出力するかどうかの判定規則を定義する。   FIG. 6 is a diagram showing an example of the policy definition table of this embodiment. The policy definition table 600 defines a determination rule for determining whether to output a trace log.

ポリシー定義テーブル600は、判定規則の種類を表す設定項目601、設定項目に対する基準値乃至基準値を与える式である設定値/設定式602、及び判定規則の優先順位603から構成される。   The policy definition table 600 includes a setting item 601 indicating the type of determination rule, a reference value for the setting item or a setting value / setting equation 602 that is an expression for giving a reference value, and a priority 603 of the determination rule.

本システムの利用者乃至管理者は、設定値/設定式602、優先順位603を変更することでトレースログをどの様な場合に出力するかを制御することができる。   A user or administrator of this system can control when the trace log is output by changing the setting value / setting expression 602 and the priority order 603.

図7は本実施形態のトレースログテーブルの一例を示す図である。トレースログテーブル700は、トレースログ出力部113が出力したトレースログを保存する。   FIG. 7 is a diagram showing an example of the trace log table of the present embodiment. The trace log table 700 stores the trace log output by the trace log output unit 113.

トレースログテーブル700は、各トレースログがポリシー定義テーブル600のどの設定項目601が設定値/設定式602を満たしたため出力されたのかを示す該当項目701、その時の設定項目601の取った値702、該当項目701に対応して定まっているトレースログ本文703、及び付加情報704から構成される。   The trace log table 700 includes a corresponding item 701 that indicates which setting item 601 of the policy definition table 600 is output because each trace log satisfies the setting value / setting expression 602, a value 702 taken by the setting item 601 at that time, It consists of a trace log text 703 determined in correspondence with the corresponding item 701 and additional information 704.

図7の1行目は、図6のポリシー定義テーブル600の1行目の分岐確率による条件を満たした場合のトレースログ出力例である。該当項目として分岐確率であることを、値として分岐確率を、トレースログ本文として分岐箇所と分岐先を、付加情報として分岐条件に使用された条件変数の名称と値を出力する。   The first line of FIG. 7 is an example of a trace log output when the condition according to the branching probability of the first line of the policy definition table 600 of FIG. 6 is satisfied. The branch probability is output as the corresponding item, the branch probability is output as the value, the branch location and branch destination are output as the trace log body, and the name and value of the condition variable used for the branch condition are added as additional information.

図7の2行目は、図6のポリシー定義テーブル600の3行目の主処理連続実行ステップ数による条件を満たした場合のトレースログ出力例である。該当項目として主処理連続実行ステップ数であることを、値として主処理を連続して実行した実行ステップ数を、トレースログ本文として現在実行しているサブルーチン名を、付加情報として現在実行しているサブルーチンのパラメタの名称と値を出力する。   The second line in FIG. 7 is an example of a trace log output when the condition based on the number of main processing continuous execution steps in the third line of the policy definition table 600 in FIG. 6 is satisfied. The corresponding item is the number of main process continuous execution steps, the value is the number of execution steps that executed the main process continuously, the name of the subroutine currently being executed as the trace log text, and the current execution as additional information Print the names and values of subroutine parameters.

図7の3行目は、図6のポリシー定義テーブル600の4行目のトレースログ出力命令による条件を満たした場合のトレースログ出力例である。該当項目としてトレースログ出力命令であることを、トレースログ本文として明示的なトレースログ出力命令によって与えられた任意のメッセージを出力する。   The third line in FIG. 7 is an example of trace log output when the condition according to the trace log output command in the fourth line of the policy definition table 600 in FIG. 6 is satisfied. An arbitrary message given by an explicit trace log output command is output as a trace log body, indicating that the item is a trace log output command.

図7の4行目は、図6のポリシー定義テーブル600の5行目のサブルーチン実行時間による条件を満たした場合のトレースログ出力例である。該当項目としてサブルーチン実行時間であることを、値としてサブルーチンの実行時間を、トレースログ本文として実行を完了したサブルーチン名を、負荷情報として実行を完了したサブルーチンのパラメタの名称と値を出力する。   The fourth line of FIG. 7 is an example of a trace log output when the condition according to the subroutine execution time of the fifth line of the policy definition table 600 of FIG. 6 is satisfied. The corresponding item is the subroutine execution time, the subroutine execution time as the value, the subroutine name that has been executed as the trace log body, and the name and value of the subroutine parameter that has been executed as the load information.

図11は本実施形態のアプリケーションプログラム110が実行する処理の流れを示す図である。図11では、アプリケーションプログラム110が、主処理部111、プロファイラ部112、及びトレースログ出力部113を順に繰り返し実行する処理を表している。   FIG. 11 is a diagram showing a flow of processing executed by the application program 110 of this embodiment. FIG. 11 shows processing in which the application program 110 repeatedly executes the main processing unit 111, the profiler unit 112, and the trace log output unit 113 in order.

主処理部111は、終了命令、明示的なトレースログ出力命令、分岐命令、サブルーチンの実行完了若しくは一定ステップ数を実行するまで、プログラムの目的処理を実行する(ステップ901)。終了命令に到達した場合(ステップ902)は、プログラムの実行を終了する(ステップ912)。その他の条件を満たした場合には、プロファイラ部112に制御を移す。   The main processing unit 111 executes the target process of the program until the end instruction, the explicit trace log output instruction, the branch instruction, the execution of the subroutine is completed, or a predetermined number of steps are executed (step 901). When the end command is reached (step 902), the program execution is ended (step 912). When other conditions are satisfied, control is transferred to the profiler unit 112.

プロファイラ部112は、明示的なトレースログ出力命令に到達していた場合(ステップ903)には、トレースログ出力部113のステップ907に制御を移す。分岐命令に到達していた場合(ステップ904)には、分岐確率テーブル300の分岐箇所x−分岐先xmに対応する分岐回数303を1増やす(ステップ906)。これらいずれの場合にも当てはまらず、サブルーチンの実行を完了した乃至一定ステップ数を実行した為にプロファイラ部へ制御が移った場合には、実行ステップ数テーブル400の合計実行ステップ数と主処理連続実行ステップ数を積算する(ステップ905)。 If the profiler unit 112 has reached an explicit trace log output command (step 903), the profiler unit 112 shifts control to step 907 of the trace log output unit 113. If it has reached the branch instruction (step 904), the number of branches 303 corresponding to the branch point x- branch destination x m of the branch probability table 300 is increased by one (step 906). In any of these cases, if the control is transferred to the profiler unit because the execution of the subroutine has been completed or a certain number of steps have been executed, the total number of execution steps in the execution step number table 400 and the main process continuous execution The number of steps is integrated (step 905).

トレースログ出力部113は、ポリシー定義テーブル600の判定規則を優先順位に従って適用し、トレースログを出力するかどうかを判定する(ステップ907)。判定方法の詳細は図12以降で説明する。トレースログを出力すると判定した場合(ステップ908)は、トレースログテーブル700へトレースログを出力する(ステップ909)。   The trace log output unit 113 applies the determination rule of the policy definition table 600 according to the priority order and determines whether or not to output the trace log (step 907). Details of the determination method will be described with reference to FIG. If it is determined to output the trace log (step 908), the trace log is output to the trace log table 700 (step 909).

プロファイラ部112は、トレースログを出力した場合は、実行ステップ数テーブル400の合計実行ステップ数とトレースログ出力実行ステップ数を積算し、主処理連続実行ステップ数をゼロにする(ステップ911)。トレースログを出力しなかった場合は、実行ステップ数テーブル400の合計実行ステップ数を積算する(ステップ910)。
以上、一連の処理をプログラムが終了するまで、ステップ901に戻って繰り返し実行する。
When outputting the trace log, the profiler unit 112 integrates the total execution step number and the trace log output execution step number in the execution step number table 400, and sets the main process continuous execution step number to zero (step 911). When the trace log is not output, the total number of execution steps in the execution step number table 400 is integrated (step 910).
As described above, the series of processing is repeatedly executed by returning to step 901 until the program ends.

図12は本実施形態のトレースログ出力部113の判定処理の流れを示す図である。図12では、トレースログ出力部113がトレースログを出力するかどうかをポリシー定義テーブル600に従って判定する処理を表している。   FIG. 12 is a diagram showing a flow of determination processing of the trace log output unit 113 of this embodiment. FIG. 12 illustrates processing in which the trace log output unit 113 determines whether to output a trace log according to the policy definition table 600.

先ず、ポリシー定義テーブル600から最も優先順位の高い設定項目を取得する(ステップ1001)。この設定項目に対応した評価方法1100〜1500によって、トレースログを出力するか、出力しないか、或いは判定を保留し他の設定項目の評価によって判定するか、を判定する(ステップ1002)。   First, the setting item with the highest priority is acquired from the policy definition table 600 (step 1001). By the evaluation method 1100-1500 corresponding to this setting item, it is determined whether to output the trace log or not, or whether to hold the determination and determine by evaluation of other setting items (step 1002).

トレースログを出力するか、出力しないかを判定した場合(ステップ1003)は、その結果を以って判定を完了する(ステップ908)。
判定が保留され、かつポリシー定義テーブル600に次に優先順位の高い設定項目がない場合(ステップ1004)は、トレースログを出力しないと判定する(ステップ908)。
判定が保留され、かつポリシー定義テーブル600に次に優先順位の高い設定項目がある場合は、その設定項目を取得し(ステップ1005)、ステップ1002に戻り、設定項目に対応する評価と判定を繰り返す。
If it is determined whether to output the trace log (step 1003), the determination is completed based on the result (step 908).
If the determination is suspended and there is no setting item with the next highest priority in the policy definition table 600 (step 1004), it is determined not to output the trace log (step 908).
If the determination is suspended and there is a setting item with the next highest priority in the policy definition table 600, the setting item is acquired (step 1005), and the process returns to step 1002 to repeat the evaluation and determination corresponding to the setting item. .

図13は本実施形態の分岐確率によってトレースログを出力するかどうかを判定する処理の流れを示す図である。主処理部111は、分岐命令に到達した場合、分岐命令に到達したことを示すパラメタをプロファイラ部112に渡す。プロファイラ部112はトレースログ出力部113に制御を移す際にそのパラメタを引き渡す。トレースログ出力部113はこのパラメタを元に分岐命令に到達しているかどうかを判定する。   FIG. 13 is a diagram showing a flow of processing for determining whether or not to output a trace log according to the branch probability according to the present embodiment. When the main processing unit 111 reaches the branch instruction, the main processing unit 111 passes a parameter indicating that the branch instruction has been reached to the profiler unit 112. The profiler unit 112 delivers the parameters when transferring control to the trace log output unit 113. The trace log output unit 113 determines whether or not the branch instruction has been reached based on this parameter.

プログラムの実行が分岐命令に到達していない場合(ステップ1101)は、判定を保留し、次の優先順位の設定項目について評価を行う。   If the execution of the program has not reached the branch instruction (step 1101), the determination is suspended, and the next priority setting item is evaluated.

プログラムの実行が分岐命令に到達している場合、分岐確率を算出し、トレースログを出力するかどうか判定する。   When the execution of the program reaches the branch instruction, the branch probability is calculated and it is determined whether or not to output the trace log.

先ず、分岐確率テーブル300から、到達した分岐箇所xに対応する分岐先x1…xnの分岐回数303を取得し合計する(ステップ1102)。分岐条件の評価により決定した分岐先xmに対する分岐確率xm/Σxi(i=1…n)を計算する(ステップ1103)。 First, the number of branches 303 of the branch destination x 1 ... X n corresponding to the reached branch location x is acquired from the branch probability table 300 and totaled (step 1102). The branch probability x m / Σx i (i = 1... N) for the branch destination x m determined by the evaluation of the branch condition is calculated (step 1103).

次に、ポリシー定義テーブル600から分岐確率に対する設定値を取得する(1104)。
ステップ1102〜1103で算出した分岐確率が設定値以下である場合(ステップ1105)は、トレースログを出力すると判定する。分岐確率が設定値を超えている場合は、判定を保留し、次の優先順位の設定項目について評価を行う。
Next, a setting value for the branch probability is acquired from the policy definition table 600 (1104).
When the branching probability calculated in steps 1102 to 1103 is equal to or less than the set value (step 1105), it is determined that the trace log is output. If the branching probability exceeds the set value, the determination is suspended and the next priority setting item is evaluated.

以上の処理によって、プログラム中の全ての条件分岐について、分岐確率が設定値以下の場合にトレースログを出力することが可能となる。即ち、プログラマが事前に想定し得ない稀な状況を自動的に検出し、トレースログを出力することが可能となる。   With the above processing, it is possible to output a trace log for all conditional branches in the program when the branch probability is less than or equal to the set value. That is, it is possible to automatically detect a rare situation that a programmer cannot assume in advance and output a trace log.

図14は本実施形態のトレースログの出力に要した実行ステップ数と合計実行ステップ数との比率からトレースログを出力するかどうかを判定する処理の流れを示す図である。先ず、実行ステップ数テーブル400から合計実行ステップ数とトレースログ出力実行ステップ数を取得する(ステップ1201)。トレースログの出力に要した実行ステップ数の割合を、トレースログ出力実行率=トレースログ出力実行ステップ数/合計実行ステップ数として計算する(ステップ1202)。   FIG. 14 is a diagram showing a flow of processing for determining whether to output a trace log from the ratio of the number of execution steps required for outputting the trace log and the total number of execution steps according to this embodiment. First, the total number of execution steps and the number of trace log output execution steps are acquired from the execution step number table 400 (step 1201). The ratio of the number of execution steps required for outputting the trace log is calculated as Trace log output execution rate = Number of trace log output execution steps / Total number of execution steps (Step 1202).

次に、ポリシー定義テーブル600からトレースログ出力実行率の設定式を取得する(ステップ1203)。コンピュータシステムの負荷率を変数として、設定式の値を計算する(ステップ1204)。   Next, a trace log output execution rate setting formula is acquired from the policy definition table 600 (step 1203). Using the load factor of the computer system as a variable, the value of the setting formula is calculated (step 1204).

ステップ1201〜1202で算出したトレースログ出力実行率が設定式の値を超えている場合(ステップ1205)は、トレースログを出力しないと判定する。トレースログ出力実行率が設定式の値以下である場合は、判定を保留し、次の優先順位の設定項目について評価を行う。   When the trace log output execution rate calculated in steps 1201 to 1202 exceeds the value of the setting formula (step 1205), it is determined that the trace log is not output. If the trace log output execution rate is less than or equal to the value of the setting expression, the determination is suspended and the next priority setting item is evaluated.

例として、コンピュータシステムの負荷率をLで表すこととし、設定式が0.1×(1-L)であった場合を考える。コンピュータシステムの負荷率が100%の場合は、L = 1, 設定式0.1×(1-L) = 0.1×(1-1) = 0となるため、トレースログ出力実行率に依らず、トレースログを出力しない。負荷率が50%の場合は、L = 0.5, 設定式0.1×(1-L) = 0.1×(1-0.5) = 0.05となるため、トレースログ出力実行率が0.05(=5%)を超えていた場合には、トレースログを出力しない。   As an example, let us consider the case where the load factor of a computer system is represented by L and the setting formula is 0.1 × (1-L). If the load factor of the computer system is 100%, L = 1, setting formula 0.1 x (1-L) = 0.1 x (1-1) = 0, so the trace log output rate does not depend on the trace log output execution rate. Is not output. When the load factor is 50%, L = 0.5, setting formula 0.1 x (1-L) = 0.1 x (1-0.5) = 0.05, so the trace log output execution rate exceeds 0.05 (= 5%) If it is, the trace log is not output.

以上の処理によって、トレースログ出力の実行率をコンピュータシステムの負荷状態によって決まるある割合以下に抑えることが可能となる。即ち、コンピュータシステムの負荷状態に応じてトレースログ出力量を抑制することが可能であり、コンピュータシステムの高負荷状態を緩和することが可能である。   With the above processing, the execution rate of the trace log output can be suppressed to a certain ratio determined by the load state of the computer system. That is, the trace log output amount can be suppressed according to the load state of the computer system, and the high load state of the computer system can be alleviated.

図15は本実施形態のプログラムの目的処理を一定ステップ数実行する毎にトレースログを出力するかどうかを判定する処理の流れを示す図である。先ず、実行ステップ数テーブル400から、トレースログ出力処理を挟まずにプログラムの目的処理を実行し続けたステップ数である、主処理連続実行ステップ数を取得する(ステップ1301)。   FIG. 15 is a diagram showing a flow of processing for determining whether or not to output a trace log every time the target processing of the program of this embodiment is executed for a certain number of steps. First, from the execution step number table 400, the main process continuous execution step number, which is the number of steps in which the target process of the program has been executed without interposing the trace log output process, is obtained (step 1301).

次にポリシー定義テーブル600から主処理連続実行ステップ数の設定値を取得する(ステップ1302)。主処理連続実行ステップ数が設定値以上である場合(ステップ1303)は、トレースログを出力すると判定する。主処理連続実行ステップ数が設定値未満である場合は、判定を保留し、次の優先順位の設定項目について評価を行う。   Next, a setting value for the number of main processing continuous execution steps is acquired from the policy definition table 600 (step 1302). If the number of main process continuous execution steps is greater than or equal to the set value (step 1303), it is determined that a trace log is output. When the number of main process continuous execution steps is less than the set value, the determination is suspended and the next set item of priority is evaluated.

以上の処理によって、明示的にトレースログ出力を命令しなくても、一定実行ステップ数毎にトレースログを出力することが可能となり、アプリケーションプログラム110の動作をトレースログから把握することが可能となる。   With the above processing, it is possible to output a trace log for each predetermined number of execution steps without explicitly instructing to output a trace log, and it is possible to grasp the operation of the application program 110 from the trace log. .

図16は本実施形態の明示的なトレースログ出力命令に到達した時にトレースログを出力するかどうかを判定する処理の流れを示す図である。主処理部111はトレースログ出力命令に到達した場合、トレースログ出力命令に到達したことを示すパラメタをプロファイラ部112に渡す。プロファイラ部112はトレースログ出力部113に制御を移す際にそのパラメタを引き渡す。トレースログ出力部113はこのパラメタを元にトレースログ出力命令に到達しているかどうかを判定する。   FIG. 16 is a diagram showing the flow of processing for determining whether or not to output a trace log when the explicit trace log output command of this embodiment is reached. When the main processing unit 111 reaches the trace log output command, the main processing unit 111 passes a parameter indicating that the trace log output command has been reached to the profiler unit 112. The profiler unit 112 delivers the parameters when transferring control to the trace log output unit 113. The trace log output unit 113 determines whether or not the trace log output command has been reached based on this parameter.

プログラムの実行が明示的なトレースログ出力命令に到達した場合(ステップ1401)は、トレースログを出力すると判定する。トレースログ出力命令に到達していない場合は、判定を保留し、次の優先順位の設定項目について評価を行う。   When the execution of the program reaches an explicit trace log output command (step 1401), it is determined that the trace log is output. If the trace log output command has not been reached, the determination is suspended and the next priority setting item is evaluated.

図17は本実施形態のサブルーチンの実行を完了した時にトレースログを出力するかどうかを判定する処理の流れを示す図である。主処理部111はサブルーチンの実行を完了した場合、サブルーチンの実行完了を示すパラメタをプロファイラ部112に渡す。プロファイラ部112はトレースログ出力部113に制御を移す際にそのパラメタを引き渡す。トレースログ出力部113はこのパラメタを元にサブルーチンの実行を完了したかどうかを判定する。   FIG. 17 is a diagram showing a flow of processing for determining whether to output a trace log when execution of the subroutine of the present embodiment is completed. When the main processing unit 111 completes execution of the subroutine, the main processing unit 111 passes a parameter indicating completion of execution of the subroutine to the profiler unit 112. The profiler unit 112 delivers the parameters when transferring control to the trace log output unit 113. The trace log output unit 113 determines whether the execution of the subroutine is completed based on this parameter.

プログラムがサブルーチンの実行を完了していない場合(ステップ1501)は、判定を保留し、次の優先順位の設定項目について評価を行う。
サブルーチンの実行を完了している場合は、サブルーチン情報テーブル500の先頭から現在実行しているサブルーチンの実行開始時刻503を取得し、現在時刻との差からサブルーチンの実行時間を計算する(ステップ1502)。
If the program has not completed execution of the subroutine (step 1501), the determination is suspended and the next priority setting item is evaluated.
If the execution of the subroutine has been completed, the execution start time 503 of the subroutine currently being executed is acquired from the top of the subroutine information table 500, and the execution time of the subroutine is calculated from the difference from the current time (step 1502). .

次にポリシー定義テーブル600からサブルーチン実行時間の設定値を取得する(ステップ1503)。
実行を完了したサブルーチンの実行時間が設定値未満である場合(ステップ1504)、判定を保留し、次の優先順位の設定項目について評価を行う。
実行を完了したサブルーチンの実行時間が設定値以上である場合は、サブルーチン情報テーブル500の全てのサブルーチンの実行開始時刻を実行時間だけ進め(ステップ1505)、トレースログを出力すると判定する。実行開始時刻を実行時間だけ進めることにより、当該サブルーチンの呼び出し元全てにおいてトレースログが出力されることを抑止する。
Next, a set value of subroutine execution time is acquired from the policy definition table 600 (step 1503).
If the execution time of the subroutine that has completed execution is less than the set value (step 1504), the determination is suspended and the next priority setting item is evaluated.
If the execution time of the subroutine that has completed execution is equal to or greater than the set value, the execution start time of all subroutines in the subroutine information table 500 is advanced by the execution time (step 1505), and it is determined that the trace log is output. By advancing the execution start time by the execution time, it is possible to prevent the trace log from being output from all callers of the subroutine.

図8は本実施形態のアプリケーションプログラム110の生成の一例を示す図である。図8では、プログラムの目的処理である主処理部111のみから成るソースプログラム114から、プロファイラ部112及びトレースログ出力部113を持つ実行プログラムであるアプリケーションプログラム110を生成する処理を表している。   FIG. 8 is a diagram showing an example of generation of the application program 110 of the present embodiment. FIG. 8 shows a process of generating an application program 110 that is an execution program having a profiler unit 112 and a trace log output unit 113 from a source program 114 including only a main processing unit 111 that is a target process of the program.

言語処理系115は、与えられたソースプログラム114の内容を解析し、プロファイラ部112及びトレースログ出力部113を生成し、実行プログラムに埋め込むことで、アプリケーションプログラム110を生成する。   The language processing system 115 analyzes the contents of the given source program 114, generates the profiler unit 112 and the trace log output unit 113, and embeds them in the execution program, thereby generating the application program 110.

本実施形態の一つとして、プロファイラ部112及びトレースログ出力部113をサブルーチンとしてプログラム中に埋め込み、プログラム中においてプロファイル処理乃至トレースログ出力処理を必要とする箇所にこれらサブルーチンの呼び出し処理を埋め込む方法がある。   As one of the embodiments, there is a method in which the profiler unit 112 and the trace log output unit 113 are embedded in a program as a subroutine, and the calling process of these subroutines is embedded in a place where profile processing or trace log output processing is required in the program. is there.

また別の実施形態の一つとして、プログラム中においてプロファイル処理乃至トレースログ出力処理の必要な箇所に、プロファイラ部112乃至トレースログ出力部113の該当処理部分をマクロ展開して直接埋め込む方法もある。   As another embodiment, there is a method of directly embedding a corresponding processing portion of the profiler unit 112 to the trace log output unit 113 in a program where necessary for profile processing or trace log output processing.

図9は本実施形態の言語処理系115によって処理される前のソースプログラム114の一例を示す図である。左端の数字は行番号を示し、プログラムの内容はプログラミング言語Cに基づく擬似コードで示している。   FIG. 9 is a diagram showing an example of the source program 114 before being processed by the language processing system 115 of this embodiment. The number at the left end indicates the line number, and the contents of the program are indicated by pseudo code based on the programming language C.

図9の3〜6行はサブルーチンの定義、8〜23行はメインルーチンの定義、11〜16行は分岐命令、18行はサブルーチンの実行、20行は明示的なトレースログ出力命令である。   In FIG. 9, lines 3 to 6 are subroutine definitions, lines 8 to 23 are main routine definitions, lines 11 to 16 are branch instructions, line 18 is a subroutine execution, and line 20 is an explicit trace log output instruction.

図10は本実施形態の言語処理系115によって図9で示したソースプログラムの例を処理した後のアプリケーションプログラム110の一例を示す図である。左端の数字は行番号を示し、プログラムの内容はプログラミング言語Cに基づく擬似コードで示している。アルファベット大文字で表記している処理が、言語処理系115が埋め込んだ処理である。   FIG. 10 is a diagram showing an example of the application program 110 after the example of the source program shown in FIG. 9 is processed by the language processing system 115 of the present embodiment. The number at the left end indicates the line number, and the contents of the program are indicated by pseudo code based on the programming language C. The process written in uppercase letters is a process embedded in the language processing system 115.

図10の1〜12行はサブルーチンの定義、14〜48行はメインルーチンの定義、24〜37行は分岐命令、39行はサブルーチンの実行、41〜43行は明示的なトレースログ出力命令である。   In FIG. 10, lines 1 to 12 are subroutine definitions, lines 14 to 48 are main routine definitions, lines 24 to 37 are branch instructions, line 39 is a subroutine execution, and lines 41 to 43 are explicit trace log output instructions. is there.

図10の4、16行は現在実行しているサブルーチンの名称、パラメタの名称と値をサブルーチン情報テーブル500に保存する処理、11行はサブルーチン情報を呼び出し元の情報に戻す処理である。   Lines 4 and 16 in FIG. 10 are processes for storing the name of the currently executed subroutine, the names and values of the parameters in the subroutine information table 500, and line 11 is a process for returning the subroutine information to the caller information.

図10の10、46行はサブルーチンの実行を完了した時に、プロファイラ部112へ制御を移す処理である。サブルーチンの実行を完了したことをパラメタとして渡している。実行を完了したサブルーチンの名称、パラメタ名と値、実行開始時刻はサブルーチン情報テーブル500に記録されているため、パラメタとしては渡さない。   Lines 10 and 46 in FIG. 10 are processes for transferring control to the profiler unit 112 when execution of the subroutine is completed. The completion of subroutine execution is passed as a parameter. Since the name of the subroutine that has completed execution, the parameter name and value, and the execution start time are recorded in the subroutine information table 500, they are not passed as parameters.

図10の18〜21行は一定ステップ数を実行する毎にプロファイラ部112へ制御を移す処理を割り込み処理として登録する処理である。一定ステップ数を実行したことをパラメタとして渡す様に設定している。   Lines 18 to 21 in FIG. 10 are processes for registering a process for transferring control to the profiler unit 112 every time a certain number of steps are executed as an interrupt process. It is set to pass as a parameter that a certain number of steps have been executed.

図10の28、34行は分岐命令に到達した時に、プロファイラ部112へ制御を移す処理である。分岐命令に到達したこと、分岐箇所、分岐先、分岐の判定に使用した条件変数の名称と値をパラメタとして渡している。分岐箇所、分岐先の名称は言語処理系115が自動生成して割り当てる。   Lines 28 and 34 in FIG. 10 are processes for transferring control to the profiler unit 112 when a branch instruction is reached. The fact that the branch instruction has been reached, the branch location, the branch destination, and the condition variable name and value used to determine the branch are passed as parameters. The language processing system 115 automatically generates and assigns branch locations and branch destination names.

図10の43行は明示的なトレースログ出力命令に到達した時に、プロファイラ部112へ制御を移す処理である。明示的なトレースログ出力命令に到達したこと、指定された任意のメッセージをパラメタとして渡している。本処理は図9の20行に対応しており、ソースプログラム114の処理を置き換えている。   Line 43 in FIG. 10 is a process for transferring control to the profiler unit 112 when an explicit trace log output command is reached. An explicit trace log output command has been reached, and any specified message is passed as a parameter. This process corresponds to the 20th line in FIG. 9 and replaces the process of the source program 114.

以上説明した様に本実施形態のトレースロギング装置によれば、プログラムの動的な実行時情報に応じてトレースログの出力を行うので、プログラマが事前に予測できなかった稀な状況やコンピュータシステムの負荷状態に応じてトレースログ出力を制御することが可能である。   As described above, according to the trace logging apparatus of the present embodiment, the trace log is output according to the dynamic runtime information of the program. It is possible to control the trace log output according to the load state.

本実施形態のプロファイリング機能付きトレースロギング装置の構成を示す図である。It is a figure which shows the structure of the trace logging apparatus with a profiling function of this embodiment. 本実施形態の記憶装置104〜106に保存される情報の概要を示す図である。It is a figure which shows the outline | summary of the information preserve | saved at the memory | storage devices 104-106 of this embodiment. 本実施形態の分岐確率テーブルの一例を示す図である。It is a figure which shows an example of the branch probability table of this embodiment. 本実施形態の実行ステップ数テーブルの一例を示す図である。It is a figure which shows an example of the execution step number table of this embodiment. 本実施形態のサブルーチン情報テーブル500の一例を示す図である。It is a figure which shows an example of the subroutine information table 500 of this embodiment. 本実施形態のポリシー定義テーブルの一例を示す図である。It is a figure which shows an example of the policy definition table of this embodiment. 本実施形態のトレースログテーブルの一例を示す図である。It is a figure which shows an example of the trace log table of this embodiment. 本実施形態のアプリケーションプログラム110の生成の一例を示す図である。It is a figure which shows an example of the production | generation of the application program 110 of this embodiment. 本実施形態の言語処理系115によって処理される前のソースプログラム114の一例を示す図である。It is a figure which shows an example of the source program 114 before being processed by the language processing system 115 of this embodiment. 本実施形態の言語処理系115によって図9で示したソースプログラムの例を処理した後のアプリケーションプログラム110の一例を示す図である。It is a figure which shows an example of the application program 110 after processing the example of the source program shown in FIG. 9 by the language processing system 115 of this embodiment. 本実施形態のアプリケーションプログラム110が実行する処理の流れを示す図である。It is a figure which shows the flow of the process which the application program 110 of this embodiment performs. 本実施形態のトレースログ出力部113の判定処理の流れを示す図である。It is a figure which shows the flow of the determination process of the trace log output part 113 of this embodiment. 本実施形態の分岐確率によってトレースログを出力するかどうかを判定する処理の流れを示す図である。It is a figure which shows the flow of the process which determines whether a trace log is output by the branch probability of this embodiment. 本実施形態のトレースログの出力に要した実行ステップ数と合計実行ステップ数との比率からトレースログを出力するかどうかを判定する処理の流れを示す図である。It is a figure which shows the flow of a process which determines whether a trace log is output from the ratio of the number of execution steps required for the output of the trace log of this embodiment, and the total number of execution steps. 本実施形態のプログラムの目的処理を一定ステップ数実行する毎にトレースログを出力するかどうかを判定する処理の流れを示す図である。It is a figure which shows the flow of a process which determines whether a trace log is output whenever the target process of the program of this embodiment is performed a fixed number of steps. 本実施形態の明示的なトレースログ出力命令に到達した時にトレースログを出力するかどうかを判定する処理の流れを示す図である。It is a figure which shows the flow of a process which determines whether a trace log is output when it reaches | attains the explicit trace log output command of this embodiment. 本実施形態のサブルーチンの実行を完了した時にトレースログを出力するかどうかを判定する処理の流れを示す図である。It is a figure which shows the flow of a process which determines whether trace log is output when the execution of the subroutine of this embodiment is completed.

符号の説明Explanation of symbols

100…コンピュータ、101…CPU、102…キーボード、103…ディスプレイ、104…統計情報記憶装置、105…ポリシー定義記憶装置、106…トレースログ記憶装置、107…バス、108…主記憶装置、109…OS、110…アプリケーションプログラム、111…主処理部、112…プロファイラ部、113…トレースログ出力部、300…分岐確率テーブル、400…実行ステップ数テーブル、500…サブルーチン情報テーブル、600…ポリシー定義テーブル、700…トレースログテーブル、301…分岐箇所(分岐元)、302…分岐先、303…分岐回数、401…処理種別、402…ステップ数、501…サブルーチン名、502…パラメタ情報、503…実行開始時刻、601…設定項目、602…設定値/設定式、603…優先順位、701…該当項目、702…値、703…トレースログ本文、704…付加情報、114…ソースプログラム、115…言語処理系。   DESCRIPTION OF SYMBOLS 100 ... Computer, 101 ... CPU, 102 ... Keyboard, 103 ... Display, 104 ... Statistical information storage device, 105 ... Policy definition storage device, 106 ... Trace log storage device, 107 ... Bus, 108 ... Main storage device, 109 ... OS , 110 ... Application program, 111 ... Main processing unit, 112 ... Profiler unit, 113 ... Trace log output unit, 300 ... Branch probability table, 400 ... Execution step number table, 500 ... Subroutine information table, 600 ... Policy definition table, 700 ... Trace log table, 301 ... Branch location (branch source), 302 ... Branch destination, 303 ... Number of branches, 401 ... Processing type, 402 ... Number of steps, 501 ... Subroutine name, 502 ... Parameter information, 503 ... Execution start time, 601: Setting item, 602: Setting Value / setting-type, 603 ... priority, 701 ... corresponding item, 702 ... value, 703 ... trace log text, 704 ... additional information, 114 ... source program, 115 ... language processor.

Claims (5)

記憶装置を備えプログラム実行時のトレースログを出力するトレースロギング装置におけるトレースロギング方法において、
プログラムの実行時にその動的な情報を示す実行時情報の計測を行ってその計測された実行時情報を前記記憶装置に格納し、前記記憶装置に格納した実行時情報である計測値を読み出してその計測値を評価するための評価値を計算し、その計算した評価値がポリシー定義テーブルで指定される閾値条件を満たす場合にトレースログを記憶装置へ出力することを特徴とするトレースロギング方法。
In a trace logging method in a trace logging device that includes a storage device and outputs a trace log during program execution,
The execution time information indicating the dynamic information is measured when the program is executed, the measured execution time information is stored in the storage device, and the measurement value which is the execution time information stored in the storage device is read. A trace logging method characterized by calculating an evaluation value for evaluating the measured value and outputting a trace log to a storage device when the calculated evaluation value satisfies a threshold condition specified in a policy definition table.
前記プログラムの実行時情報として各分岐命令における分岐先毎の分岐回数の計測を行って記憶装置に格納し、前記記憶装置に格納した分岐回数の情報を読み出して分岐先毎の分岐確率を前記評価値として計算し、その分岐確率がポリシー定義テーブルで指定される所定の設定値以下である場合にその分岐先を示すトレースログを記憶装置へ出力することを特徴とする請求項1に記載されたトレースロギング方法。   As the execution information of the program, the number of branches for each branch instruction in each branch instruction is measured and stored in a storage device, and the information on the number of branches stored in the storage device is read to evaluate the branch probability for each branch destination. The trace log indicating the branch destination is output to the storage device when the branch probability is calculated as a value and the branch probability is equal to or less than a predetermined setting value specified in the policy definition table. Trace logging method. 前記プログラムの実行時情報として、そのプログラムの実行時における全実行ステップ数を示す合計実行ステップ数と、トレースログ出力時における実行ステップ数を示すトレースログ出力実行ステップ数の計測を行って記憶装置に格納し、前記記憶装置に格納した合計実行ステップ数及びトレースログ出力実行ステップ数の情報を読み出して、トレースログ出力実行率を前記評価値として計算し、そのトレースログ出力実行率がポリシー定義テーブルで指定される所定の設定式の値より大きい場合にトレースログの出力を抑制することを特徴とする請求項1に記載されたトレースロギング方法。   As the execution information of the program, the total number of execution steps indicating the total number of execution steps at the time of execution of the program and the number of execution steps of the trace log output indicating the number of execution steps at the time of output of the trace log are measured and stored in the storage device. The information of the total number of execution steps and the number of execution steps of trace log output stored in the storage device is read out, the trace log output execution rate is calculated as the evaluation value, and the trace log output execution rate is calculated in the policy definition table. The trace logging method according to claim 1, wherein the output of the trace log is suppressed when the value is larger than a value of a predetermined setting expression specified. 記憶装置を備えプログラム実行時のトレースログを出力するトレースロギング装置において、
プログラムの実行時にその動的な情報を示す実行時情報の計測を行ってその計測された実行時情報を前記記憶装置に格納するプロファイラ部と、前記記憶装置に格納した実行時情報である計測値を読み出してその計測値を評価するための評価値を計算し、その計算した評価値がポリシー定義テーブルで指定される閾値条件を満たす場合にトレースログを記憶装置へ出力するトレースログ出力部とを備えることを特徴とするトレースロギング装置。
In a trace logging device that has a storage device and outputs a trace log during program execution,
A profiler unit that measures runtime information indicating dynamic information at the time of program execution and stores the measured runtime information in the storage device, and a measurement value that is runtime information stored in the storage device A trace log output unit that calculates an evaluation value for evaluating the measured value and outputs the trace log to the storage device when the calculated evaluation value satisfies a threshold condition specified in the policy definition table. A trace logging device comprising:
記憶装置を備えプログラム実行時のトレースログを出力するトレースロギング装置におけるトレースロギング方法をコンピュータに実行させる為のプログラムにおいて、
プログラムの実行時にその動的な情報を示す実行時情報の計測を行ってその計測された実行時情報を前記記憶装置に格納するステップと、前記記憶装置に格納した実行時情報である計測値を読み出してその計測値を評価するための評価値を計算し、その計算した評価値がポリシー定義テーブルで指定される閾値条件を満たす場合にトレースログを記憶装置へ出力するステップとをコンピュータに実行させることを特徴とするプログラム。
In a program for causing a computer to execute a trace logging method in a trace logging device that includes a storage device and outputs a trace log during program execution,
Measuring execution time information indicating the dynamic information at the time of execution of the program and storing the measured execution time information in the storage device; and a measurement value which is the execution time information stored in the storage device. An evaluation value for reading and evaluating the measurement value is calculated, and when the calculated evaluation value satisfies a threshold condition specified in the policy definition table, a step of outputting a trace log to a storage device is executed by a computer. A program characterized by that.
JP2006272512A 2006-10-04 2006-10-04 Trace logging method, apparatus and program Pending JP2008090699A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006272512A JP2008090699A (en) 2006-10-04 2006-10-04 Trace logging method, apparatus and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006272512A JP2008090699A (en) 2006-10-04 2006-10-04 Trace logging method, apparatus and program

Publications (1)

Publication Number Publication Date
JP2008090699A true JP2008090699A (en) 2008-04-17

Family

ID=39374756

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006272512A Pending JP2008090699A (en) 2006-10-04 2006-10-04 Trace logging method, apparatus and program

Country Status (1)

Country Link
JP (1) JP2008090699A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011076389A (en) * 2009-09-30 2011-04-14 Fujitsu Frontech Ltd Information management program, information management method and information management device
JP2012141909A (en) * 2011-01-06 2012-07-26 Hitachi Ltd Abnormality detection method and information processing system using the same
JP2013174960A (en) * 2012-02-23 2013-09-05 Fujitsu Semiconductor Ltd Description file of lsi model, simulation system, and method for debug

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011076389A (en) * 2009-09-30 2011-04-14 Fujitsu Frontech Ltd Information management program, information management method and information management device
JP2012141909A (en) * 2011-01-06 2012-07-26 Hitachi Ltd Abnormality detection method and information processing system using the same
JP2013174960A (en) * 2012-02-23 2013-09-05 Fujitsu Semiconductor Ltd Description file of lsi model, simulation system, and method for debug

Similar Documents

Publication Publication Date Title
CN110990019B (en) Java class analysis method and device, storage medium and electronic equipment
US8397104B2 (en) Creation of test plans
US8898649B2 (en) Application program analysis method, analysis system and recording medium for identifying a contributing factor for an invalid operation of an application program
KR20110070468A (en) Instrumentation execution device and method
CN112634973A (en) Data rereading method and system of storage medium, terminal device and storage medium
US20110154127A1 (en) Test support system, method and computer program product, which optimize test scenarios to minimize total test time
JP2019215847A (en) Reducing buffer overflow
CN105556402A (en) Method for manipulating a control program of a control device
JP6723483B2 (en) Test case generation device, test case generation method, and test case generation program
US7353500B2 (en) Suppressing execution of monitoring measurement program pointed to by inserted branch after threshold number of coverage to reduce instruction testing overhead
KR102114547B1 (en) Testing method and apparatus of target function incluede in target program
US9646252B2 (en) Template clauses based SAT techniques
US11241962B2 (en) Evaluation apparatus for display arbitration control and generation apparatus for rule definition file
JP2008090699A (en) Trace logging method, apparatus and program
US20100077383A1 (en) Simulation method and storage medium for storing program
KR101476536B1 (en) The method and system for inspecting program
CN114153750A (en) Code checking method and device, code compiling method and electronic equipment
JP5021584B2 (en) Microcomputer simulator, simulation method thereof, program, and computer-readable medium
JP6583033B2 (en) Driver generation program, apparatus, and method
JP2007323299A (en) Review execution order determination device, review execution order determination program, recording medium storing review execution order determination program, and review execution order determination method
CN119538262B (en) Fuzz testing input optimization device for IoT device firmware
US11520964B1 (en) Method and system for assertion-based formal verification using unique signature values
CN113312167B (en) Service control method and device, electronic equipment and computer readable medium
CN112860224B (en) Function execution environment construction method and device, electronic equipment and storage medium
JP5067705B2 (en) Abnormal test support device, abnormal test support method, and program