JP2007065718A - Display method and system for supporting tracing program operation processes - Google Patents
Display method and system for supporting tracing program operation processes Download PDFInfo
- Publication number
- JP2007065718A JP2007065718A JP2005247271A JP2005247271A JP2007065718A JP 2007065718 A JP2007065718 A JP 2007065718A JP 2005247271 A JP2005247271 A JP 2005247271A JP 2005247271 A JP2005247271 A JP 2005247271A JP 2007065718 A JP2007065718 A JP 2007065718A
- Authority
- JP
- Japan
- Prior art keywords
- tracking
- log
- program
- context
- attribute
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 134
- 238000000605 extraction Methods 0.000 claims description 15
- 238000012545 processing Methods 0.000 claims description 13
- 238000009434 installation Methods 0.000 claims description 2
- 238000010586 diagram Methods 0.000 description 13
- 238000011161 development Methods 0.000 description 6
- 238000012217 deletion Methods 0.000 description 4
- 230000037430 deletion Effects 0.000 description 4
- 238000012360 testing method Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 3
- 238000010348 incorporation Methods 0.000 description 3
- 239000002131 composite material Substances 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
Images
Landscapes
- Debugging And Monitoring (AREA)
Abstract
Description
本発明は、プログラムが出力するログの出力方法と出力箇所を指定し、出力されたログからプログラムの動作過程の追跡を支援するプログラム動作過程追跡支援表示方法及びシステムに関するものである。 The present invention relates to a program operation process tracking support display method and system for designating an output method and output location of a log output by a program and supporting tracking of the operation process of the program from the output log.
従来、プログラムの実行時にバグやエラーが発生した際に、それらの問題を突きとめるためにログを使用することが多く行われている。しかし、ログを大量に出力するプログラムでは、ログを解析し、原因となる箇所を特定することが難しく、プログラムを追跡することに時間がかかってしまう。それを回避すべく、プログラムの追跡に関して、必要なログを抽出して、専用のツールを使用してログの解析を容易にすることが行われている。そのような技術として、例えば下記特許文献1に記載のものが知られている。
Conventionally, when a bug or an error occurs during execution of a program, a log is often used to find out the problem. However, in a program that outputs a large amount of logs, it is difficult to analyze the log and identify the cause, and it takes time to track the program. In order to avoid this, regarding the program tracking, a necessary log is extracted, and a dedicated tool is used to facilitate the analysis of the log. As such a technique, for example, one described in
下記特許文献1に記載のものは、プログラム中に予めロギング関数を組み込んでおき、ある条件に合致した場合にログを出力させ、必要なログのみをメモリに保存し、検索時に検索条件を指定して必要なログのみを抽出して整理するものである。ロギング関数は、区分、ロギング条件、データ長、プロセス名などのパラメータをもち、区分または区分とロギング条件に合致した場合にログを出力する関数である。またロギング関数で使用する区分は、単体テスト、複合テストなどテストの粒度の違いで使い分けるもので、0から255までの数字で割り当てられる。例えば、特定のログを参照する場合に、専用のツールを使用して区分と時刻をそれぞれ指定することで、必要なログを収集して解析するものである。
しかしながら、上記特許文献1に記載の技術における数字による区分は、テストの粒度ごとにログを分類・収集するために適当に数字を付けて区分けしただけのものであり、プログラムの動作追跡を行うため、という目的をもった区分ではない。従って、この区分によってプログラムの動作過程が分り易くなる、というものではなかった。
However, the numerical classification in the technique described in the above-mentioned
本発明の目的は、プログラムの動作過程が分るように、予めプログラムの流れを意味づける指標を含んだログ出力コードをプログラムに組み込み、ログ出力後に関連付けを行うことでプログラムの動作過程別にログを分類して表示するプログラム動作過程追跡支援表示方法及びシステムを提供することにある。 The purpose of the present invention is to incorporate a log output code including an index that signifies the flow of the program in advance so that the operation process of the program is known, and to associate logs after the log output so that a log is recorded for each operation process of the program. An object of the present invention is to provide a program operation process tracking support display method and system for classifying and displaying.
上記目的を達成するために、請求項1に係る発明は、コンピュータを用いて構築されたプログラム動作追跡支援表示システムにおけるプログラム動作追跡支援表示方法であって、コンピュータが備えるログ出力設定手段が、ログを取る対象のプログラムである組込前プログラム中のプログラム追跡開始箇所及びプログラム追跡箇所を設定する工程と、コンピュータが備えるログ出力設定反映手段が、前記組込前プログラムに対して、前記設定されたプログラム追跡開始箇所に、前記組込前プログラムの動作過程を示す追跡キーと前記追跡キーに従属する追跡値で構成される追跡属性を生成し登録追跡属性として登録するとともに、既に登録されている登録済み追跡属性と新たに生成された登録追跡属性を含む動作開始ログを出力するコードを組み込み、前記設定されたプログラム追跡箇所に、前記登録済み追跡属性を取得し該登録済み追跡属性を含んだ動作ログを出力するコードを組み込んで、組込後プログラムを生成する工程と、コンピュータが備えるプログラム実行手段が、前記組込後プログラムを実行し、前記プログラム追跡開始箇所に組み込まれたコードを実行することにより前記動作開始ログを出力し、前記プログラム追跡箇所に組み込まれたコードを実行することにより前記動作ログを出力する工程と、コンピュータが備える関連付け手段が、前記動作開始ログと前記動作ログ中の追跡属性を関連付ける工程と、コンピュータが備える表示手段が、前記関連付けた追跡属性を、該関連性が分るように表示する工程とを備えたことを特徴とする。
To achieve the above object, the invention according to
また請求項2に係る発明は、請求項1に記載のプログラム動作追跡支援表示方法において、前記動作開始ログと前記動作ログ中の追跡属性を関連付ける工程は、前記動作開始ログに含まれる前記登録済み追跡属性である動作開始ログ登録済み追跡属性と、前記動作開始ログに含まれる登録追跡属性である動作開始ログ登録追跡属性と、前記動作ログに含まれる前記登録済み追跡属性である動作ログ登録済み追跡属性とを抽出し、前記動作開始ログ登録済み追跡属性と前記動作開始ログ登録追跡属性とを関連付けることにより、前記動作開始ログ同士を関連付けし、2つの前記動作開始ログ登録追跡属性を関連付けることにより、前記動作開始ログ同士を関連付けし、前記動作開始ログ登録追跡属性と前記動作ログ登録済み追跡属性とを関連付けることにより、前記動作開始ログと前記動作ログとを関連付けするものであり、前記表示する工程は、前記動作開始ログ登録追跡属性が保持する前記追跡キーを順序づけて選択し、その追跡キーの順序に応じて、前記関連付けされた動作開始ログ及び動作ログを分類し、分類した動作開始ログと動作ログを表示するものであることを特徴とする。
The invention according to
請求項3に係る発明は、1つ以上のコンピュータを用いて構築された、プログラムにログ出力コードを組み込む箇所を設定するログ出力設定環境と、前記プログラムに前記ログ出力コードを組み込んだ組み込み済みプログラムを実行するプログラム実行環境と、前記組み込み済みプログラムが出力するログを解析するログ解析環境とを備え、前記ログ出力設定環境は、前記プログラムの動作過程を示す追跡キーと前記追跡キーに従属する追跡値で構成される追跡属性を定義する手段と、前記プログラムの追跡を開始するプログラム追跡開始箇所を定義する手段と、前記プログラム追跡開始箇所に対応する前記プログラムの命令箇所の前に、前記追跡属性を保持する追跡属性保持プログラムに前記追跡属性を登録追跡属性として登録する手段と、前記追跡属性保持プログラムに前記登録追跡属性の登録時に、前記追跡属性保持プログラムに登録済みである登録済み追跡属性と前記登録追跡属性を取得し、前記登録済み追跡属性と前記登録追跡属性を含んだ動作開始ログを出力するプログラム追跡開始処理を前記プログラムに組み込む手段と、前記プログラムを追跡するプログラム追跡箇所を定義する手段と、前記プログラム追跡箇所に対応する前記プログラムの命令箇所の後ろに、前記登録済み追跡属性を取得し、前記登録済み追跡属性を含んだ動作ログを出力するプログラム追跡処理を前記プログラムに組み込む手段と、前記プログラム追跡開始処理と前記プログラム追跡処理を組み込んだ前記組み込み済みプログラムを生成する手段とを備え、前記プログラム実行環境は、前記組み込み済みプログラムを実行する手段と、前記プログラム追跡開始箇所に対応する前記組み込み済みプログラムの命令が実行されたときに前記動作開始ログを出力する手段と、前記プログラム追跡箇所に対応する前記組み込み済みプログラムの命令が実行されたときに前記動作ログを出力する手段とを備え、前記ログ解析環境は、前記動作開始ログと前記動作ログを読み込む手段と、前記動作開始ログに含まれる前記登録済み追跡属性である動作開始ログ登録済み追跡属性と、前記動作開始ログに含まれる登録追跡属性である動作開始ログ登録追跡属性と、前記動作ログに含まれる前記登録済み追跡属性である動作ログ登録済み追跡属性を抽出する手段と、前記動作開始ログ登録済み追跡属性と前記動作開始ログ登録追跡属性を関連付け、前記動作開始ログ同士を関連付けする関連付け手段1と、2つの前記動作開始ログ登録追跡属性を関連付け、前記動作開始ログ同士を関連付けする関連付け手段2と、前記動作開始ログ登録追跡属性と前記動作ログ登録済み追跡属性を関連付け、前記動作開始ログと前記動作ログの関連付けする関連付け手段3と、前記動作開始ログ登録追跡属性が保持する前記追跡キーを順序づけて選択する追跡キー順序選択手段と、選択した前記追跡キーのうち一つを処理中追跡キーとして取得する手段と、前記ログ解析環境に読み込まれた前記動作開始ログ全てを分類対象集合として抽出する手段と、前記処理中追跡キーと合致する前記追跡キーを保持する前記動作開始ログ登録追跡属性を保持する動作開始ログを、前記分類対象集合から分類済み動作開始ログとして抽出する抽出手段1と、関連付け手段1、関連付け手段2、関連付け手段3を用いて、前記分類済み動作開始ログに関連付けられた前記動作開始ログ、前記動作ログを前記分類対象集合として抽出する抽出手段2と、取得済みである前記処理中追跡キー全てを保持する前記動作ログ登録済み追跡属性を保持する前記動作ログを、前記分類対象集合から分類済み動作ログとして抽出する抽出手段3と、前記処理中追跡キーを選択順に取得し、取得した前記処理中追跡キーごとに前記抽出手段1、前記抽出手段2、前記抽出手段3を実行することにより前記動作開始ログ、前記動作ログを分類する手段と、前記分類済み動作開始ログと前記分類済み動作ログを表示する手段とを備えたことを特徴とする。
The invention according to
請求項4に係る発明は、請求項3に記載のプログラム動作追跡支援表示システムにおいて、前記ログ解析環境では、前記分類済み動作開始ログを木構造での節とし、前記分類済み動作ログを木構造での葉として、前記組み込み済みプログラムの動作を木構造で表示することを特徴とする。
The invention according to
本発明によれば、ログを取る対象のプログラムの動作過程を表すログ出力コードを当該対象プログラムに組み込んでおくため、多くのログをユーザが定義した指標で分類することが可能となり、分類したログを専用の表示ツールで表示することで、プログラムの動作過程の追跡が容易となる。 According to the present invention, since a log output code representing an operation process of a target program to be logged is incorporated in the target program, it is possible to classify many logs by a user-defined index. Is displayed with a dedicated display tool, making it easy to track the operation process of the program.
以下、図面を用いて本発明を実施する場合の一形態を具体的に説明する。 Hereinafter, an embodiment of the present invention will be specifically described with reference to the drawings.
図1は、本発明の実施形態に係るシステム構成図を示す。本システムは、ログ出力開発環境1と、アプリケーションサーバ2と、組込前プログラム8とを備える。ログ出力開発環境1は、ログ出力設定プログラム3、ログ出力設定反映プログラム4、関連付け定義プログラム5、及び、コンテキストツリービュー表示プログラム6が動作する環境であり、ログの出力設定や編集を行う部分である。アプリケーションサーバ2は、ログを取る対象であるプログラムが動作する環境であり、トラッキングコンテキスト管理プログラム7と組込後プログラム9が動作する。組込前プログラム8は、組込後プログラム9にログ出力コードが組み込まれる前のプログラムで、すでに完成済みのものである。組込前プログラム8(あるいは組込後プログラム9)は、ログを取る対象のプログラムである。
FIG. 1 shows a system configuration diagram according to an embodiment of the present invention. This system includes a log
ログ出力開発環境1において、ログ出力設定プログラム3は、コンテキスト・ライフサイクルログ10と実行情報ログ11を出力させるためのコード(プログラム)を組込前プログラム8に組み込むための設定プログラムである。ログ出力設定プログラム3は、図3のコンテキスト・ライフサイクルログ設定画面30を用いて組込前プログラム8中のトラッキングコンテキスト(組込後プログラム9の動作過程を表す)の生成箇所をユーザに設定させ、また図5の実行情報ログ設定画面50を用いて組込前プログラム8中の実行情報ログ11を出力するコードを組み込む箇所をユーザに設定させる。
In the log
ログ出力設定反映プログラム4は、ログ出力設定プログラム3からログ出力コードを組み込む箇所の設定情報を読み込み、組込前プログラム8のバイトコードを操作し、ログ出力コードを組み込むプログラムである。本実施形態では、バイトコード操作にJavassistを使用する。
The log output
関連付け定義プログラム5は、組込後プログラム9の実行中に出力されたコンテキスト・ライフサイクルログ10と実行情報ログ11の2種類のログをトラッキングコンテキストで関連付けるプログラムである(トラッキングコンテキストについては図2−1で説明する)。コンテキストツリービュー表示プログラム6は、組込後プログラム9の動作過程を追跡できるように、トラッキングコンテキストと関連付け定義プログラム5で関連付けした実行情報ログ11を表示するプログラムである。
The
アプリケーションサーバ2において、トラッキングコンテキスト管理プログラム7は、コンテキストキーとコンテキスト値からなるトラッキングコンテキストを登録・管理するプログラムである(コンテキストキーとコンテキスト値については図2−1で説明する)。組込後プログラム9は、組込前プログラム8にログ出力設定反映プログラム4でログ出力コードを組み込んだプログラムである。
In the
以上のように、ログ出力設定プログラム3により、組込前プログラム8中のトラッキングコンテキストを生成する箇所と実行情報ログを出力する箇所を設定し、その設定に応じてログ出力設定反映プログラム4により組込前プログラム8に所出のコードを組み込む。アプリケーションサーバ2上で組込後プログラム9を実行すると、上記設定箇所でコンテキスト・ライフサイクルログ10や実行情報ログ11が出力される。その後、関連付け定義プログラム5により、コンテキスト・ライフサイクルログ10と実行情報ログ11とをトラッキングコンテキストで関連付ける。コンテキストツリービュー表示プログラム6により、上記関連付けした実行情報ログ11を表示する。これにより、組込後プログラム9の動作過程が追跡できるように実行情報ログ11を参照することができる。なお、ログ出力開発環境1とアプリケーションサーバ2は、コンピュータ上で上述の各プログラムを動作させることにより実現しているものである。
As described above, the location for generating the tracking context and the location for outputting the execution information log in the
図2−1は、トラッキングコンテキストの定義を示す図である。トラッキングコンテキスト21は、コンテキストキー22とコンテキスト値23からなり、組込後プログラム9の動作過程を表す識別子である。
FIG. 2A is a diagram illustrating the definition of a tracking context. The
図2−2は、組込後プログラム9が実行されたとき、組込後プログラム9の動作過程を表すトラッキングコンテキストを出力する様子を表した図である。
FIG. 2B is a diagram illustrating a state in which a tracking context representing an operation process of the
矢印24は、組込後プログラム9の実行の進度を表したものである。矢印24の進行方向に進むにつれて、組込後プログラム9内の処理が次々と実行されていることを表す。
An
命令25aは、組込後プログラム9の実行時に処理される命令である。上述したログ出力設定プログラム3及びログ出力設定反映プログラム4により、この命令25aを実行する前の位置でトラッキングコンテキストを出力するコンテキスト・ライフサイクルログ出力処理のコードが組み込まれているものとする。そのコンテキスト・ライフサイクルログ出力処理によって、コンテキスト・ライフサイクルログ25bが出力される。コンテキスト・ライフサイクルログ25bに含まれるトラッキングコンテキスト(ここでは「ThreadID」というコンテキストキーと「TC01」というコンテキスト値からなるトラッキングコンテキスト)は、新たに生成されたトラッキングコンテキストであり、組込後プログラム9の動作追跡時の起点であることを表す。ここで新たに生成されたトラッキングコンテキストは、トラッキングコンテキスト管理プログラム7に登録される。
The instruction 25a is an instruction processed when the
命令25cと命令25eは、命令25aと同様である。すなわち、命令25c,25eの前にトラッキングコンテキストを出力するコードが組み込まれているので、これによりコンテキスト・ライフサイクルログ25d、25fが出力される。新たに生成されたトラッキングコンテキストのトラッキングコンテキスト管理プログラム7への登録も、命令25aにおけるのと同様である。コンテキスト・ライフサイクルログ25d,25fは、コンテキスト・ライフサイクルログ25bと同様のものであり、25dでは「SessionID」というコンテキストキーと「SC01」というコンテキスト値からなるトラッキングコンテキストが、25fでは「RemoteID」というコンテキストキーと「RC01」というコンテキスト値からなるトラッキングコンテキストが、それぞれ出力されている。
The instruction 25c and the instruction 25e are the same as the instruction 25a. That is, since the code for outputting the tracking context is incorporated before the instructions 25c and 25e, the context lifecycle logs 25d and 25f are thereby output. Registration of the newly generated tracking context in the tracking
命令25gは組込後プログラム9の実行時に処理される命令である。上述したログ出力設定プログラム3及びログ出力設定反映プログラム4により、この命令25gを実行した後の位置で生成されたトラッキングコンテキストを破棄する処理のコードが組み込まれているものとする。トラッキングコンテキストを破棄する処理によって、生成されたトラッキングコンテキスト(ここではコンテキストキー「RemoteID」とコンテキスト値「RC01」)がトラッキングコンテキスト管理プログラム7から削除され、削除を知らせるコンテキスト・ライフサイクルログが出力される。これにより、組込後プログラム9でトラッキングコンテキストが削除された箇所が、組込後プログラム9の動作追跡時の終点となる。
The instruction 25g is an instruction processed when the
命令25hと命令25iは命令25gと同様である。すなわち、命令25hと命令25iの後にトラッキングコンテキストを破棄するコードが組み込まれているので、これによりトラッキングコンテキストがトラッキングコンテキスト管理プログラム7から削除され、削除を知らせるコンテキスト・ライフサイクルログが出力される。これにより、組込後プログラム9でトラッキングコンテキストが削除された箇所が組込後プログラム9の動作追跡時の終点となる。命令25hではコンテキストキー「SessionID」とコンテキスト値「SC01」からなるトラッキングコンテキストが、命令25iではコンテキストキー「ThreadID」とコンテキスト値「TC01」からなるトラッキングコンテキストがそれぞれトラッキングコンテキスト管理プログラム7から削除される。
The instruction 25h and the instruction 25i are the same as the instruction 25g. That is, since the code for discarding the tracking context is incorporated after the instruction 25h and the instruction 25i, the tracking context is deleted from the tracking
命令26aは、組込後プログラム9の実行時に処理される命令である。上述したログ出力設定プログラム3及びログ出力設定反映プログラム4により、この命令26aを実行するときに実行情報ログを出力する実行情報ログ出力処理のコードが組み込まれているものとする。その実行情報ログ出力処理によって、実行情報ログ26bが出力される。実行情報ログ26bには、生成済みのトラッキングコンテキスト(トラッキングコンテキスト管理プログラム7に登録されているもの)が出力される。命令26aの時点では「ThreadID/TC01」が生成済みであるので、実行情報ログ26bではその生成済みトラッキングコンテキストが出力されている。これにより、実行情報ログと組込後プログラム9の命令との対応を取ることができ、特定のトラッキングコンテキストをもとに実行情報ログを辿ることで組込後プログラム9の命令を辿ることができ、組込後プログラム9の動作過程を追跡することができる。
The instruction 26a is an instruction processed when the
命令26c,26e,26gは、命令26aと同様である。すなわち、命令26c,26e,26gを実行するときに実行情報ログを出力するコードが組み込まれているので、これにより実行情報ログ26d,26f,26iが出力される。 The instructions 26c, 26e, and 26g are the same as the instruction 26a. That is, since the code for outputting the execution information log when the instructions 26c, 26e, and 26g are executed is incorporated, the execution information logs 26d, 26f, and 26i are thereby output.
矢印27aは、コンテキスト・ライフサイクルログ25bが保持する、新たに生成されたトラッキングコンテキストによって識別された命令群の範囲を表す。矢印27bも矢印27aと同様に、コンテキスト・ライフサイクルログ25dが保持する、新たに生成されたトラッキングコンテキストによって識別された命令群の範囲を表す。矢印27cも矢印27aと同様に、コンテキスト・ライフサイクルログ25fが保持する、新たに生成されたトラッキングコンテキストによって識別された命令群の範囲を表す。なお、コンテキスト・ライフサイクルログと実行情報ログの具体的なログフォーマットについては、図6,7で詳しく説明する。 The arrow 27a represents the range of the instruction group identified by the newly generated tracking context held by the context lifecycle log 25b. Similarly to the arrow 27a, the arrow 27b represents the range of the instruction group identified by the newly generated tracking context held by the context lifecycle log 25d. Similarly to the arrow 27a, the arrow 27c represents the range of the instruction group identified by the newly generated tracking context held by the context lifecycle log 25f. Specific log formats of the context / lifecycle log and the execution information log will be described in detail with reference to FIGS.
図3は、コンテキスト・ライフサイクルログ設定画面30の例を示す。コンテキスト・ライフサイクルログ設定画面30は、組込後プログラム9の動作過程を表すトラッキングコンテキスト21の生成箇所を指定する画面である。ユーザがログ出力設定プログラム3を起動するとログ出力設定プログラム画面が表示されるが、該画面ではコンテキスト・ライフサイクルログタグ35と実行情報ログタグ36が表示される。図3は、ログ出力設定プログラム画面中でコンテキスト・ライフサイクルログ設定画面30を表示する際に押すコンテキスト・ライフサイクルログタグ35を押したときの画面を示している。なお、ログ出力設定プログラム3を起動したときの初期画面は、コンテキスト・ライフサイクルログ設定画面30とする。
FIG. 3 shows an example of the context / lifecycle
図3のコンテキスト・ライフサイクルログ設定画面30において、トラッキングコンテキスト出力項目31は、出力するトラッキングコンテキストを決定する項目である。31a、31b、31cはそれぞれ組込後プログラム9の動作過程を追跡する項目にユーザが任意に指定した名前である。追加ボタン32は、新たにトラッキングコンテキスト出力項目31を追加する場合に押すボタンである。削除ボタン33は、トラッキングコンテキスト出力項目31において設定したトラッキングコンテキスト21を削除する場合に、削除する項目を選んでから押すボタンである。生成ボタン34は、図3の画面で設定したコンテキスト・ライフサイクルログの設定と後述する図5の画面で設定した実行情報ログの設定を組込前プログラム8に反映させるために使用するボタンである。
In the context / lifecycle
図4−1は、トラッキングコンテキスト設定画面40の例を示す。トラッキングコンテキスト設定画面40は、組込後プログラム9の実行中にトラッキングコンテキスト21を生成させる項目の追加を行う設定画面である。この画面40は、図3の画面で追加ボタン32を押したとき表示される。
FIG. 4A shows an example of the tracking
コンテキスト名41は、組込後プログラム9を追跡する動作過程を示す動作追跡名を入力する欄である。ここで入力した名前が、図3の画面30で31a,31b,31cのように表示される。
The context name 41 is a field for inputting an operation tracking name indicating an operation process for tracking the
パッケージ名42bとクラス名42cとメソッド名42dとメソッドシグネチャ42eは、それぞれトラッキングコンテキスト21を出力する箇所のパッケージ名、クラス名、メソッド名、及びメソッドシグネチャを入力する欄である。それぞれの欄にトラッキングコンテキストを生成させる箇所を入力するが、この入力に関して、「*」という文字が入力できる。「*」は、例えばクラスの指定に「Action*」と入力した場合、クラス名の先頭に"Action"という名前を持つクラス全てがコードを組み込む対象のクラスになることを意味する。
The
ルールタイプ42aは、「include」と「exclude」を持ち、どちらかを選択する。「include」が選択された場合は、42b〜42eで指定されたパッケージ、クラス、メソッド、及びメソッドシグネチャが組込前プログラム8内でマッチする箇所に、後述するトラッキングコンテキストコード入力欄43で記述されたコードが組み込まれ、プログラム実行中に当該コードが組み込まれた箇所でトラッキングコンテキストが生成出力される。「exclude」が選択された場合は、42b〜42eで指定されたパッケージ、クラス、メソッド、及びメソッドシグネチャの箇所がコードを組み込む対象から外される。トラッキングコンテキストコード入力欄43は、上記で指定した箇所に組み込むコードを記述する欄である。
The
追加ボタン44は、トラッキングコンテキスト21を出力する指定箇所を新たに追加するときに押すボタンである。削除ボタン45は、トラッキングコンテキスト21を出力する指定箇所を削除する場合に押すボタンである。
The add button 44 is a button that is pressed when a designated portion for outputting the tracking
生成タグ46は組込後プログラム9の実行中にトラッキングコンテキスト21を生成させるための設定を行う画面に切り替えるタグである。トラッキングコンテキスト設定画面40の初期画面は、生成タグ46を押した時の画面とする。破棄タグ47は生成したトラッキングコンテキスト21をトラッキングコンテキスト管理プログラム7から削除するための設定を行う画面に切り替えるタグである。
The
図4−2は破棄タグ47を押して表示される画面の例である。破棄タグ47を押して表示される設定画面は図4−1の設定画面と変わらず、設定する項目も同様に変わらない。また設定項目の内容は、トラッキングコンテキスト21の生成で設定した、トラッキングコンテキストコード入力欄43以外の項目の内容が反映される。
FIG. 4B is an example of a screen displayed when the discard tag 47 is pressed. The setting screen displayed by pressing the discard tag 47 is the same as the setting screen of FIG. 4A and the items to be set are not changed. The contents of the setting items reflect the contents of items other than the tracking context code input field 43 set in the generation of the tracking
図5は、実行情報ログ設定画面50の例を示す。この画面は、図3の画面において、実行情報ログタグ36を押すことにより表示される。実行情報ログ設定画面50は、組込前プログラム8に実行情報ログを出力するコードを組み込む箇所を設定する画面である。
FIG. 5 shows an example of the execution information
ルールタイプ51a、パッケージ名51b、クラス名51c、メソッド名51d、及びメソッドシグネチャ51eは、それぞれ、図4−1で説明したトラッキングコンテキスト21を出力する箇所の設定項目42a〜42eと同様に、実行情報ログを出力するコードを組み込む箇所の設定項目である。追加ボタン52は、実行情報ログを出力する指定箇所を追加する場合に押すボタンである。削除ボタン53は、指定箇所を削除する場合に押すボタンである。実行情報ログを出力するコードは規定のものであるので、図4−1のコード入力欄43のようなものは図5では不要である。
The rule type 51a, the
図6は、出力されるコンテキスト・ライフサイクルログ10のログフォーマットを示す図である。時間情報61は、当該コンテキスト・ライフサイクルログが組込後プログラム9から出力された時間を表す。生成済みコンテキストキー62aは、組込後プログラム9が当該コンテキスト・ライフサイクルログを出力する際にすでにトラッキングコンテキスト管理プログラム7に登録されているコンテキストキー22を表す。生成済みコンテキスト値62bは、組込後プログラム9が当該コンテキスト・ライフサイクルログを出力する際にすでにトラッキングコンテキスト管理プログラム7に登録されている前記コンテキストキー62aに従属するコンテキスト値23を表す。生成済みトラッキングコンテキスト62は、生成済みコンテキストキー62aと生成済みコンテキスト値62bからなるトラッキングコンテキストを表す。
FIG. 6 is a diagram showing a log format of the output context /
生成コンテキストキー63aは、組込後プログラム9が新たに生成したトラッキングコンテキストのコンテキストキーである。生成コンテキスト値63bは、組込後プログラム9が新たに生成したトラッキングコンテキストのコンテキスト値である。生成トラッキングコンテキスト63は、生成コンテキストキー63aと生成コンテキスト値63bからなるトラッキングコンテキストを表す。生成済みコンテキストキー62aと生成済みコンテキスト値62bとの間、及び、生成コンテキストキー63aと生成コンテキスト値63bとの間は、それぞれ「/」で区切る。またトラッキングコンテキストごとに「:」で区切る。生成済みトラッキングコンテキスト62は、複数列挙可能であり、生成トラッキングコンテキストが生成された順で出力される。
The generated context key 63a is a context key of a tracking context newly generated by the
コンテキスト・ライフサイクルログファイル64は、実際に出力されるコンテキスト・ライフサイクルログの例である。このコンテキスト・ライフサイクルログファイル64では、1行で1つのコンテキスト・ライフサイクルログを表記している。 The context life cycle log file 64 is an example of a context life cycle log that is actually output. In this context life cycle log file 64, one context life cycle log is described in one line.
図7は、出力される実行情報ログ11のログフォーマットを示す図である。時間情報71は、組込後プログラム9から当該実行情報ログが出力された時間を表す。クラス名72は、当該実行情報ログが出力されたクラスを表す。行番号73は、当該実行情報ログを出力するクラスファイルの行の数値を表す。生成済みコンテキストキー74aは、実行情報ログ設定画面50で指定した箇所においてトラッキングコンテキスト管理プログラム7が保持しているコンテキストキーを表す。生成済みコンテキスト値74bは、実行情報ログ設定画面50で指定した箇所においてトラッキングコンテキスト管理プログラム7が保持している生成済みコンテキストキー74aに従属したコンテキスト値を表す。生成済みトラッキングコンテキスト74は、生成済みコンテキストキー74aと生成済みコンテキスト値74bからなるトラッキングコンテキストである。生成済みコンテキストキー74aと生成済みコンテキスト値74bとの間は「/」で区切る。またトラッキングコンテキストごとに「:」で区切る。生成済みトラッキングコンテキスト74は、複数列挙可能であり、生成トラッキングコンテキストが生成された順で出力される。
FIG. 7 is a diagram showing a log format of the output
実行情報ログファイル75は、実際に出力される実行情報ログの例である。この実行情報ログファイル75では、1行で1つの実行情報ログを表記している。 The execution information log file 75 is an example of an execution information log that is actually output. In this execution information log file 75, one execution information log is described in one line.
図8−1は、関連付け定義プログラム5の実行画面を示す図である。すでに組込後プログラム9が実行され、コンテキスト・ライフサイクルログ10と実行情報ログ11が出力されているものとする。これらのログを参照したいユーザは、関連付け定義プログラム5を起動し、これにより図8−1の画面が表示される。
FIG. 8A is a diagram illustrating an execution screen of the
アイコン81は全てのログを表す図形である。アイコン81の右にアイコン81の名称が表示され、その名称は「ログ」と表示される。メニュー82は、アイコン81を右クリックした際に表示される項目である。「Correlation」82aは、メニュー82の項目の一つで、関連付けの実行を開始することを指示する項目である。この項目を選択することにより、コンテキスト・ライフサイクルログ10と実行情報ログ11との関連付けが実行される。この関連付けについては、後に詳しく説明する。
The icon 81 is a graphic representing all logs. The name of the icon 81 is displayed on the right of the icon 81, and the name is displayed as “log”. The
関連付けを実行した後、メニュー82の項目の一つである「Open Tree View」82bを選択して、コンテキストツリービュー表示プログラム6の実行を指示する。
After executing the association, “Open Tree View” 82b which is one of the items of the
図8−2は、コンテキストツリービュー表示プログラム6を実行する際の実行方法を示す図である。図8−1の画面から「Open Tree View」82bを選択すると、生成コンテキストキー一覧メニュー83が表示される。生成コンテキストキー一覧メニュー83は、上記「Correlation」82aを選択して関連付けを行った生成コンテキストキーの一覧を表示する。ただし、「決定」85はメニュー83に含まない。生成コンテキストキー一覧メニュー83中の「ThreadID」83aと「SessionID」83bは、生成コンテキストキーを表す。
FIG. 8-2 is a diagram illustrating an execution method when the context tree
生成コンテキストキー一覧サブメニュー84は、生成コンテキストキー一覧メニュー83で「ThreadID」83aを選択したときに表示されるサブメニューである。生成コンテキストキー一覧サブメニュー84は、生成コンテキストキー一覧メニュー83で選択されている「ThreadID」以外の生成コンテキストキーである「SessionID」84aと「決定」84bを表示する。同様に、生成コンテキストキー一覧メニュー83で「SessionID」83bを選択したときに表示される生成コンテキストキー一覧サブメニュー85を図示した。生成コンテキストキー一覧サブメニュー85は、生成コンテキストキー一覧メニュー83で選択されている「SessionID」以外の生成コンテキストキーである「ThreadID」85aと「決定」85bを表示する。さらに、生成コンテキストキー一覧サブメニュー84で「SessionID」84aを選択すると、その下位に生成コンテキストキー一覧サブメニュー86が表示される。また、生成コンテキストキー一覧サブメニュー85で「ThreadID」85aを選択すると、その下位に生成コンテキストキー一覧サブメニュー87が表示される。生成コンテキストキー一覧サブメニュー86や87では、それまでに選択された生成コンテキストキー以外の生成コンテキストキーは無いので「決定」のみが表示されている。「決定」は、生成コンテキストキーを選択し終えた場合にクリックする項目である。「決定」を選択すると、そこまでに選択した生成コンテキストキーの順でコンテキストツリービュー表示プログラム6が実行される。
The generation context
図9−1は、コンテキストツリービュー91の画面の一例を表す図である。コンテキストツリービュー91は、関連付け定義プログラム5によって関連付けされた実行情報ログを生成トラッキングコンテキストごとに分けて木構造で表示するものである。特に、コンテキストツリービュー91は、図8−2で「ThreadID」83a→「SessionID」84a→「決定」の順に選択した場合の画面である。
FIG. 9A is a diagram illustrating an example of a screen of the
アイコン92は、コンテキストツリービュー91のルートを表す。アイコン92の右にアイコン92の名称が表示され、動作過程を追跡するプログラム名が表示される。アイコン93aは、生成トラッキングコンテキストを表す。アイコン93aの隣にアイコン93aの名称が表示される。その名称は、関連付けで使用した生成コンテキストキーと生成コンテキスト値との組合せからなり、生成コンテキストキーと生成コンテキスト値の間を「/」で区切って表記する。アイコン93bとアイコン94aとアイコン94bはアイコン93aと同様である。アイコン95aは、関連付けした実行情報ログを表す。アイコン95bとアイコン95cもアイコン95aと同様である。線分96は、生成トラッキングコンテキスト同士の関連や生成トラッキングコンテキストと実行情報ログとの関連を表す。
The
「Source Code」97は、実行した組込後プログラム9のソースコードを表示するビューである。網掛け部分98は、コンテキストツリービュー91内の実行情報ログ95bをクリックした際に、実行情報ログ95bが出力された箇所に対応する命令を「Source Code」97内で指し示す印である。実行情報ログ95aや実行情報ログ95cでも、実行情報ログ95bと同様に、各実行情報ログ95aや95cをクリックすると、それらのログが出力された箇所に対応する命令が「Source Code」97内で指し示される。
“Source Code” 97 is a view for displaying the source code of the executed
図9−2は、図9−1と異なるコンテキストツリービュー91の画面の一例を示す図である。このコンテキストツリービューは、図8−2で「SessionID」83b→「ThreadID」85a→「決定」の順に選択した場合の画面である。アイコン94等は、図9−1のアイコンと同様のものである。実行情報ログのアイコンをクリックすると、「Source Code」97内の対応する箇所が網掛け表示される点も同じである。
FIG. 9B is a diagram illustrating an example of a screen of the
図10−1は、コンテキスト・ライフサイクルログ内でのトラッキングコンテキスト21の関連付けを示した図である。この図に示す関連付けは、図8−1の画面で「Correlation」82aを選択することによりメモリ上に生成される。
FIG. 10A is a diagram illustrating the association of the tracking
「生」100aは、生成トラッキングコンテキスト(図6の63)を示している。「ThreadID」100bは、「生」100aの生成コンテキストキーを表す。「TC01」100cは、「生」100aの生成コンテキスト値を示している。コンテキスト・ライフサイクルログ100は、「ThreadID」100bと「TC01」100cからなる「生」100aを含むログである。このコンテキスト・ライフサイクルログ100は、図6のコンテキスト・ライフサイクルログファイル64の1行目のコンテキスト・ライフサイクルログを読み出し、そこに含まれるトラッキングコンテキストに「生」100aを付してメモリ上に生成したものである。図6のコンテキスト・ライフサイクルログファイル64の1行目のコンテキスト・ライフサイクルログを読み出したとき、読み出したトラッキングコンテキスト「ThreadID/TC01」が初めて出現したものであることを検出し(トラッキングコンテキスト管理プログラム7への登録情報を参照することで検出できる)、従ってこれは生成トラッキングコンテキストであるので、「生」100aが付されている。なお、図10−1では、コンテキスト・ライフサイクルログ100に時間情報などを図示していないが、読み出したログの情報は全てログ100中に含まれるものとする。以下の他のログ101〜103についても同様である。
“Raw” 100a indicates a generation tracking context (63 in FIG. 6). “ThreadID” 100b represents a generation context key of “raw” 100a. “TC01” 100c indicates a generation context value of “raw” 100a. The
「済」101aは、生成済みトラッキングコンテキスト(図6の62)を示している。「ThreadID」101bは、「済」101aの生成済みコンテキストキーである。「TC01」101cは、「済」101aの生成済みコンテキスト値である。「生」101dは、「生」100aと同様に、「SessionID」101eという名称の生成コンテキストキーと「SC01」101fという値の生成コンテキスト値からなる生成トラッキングコンテキストであることを示している。コンテキスト・ライフサイクルログ101は、「済」101aと「生」101dを含むログである。このコンテキスト・ライフサイクルログ101は、図6のコンテキスト・ライフサイクルログファイル64の2行目のコンテキスト・ライフサイクルログを読み出し、そこに含まれる2つのトラッキングコンテキストにそれぞれ「済」101aと「生」101dを付してメモリ上に生成したものである。図6のコンテキスト・ライフサイクルログファイル64の2行目のコンテキスト・ライフサイクルログからは「ThreadID/TC01」と「SessionID/SC01」が読み出されるが、「ThreadID/TC01」は既に生成済みのトラッキングコンテキストであるので「済」101aが付され、「SessionID/SC01」は初めて出現したものであるので「生」101dが付されている。なお、「SessionID/SC01」は、「ThreadID/TC01」の下位のトラッキングコンテキストとして初めて出現したものであると判断されるものである。従って、同じ「SessionID/SC01」であっても、後述するコンテキスト・ライフサイクルログ103が保持する「SessionID/SC01」は、「ThreadID/TC02」の下位なので、既に「生」101dのトラッキングコンテキストがあっても、「ThreadID/TC02」の下位の「SessionID/SC01」としては初めて出現したものであるので「生」101dが付される。
“Done” 101a indicates a generated tracking context (62 in FIG. 6). “ThreadID” 101b is a generated context key of “Done” 101a. “TC01” 101c is the generated context value of “Done” 101a. “Raw” 101d indicates a generation tracking context including a generation context key named “SessionID” 101e and a generation context value “SC01” 101f, similarly to “raw” 100a. The
コンテキスト・ライフサイクルログ102は、コンテキスト・ライフサイクルログ100と同様に、「生」102aを含むログである。コンテキスト・ライフサイクルログ103は、コンテキスト・ライフサイクルログ101と同様に、「済」103aと「生」103dを含むログである。これらのログ102,103は、それぞれ、上述したのと同様にして、図6のコンテキスト・ライフサイクルログファイル64の3行目と4行目のコンテキスト・ライフサイクルログを読み出してメモリ上に生成したものである。
Similar to the
矢印104aは、コンテキスト・ライフサイクルログ100内の「生」100aのトラッキングコンテキストとコンテキスト・ライフサイクルログ101内の「済」101aのトラッキングコンテキストとを関連付ける矢印である。「生」100aの「ThreadID」100b及び「TC01」100cが、「済」101aの「ThreadID」101b及び「TC01」101cとそれぞれ等しいので、トラッキングコンテキスト21の等しいもの同士をつなぐ矢印104aを生成できる。この矢印104aにより、トラッキングコンテキストを生成した順にコンテキスト・ライフサイクルログ100とコンテキスト・ライフサイクルログ101を並び替えることができ、組込後プログラム9の動作過程をたどることができる。矢印104bも、同様にして、コンテキスト・ライフサイクルログ102と103との間で、トラッキングコンテキスト21が等しいもの同士をつなぐことで生成する。
An
矢印105は、「生」101dの「SessionID」101eと「SC01」101fが、「生」103dの「SessionID」103eと「SC01」103fとそれぞれ等しく、トラッキングコンテキスト21の等しいもの同士をつなぐことで、「生」101dと「生」103dが組込後プログラム9で同一の動作過程を示す矢印である。
Arrow 105 indicates that “SessionID” 101e and “SC01” 101f of “raw” 101d are equal to “SessionID” 103e and “SC01” 103f of “raw” 103d, respectively, and the
図10−2は、コンテキスト・ライフサイクルログと実行情報ログとの関連付けを示す図である。この図に示す関連付けは、図10−1と同じく、図8−1の画面で「Correlation」82aを選択することによりメモリ上に生成される。コンテキスト・ライフサイクルログ100,101,102,103及び矢印104a,104b,105は、上記の図10−1と同じものを示す。メモリ上に図10−1のように関連付けをした上に、重ねて実行情報ログとの関連付けを追加するものである。
FIG. 10B is a diagram illustrating an association between the context / lifecycle log and the execution information log. The association shown in this figure is generated on the memory by selecting “Correlation” 82a on the screen of FIG. 8-1 as in FIG. 10-1. The context lifecycle logs 100, 101, 102, 103 and the
「ThreadID」106bは、生成済みコンテキストキーの名称を示している。「TC01」106cは、生成済みコンテキスト値の値を示している。実行情報ログ106は、「ThreadID」106bという名称の生成済みコンテキストキーと「TC01」106cという値の生成済みコンテキスト値からなる生成済みトラッキングコンテキストを含むログである。この実行情報ログ106は、図7の実行情報ログファイル75の1行目の実行情報ログを読み出し、メモリ上に保持したものである。なお、図10−2では、実行情報ログ106に時間情報などを図示していないが、読み出したログの情報は全てログ106中に含まれるものとする。以下の他の実行情報ログ107,108についても同様である。
“ThreadID” 106b indicates the name of the generated context key. “TC01” 106c indicates the value of the generated context value. The execution information log 106 includes a generated tracking context including a generated context key named “ThreadID” 106 b and a generated context value “TC01” 106 c. The execution information log 106 is obtained by reading the execution information log on the first line of the execution information log file 75 of FIG. 7 and holding it in the memory. In FIG. 10B, time information and the like are not shown in the execution information log 106, but all the read log information is included in the
実行情報ログ107は、実行情報ログ106と同様に、「ThreadID」107bという名称の生成済みコンテキストキーと「TC01」107cという値の生成済みコンテキスト値からなる生成済みトラッキングコンテキストと、「SessionID」107eという名称の生成済みコンテキストキーと「SC01」107fという値の生成済みコンテキスト値からなる生成済みトラッキングコンテキストを含むログであることを示している。この実行情報ログ107は、図7の実行情報ログファイル75の2行目の実行情報ログを読み出し、メモリ上に保持したものである。 Similar to the execution information log 106, the execution information log 107 includes a generated tracking context including a generated context key named “ThreadID” 107b, a generated context value “TC01” 107c, and “SessionID” 107e. This indicates that the log includes a generated tracking context composed of a generated context key of the name and a generated context value of “SC01” 107f. The execution information log 107 is obtained by reading the execution information log on the second line of the execution information log file 75 of FIG. 7 and holding it in the memory.
実行情報ログ108は、実行情報ログ106と同様に、「ThreadID」108bと「TC02」108cからなる生成済みトラッキングコンテキストと、「SessionID」108eと「SC01」108fからなる生成済みトラッキングコンテキストと、「RemoteID」108hと「RC01」108iからなる生成済みトラッキングコンテキストを含むログであることを示している。この実行情報ログ108は、図7の実行情報ログファイル75の6行目の実行情報ログを読み出し、メモリ上に保持したものである。 Similar to the execution information log 106, the execution information log 108 includes a generated tracking context including “ThreadID” 108b and “TC02” 108c, a generated tracking context including “SessionID” 108e and “SC01” 108f, and “RemoteID”. ”108h and“ RC01 ”108i, the log includes a generated tracking context. The execution information log 108 is obtained by reading the execution information log on the sixth line of the execution information log file 75 of FIG. 7 and holding it in the memory.
矢印109aは、コンテキスト・ライフサイクルログ100内にある「ThreadID」100b及び「TC01」100cの「生」100aと等しい生成済みトラッキングコンテキストを保持する実行情報ログ106,107を、それぞれ、「生」100aから単方向で関連付けて、コンテキスト・ライフサイクルログ100が生成された後に実行情報ログ106,107が生成されたことを示す矢印である。 An arrow 109a indicates that the execution information logs 106 and 107 having generated tracking contexts equal to the “raw” 100a of “ThreadID” 100b and “TC01” 100c in the context lifecycle log 100 are “raw” 100a, respectively. Are the arrows indicating that the execution information logs 106 and 107 are generated after the context life cycle log 100 is generated.
矢印109bと矢印109cと矢印109dは、矢印109aと同様に、生成コンテキストキー22と生成コンテキスト値23が等しい生成済みトラッキングコンテキスト同士を関連付けることで、コンテキスト・ライフサイクルログ101,102,103が生成された後に実行情報ログ107,108,108がそれぞれ生成されたことを示す矢印である。
Similarly to the arrow 109a, the arrows 109b, 109c, and 109d generate the context lifecycle logs 101, 102, and 103 by associating the generated tracking contexts having the same generation context key 22 and the same
図10−3は、図8−2で「ThreadID」83a→「SessionID」84a→「決定」86の順に生成コンテキストキーを選択した場合に実行されるコンテキストツリービュー表示プログラム6の実行過程を示した図である。すでに関連付けは実行され、図10−1及び図10−2に示す情報がメモリ上に存在することを前提とする。
FIG. 10C shows an execution process of the context tree
集合110は、関連付け定義プログラム5に読み込まれたコンテキスト・ライフサイクルログを全て抽出したグループを表す。すなわち、図10−1及び図10−2のようにメモリ上に生成された中のコンテキスト・ライフサイクルログ100〜103等を全て抽出したものである。
A set 110 represents a group in which all the context lifecycle logs read by the
「ThreadID」111aは、生成コンテキストキーを表す。「TC01」111bは、生成コンテキスト値を表す。「C」111は、「ThreadID」111aと「TC01」111bからなる生成トラッキングコンテキストを保持するコンテキスト・ライフサイクルログであることを表す。「C」111は、図10−1及び図10−2で説明したコンテキスト・ライフサイクルログ100に対応するものである。 “ThreadID” 111a represents a generation context key. “TC01” 111b represents a generation context value. “C” 111 represents a context lifecycle log that holds a generated tracking context including “ThreadID” 111a and “TC01” 111b. “C” 111 corresponds to the context / lifecycle log 100 described with reference to FIGS. 10A and 10B.
「C」112は、「C」111と同様に、「SessionID」と「SC01」からなる生成トラッキングコンテキストを保持するコンテキスト・ライフサイクルログであることを表す。「C」112は、図10−1及び図10−2で説明したコンテキスト・ライフサイクルログ101に対応するものである。 Similarly to “C” 111, “C” 112 represents a context lifecycle log that holds a generated tracking context composed of “SessionID” and “SC01”. “C” 112 corresponds to the context / lifecycle log 101 described with reference to FIGS. 10A and 10B.
「C」113は、「C」111と同様に、「ThreadID」と「TC02」からなる生成トラッキングコンテキストを保持するコンテキスト・ライフサイクルログであることを表す。「C」113は、図10−1及び図10−2で説明したコンテキスト・ライフサイクルログ102に対応するものである。 Similarly to “C” 111, “C” 113 represents a context lifecycle log that holds a generated tracking context composed of “ThreadID” and “TC02”. “C” 113 corresponds to the context / lifecycle log 102 described with reference to FIGS. 10A and 10B.
「C」114は、「C」111と同様に、「SessionID」と「SC01」からなる生成トラッキングコンテキストを保持するコンテキスト・ライフサイクルログであることを表す。「C」114は、図10−1及び図10−2で説明したコンテキスト・ライフサイクルログ103に対応するものである。 Similarly to “C” 111, “C” 114 represents a context lifecycle log that holds a generated tracking context composed of “SessionID” and “SC01”. “C” 114 corresponds to the context life cycle log 103 described with reference to FIGS. 10A and 10B.
集合115は、関連付け定義プログラム5により、「C」111と関連付けられたコンテキスト・ライフサイクルログと実行情報ログを全て抽出したグループを表す。
The set 115 represents a group in which all of the context lifecycle log and execution information log associated with “C” 111 are extracted by the
集合116は、集合115と同様に、関連付け定義プログラム5により「C」113と関連付けられたコンテキスト・ライフサイクルログと実行情報ログを全て抽出したグループを表す。
Similar to the set 115, the set 116 represents a group in which all the context lifecycle logs and execution information logs associated with the “C” 113 are extracted by the
「ThreadID」117aは、生成済みコンテキストキーを表す。「TC01」117bは、生成済みコンテキスト値を表す。「E」117は、「ThreadID」117aと「TC01」117bからなる生成済みトラッキングコンテキストを保持する実行情報ログを表す。「E」117は、図10−2で説明した実行情報ログ106に対応するものである。 “ThreadID” 117a represents a generated context key. “TC01” 117b represents a generated context value. “E” 117 represents an execution information log that holds a generated tracking context including “ThreadID” 117 a and “TC01” 117 b. “E” 117 corresponds to the execution information log 106 described with reference to FIG.
「E」118は、「E」117と同様に、「ThreadID」と「TC01」からなる生成済みトラッキングコンテキストと「SessionID」と「SC01」からなる生成済みトラッキングコンテキストを保持する実行情報ログを表す。「E」118は、図10−2で説明した実行情報ログ107に対応するものである。 Similarly to “E” 117, “E” 118 represents an execution information log that holds a generated tracking context including “ThreadID” and “TC01” and a generated tracking context including “SessionID” and “SC01”. “E” 118 corresponds to the execution information log 107 described with reference to FIG.
「C」119は、「C」111と同様に、「SessionID」と「SC01」からなる生成トラッキングコンテキストを保持するコンテキスト・ライフサイクルログを表す。「C」119は、図10−2で説明したコンテキスト・ライフサイクルログ101に対応するものである。 Similarly to “C” 111, “C” 119 represents a context lifecycle log that holds a generated tracking context composed of “SessionID” and “SC01”. “C” 119 corresponds to the context lifecycle log 101 described with reference to FIG.
「E」120は、「E」117と同様に、「ThreadID」と「TC02」からなる生成済みトラッキングコンテキストと「SessionID」と「SC01」からなる生成済みトラッキングコンテキストと「RemoteID」と「RC01」からなる生成済みトラッキングコンテキストを保持する実行情報ログを表す。「E」120は、図10−2で説明した実行情報ログ108に対応するものである。 Similarly to “E” 117, “E” 120 includes a generated tracking context including “ThreadID” and “TC02”, a generated tracking context including “SessionID” and “SC01”, “RemoteID”, and “RC01”. Represents an execution information log that holds a generated tracking context. “E” 120 corresponds to the execution information log 108 described with reference to FIG.
「C」121は、「C」111と同様に、「SessionID」と「SC01」からなる生成トラッキングコンテキストを保持するコンテキスト・ライフサイクルログを表す。「C」121は、図10−2で説明したコンテキスト・ライフサイクルログ103に対応するものである。 Similarly to “C” 111, “C” 121 represents a context lifecycle log that holds a generated tracking context composed of “SessionID” and “SC01”. “C” 121 corresponds to the context / lifecycle log 103 described with reference to FIG.
「葉」付き矢印122は、「E」117を集合115から選択してコンテキストツリービュー91で葉として表示することを意味する。
An arrow 122 with “leaf” means that “E” 117 is selected from the set 115 and displayed as a leaf in the
集合123は、集合115と同様に、関連付け定義プログラム5により「C」119と関連付けられたコンテキスト・ライフサイクルログと実行情報ログを全て抽出したグループを表す。集合124は、集合115と同様に、関連付け定義プログラム5により「C」121と関連付けられたコンテキスト・ライフサイクルログと実行情報ログを全て抽出したグループを表す。
Similar to the set 115, the set 123 represents a group in which the context lifecycle log and the execution information log associated with “C” 119 are all extracted by the
「E」125は、「E」117と同様に、「ThreadID」と「TC01」からなる生成済みトラッキングコンテキストと「SessionID」と「SC01」からなる生成済みトラッキングコンテキストを保持する実行情報ログを表す。「E」125は、図10−2で説明した実行情報ログ107に対応するものである。 Similarly to “E” 117, “E” 125 represents an execution information log that holds a generated tracking context including “ThreadID” and “TC01” and a generated tracking context including “SessionID” and “SC01”. “E” 125 corresponds to the execution information log 107 described with reference to FIG.
「E」126は、「E」117と同様に、「ThreadID」と「TC02」からなる生成済みトラッキングコンテキストと「SessionID」と「SC01」からなる生成済みトラッキングコンテキストと「RemoteID」と「RC01」からなる生成済みトラッキングコンテキストを保持する実行情報ログを表す。「E」126は、図10−2で説明した実行情報ログ108に対応するものである。 Similarly to “E” 117, “E” 126 includes a generated tracking context including “ThreadID” and “TC02”, a generated tracking context including “SessionID” and “SC01”, “RemoteID”, and “RC01”. Represents an execution information log that holds a generated tracking context. “E” 126 corresponds to the execution information log 108 described with reference to FIG.
「葉」付き矢印127は、「葉」付き矢印122と同様に、「E」125を集合123から選択してコンテキストツリービュー91で葉として表示することを意味する。「葉」付き矢印128は、「葉」付き矢印122と同様に、「E」126を集合124から選択してコンテキストツリービュー91で葉として表示することを意味する。「枝」付き矢印129aは、「C」111と関連付けられたコンテキスト・ライフサイクルログと実行情報ログ全ての抽出を示し、かつ「C」111がコンテキストツリービュー91で節の要素として表示されることを意味する。「枝」付き矢印129bは、「枝」付き矢印129aと同様に、「C」113と関連付けられたコンテキスト・ライフサイクルログと実行情報ログ全ての抽出を示し、かつ「C」113がコンテキストツリービュー91で節の要素として表示されることを意味する。「枝」付き矢印129cは、「枝」付き矢印129aと同様に、「C」119と関連付けられたコンテキスト・ライフサイクルログと実行情報ログ全ての抽出を示し、かつ「C」119がコンテキストツリービュー91で節の要素として表示されることを意味する。「枝」付き矢印129dは、「枝」付き矢印129aと同様に、「C」121と関連付けられたコンテキスト・ライフサイクルログと実行情報ログ全ての抽出を示し、かつ「C」121がコンテキストツリービュー91で節の要素として表示されることを意味する。
The
図11は、本実施形態のシステム動作のフローチャート図である。 FIG. 11 is a flowchart of the system operation of this embodiment.
ログ出力開発環境1内のログ出力設定プログラム3を起動する(ステップ1101)。コンテキスト・ライフサイクルログ設定画面30(図3)と実行情報ログ設定画面50(図5)でそれぞれ出力する箇所を設定し、コンテキスト・ライフサイクルログ10と実行情報ログ11を出力するコードを組込前プログラム8に組み込む(ステップ1102、図12参照)。ログ出力設定プログラム3の設定の終了後、組込後プログラム9をアプリケーションサーバ2上で実行する(ステップ1103)。
The log
組込後プログラム9を実行すると、組込後プログラム9が、コンテキスト・ライフサイクルログ設定画面30で指定したメソッドの実行前で生成トラッキングコンテキストをトラッキングコンテキスト管理プログラム7に登録する処理を実行し、生成トラッキングコンテキストと生成済みトラッキングコンテキストをトラッキングコンテキスト管理プログラム7から取得し、コンテキスト・ライフサイクルログ10として出力する。また組込後プログラム9は、実行情報ログ設定画面50で指定したメソッドの実行時にトラッキングコンテキスト管理プログラム7に登録してあるトラッキングコンテキスト21を全て取得し、実行情報ログ11として出力する(ステップ1104)。
When the
ログ出力後、関連付け定義プログラム5を起動する(ステップ1105)。出力されたコンテキスト・ライフサイクルログ10と実行情報ログ11についてトラッキングコンテキスト21をもとに3種類の関連付けを行う(ステップ1106、図13参照)。関連付けした実行情報ログ11をコンテキストツリービュー表示プログラム6で表示する(ステップ1107、図14参照)。表示されたコンテキストツリービュー91内の実行情報ログをクリックする(ステップ1108)。実行情報ログをクリックすると、クリックした実行情報ログのクラス名と行番号の情報をもとに、実行情報ログを出力した箇所が「Source Code」97内に表示される(ステップ1109)。これにより組込後プログラム9の動作の追跡が可能となる。
After the log output, the
図12−1及び図12−2は、図11のステップ1102におけるログ出力設定プログラム3の操作のフローチャート図である。
12A and 12B are flowcharts of the operation of the log
ログ出力設定プログラム3でコンテキスト・ライフサイクルログタグ35をクリックして、コンテキスト・ライフサイクルログ設定画面30(図3)を開く(ステップ1201)。トラッキングコンテキスト出力項目31を新たに追加する場合はステップ1203へ進み、追加しない場合はステップ1207へ進む(ステップ1202)。
The context / life cycle log tag 35 is clicked in the log
追加する場合は、追加ボタン32をクリックする(ステップ1203)。追加ボタン32を押すと、トラッキングコンテキスト設定画面40(図4−1)が起動する(ステップ1204)。トラッキングコンテキスト設定画面40内のコンテキスト名称41、ルールタイプ42a、パッケージ名42b、クラス名42c、メソッド名42d、メソッドシグネチャ42e、及びトラッキングコンテキストコード入力欄43をそれぞれ入力して、ログ出力コードを組込前プログラム8に組み込む箇所を指定する(ステップ1205)。設定項目は上から順に実行され、ログ出力設定反映プログラム4に反映される。
When adding, the
コンテキスト名称41は、組込前プログラム8の動作過程を追跡する任意の名前を設定する。ルールタイプ42aは「include」か「exclude」のどちらかを選択する。パッケージ名42b、クラス名42c、メソッド名42d、及びメソッドシグネチャ42eは、指定箇所に対するそれぞれの名称を入力する。トラッキングコンテキストコード入力欄43に入力する内容は、トラッキングコンテキスト21をトラッキングコンテキスト管理プログラム7に登録する処理である。
As the context name 41, an arbitrary name for tracking the operation process of the
その入力例を、図4−1のトラッキングコンテキストコード入力欄43内に示す。はじめに、String型の変数idを定義する。変数idは、取得したコンテキスト値23を入力する際に使用する。次に、TrackingContextContainerクラスのgetInstanceメソッドを使用して、TrackingContextContainerクラスのインスタンスを取得する。TrackingContextContainerクラスはトラッキングコンテキスト管理プログラム7であり、トラッキングコンテキスト21を登録して、コンテキスト・ライフサイクルログと実行情報ログに出力するクラスである。次に、doGetメソッドの第一引数にアクセスする$argsという変数を用意する。$args[]はObject型配列の変数で、0番目の要素が第一引数を表す。ここでは$args[0]がdoGetメソッドの第一引数であるHttpServletRequestクラスに対応する。$args[0]を使用してHttpServletRequestクラスのgetSessionメソッドを呼び、HttpSessionオブジェクトを取得する。次に、HttpSessionクラスのgetIdメソッドを使用して、セッションIDを取得し、変数idに代入する。セッションIDは、アプリケーションサーバ2が保持しているセッションを一意に識別できる値である。TrackingContextContainerクラスのsetContextメソッドを使用して、コンテキストキー22とコンテキスト値23をトラッキングコンテキスト管理プログラム7に登録する。setContextメソッドは、第一引数にコンテキストキー22、第二引数にコンテキスト値23をとる。setContextメソッドで使用するコンテキストキー22について、組込後プログラム9の動作過程を識別できる任意の文字列を指定する。またsetContextメソッドで使用するコンテキスト値23については、セッションIDが格納されている変数idを指定する。
An example of the input is shown in the tracking context code input field 43 of FIG. First, define a string type variable id. The variable id is used when the acquired
以上のように入力した後、破棄タグ47をクリックする(ステップ1206)。破棄タグ47をクリックすると、生成されたトラッキングコンテキストを破棄する設定画面に変わり、未入力のトラッキングコンテキストコード入力欄43にトラッキングコンテキスト21を破棄するコードを入力する(ステップ1207)。トラッキングコンテキストコード入力欄以外の設定内容はトラッキングコンテキストの生成の際に設定した内容が反映されるので、既に入力されている。
After the input as described above, the discard tag 47 is clicked (step 1206). When the discard tag 47 is clicked, the screen changes to a setting screen for discarding the generated tracking context, and a code for discarding the tracking
その入力例を図4−2のトラッキングコンテキストコード入力欄43内に示す。トラッキングコンテキストの生成する設定画面のトラッキングコンテキストコード入力欄43内でトラッキングコンテキストを登録したtccオブジェクトと、TrackingContextContainerクラスのremoveContextメソッドを使用してトラッキングコンテキスト管理プログラム7に登録したトラッキングコンテキストを削除する。removeContextメソッドは引数に削除するトラッキングコンテキストのコンテキストキーをとる。
An example of the input is shown in the tracking context code input field 43 of FIG. The tracking context registered in the tracking
以上のように入力した後、終了ボタン46をクリックする(ステップ1208)。他にトラッキングコンテキスト出力項目31を追加する場合はステップ1202へ戻り、追加する手順を繰り返す。
After the input as described above, the
トラッキングコンテキスト出力項目31を追加するのでない場合はステップ1209に進む。トラッキングコンテキスト出力項目31を削除する場合はステップ1210へ進み、削除しない場合はステップ1212へ進む(ステップ1209)。トラッキングコンテキスト出力項目31を削除する場合は、削除する項目をクリックする(ステップ1210)。削除する項目をクリックした後に、削除ボタン33をクリックすると、トラッキングコンテキスト出力項目31から削除される(ステップ1211)。他にトラッキングコンテキスト出力項目を削除する場合はステップ1209へ戻り、削除する手順を繰り返す。
If the tracking
トラッキングコンテキスト出力項目31を削除しない場合は、コンテキスト・ライフサイクルログの設定を終了し、実行情報ログタグ36をクリックする(ステップ1212)。
If the tracking
組込前プログラム8に実行情報ログを出力する指定箇所を追加する場合はステップ1214へ進み、追加しない場合はステップ1216へ進む(ステップ1213)。指定箇所を追加する場合は、追加ボタン52をクリックする(ステップ1214)。ルールタイプ51a、パッケージ名51b、クラス名51c、メソッド名51d、及びメソッドシグネチャ51eをそれぞれ入力し、実行情報ログの出力コードを組込前プログラム8に組み込む箇所を指定する(ステップ1215)他に追加する箇所がある場合はステップ1213へ戻り、追加する手順を繰り返す。
If a designated location for outputting an execution information log is added to the
指定箇所を追加しない場合は、ステップ1216へ進む。指定箇所を削除する場合はステップ1217へ進み、削除しない場合はステップ1219へ進む(ステップ1216)。指定箇所を削除する場合、削除する項目をクリックする(ステップ1217)。その後に削除ボタン53をクリックする(ステップ1218)。他に削除する箇所がある場合はステップ1216へ戻り、削除する手順を繰り返す。 If the designated location is not added, the process proceeds to step 1216. If the designated location is to be deleted, the process proceeds to step 1217; otherwise, the process proceeds to step 1219 (step 1216). When deleting the designated part, the item to be deleted is clicked (step 1217). Thereafter, the delete button 53 is clicked (step 1218). If there is another part to be deleted, the process returns to step 1216 to repeat the deletion procedure.
削除する箇所がない場合は、生成ボタン34をクリックする(ステップ1219)。生成ボタン34をクリックすることで、ログ出力設定反映プログラム4がログ出力設定プログラム3の設定項目を読み込み、組込前プログラム8中の指定箇所にそれぞれのログ出力コードを組み込み、組込後プログラム9を生成する(ステップ1220)。
If there is no part to be deleted, the generation button 34 is clicked (step 1219). When the generation button 34 is clicked, the log output
図13は、図11のステップ1106の関連付け定義プログラム5を実行する手順を示したフローチャート図である。
FIG. 13 is a flowchart showing a procedure for executing the
図8−1においてアイコン81を右クリックする(ステップ1301)。右クリックするとメニュー82が表示される(ステップ1302)。メニュー82の項目から「Correlation」82aを選択する(ステップ1303)。「Correlation」82aを選択すると、関連付け定義プログラム5が呼び出され(ステップ1304)、3種類の関連付けを実行する。
In FIG. 8A, the icon 81 is right-clicked (step 1301). Right-clicking displays a menu 82 (step 1302). “Correlation” 82a is selected from the items of the menu 82 (step 1303). When “Correlation” 82a is selected, the
まず1つ目の関連付けとして、コンテキスト・ライフサイクルログ内にある生成済みトラッキングコンテキストと、生成トラッキングコンテキストが等しい場合に、トラッキングコンテキスト21の生成した順番を示す関連付けを行う(ステップ1305)。これは、図10−1の矢印104a,104bを生成する関連付けである。2つ目の関連付けとして、コンテキスト・ライフサイクルログ内にある等しい生成トラッキングコンテキスト同士が存在する場合に、組込後プログラム9の同一の動作過程を示す関連付けを行う(ステップ1306)。これは、図10−1の矢印105を生成する関連付けである。さらに、3つ目の関連付けとして、コンテキスト・ライフサイクルログ内の生成トラッキングコンテキストと、実行情報ログ内の生成済みトラッキングコンテキストが等しい場合に、コンテキスト・ライフサイクルログの後に実行情報ログが生成されたことを示す関連付けを行う(ステップ1307)。これは、図10−2の矢印109a,109b,109c,109dを生成する関連付けである。
First, as the first association, when the generated tracking context in the context / lifecycle log is equal to the generated tracking context, an association indicating the generation order of the tracking
図14は、図11のステップ1107のコンテキストツリービュー表示プログラム6の実行手順を示したフローチャート図である。
FIG. 14 is a flowchart showing an execution procedure of the context tree
関連付け定義プログラム5の実行後、アイコン81を右クリックする(ステップ1401)。右クリックすると、メニュー82が表示される(ステップ1402)。メニュー82の項目の中から「Open Tree View」82bを選択する(ステップ1403)。「Open Tree View」82bを選択すると、生成コンテキストキー一覧メニュー83が表示される(ステップ1404)。生成コンテキストキー一覧メニュー83の中から生成コンテキストキーを選択する(ステップ1405)。生成コンテキストキー一覧メニュー83で生成コンテキストキーを選択した後、生成コンテキストキー一覧サブメニュー84,85が表示され、そこにステップ1405で選択した生成コンテキストキー以外の生成コンテキストキーが表示される(ステップ1406)。選択する項目が生成コンテキストキーの場合はステップ1408へ進み、「決定」の場合はステップ1409へ進む(ステップ1407)。
After execution of the
選択する項目が生成コンテキストキーの場合、その生成コンテキストキーを選択する(ステップ1408)。生成コンテキストキー選択後、ステップ1406へ戻り、そこまでに選択した生成コンテキストキー以外の生成コンテキストキーが生成コンテキストキー一覧サブメニューに表示される。選択する項目がステップ1407で「決定」の場合、「決定」を選択する(ステップ1409)。「決定」選択後、それまでに選択した生成コンテキストキーを、その選択の順で、生成コンテキストキーを保持する配列に格納する(ステップ1410)。生成コンテキストキーを配列に格納した後、コンテキストツリービュー表示プログラム6の実行が始まる(ステップ1411)。
If the item to be selected is a generation context key, the generation context key is selected (step 1408). After selecting the generation context key, the process returns to step 1406, and generation context keys other than the generation context key selected so far are displayed in the generation context key list submenu. If the item to be selected is “decision” in step 1407, “decision” is selected (step 1409). After selecting “Determine”, the generated context keys selected so far are stored in an array holding the generated context keys in the order of selection (step 1410). After storing the generated context key in the array, the execution of the context tree
図15は、図14のステップ1411、すなわち図8−2で「決定」を選択した後に、選択された生成コンテキストキーの順でコンテキストツリービュー91を表示する過程を示したフローチャート図である。ここでは、図8−2で「ThreadID」83a、「SessionID」84a、「決定」86の順に生成コンテキストキーを選択した場合で説明する。また、コンテキストツリービュー表示プログラム6の実行過程を示した図10−3と、図10−3の実行結果を表示した図9−1を用いて説明する。
FIG. 15 is a flowchart showing a process of displaying the
生成コンテキストキーを選択順に配列に格納した後、図8−2で選択した生成コンテキストキーを順に格納した配列の各要素を指すための添え字を0に設定する(ステップ1501)。次に、関連付け定義プログラム5で関連付けされたコンテキスト・ライフサイクルログを全て抽出する(ステップ1502)。図10−3では、抽出したコンテキスト・ライフサイクルログが「C」111、「C」112、「C」113、及び「C」114である。次に、現在の添え字に対応する配列要素を取得する(ステップ1503)。取得した配列要素が生成コンテキストキーの場合はステップ1505へ進み、「決定」の場合はステップ1512へ進む(ステップ1504)。
After the generation context keys are stored in the array in the order of selection, a subscript for indicating each element of the array in which the generation context keys selected in FIG. 8-2 are stored in order is set to 0 (step 1501). Next, all the context life cycle logs associated with the
ステップ1502で取得した配列要素が生成コンテキストキーの場合、ステップ1502で抽出したコンテキスト・ライフサイクルログの中から、取得した生成コンテキストキーを保持するコンテキスト・ライフサイクルログを選択する(ステップ1505)。図10−3では、最初に取得した生成コンテキストキーが「ThreadID」であるので、「C」111と「C」113を選択する。
If the array element acquired in
次に、選択したコンテキスト・ライフサイクルログと関連付けられたコンテキスト・ライフサイクルログと実行情報ログを全て抽出する(ステップ1506)。図10−3では「C」111(図10−2の100)に対して、図10−2の矢印104aと矢印109aによって関連付けられた「C」119(図10−2の101)と「E」117(図10−2の106)と「E」118(図10−2の107)を抽出する。同様に、「C」113(図10−2の102)に対して、図10−2の矢印104bと矢印109cによって関連付けられた「C」121(図10−2の103)と「E」120(図10−2の108)を抽出する。
Next, all the context life cycle logs and execution information logs associated with the selected context life cycle log are extracted (step 1506). In FIG. 10C, “C” 111 (101 in FIG. 10-2) and “E” associated with the
次に、選択したコンテキスト・ライフサイクルログを、コンテキストツリービューで節の要素として表示する(ステップ1507)。図10−3では、「C」111をコンテキストツリービュー91で節として表示することを「枝」付き矢印129aで示している。「C」111は、図9−1の93aのように表示される。「C」111と同様に、「C」113をコンテキストツリービュー91で節として表示することを「枝」付き矢印129bで示している。「C」113は、図9−1の93bのように表示される。但し、選択したコンテキスト・ライフサイクルログの中で、同一の生成トラッキングコンテキストを保持するコンテキスト・ライフサイクルログが2個以上存在する場合、コンテキストツリービュー91では1個の節として表示される。
Next, the selected context / lifecycle log is displayed as a section element in the context tree view (step 1507). In FIG. 10C, displaying “C” 111 as a node in the
ステップ1506において抽出した実行情報ログの中に、これまで取得した全ての生成コンテキストキーのみを保持する実行情報ログがある場合はステップ1509へ進み、ない場合は1511へ進む(ステップ1508)。 If the execution information log extracted in step 1506 includes an execution information log that holds only all the generated context keys acquired so far, the process proceeds to step 1509, and if not, the process proceeds to 1511 (step 1508).
これまで取得した全ての生成コンテキストキーのみを保持する実行情報ログがある場合、該当する実行情報ログを選択する(ステップ1509)。図10−3では、配列要素から取得した生成コンテキストキー「ThreadID」のみを保持する「E」117を選択する。選択した実行情報ログをコンテキストツリービュー91の葉として表示し(ステップ1510)、ステップ1511へ進む。図10−3では、選択した「E」117をコンテキストツリービュー91の葉の要素として、図9−1のアイコン95aに表示することを、「葉」付き矢印122で示している。
If there is an execution information log that holds only all the generated context keys acquired so far, the corresponding execution information log is selected (step 1509). In FIG. 10C, “E” 117 holding only the generation context key “ThreadID” acquired from the array element is selected. The selected execution information log is displayed as a leaf of the context tree view 91 (step 1510), and the process proceeds to step 1511. In FIG. 10C, an arrow 122 with a “leaf” indicates that the selected “E” 117 is displayed as the leaf element of the
ステップ1510の処理終了後、またはステップ1508においてこれまで取得した全ての生成コンテキストキーのみを保持する実行情報ログがない場合、生成コンテキストキーを格納している配列の添え字に1を加えて(ステップ1511)、ステップ1503に戻り、上記の手順を繰り返す。図10−3では、添え字に1を加えた値に対応する配列要素が「SessionID」であるので、ステップ1504から1505に進み、集合115から「C」119(図10−2の101)を選択する(ステップ1505)。選択した「C」119に対して、図10−2の矢印109bによって関連付けられた「E」125(図10−2の107)を抽出する(ステップ1506)。選択した「C」119は、コンテキストツリービュー91で「C」111の次の節の要素とし、図9−1の94aのように表示される(ステップ1507)。抽出した「E」125はこれまで取得した全ての生成コンテキストキー「ThreadID」と「SessionID」のみを保持する実行情報ログであるので、ステップ1508から1509へ進み、集合123から「E」125を選択して「葉」付き矢印127により、コンテキストツリービュー91の葉の要素として表示する(ステップ1509,1510)。「E」125は、図9−1のアイコン95bのように表示される。さらに、集合115と同様に集合116から「C」121を選択し、「C」121と図10−2の矢印109dによって関連付けられた「E」126を抽出する。選択した「C」121はコンテキストツリービュー91で「C」113の次の節の要素とし、「C」121は図9−1の94bのように表示される。
After the processing of step 1510 or when there is no execution information log that holds only all the generated context keys acquired so far in
ステップ1504において、取得した配列要素が「決定」である場合、「決定」の一つ前で取得した生成コンテキストキーを保持するコンテキスト・ライフサイクルログと関連付けられた実行情報ログ全てをコンテキストツリービュー91の葉の要素として表示する(ステップ1512)。図10−3では、「SessionID」の次に取得した配列要素が「決定」であるので、集合124の「E」126を選択して「葉」付き矢印128により、コンテキストツリービュー91で葉の要素として表示する。「E」126は、図9−1のアイコン95cのように表示される。
In step 1504, when the acquired array element is “determination”, all the execution information logs associated with the context lifecycle log holding the generated context key acquired immediately before “determination” are displayed in the
以上より、コンテキストツリービュー表示プログラム6の実行が完了する。完成したコンテキストツリービュー91の例を図9−1と図9−2に示す。
Thus, the execution of the context tree
図9−2は、図8−2の「Open Tree View」82bから「SessionID」83b、「ThreadID」85a、「決定」87の順で選択した際に表示されるコンテキストツリービュー91の図である。
FIG. 9B is a diagram of the
1…ログ出力開発環境、2…アプリケーションサーバ、3…ログ出力設定プログラム、4…ログ出力設定反映プログラム、5…関連付け定義プログラム、6…コンテキストツリービュー表示プログラム、7…トラッキングコンテキスト管理プログラム、8…組込前プログラム、9…組込後プログラム、10…コンテキスト・ライフサイクルログ、11…実行情報ログ。
DESCRIPTION OF
Claims (4)
コンピュータが備えるログ出力設定手段が、ログを取る対象のプログラムである組込前プログラム中のプログラム追跡開始箇所及びプログラム追跡箇所を設定する工程と、
コンピュータが備えるログ出力設定反映手段が、前記組込前プログラムに対して、前記設定されたプログラム追跡開始箇所に、前記組込前プログラムの動作過程を示す追跡キーと前記追跡キーに従属する追跡値で構成される追跡属性を生成し登録追跡属性として登録するとともに、既に登録されている登録済み追跡属性と新たに生成された登録追跡属性を含む動作開始ログを出力するコードを組み込み、前記設定されたプログラム追跡箇所に、前記登録済み追跡属性を取得し該登録済み追跡属性を含んだ動作ログを出力するコードを組み込んで、組込後プログラムを生成する工程と、
コンピュータが備えるプログラム実行手段が、前記組込後プログラムを実行し、前記プログラム追跡開始箇所に組み込まれたコードを実行することにより前記動作開始ログを出力し、前記プログラム追跡箇所に組み込まれたコードを実行することにより前記動作ログを出力する工程と、
コンピュータが備える関連付け手段が、前記動作開始ログと前記動作ログ中の追跡属性を関連付ける工程と、
コンピュータが備える表示手段が、前記関連付けた追跡属性を、該関連性が分るように表示する工程と
を備えたことを特徴とするプログラム動作追跡支援表示方法。 A program operation tracking support display method in a program operation tracking support display system constructed using a computer,
The log output setting means provided in the computer sets the program tracking start location and the program tracking location in the pre-embedding program that is the program to be logged, and
The log output setting reflecting means provided in the computer includes a tracking key indicating an operation process of the pre-embedded program at the set program tracking start location and a tracking value subordinate to the tracking key with respect to the pre-embedded program. The tracking attribute is configured to be registered and registered as a registered tracking attribute, and a code for outputting an operation start log including a registered tracking attribute that has already been registered and a newly generated registered tracking attribute is incorporated and set as described above. Incorporating the code for obtaining the registered tracking attribute and outputting the operation log including the registered tracking attribute into the program tracking location, and generating a program after installation;
The program execution means provided in the computer executes the post-installation program, outputs the operation start log by executing the code incorporated in the program tracking start location, and outputs the code incorporated in the program tracking location. A step of outputting the operation log by executing;
Associating means provided in the computer associating the operation start log with the tracking attribute in the operation log;
A program operation tracking support display method, characterized in that: a display means provided in the computer includes a step of displaying the associated tracking attributes so that the association is known.
前記動作開始ログと前記動作ログ中の追跡属性を関連付ける工程は、
前記動作開始ログに含まれる前記登録済み追跡属性である動作開始ログ登録済み追跡属性と、前記動作開始ログに含まれる前記登録追跡属性である動作開始ログ登録追跡属性と、前記動作ログに含まれる前記登録済み追跡属性である動作ログ登録済み追跡属性とを抽出し、
前記動作開始ログ登録済み追跡属性と前記動作開始ログ登録追跡属性とを関連付けることにより、前記動作開始ログ同士を関連付けし、
2つの前記動作開始ログ登録追跡属性を関連付けることにより、前記動作開始ログ同士を関連付けし、
前記動作開始ログ登録追跡属性と前記動作ログ登録済み追跡属性とを関連付けることにより、前記動作開始ログと前記動作ログとを関連付けするものであり、
前記表示する工程は、
前記動作開始ログ登録追跡属性が保持する前記追跡キーを順序づけて選択し、
その追跡キーの順序に応じて、前記関連付けされた動作開始ログ及び動作ログを分類し、分類した動作開始ログと動作ログを表示する
ものであることを特徴とするプログラム動作追跡支援表示方法。 The program operation tracking support display method according to claim 1,
The step of associating the operation start log with the tracking attribute in the operation log includes:
The operation start log registered tracking attribute that is the registered tracking attribute included in the operation start log, the operation start log registration tracking attribute that is the registered tracking attribute included in the operation start log, and included in the operation log Extracting the registered tracking attribute and the action log registered tracking attribute;
By associating the operation start log registered tracking attribute with the operation start log registration tracking attribute, the operation start logs are associated with each other,
By associating the two operation start log registration tracking attributes, the operation start logs are associated with each other,
Correlating the operation start log and the operation log by associating the operation start log registration tracking attribute and the operation log registered tracking attribute;
The displaying step includes
In order to select the tracking key held by the operation start log registration tracking attribute,
The program operation tracking support display method characterized by classifying the associated operation start log and operation log according to the order of the tracking keys, and displaying the classified operation start log and operation log.
前記ログ出力設定環境は、
前記プログラムの動作過程を示す追跡キーと前記追跡キーに従属する追跡値で構成される追跡属性を定義する手段と、
前記プログラムの追跡を開始するプログラム追跡開始箇所を定義する手段と、
前記プログラム追跡開始箇所に対応する前記プログラムの命令箇所の前に、前記追跡属性を保持する追跡属性保持プログラムに前記追跡属性を登録追跡属性として登録する手段と、
前記追跡属性保持プログラムに前記登録追跡属性の登録時に、前記追跡属性保持プログラムに登録済みである登録済み追跡属性と前記登録追跡属性を取得し、前記登録済み追跡属性と前記登録追跡属性を含んだ動作開始ログを出力するプログラム追跡開始処理を前記プログラムに組み込む手段と、
前記プログラムを追跡するプログラム追跡箇所を定義する手段と、
前記プログラム追跡箇所に対応する前記プログラムの命令箇所の後ろに、前記登録済み追跡属性を取得し、前記登録済み追跡属性を含んだ動作ログを出力するプログラム追跡処理を前記プログラムに組み込む手段と、
前記プログラム追跡開始処理と前記プログラム追跡処理を組み込んだ前記組み込み済みプログラムを生成する手段と
を備え、
前記プログラム実行環境は、
前記組み込み済みプログラムを実行する手段と、
前記プログラム追跡開始箇所に対応する前記組み込み済みプログラムの命令が実行されたときに前記動作開始ログを出力する手段と、
前記プログラム追跡箇所に対応する前記組み込み済みプログラムの命令が実行されたときに前記動作ログを出力する手段と
を備え、
前記ログ解析環境は、
前記動作開始ログと前記動作ログを読み込む手段と、
前記動作開始ログに含まれる前記登録済み追跡属性である動作開始ログ登録済み追跡属性と、前記動作開始ログに含まれる登録追跡属性である動作開始ログ登録追跡属性と、前記動作ログに含まれる前記登録済み追跡属性である動作ログ登録済み追跡属性を抽出する手段と、
前記動作開始ログ登録済み追跡属性と前記動作開始ログ登録追跡属性を関連付け、前記動作開始ログ同士を関連付けする関連付け手段1と、
2つの前記動作開始ログ登録追跡属性を関連付け、前記動作開始ログ同士を関連付けする関連付け手段2と、
前記動作開始ログ登録追跡属性と前記動作ログ登録済み追跡属性を関連付け、前記動作開始ログと前記動作ログの関連付けする関連付け手段3と、
前記動作開始ログ登録追跡属性が保持する前記追跡キーを順序づけて選択する追跡キー順序選択手段と、
選択した前記追跡キーのうち一つを処理中追跡キーとして取得する手段と、
前記ログ解析環境に読み込まれた前記動作開始ログ全てを分類対象集合として抽出する手段と、
前記処理中追跡キーと合致する前記追跡キーを保持する前記動作開始ログ登録追跡属性を保持する動作開始ログを、前記分類対象集合から分類済み動作開始ログとして抽出する抽出手段1と、
関連付け手段1、関連付け手段2、関連付け手段3を用いて、前記分類済み動作開始ログに関連付けられた前記動作開始ログ、前記動作ログを前記分類対象集合として抽出する抽出手段2と、
取得済みである前記処理中追跡キー全てを保持する前記動作ログ登録済み追跡属性を保持する前記動作ログを、前記分類対象集合から分類済み動作ログとして抽出する抽出手段3と、
前記処理中追跡キーを選択順に取得し、取得した前記処理中追跡キーごとに前記抽出手段1、前記抽出手段2、前記抽出手段3を実行することにより前記動作開始ログ、前記動作ログを分類する手段と、
前記分類済み動作開始ログと前記分類済み動作ログを表示する手段と
を備えたことを特徴とするプログラム動作追跡支援表示システム。 A log output setting environment configured to set a location where a log output code is incorporated into a program, constructed using one or more computers, and a program execution environment for executing an embedded program in which the log output code is incorporated into the program; A log analysis environment for analyzing a log output by the embedded program,
The log output setting environment is as follows:
Means for defining a tracking attribute composed of a tracking key indicating an operation process of the program and a tracking value subordinate to the tracking key;
Means for defining a program tracking start location for starting tracking of the program;
Means for registering the tracking attribute as a registered tracking attribute in a tracking attribute holding program that holds the tracking attribute before the instruction location of the program corresponding to the program tracking start location;
When registering the registered tracking attribute in the tracking attribute holding program, the registered tracking attribute registered in the tracking attribute holding program and the registered tracking attribute are acquired, and the registered tracking attribute and the registered tracking attribute are included. Means for incorporating a program tracking start process for outputting an operation start log into the program;
Means for defining a program tracking location for tracking the program;
Means for acquiring the registered tracking attribute behind the command location of the program corresponding to the program tracking location, and incorporating program tracking processing into the program for outputting an operation log including the registered tracking attribute;
And means for generating the embedded program incorporating the program tracking start process and the program tracking process,
The program execution environment is:
Means for executing the embedded program;
Means for outputting the operation start log when an instruction of the embedded program corresponding to the program tracking start location is executed;
Means for outputting the operation log when an instruction of the embedded program corresponding to the program tracking location is executed,
The log analysis environment is:
Means for reading the operation start log and the operation log;
The operation start log registered tracking attribute that is the registered tracking attribute included in the operation start log, the operation start log registration tracking attribute that is a registered tracking attribute included in the operation start log, and the operation log included in the operation log A means for extracting the action log registered tracking attribute which is a registered tracking attribute;
Associating means 1 for associating the operation start log registered tracking attribute with the operation start log registration tracking attribute and associating the operation start logs with each other;
Associating means 2 for associating two operation start log registration tracking attributes and associating the operation start logs with each other;
Associating means 3 for associating the operation start log registration tracking attribute with the operation log registered tracking attribute, and associating the operation start log with the operation log;
Tracking key order selection means for selecting the tracking keys held by the operation start log registration tracking attribute in order;
Means for obtaining one of the selected tracking keys as a processing tracking key;
Means for extracting all the operation start logs read into the log analysis environment as a classification target set;
An extraction means 1 for extracting an operation start log holding the operation start log registration tracking attribute that holds the tracking key that matches the processing tracking key as a classified operation start log from the classification target set;
Using the association unit 1, the association unit 2 and the association unit 3 to extract the operation start log associated with the classified operation start log and the operation log as the classification target set; and
Extraction means 3 for extracting the action log holding the action log registered tracking attribute that holds all of the processing tracking keys that have been acquired as a classified action log from the classification target set;
The in-process tracking keys are acquired in the order of selection, and the operation start log and the operation log are classified by executing the extraction unit 1, the extraction unit 2, and the extraction unit 3 for each acquired in-process tracking key. Means,
A program operation tracking support display system comprising: the classified operation start log; and means for displaying the classified operation log.
前記ログ解析環境では、前記分類済み動作開始ログを木構造での節とし、前記分類済み動作ログを木構造での葉として、前記組み込み済みプログラムの動作を木構造で表示することを特徴とするプログラム動作追跡支援表示システム。 The program operation tracking support display system according to claim 3,
In the log analysis environment, the classified operation start log is a node in a tree structure, the classified operation log is a leaf in a tree structure, and the operation of the embedded program is displayed in a tree structure. Program operation tracking support display system.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005247271A JP2007065718A (en) | 2005-08-29 | 2005-08-29 | Display method and system for supporting tracing program operation processes |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005247271A JP2007065718A (en) | 2005-08-29 | 2005-08-29 | Display method and system for supporting tracing program operation processes |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2007065718A true JP2007065718A (en) | 2007-03-15 |
Family
ID=37927901
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005247271A Pending JP2007065718A (en) | 2005-08-29 | 2005-08-29 | Display method and system for supporting tracing program operation processes |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2007065718A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009053740A (en) * | 2007-08-23 | 2009-03-12 | Internatl Business Mach Corp <Ibm> | System, method, and computer program for recording operation log |
JP2011008395A (en) * | 2009-06-24 | 2011-01-13 | Renesas Electronics Corp | Debugging support apparatus and debugging support method |
JP2021502658A (en) * | 2017-11-13 | 2021-01-28 | アビニシオ テクノロジー エルエルシー | Key-based logging for processing structured data items using executable logic |
JP2021018565A (en) * | 2019-07-19 | 2021-02-15 | 富士通株式会社 | Information processing program, information processing device and information processing method |
CN115964689A (en) * | 2023-02-02 | 2023-04-14 | 国城科技(成都)有限公司 | Computer system resource access method based on user entity |
US11645138B2 (en) | 2020-07-01 | 2023-05-09 | International Business Machines Corporation | Diagnosing and resolving technical issues |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH03260742A (en) * | 1990-03-12 | 1991-11-20 | Hitachi Ltd | Program trace display method |
JP2000267898A (en) * | 1999-03-19 | 2000-09-29 | Denso Corp | Program execution history recorder and recording medium |
JP2002116928A (en) * | 2000-06-16 | 2002-04-19 | Fujitsu Ltd | Recording system for recording processing information of plural systems |
JP2003022201A (en) * | 2001-07-06 | 2003-01-24 | Mitsubishi Electric Corp | Method for debugging program |
-
2005
- 2005-08-29 JP JP2005247271A patent/JP2007065718A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH03260742A (en) * | 1990-03-12 | 1991-11-20 | Hitachi Ltd | Program trace display method |
JP2000267898A (en) * | 1999-03-19 | 2000-09-29 | Denso Corp | Program execution history recorder and recording medium |
JP2002116928A (en) * | 2000-06-16 | 2002-04-19 | Fujitsu Ltd | Recording system for recording processing information of plural systems |
JP2003022201A (en) * | 2001-07-06 | 2003-01-24 | Mitsubishi Electric Corp | Method for debugging program |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009053740A (en) * | 2007-08-23 | 2009-03-12 | Internatl Business Mach Corp <Ibm> | System, method, and computer program for recording operation log |
US8554740B2 (en) | 2007-08-23 | 2013-10-08 | International Business Machines Corporation | Recording a log of operations |
JP2011008395A (en) * | 2009-06-24 | 2011-01-13 | Renesas Electronics Corp | Debugging support apparatus and debugging support method |
JP2021502658A (en) * | 2017-11-13 | 2021-01-28 | アビニシオ テクノロジー エルエルシー | Key-based logging for processing structured data items using executable logic |
JP2022058555A (en) * | 2017-11-13 | 2022-04-12 | アビニシオ テクノロジー エルエルシー | Key-based logging for processing structured data items using executable logic |
US12190083B2 (en) | 2017-11-13 | 2025-01-07 | Ab Initio Technology Llc | Key-based logging for processing of structured data items with executable logic |
JP2021018565A (en) * | 2019-07-19 | 2021-02-15 | 富士通株式会社 | Information processing program, information processing device and information processing method |
JP7385105B2 (en) | 2019-07-19 | 2023-11-22 | 富士通株式会社 | Information processing program, information processing device, and information processing method |
US11645138B2 (en) | 2020-07-01 | 2023-05-09 | International Business Machines Corporation | Diagnosing and resolving technical issues |
CN115964689A (en) * | 2023-02-02 | 2023-04-14 | 国城科技(成都)有限公司 | Computer system resource access method based on user entity |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3750053B1 (en) | Systems and methods for providing an instant communication channel within integrated development environments | |
US8839107B2 (en) | Context based script generation | |
JP4876511B2 (en) | Logic extraction support device | |
EP3165984B1 (en) | An event analysis apparatus, an event analysis method, and an event analysis program | |
US7661053B2 (en) | Methods and apparatus for patternizing device responses | |
US20120173998A1 (en) | Three-dimensional gui object stores in automation test tools | |
US20140304253A1 (en) | Screen-data editing device for programmable display device | |
CN102164045A (en) | Parameterized computer monitoring system | |
CN102067117B (en) | Method for displaying and operating table | |
US9003370B2 (en) | Application modification portion searching device and application modification portion searching method | |
US7730466B2 (en) | System and method for manipulating source code in a text editor | |
JP2012064297A (en) | Content file classification device and content file classification method | |
CN109478051A (en) | Program creation apparatus | |
US10042638B2 (en) | Evaluating documentation coverage | |
JP2007065718A (en) | Display method and system for supporting tracing program operation processes | |
JP2006268118A (en) | Application environment check apparatus and method and program thereof | |
JP2019101889A (en) | Test execution device and program | |
CN116955065A (en) | Buried point identification generation method, electronic device, and computer-readable storage medium | |
JP2002108649A (en) | Recording medium in which program to support trace analysis is recorded and program product | |
JP6157166B2 (en) | Parts generation system, method and program | |
JP6397800B2 (en) | Test support system and test support method | |
JP2004362495A (en) | Error log information analysis support method, execution device, and processing program | |
US20040103106A1 (en) | Data processing apparatus, data processing method, and data processing program | |
WO2014059387A2 (en) | Method of annotating a document displayed on an electronic device | |
CN118295694A (en) | Processing method and device for configuration parameters |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20080110 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20091222 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20100628 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20100827 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20100917 |