JP2015114786A - Information processing system and program - Google Patents

Information processing system and program Download PDF

Info

Publication number
JP2015114786A
JP2015114786A JP2013255531A JP2013255531A JP2015114786A JP 2015114786 A JP2015114786 A JP 2015114786A JP 2013255531 A JP2013255531 A JP 2013255531A JP 2013255531 A JP2013255531 A JP 2013255531A JP 2015114786 A JP2015114786 A JP 2015114786A
Authority
JP
Japan
Prior art keywords
trace log
information
object file
function
trace
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
JP2013255531A
Other languages
Japanese (ja)
Inventor
佑美 勅使河原
Yumi Teshigawara
佑美 勅使河原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2013255531A priority Critical patent/JP2015114786A/en
Publication of JP2015114786A publication Critical patent/JP2015114786A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PROBLEM TO BE SOLVED: To specify a traced application even in the case of simultaneously tracing an application and an OS in such situations that a plurality of applications have the same name.SOLUTION: A process information generation part 6 generates process information 5 in which process IDs designated for applications 2 and 3 are associated with the paths of the object files of the applications 2 and 3 in the case of executing the applications 2 and 3. A trace log generation part 17 generates a trace log in the same format as the trace log of an OS in which the process ID of the process information 5 is described as the trace logs of the applications 2 and 3. A trace analysis part 18 extracts the trace log in which the process ID of the process information 5 is described from the trace logs generated by the trace log generation part 17, and specifies the object files of the applications 2 and 3 on the basis of the path of the object file of the process information 5.

Description

本発明は、プログラムトレースに関する。   The present invention relates to program trace.

プログラムの動作を解析するためのプログラムトレース(以下、単にトレースともいう)という手法がある。
トレースは、プログラム実行時に特定関数が呼び出されたこと、特定の値が変更されたこと、特定の処理経路を通過したことなどをトレースログとして残し、ソフトウェアの動作を外部より把握するための仕組みである。
トレースに関する技術として、以下の技術がある。
例えば、末尾呼び出しの最適化が行われた場合のコールスタックを正しく表示するために、プログラムコードのオペラントと関数名と関数のアドレス情報を保持する方式が示されている技術(例えば、特許文献1)がある。
また、関数呼び出しの順番とその内容を把握するために、関数呼び出しの呼び出し側と呼び出された側の関数名を実行順に保持する方式が示されている技術(例えば、特許文献2)がある。
There is a technique called program trace (hereinafter also simply referred to as trace) for analyzing the operation of a program.
Trace is a mechanism for keeping track of software operations from the outside by keeping a trace log indicating that a specific function was called during program execution, a specific value was changed, or a specific processing path was passed. is there.
The following technologies are available as trace technologies.
For example, in order to correctly display the call stack when tail call optimization is performed, a technique that holds a program code operand, function name, and function address information is disclosed (for example, Patent Document 1). )
In addition, there is a technique (for example, Patent Document 2) that shows a method of holding function callers and function names on the called side in order of execution in order to grasp the order of function calls and the contents thereof.

特開2010−287101号公報JP 2010-287101 A 特開2001−282576号公報JP 2001-282576 A

アプリケーションプログラム(以下、単にアプリケーションともいう)とOS(Operating System)のトレースを同時に行う際、同じ名前(ファイル名)であるが異なるアプリケーションが複数あったときに、トレースされたアプリケーションが判別できないという課題がある。   When tracing application programs (hereinafter also simply referred to as applications) and OS (Operating System) simultaneously, if there are multiple applications with the same name (file name) but different, the traced application cannot be identified There is.

本発明は、このような課題を解決することを主な目的の一つとしており、複数の異なるアプリケーションプログラムが同じ名前である状況で、アプリケーションプログラムとOSのトレースを同時に行った際にも、トレースされたアプリケーションプログラムを特定できるようにすることを主な目的とする。   One of the main objects of the present invention is to solve such a problem. In a situation where a plurality of different application programs have the same name, tracing is also performed when the application program and the OS are traced simultaneously. The main purpose is to make it possible to identify a registered application program.

本発明に係る情報処理システムは、
アプリケーションプログラムの実行時に、前記アプリケーションプログラムに対して指定されたプロセスID(Identifier)と、前記アプリケーションプログラムのオブジェクトファイルのパスとが対応付けられて示されるプロセス情報を生成するプロセス情報生成部と、
プロセスIDが記述されるOS(Operating System)のトレースログを生成するとともに、前記アプリケーションプログラムのトレースログとして、前記プロセス情報に示されるプロセスIDが記述され、前記OSのトレースログと同じ形式のトレースログを生成するトレースログ生成部と、
前記トレースログ生成部により生成されたトレースログから前記プロセス情報に示されるプロセスIDが記述されるトレースログを抽出し、前記プロセス情報において前記プロセスIDと対応付けられているオブジェクトファイルのパスに基づき、前記アプリケーションプログラムのオブジェクトファイルを特定するオブジェクトファイル特定部とを有することを特徴とする。
An information processing system according to the present invention includes:
A process information generating unit that generates process information in which a process ID (Identifier) specified for the application program and a path of an object file of the application program are associated with each other when the application program is executed;
An OS (Operating System) trace log in which the process ID is described is generated, and the process ID indicated in the process information is described as the trace log of the application program. The trace log has the same format as the OS trace log. A trace log generator for generating
Extracting a trace log in which the process ID indicated in the process information is described from the trace log generated by the trace log generation unit, and based on the path of the object file associated with the process ID in the process information, And an object file specifying unit for specifying an object file of the application program.

本発明によれば、プロセス情報においてプロセスIDとアプリケーションプログラムのオブジェクトファイルのパスとが対応付けられているので、プロセス情報に示されるプロセスIDが記述されたトレースログを抽出することで、アプリケーションプログラムのトレースログを抽出することができる。
また、プロセス情報に示されるパスに基づいて、アプリケーションプログラムのオブジェクトファイルを特定することできる。
このため、複数の異なるアプリケーションプログラムが同じ名前である場合でも、アプリケーションプログラムのトレースログを取得することができ、トレースされたアプリケーションプログラムを特定することができる。
According to the present invention, since the process ID is associated with the object file path of the application program in the process information, by extracting the trace log in which the process ID indicated in the process information is described, the application program Trace log can be extracted.
Further, the object file of the application program can be specified based on the path indicated in the process information.
For this reason, even when a plurality of different application programs have the same name, the trace log of the application program can be acquired and the traced application program can be specified.

実施の形態1に係る情報処理システムの構成例を示す図。1 is a diagram illustrating a configuration example of an information processing system according to Embodiment 1. FIG. 実施の形態1に係るプロセス情報の例を示す図。FIG. 4 is a diagram showing an example of process information according to the first embodiment. 実施の形態1に係る情報処理システムの動作例を示すフローチャート図。FIG. 3 is a flowchart showing an operation example of the information processing system according to the first embodiment. 実施の形態1に係るプログラム表示部の動作例を示す図。FIG. 6 is a diagram illustrating an operation example of a program display unit according to the first embodiment. 実施の形態1に係るプログラム表示部の動作例を示すフローチャート図。FIG. 4 is a flowchart showing an operation example of a program display unit according to the first embodiment. 実施の形態1に係る情報処理システムのハードウェア構成例を示す図。FIG. 3 is a diagram illustrating a hardware configuration example of the information processing system according to the first embodiment.

実施の形態1.
本実施の形態では、実行するアプリケーションのID(Identifier)とオブジェクトファイルのパスの対応表を作成することにより、実行されたアプリケーションを一意に特定する構成を説明する。
Embodiment 1 FIG.
In the present embodiment, a configuration will be described in which an executed application is uniquely identified by creating a correspondence table between the ID (Identifier) of the application to be executed and the path of the object file.

図1は、本実施の形態に係る情報処理システム100の構成例を示す。   FIG. 1 shows a configuration example of an information processing system 100 according to the present embodiment.

アプリケーション実行プログラム1は、アプリケーションを実行し、実行したアプリケーションのプロセスIDとオブジェクトファイルの対応表を作成するプログラムである。
アプリケーション実行プログラム1は、プログラム実行部4とプロセス情報生成部6で構成されている。
プログラム実行部4は、アプリケーションを実行する。
プロセス情報生成部6はアプリケーションのプロセスIDとオブジェクトファイルの対応表(プロセス情報5)を生成する。
図2は、プロセス情報5を示す。
図2に示すように、プロセス情報5では、プロセスIDと、アプリケーション2、3のオブジェクトファイルのパスとが対応付けられている。
The application execution program 1 is a program that executes an application and creates a correspondence table between the process ID of the executed application and an object file.
The application execution program 1 includes a program execution unit 4 and a process information generation unit 6.
The program execution unit 4 executes an application.
The process information generation unit 6 generates a correspondence table (process information 5) between an application process ID and an object file.
FIG. 2 shows the process information 5.
As shown in FIG. 2, in the process information 5, the process ID is associated with the object file paths of the applications 2 and 3.

情報処理システム100で実行されるアプリケーションは複数あるものとする。
本実施の形態では、アプリケーション2とアプリケーション3を用いて説明を行う。
アプリケーション2とアプリケーション3は、異なるアプリケーションである。
このため、オブジェクトファイルは異なっており、また、オブジェクトファイルのパスも異なっている。
しかしながら、アプリケーション2とアプリケーション3には同じ名称が設定されているものとする。
Assume that there are a plurality of applications executed in the information processing system 100.
In the present embodiment, description will be made using application 2 and application 3.
Application 2 and application 3 are different applications.
For this reason, the object files are different, and the path of the object file is also different.
However, it is assumed that the same name is set for the application 2 and the application 3.

アプリケーション2とアプリケーション3の各々には、コンパイル時のオプションにてアプリケーション内の各関数から呼び出される関数フック手段がある。
アプリケーション2内では関数フック手段9が存在し、アプリケーション3内では関数フック手段10が存在している。
関数フック手段9、10は、gcc(GNU Compiler)の−pgオプションのように、コンパイラによって、全関数の先頭で、特定の関数を呼び出すコードが埋め込まれており、共有ライブラリ7を呼び出す。
関数フック手段9、10は、トレース機能にのみ存在するのではなく、プロファイラなどの性能解析など一般的に使用されている機能である。
Each of the application 2 and the application 3 has a function hook means that is called from each function in the application with a compile-time option.
Function hook means 9 exists in the application 2, and function hook means 10 exists in the application 3.
In the function hook means 9 and 10, a code for calling a specific function is embedded at the head of all the functions by the compiler like the -pg option of gcc (GNU Compiler), and the shared library 7 is called.
The function hook means 9 and 10 do not exist only in the trace function, but are functions generally used for performance analysis of a profiler and the like.

共有ライブラリ7は、OS8のサービスをシステムコールという形式で呼び出す。
共有ライブラリ7には、関数フック機能処理部11、開始・終了部12、関数アドレス・引数取得部13、システムコール発行部14がある。
The shared library 7 calls a service of the OS 8 in the form of a system call.
The shared library 7 includes a function hook function processing unit 11, a start / end unit 12, a function address / argument acquisition unit 13, and a system call issue unit 14.

関数フック機能処理部11は、アプリケーション2、3との動的リンク時に呼び出される関数フック機能の処理を行う。
開始・終了部12は、関数フック手段9、10から呼び出されトレースを実施すべきか否かを決定する。
関数アドレス・引数取得部13は、関数フック手段9、10を呼び出した関数のアドレスおよび関数の引数を取得する。
システムコール発行部14は、システムコールを発行し、OS8のサービスを呼び出す。
The function hook function processing unit 11 performs a function hook function called at the time of dynamic linking with the applications 2 and 3.
The start / end unit 12 is called from the function hook means 9 and 10 and determines whether or not to execute the trace.
The function address / argument acquisition unit 13 acquires the address of the function that called the function hook means 9 and 10 and the argument of the function.
The system call issuing unit 14 issues a system call and calls a service of the OS 8.

OS8には、システムコール処理部15とトレースログ生成部17がある。   The OS 8 includes a system call processing unit 15 and a trace log generation unit 17.

システムコール処理部15は、共有ライブラリ7からのシステムコールを処理する。
トレースログ生成部17は、OS8をトレースし、OSトレースログ情報16にトレースログを記録する。
また、トレースログ生成部17は、アプリケーション2、3のトレースログを、OS8のトレースログと同じ形式にてOSトレースログ情報16に記録する。
トレースログ生成部17が生成するトレースログには、プロセスIDと、実行された関数のアドレスが含まれる。
The system call processing unit 15 processes a system call from the shared library 7.
The trace log generation unit 17 traces the OS 8 and records the trace log in the OS trace log information 16.
In addition, the trace log generation unit 17 records the trace logs of the applications 2 and 3 in the OS trace log information 16 in the same format as the OS 8 trace log.
The trace log generated by the trace log generation unit 17 includes the process ID and the address of the executed function.

トレース解析部18は、OSトレースログ情報16を解析し、OSトレースログ情報16からプロセス情報5に示されるプロセスIDが記述されているトレースログを抽出し、プロセス情報5において当該プロセスIDと対応付けられているオブジェクトファイルのパスに基づき、アプリケーション2、3のオブジェクトファイルを特定する。
また、トレース解析部18は、特定したアプリケーション2、3のオブジェクトファイルから、アプリケーション2、3のトレースログに記述されている関数のアドレスに対応する関数名を取得する。
そして、トレース解析部18は、アプリケーションとカーネルのトレースログであるアプリケーション/カーネルトレースログ情報23を作成する。
なお、トレース解析部18は、オブジェクトファイル特定部の例に相当する。
The trace analysis unit 18 analyzes the OS trace log information 16, extracts a trace log in which the process ID indicated in the process information 5 is described from the OS trace log information 16, and associates it with the process ID in the process information 5. The object files of the applications 2 and 3 are specified based on the object file path.
Further, the trace analysis unit 18 acquires a function name corresponding to the address of the function described in the trace log of the applications 2 and 3 from the identified object files of the applications 2 and 3.
Then, the trace analysis unit 18 creates application / kernel trace log information 23 that is a trace log of the application and the kernel.
Note that the trace analysis unit 18 corresponds to an example of an object file specifying unit.

トレース解析部18は、関数名抽出部19とプロセス情報参照部20とトレースログ収集部21と関数/引数変換部22で構成されている。   The trace analysis unit 18 includes a function name extraction unit 19, a process information reference unit 20, a trace log collection unit 21, and a function / argument conversion unit 22.

関数名抽出部19は、アプリケーション2、3を参照して関数名を取得する。
プロセス情報参照部20は、プロセス情報5を参照してプロセスIDからオブジェクトファイルのパスを取得する。
トレースログ収集部21は、OSトレースログ情報16を取得する。
関数/引数変換部22は、OSトレースログ情報16をアプリケーション/カーネルトレースログ情報23に変換する。
The function name extraction unit 19 refers to the applications 2 and 3 and acquires the function name.
The process information reference unit 20 refers to the process information 5 and acquires the path of the object file from the process ID.
The trace log collection unit 21 acquires the OS trace log information 16.
The function / argument conversion unit 22 converts the OS trace log information 16 into application / kernel trace log information 23.

トレース結果表示ツール24は、アプリケーション/カーネルトレースログ情報23を表示するツールである。
トレース結果表示ツール24には、アプリケーション/カーネルトレースログ情報23から実行された関数のプログラムソースを描画するプログラム表示部25が存在する。
プログラム表示部25は、より具体的には、アプリケーション2、3のオブジェクトファイルに含まれるデバッグ情報を解析して、関数名抽出部19により抽出された関数名が記述されている箇所を特定し、デバッグ情報から、当該関数名が記述されている箇所のプログラムソースを取得し、描画する。
The trace result display tool 24 is a tool for displaying the application / kernel trace log information 23.
The trace result display tool 24 includes a program display unit 25 that draws a program source of a function executed from the application / kernel trace log information 23.
More specifically, the program display unit 25 analyzes the debug information included in the object files of the applications 2 and 3 to identify the location where the function name extracted by the function name extraction unit 19 is described, The program source at the location where the function name is described is acquired from the debug information and rendered.

次に動作について説明する。
図3は、本実施の形態に係る情報処理システム100の動作例を示すフローチャートである。
Next, the operation will be described.
FIG. 3 is a flowchart showing an operation example of the information processing system 100 according to the present embodiment.

まず、ステップ100において、プログラム実行部4はアプリケーション2、3を実行する。
アプリケーション2、3を実行する際、ユーザがオブジェクトファイルを指定する。
First, in step 100, the program execution unit 4 executes the applications 2 and 3.
When executing the applications 2 and 3, the user designates an object file.

次に、ステップ101において、プロセス情報生成部6が、実行したアプリケーション2、3のプロセスIDとオブジェクトファイルのパスからプロセス情報5を作成する。
Unix(登録商標)の場合は、プロセスIDは、getpid()関数で得ることができる。
また、execve()関数でオブジェクトファイルのパスを指定することにより、プログラムが実行できる。
Next, in step 101, the process information generation unit 6 creates process information 5 from the process IDs of the executed applications 2 and 3 and the path of the object file.
In the case of Unix (registered trademark), the process ID can be obtained by the getpid () function.
Also, the program can be executed by specifying the path of the object file with the execute () function.

次に、ステップ102において、ステップ100で実行されたアプリケーション2、3において、共有ライブラリ7とアプリケーション2、3の動的リンクが実施される。
この動的リンクの際、共有ライブラリ7の関数フック機能処理部11は、関数フック手段9、10が、共有ライブラリ7の開始・終了部12を呼び出すように関数フック手段9、10のコードを書き換える。
Next, in step 102, the dynamic link between the shared library 7 and the applications 2 and 3 is performed in the applications 2 and 3 executed in step 100.
During this dynamic linking, the function hook function processing unit 11 of the shared library 7 rewrites the code of the function hook units 9 and 10 so that the function hook units 9 and 10 call the start / end unit 12 of the shared library 7. .

次に、ステップ103において、共有ライブラリ7との動的リンクがなされると、アプリケーション2、3は動作を開始し、main( )関数が呼び出され、それに伴い、各関数が実行される。
各関数が実行されると、各関数の先頭で関数フック手段9、10が呼び出される。
Next, in step 103, when dynamic linking with the shared library 7 is performed, the applications 2 and 3 start to operate, the main () function is called, and each function is executed accordingly.
When each function is executed, the function hook means 9 and 10 are called at the head of each function.

次に、ステップ104において、共有ライブラリ7の開始・終了部12が呼び出され、関数アドレス・引数取得部13が、関数フック手段9、10を呼び出した関数のアドレスと関数の引数を取得する。
更に、システムコール発行部14が、明示的にエラーとなるシステムコールを実行する。
この時、システムコールの引数に、関数アドレス・引数取得部13にて取得した関数のアドレスと関数の引数が設定される。
Next, in step 104, the start / end unit 12 of the shared library 7 is called, and the function address / argument acquisition unit 13 acquires the address of the function that called the function hook means 9, and the function argument.
Further, the system call issuing unit 14 executes a system call that explicitly causes an error.
At this time, the address of the function and the argument of the function acquired by the function address / argument acquisition unit 13 are set in the argument of the system call.

次にステップ105において、システムコール処理部15により、トレースログ生成部17が呼び出されることにより関数トレースが記録される。
トレースログ生成部17は、OS8内の他のイベント(ファイル書き込み、割込み発生、コンテキストスイッチ等)の記録とともにシステムコールトレース情報として関数トレース情報をOSトレースログ情報16に記録する。
また、動作するシステムコール処理部15は、アプリケーション2、3から動作したものであり、プロセスIDはアプリケーション2、3と同じであるため、関数トレース情報をOSトレースログ情報16に記録する際、システムコール処理部15のプロセスIDを記録する。
Next, in step 105, the system call processing unit 15 calls the trace log generation unit 17 to record the function trace.
The trace log generation unit 17 records function trace information in the OS trace log information 16 as system call trace information together with recording of other events (file write, interrupt occurrence, context switch, etc.) in the OS 8.
Further, since the operating system call processing unit 15 is operated from the applications 2 and 3 and the process ID is the same as that of the applications 2 and 3, when the function trace information is recorded in the OS trace log information 16, The process ID of the call processing unit 15 is recorded.

次に、ステップ106において、アプリケーション2、3の動作が終了する。   Next, in step 106, the operations of the applications 2 and 3 are finished.

次に、ステップ107において、トレースログ収集部21が、トレースログ生成部17が記録したOSトレースログ情報16を取得し、関数/引数変換部22に渡す。
この時、OSトレースログ情報16には、アプリケーション2、3の関数トレース情報はシステムコールトレース情報としてしか記録されていない。
つまり、アプリケーション2、3のトレースログは、OS8のトレースログと同じ形式で生成される。
Next, in step 107, the trace log collection unit 21 acquires the OS trace log information 16 recorded by the trace log generation unit 17 and passes it to the function / argument conversion unit 22.
At this time, the function trace information of the applications 2 and 3 is recorded in the OS trace log information 16 only as system call trace information.
That is, the trace logs of the applications 2 and 3 are generated in the same format as the trace log of the OS8.

次に、ステップ108において、関数/引数変換部22は、ステップ107で得たOSトレースログ情報16の時刻毎のトレース情報を解析し、解析結果から得たプロセスIDをプロセス情報参照部20に送る。
つまり、関数/引数変換部22は、OSトレースログ情報16の中からプロセス情報5に含まれるプロセスIDが記述されているトレースログを抽出し、抽出したトレースログのプロセスIDをプロセス情報参照部20に送る。
Next, in step 108, the function / argument conversion unit 22 analyzes the trace information for each time of the OS trace log information 16 obtained in step 107, and sends the process ID obtained from the analysis result to the process information reference unit 20. .
That is, the function / argument conversion unit 22 extracts a trace log in which the process ID included in the process information 5 is described from the OS trace log information 16, and uses the process ID of the extracted trace log as the process information reference unit 20. Send to.

次に、ステップ109において、プロセス情報参照部20は、プロセス情報5を参照し、ステップ108で得たプロセスIDからオブジェクトファイルのパスを得て、関数/引数変換部22に送る。   Next, in step 109, the process information reference unit 20 refers to the process information 5, obtains an object file path from the process ID obtained in step 108, and sends it to the function / argument conversion unit 22.

次に、ステップ110において、関数/引数変換部22は、ステップ108の解析結果から得た関数情報(関数のアドレスと引数)とステップ109で得たオブジェクトファイルのパスを関数名抽出部19に送る。   Next, in step 110, the function / argument conversion unit 22 sends the function information (function address and argument) obtained from the analysis result in step 108 and the object file path obtained in step 109 to the function name extraction unit 19. .

次に、ステップ111において、関数名抽出部19は、ステップ110で得たオブジェクトファイルのパスから参照するアプリケーション2又はアプリケーション3を特定し、特定したアプリケーション2又はアプリケーション3からステップ110で得た関数情報のうちの関数アドレスをもとに関数名を得て、関数/引数変換部22に送る。   Next, in step 111, the function name extraction unit 19 specifies the application 2 or application 3 to be referred to from the path of the object file obtained in step 110, and the function information obtained in step 110 from the identified application 2 or application 3. The function name is obtained based on the function address, and sent to the function / argument conversion unit 22.

次に、ステップ112において、関数/引数変換部22は、ステップ108で解析した時刻毎のトレース情報の時刻情報、プロセスID、関数の引数情報、カーネルトレースログ、ステップ111で得た関数名をアプリケーション/カーネルトレースログ情報23に出力する。   Next, in step 112, the function / argument conversion unit 22 uses the time information of the trace information analyzed at step 108, the process ID, the function argument information, the kernel trace log, and the function name obtained in step 111 as the application. / Output to kernel trace log information 23.

次に、ステップ113にて、アプリケーション/カーネルトレースログ情報23を表示する際に、プログラム表示部25により、アプリケーションのトレース情報から、どのアプリケーションのどの関数を実行したものなのか表示する。   Next, at step 113, when displaying the application / kernel trace log information 23, the program display unit 25 displays which function of which application is executed from the trace information of the application.

プログラム表示部25について説明する。
図4は、プログラム表示部25の動作例を示している。
アプリケーション2、3、プロセス情報5、アプリケーション/カーネルトレースログ情報23、トレース結果表示ツール24、プログラム表示部25に関しては図1と同じものとする。
アプリケーション2、3のオブジェクトファイルにはそれぞれデバッグ情報26、27があり、デバッグ情報26、27には、実行された関数がどのプログラムソースの何行目にあるかと、プログラムソースがあるものとする。
The program display unit 25 will be described.
FIG. 4 shows an operation example of the program display unit 25.
The applications 2 and 3, process information 5, application / kernel trace log information 23, trace result display tool 24, and program display unit 25 are the same as those in FIG.
It is assumed that the object files of the applications 2 and 3 have debug information 26 and 27, respectively, and the debug information 26 and 27 includes what program source the executed function is in which line and the program source.

図5は、プログラム表示部25の動作例を示すフローチャートである。   FIG. 5 is a flowchart illustrating an operation example of the program display unit 25.

まず、ステップ200において、プログラム表示部25は、アプリケーション/カーネルトレースログ情報23を時刻ごとに1行ずつ表示する。   First, in step 200, the program display unit 25 displays the application / kernel trace log information 23 line by line for each time.

次に、ステップ201において、プログラム表示部25は、ステップ200で表示したログから、1行選択する。   Next, in step 201, the program display unit 25 selects one line from the log displayed in step 200.

次に、ステップ202において、プログラム表示部25は、ステップ201で選択したトレースログの行の情報を読み込む。   Next, in step 202, the program display unit 25 reads the information of the trace log line selected in step 201.

次に、ステップ203において、プログラム表示部25は、ステップ202で読み込んだトレースログ情報に記録されているプロセスIDからプロセス情報を参照して、オブジェクトファイルのパスを得る。   Next, in step 203, the program display unit 25 refers to the process information from the process ID recorded in the trace log information read in step 202, and obtains an object file path.

次に、ステップ204において、プログラム表示部25は、ステップ203にて特定したオブジェクトファイル内にあるデバッグ情報から、ステップ202で読み込んだトレースログ情報の関数と一致するものを探し、関数がどのプログラムソースの何行目の関数かの情報を取得する。   Next, in step 204, the program display unit 25 searches the debug information in the object file specified in step 203 for a match with the function of the trace log information read in step 202, and which program source is the function. Get the information of the function of which line.

次に、ステップ205において、プログラム表示部25は、ステップ204で特定したプログラムソースをデバッグ情報から読み込む。   Next, in step 205, the program display unit 25 reads the program source specified in step 204 from the debug information.

最後に、ステップ206において、プログラム表示部25は、ステップ205で取得したプログラムソースと、ステップ204で取得した関数の行数から、関数部分のプログラムソースを表示する。   Finally, in step 206, the program display unit 25 displays the function part program source from the program source acquired in step 205 and the number of function lines acquired in step 204.

また、プロセス情報5を作成する別の手段として、以下の方法がある。
アプリケーション実行プログラム1で、プログラム実行部4によりアプリケーション2、3を実行し、プロセス情報生成部6によりプロセス情報5を作成するのではなく、システムコール発行部14にて、システムコールを発行するときに、execve()関数にてオブジェクトファイルのパスが得られる。
また、カレントプロセスIDがアプリケーションのPIDとなるため、プロセスIDも得ることができ、OS8内でプロセス情報5を作成することができる。
As another means for creating the process information 5, there is the following method.
When the application execution program 1 does not execute the applications 2 and 3 by the program execution unit 4 and creates the process information 5 by the process information generation unit 6 but issues a system call by the system call issue unit 14 , The path of the object file is obtained with the execute () function.
Further, since the current process ID becomes the PID of the application, the process ID can be obtained and the process information 5 can be created in the OS 8.

最後に、本実施の形態に示した情報処理システム100のハードウェア構成例を図6を参照して説明する。
情報処理システム100はコンピュータであり、情報処理システム100の各要素をプログラムで実現することができる。
情報処理システム100のハードウェア構成としては、バスに、演算装置901、外部記憶装置902、主記憶装置903、通信装置904、入出力装置905が接続されている。
Finally, a hardware configuration example of the information processing system 100 shown in the present embodiment will be described with reference to FIG.
The information processing system 100 is a computer, and each element of the information processing system 100 can be realized by a program.
As a hardware configuration of the information processing system 100, an arithmetic device 901, an external storage device 902, a main storage device 903, a communication device 904, and an input / output device 905 are connected to a bus.

演算装置901は、図1に示すOS、共有ライブラリ、アプリケーションを含む各種プログラムを実行するCPU(Central Processing Unit)である。
外部記憶装置902は、例えばROM(Read Only Memory)やフラッシュメモリ、ハードディスク装置である。
主記憶装置903は、RAM(Random Access Memory)である。
通信装置904は、例えば、NIC(Network Interface Card)である。
入出力装置905は、例えばマウス、キーボード、ディスプレイ装置等である。
The arithmetic device 901 is a CPU (Central Processing Unit) that executes various programs including the OS, shared library, and application shown in FIG.
The external storage device 902 is, for example, a ROM (Read Only Memory), a flash memory, or a hard disk device.
The main storage device 903 is a RAM (Random Access Memory).
The communication device 904 is, for example, a NIC (Network Interface Card).
The input / output device 905 is, for example, a mouse, a keyboard, a display device, or the like.

プログラムは、通常は外部記憶装置902に記憶されており、主記憶装置903にロードされた状態で、順次演算装置901に読み込まれ、実行される。
プログラムには、図1に示す「〜部」として説明している機能を実現するプログラムも含まれる。
また、本実施の形態の説明において、「〜の判断」、「〜の判定」、「〜の抽出」、「〜の生成」、「〜の取得」、「〜の特定」等として説明している処理の結果を示す情報やデータや信号値や変数値が主記憶装置903にファイルとして記憶されている。
The program is normally stored in the external storage device 902, and is loaded into the main storage device 903 and sequentially read into the arithmetic device 901 and executed.
The program also includes a program that realizes the function described as “˜unit” shown in FIG.
In the description of the present embodiment, it is described as “determining”, “determining”, “extracting”, “generating”, “acquiring”, “specifying”, etc. Information, data, signal values, and variable values indicating the results of processing are stored in the main storage device 903 as files.

なお、図6の構成は、あくまでも情報処理システム100のハードウェア構成の一例を示すものであり、情報処理システム100のハードウェア構成は図6に記載の構成に限らず、他の構成であってもよい。   The configuration in FIG. 6 is merely an example of the hardware configuration of the information processing system 100, and the hardware configuration of the information processing system 100 is not limited to the configuration illustrated in FIG. Also good.

1 アプリケーション実行プログラム、2 アプリケーション、3 アプリケーション、4 プログラム実行部、5 プロセス情報、6 プロセス情報生成部、7 共有ライブラリ、8 OS、9 関数フック手段、10 関数フック手段、11 関数フック機能処理部、12 開始・終了部、13 関数アドレス・引数取得部、14 システムコール発行部、15 システムコール処理部、16 OSトレースログ情報、17 トレースログ生成部、18 トレース解析部、19 関数名抽出部、20 プロセス情報参照部、21 トレースログ収集部、22 関数/引数変換部、23 アプリケーション/カーネルトレースログ情報、24 トレース結果表示ツール、25 プログラム表示部、100 情報処理システム。   1 application execution program, 2 application, 3 application, 4 program execution unit, 5 process information, 6 process information generation unit, 7 shared library, 8 OS, 9 function hook unit, 10 function hook unit, 11 function hook function processing unit, 12 start / end unit, 13 function address / argument acquisition unit, 14 system call issue unit, 15 system call processing unit, 16 OS trace log information, 17 trace log generation unit, 18 trace analysis unit, 19 function name extraction unit, 20 Process information reference unit, 21 Trace log collection unit, 22 Function / argument conversion unit, 23 Application / kernel trace log information, 24 Trace result display tool, 25 Program display unit, 100 Information processing system.

Claims (5)

アプリケーションプログラムの実行時に、前記アプリケーションプログラムに対して指定されたプロセスID(Identifier)と、前記アプリケーションプログラムのオブジェクトファイルのパスとが対応付けられて示されるプロセス情報を生成するプロセス情報生成部と、
プロセスIDが記述されるOS(Operating System)のトレースログを生成するとともに、前記アプリケーションプログラムのトレースログとして、前記プロセス情報に示されるプロセスIDが記述され、前記OSのトレースログと同じ形式のトレースログを生成するトレースログ生成部と、
前記トレースログ生成部により生成されたトレースログから前記プロセス情報に示されるプロセスIDが記述されるトレースログを抽出し、前記プロセス情報において前記プロセスIDと対応付けられているオブジェクトファイルのパスに基づき、前記アプリケーションプログラムのオブジェクトファイルを特定するオブジェクトファイル特定部とを有することを特徴とする情報処理システム。
A process information generating unit that generates process information in which a process ID (Identifier) specified for the application program and a path of an object file of the application program are associated with each other when the application program is executed;
An OS (Operating System) trace log in which the process ID is described is generated, and the process ID indicated in the process information is described as the trace log of the application program. The trace log has the same format as the OS trace log. A trace log generator for generating
Extracting a trace log in which the process ID indicated in the process information is described from the trace log generated by the trace log generation unit, and based on the path of the object file associated with the process ID in the process information, An information processing system comprising: an object file specifying unit that specifies an object file of the application program.
前記トレースログ生成部は、
前記アプリケーションプログラムのトレースログとして、前記プロセスIDと、前記アプリケーションプログラムの実行時に実行された関数のアドレスとが記述される、前記OSのトレースログと同じ形式のトレースログを生成し、
前記オブジェクトファイル特定部は、
抽出したトレースログに記述されている関数のアドレスに対応する関数名を、特定したオブジェクトファイルから取得することを特徴とする請求項1に記載の情報処理システム。
The trace log generation unit
As the trace log of the application program, a trace log having the same format as the trace log of the OS, in which the process ID and the address of a function executed when the application program is executed, is generated.
The object file specifying unit
The information processing system according to claim 1, wherein the function name corresponding to the address of the function described in the extracted trace log is acquired from the identified object file.
前記情報処理システムは、更に、
特定したオブジェクトファイルを解析して、前記オブジェクトファイル特定部により取得された関数名が記述されているオブジェクトファイル内の箇所を特定し、前記関数名が記述されている箇所のプログラムソースを取得し、取得したプログラムソースを表示するプログラム表示部を有することを特徴とする請求項2に記載の情報処理システム。
The information processing system further includes:
Analyzing the identified object file, identifying the location in the object file in which the function name obtained by the object file identification unit is described, obtaining the program source of the location in which the function name is described, The information processing system according to claim 2, further comprising a program display unit that displays the acquired program source.
前記プログラム表示部は、
特定したオブジェクトファイルに含まれるデバッグ情報を解析して、前記関数名が記述されている箇所を特定し、前記デバッグ情報から、前記関数名が記述されている箇所のプログラムソースを取得することを特徴とする請求項3に記載の情報処理システム。
The program display unit
Analyzing debug information included in the identified object file, identifying a location where the function name is described, and obtaining a program source of the location where the function name is described from the debug information The information processing system according to claim 3.
アプリケーションプログラムの実行時に、前記アプリケーションプログラムに対して指定されたプロセスID(Identifier)と、前記アプリケーションプログラムのオブジェクトファイルのパスとが対応付けられて示されるプロセス情報を生成するプロセス情報生成処理と、
プロセスIDが記述されるOS(Operating System)のトレースログを生成するとともに、前記アプリケーションプログラムのトレースログとして、前記プロセス情報に示されるプロセスIDが記述され、前記OSのトレースログと同じ形式のトレースログを生成するトレースログ生成処理と、
前記トレースログ生成処理により生成されたトレースログから前記プロセス情報に示されるプロセスIDが記述されるトレースログを抽出し、前記プロセス情報において前記プロセスIDと対応付けられているオブジェクトファイルのパスに基づき、前記アプリケーションプログラムのオブジェクトファイルを特定するオブジェクトファイル特定処理とをコンピュータに実行させることを特徴とするプログラム。
A process information generation process for generating process information in which a process ID (Identifier) specified for the application program and a path of an object file of the application program are associated with each other when the application program is executed;
An OS (Operating System) trace log in which the process ID is described is generated, and the process ID indicated in the process information is described as the trace log of the application program. The trace log has the same format as the OS trace log. Trace log generation processing to generate
Extracting a trace log in which the process ID indicated in the process information is described from the trace log generated by the trace log generation process, and based on the path of the object file associated with the process ID in the process information, A program for causing a computer to execute an object file specifying process for specifying an object file of the application program.
JP2013255531A 2013-12-11 2013-12-11 Information processing system and program Pending JP2015114786A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013255531A JP2015114786A (en) 2013-12-11 2013-12-11 Information processing system and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013255531A JP2015114786A (en) 2013-12-11 2013-12-11 Information processing system and program

Publications (1)

Publication Number Publication Date
JP2015114786A true JP2015114786A (en) 2015-06-22

Family

ID=53528551

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013255531A Pending JP2015114786A (en) 2013-12-11 2013-12-11 Information processing system and program

Country Status (1)

Country Link
JP (1) JP2015114786A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113553578A (en) * 2021-07-08 2021-10-26 北京奇艺世纪科技有限公司 Log printing response method and device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6292034A (en) * 1985-10-17 1987-04-27 Omron Tateisi Electronics Co Program debugging device
JP2012208879A (en) * 2011-03-30 2012-10-25 Kddi Corp Patch influence analysis device, method and program
JP2013025559A (en) * 2011-07-21 2013-02-04 Mitsubishi Electric Corp Program trace management device, program trace management method and program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6292034A (en) * 1985-10-17 1987-04-27 Omron Tateisi Electronics Co Program debugging device
JP2012208879A (en) * 2011-03-30 2012-10-25 Kddi Corp Patch influence analysis device, method and program
JP2013025559A (en) * 2011-07-21 2013-02-04 Mitsubishi Electric Corp Program trace management device, program trace management method and program

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
攝津 敦 外2名: "「カーネルトレース機構を利用したシステムトレース機能の設計と実装」", マルチメディア,分散,協調とモバイル(DICOMO2013)シンポジウム論文集 情報処理学会シンポジ, vol. 第2013巻,第2号, JPN6017030995, July 2013 (2013-07-01), pages pp.453−459 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113553578A (en) * 2021-07-08 2021-10-26 北京奇艺世纪科技有限公司 Log printing response method and device, electronic equipment and storage medium
CN113553578B (en) * 2021-07-08 2024-04-12 北京奇艺世纪科技有限公司 Log printing response method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US10185643B2 (en) Call chain interval resource impact unification
US9507688B2 (en) Execution history tracing method
US9176848B2 (en) Program debugger and program debugging
WO2016095570A1 (en) Debugging method and apparatus for embedded system, and storage medium
US20150169435A1 (en) Method and apparatus for mining test coverage data
JP2015043198A (en) Analysis system, analysis method and analysis program
JP6023317B2 (en) Information processing apparatus and information processing method
US20200241992A1 (en) System and method for dynamic domain-specific sequence diagram visualization
CN113051514B (en) Element positioning method and device, electronic equipment and storage medium
JP2021502658A5 (en)
JP2010067188A (en) Information processor for supporting programming, information processing system, and programming support method and program
JP2017538996A5 (en)
US8412744B2 (en) Visualization of runtime analysis across dynamic boundaries
US9286036B2 (en) Computer-readable recording medium storing program for managing scripts, script management device, and script management method
JP2015114786A (en) Information processing system and program
WO2020073200A1 (en) Program debugging method and system
JP6665576B2 (en) Support device, support method, and program
CN114238107A (en) Tracking debugging method, system and computer readable storage medium
JP5686686B2 (en) Program trace management apparatus, program trace management method and program
CN114297061A (en) Software project fault positioning method and device and electronic equipment
JP6437396B2 (en) Trace information management system, method, and program
JP7322964B2 (en) Test information extraction device, test information extraction method and program
KR101583306B1 (en) Analysis method and analysis apparatus of executable file applied virtualization obfuscation
WO2024066622A1 (en) Cloud system testing method and apparatus
JP5800777B2 (en) Information processing apparatus, information processing method, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20161104

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170822

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170823

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20180306