[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

JPH08147199A - Process execution information collection device - Google Patents

Process execution information collection device

Info

Publication number
JPH08147199A
JPH08147199A JP6284657A JP28465794A JPH08147199A JP H08147199 A JPH08147199 A JP H08147199A JP 6284657 A JP6284657 A JP 6284657A JP 28465794 A JP28465794 A JP 28465794A JP H08147199 A JPH08147199 A JP H08147199A
Authority
JP
Japan
Prior art keywords
information
unit
dynamic
function
measurement
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.)
Granted
Application number
JP6284657A
Other languages
Japanese (ja)
Other versions
JP3419916B2 (en
Inventor
Kenji Iizuka
賢治 飯塚
Shoichi Sato
正一 佐藤
Michiharu Kasahara
道治 笠原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP28465794A priority Critical patent/JP3419916B2/en
Publication of JPH08147199A publication Critical patent/JPH08147199A/en
Application granted granted Critical
Publication of JP3419916B2 publication Critical patent/JP3419916B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

(57)【要約】 【目的】プロセス実行情報を採取し出力するプロセス実
行情報採取装置に関し,測定対象の再翻訳/再結合を行
うことなく,動的ライブラリ関数の実行回数や実行時間
等の必要な情報のみを取得することができ,また測定を
行わない場合の性能劣化を非常に小さくすることを目的
とする。 【構成】動的リンカ10においてカーネル45からの通知情
報を判定することにより,実行情報を採取する場合に,
情報採取用ライブラリ20をマップして実行情報採取部22
を所定の時間毎に起動するようにする。また,動的ライ
ブラリの結合時に用いられるリンク用テーブル32のエン
トリ情報を,関数実行トレース部23を呼び出すように書
き換え,2回目以降の動的ライブラリ関数の呼び出し時
には,関数実行トレース部23を経由して関数を呼び出す
ようにする。
(57) [Summary] [Purpose] Regarding the process execution information collection device that collects and outputs process execution information, the number of executions and the execution time of dynamic library functions are required without re-translation / recombination of measurement targets. The objective is to be able to obtain only such information and to reduce the performance degradation when measurement is not performed. [Configuration] When collecting execution information by determining the notification information from the kernel 45 in the dynamic linker 10,
Execution information collection part 22 by mapping the information collection library 20
To be started every predetermined time. In addition, the entry information of the link table 32 used when linking the dynamic libraries is rewritten so as to call the function execution trace unit 23, and when the dynamic library function is called for the second time or later, it is passed through the function execution trace unit 23. To call the function.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は,特に動的ライブラリ関
数の実行回数や実行時間等のプロセス実行情報を採取し
出力するプロセス実行情報採取装置に関するものであ
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a process execution information collecting device which collects and outputs process execution information such as the number of executions and execution time of a dynamic library function.

【0002】近年,さまざまなプログラムに性能上の問
題が生じており,その原因を探るための情報をできる限
り採取したいという要求がある。特に,動的ライブラリ
関数に関する実行情報は得にくい状態であり,ソフトウ
ェアの品質向上,性能向上を図るために,プログラムの
解析をより容易に行うための一つの情報として,動的ラ
イブラリ関数に関する情報を得ることは有用である。
In recent years, performance problems have arisen in various programs, and there is a demand to collect as much information as possible to find out the cause. In particular, since it is difficult to obtain execution information about dynamic library functions, information about dynamic library functions is used as one piece of information for easier program analysis in order to improve software quality and performance. It is useful to get.

【0003】[0003]

【従来の技術】従来の技術は,以下のようなものであっ
た。 ライブラリ関数に関する情報を採取しようとする場
合,例えばUNIXオペレーティング・システムにおい
ては,prof等のUNIXコマンドを利用して採取す
ることができるが,その場合,図11に示すように,ロ
ードモジュール内に測定用の命令を埋め込まなければな
らない。そのため,測定対象プログラムを関数情報採取
用のオプションを指定して再翻訳(コンパイル)/再結
合(リンク)する必要があった。
2. Description of the Related Art The prior art is as follows. When collecting information about library functions, for example, in UNIX operating system, it can be collected by using UNIX command such as prof. In that case, as shown in FIG. 11, measurement is performed in the load module. Must be embedded in the instruction for. Therefore, it is necessary to re-translate (compile) / re-join (link) the measurement target program by specifying the option for collecting function information.

【0004】 上記の方法によりライブラリ関数の
実行情報を採取する場合に,動的ライブラリの情報は採
取できないため,動的ライブラリに対応する静的なライ
ブラリを使ってプログラムを再翻訳/再結合しなければ
ならなかった。
When the execution information of the library function is collected by the above method, since the information of the dynamic library cannot be collected, the program must be retranslated / recombined using the static library corresponding to the dynamic library. I had to do it.

【0005】 また,従来の技術では,一般に1つの
プロセスを起動して終了するまでの情報を必ず採取して
いた。 再翻訳なしにライブラリ関数に関する情報を採取す
る方法として,デバッガで関数の入口点にブレイク・ポ
イントを設定し,プロセスを実行させ,デバッガによっ
て情報を採取する方法もある。この場合,ブレイク・ポ
イントを設定する作業が必要であり,また,ブレイク・
ポイントまで着いたら,再実行させる操作が必要であっ
た。
In addition, in the related art, generally, the information until one process is started and ended is always collected. Another way to collect information about library functions without retranslation is to set a breakpoint at the entry point of the function in the debugger, run the process, and collect the information in the debugger. In this case, it is necessary to set the break point, and the break point
When I got to the point, I needed to perform the operation again.

【0006】この場合は,個々のプロセスのみの情報し
か得ることができないので,それぞれのプロセスの情報
を画面や記録媒体に出力した後,それぞれのプロセスの
関数情報をマージする作業が必要であった。また,個々
のプロセスが記録媒体や画面へ出力することは個々のプ
ロセス自体に負荷がかかっていた。
In this case, since only the information of each process can be obtained, it is necessary to output the information of each process to the screen or the recording medium and then merge the function information of each process. . In addition, the output of each process to a recording medium or screen imposes a load on each process itself.

【0007】 その他の従来技術では,命令コードを
解析し,それによって実行時間を計算するというような
方法等もあった。
In other conventional techniques, there is a method of analyzing the instruction code and calculating the execution time based on the method.

【0008】[0008]

【発明が解決しようとする課題】例えば前記のprof
コマンドを使用する場合には,以下のような問題点が生
じていた。
[Problems to be Solved by the Invention] For example, the above-mentioned prof
The following problems have occurred when using commands.

【0009】 ソースプログラムファイルがある場合
には,関数実行時間取得用に対象となるソースプログラ
ムファイルを再翻訳しなければならないという手間が生
じていた。また,ソースプログラムファイルがない場合
には,関数の実行時間情報の取得を諦めなければならな
かった。
When there is a source program file, it is necessary to retranslate the target source program file for acquiring the function execution time. Also, if the source program file does not exist, it was necessary to give up acquiring the execution time information of the function.

【0010】 動的リンクにより動的ライブラリを呼
び出す主プログラムに対しても使用することはできる
が,動的ライブラリ関数の実行時間情報は採取できない
ため,実際にはプログラムのどの部分で時問が多く掛か
っているのかという判断を誤らせる原因となることがあ
った。
Although it can be used for a main program that calls a dynamic library by dynamic linking, the execution time information of the dynamic library function cannot be collected, so in practice, there are many problems in which part of the program. This sometimes caused a misunderstanding about whether it was hanging.

【0011】 動的ライブラリ関数に対しての実行時
間情報を取得したい場合には,動的ライブラリに対応す
る静的ライブラリを用意して,再結合しなければなら
ず,時間と手間がかかっていた。また,動的ライブラリ
に対応する静的ライブラリがない場合には,そのライブ
ラリ関数の実行時間情報の取得を断念せざるをえなかっ
た。
In order to obtain the execution time information for the dynamic library function, it is necessary to prepare a static library corresponding to the dynamic library and rejoin them, which takes time and effort. . In addition, when there is no static library corresponding to the dynamic library, the acquisition of the execution time information of the library function had to be abandoned.

【0012】 要求する部分の情報だけを得ることが
できず,1プロセス全体の情報しか得られないので,実
行時間の長いプロセスの場合には情報採取にそれだけ多
くの時間がかかり,また,通常止まることなく動作し続
けるようなプロセスの場合,関数実行時間情報を取得す
ることができなかった。
[0012] Since it is not possible to obtain only the information of the requested portion and only the information of the entire one process is obtained, it takes a lot of time to collect the information in the case of a process with a long execution time, and it usually stops. In the case of a process that continues to operate without any action, the function execution time information could not be acquired.

【0013】また,デバッガを利用してライブラリ関数
に関する情報を採取しようとする場合,関数の入口を調
べてブレイク・ポイントをはり,ブレイク・ポイントま
で到着したら,再実行という作業をしなければならない
という問題点があった。特に,運用時における実行情報
の取得は困難であった。
Further, when collecting information about a library function using a debugger, it is necessary to check the entrance of the function, set a break point, and re-execute when the break point is reached. There was a problem. In particular, it was difficult to obtain execution information during operation.

【0014】同時に起動しているプロセスの情報を採取
しようとする場合,個々のプロセスごとに画面や記録媒
体に出力するため,個々のプロセスに負荷がかかるとい
う問題点が生じていた。また,出力した個々のプロセス
の情報をマージする作業が必要であるという問題点が生
じていた。
When attempting to collect information on processes that are being activated at the same time, each process is output to a screen or recording medium, which causes a problem that a load is applied to each process. In addition, there is a problem that it is necessary to merge the output information of individual processes.

【0015】命令コードを解析して実行時間を計算する
という方法の場合には,情報を採取し出力するまでに長
い時間がかかっていた。本発明は上記問題点の解決を図
り,再翻訳/再結合を行うことなく,実行モジュールの
関数,および動的ライブラリ関数の実行情報について要
求する部分の情報のみ取得することができ,また測定を
行わない場合に同じモジュールを使用しても性能劣化を
最小にする手段を提供することを目的とする。
In the method of analyzing the instruction code and calculating the execution time, it takes a long time to collect and output the information. The present invention solves the above-mentioned problems, and can acquire only the information of the requested part of the execution information of the function of the execution module and the dynamic library function without performing the retranslation / reconnection, and the measurement can be performed. It is an object of the present invention to provide a means for minimizing performance deterioration even when the same module is used when not performing.

【0016】[0016]

【課題を解決するための手段】図1は本発明の構成例を
示す図である。図中,1は測定対象のプロセス,10は
測定用に改良された動的リンカ,11は測定対象の判定
を行う測定対象判定部,12はリンク用テーブル(以
下,PLT(Procedure Linkage Table)という)のエン
トリを書き換えるPLTエントリ書き換え部,20は情
報採取用ライブラリ,21は測定時の初期化を行う初期
処理部,22は一定時間ごとに起動される実行情報採取
部,23は動的ライブラリ関数の呼び出し時に起動され
る関数実行トレース部,24は採取した情報を出力する
採取情報出力部,25はエラー発生時に採取情報出力部
24または,共有メモリ情報出力部42を呼び出すエラ
ー処理部,30は測定対象となる主ロードモジュール,
31は命令テキスト部,32は動的リンク時に制御移行
先のアドレス情報が設定されて用いられるリンク用テー
ブル(PLT),33a,33bはそれぞれ動的リンク
対象となる1以上の関数が格納された動的ライブラリ,
40は測定に関するコマンドを受け付けて処理する測定
監視処理部,41は測定するかしないかのフラグを設定
するフラグ設定部,42は採取した測定情報を所定の記
憶装置または出力装置に出力する共有メモリ情報出力
部,45はオペレーティングシステムの中枢部分である
カーネル,46は測定するかしないかを示すカーネル内
フラグ,51はキーボード等の入力装置,52はディス
プレイ装置等の出力装置,53はディスク装置等の記憶
装置,60はプロセス間で共有される共有メモリ,63
はプロセス内メモリを表す。
FIG. 1 is a diagram showing a configuration example of the present invention. In the figure, 1 is a process to be measured, 10 is a dynamic linker improved for measurement, 11 is a measurement target determination unit that determines the measurement target, and 12 is a link table (hereinafter referred to as PLT (Procedure Linkage Table)). ), The PLT entry rewriting unit, 20 is an information collecting library, 21 is an initial processing unit that performs initialization at the time of measurement, 22 is an execution information collecting unit that is activated at regular intervals, and 23 is a dynamic library function. A function execution trace unit that is activated when calling the, a collected information output unit that outputs collected information, a error processing unit that calls the collected information output unit 24 or the shared memory information output unit when an error occurs, and a 30 Main load module to be measured,
31 is an instruction text part, 32 is a link table (PLT) which is used by setting the address information of the control transfer destination at the time of dynamic linking, and 33a and 33b each store one or more functions to be dynamically linked. Dynamic library,
Reference numeral 40 is a measurement monitoring processing unit that receives and processes a command related to measurement, 41 is a flag setting unit that sets a flag indicating whether or not to measure, and 42 is a shared memory that outputs the collected measurement information to a predetermined storage device or output device. An information output unit, 45 is a kernel which is a central part of the operating system, 46 is an in-kernel flag indicating whether or not to measure, 51 is an input device such as a keyboard, 52 is an output device such as a display device, 53 is a disk device, etc. Storage device, 60 is a shared memory shared between processes, 63
Represents in-process memory.

【0017】本発明では,一定時間ごとにプログラムカ
ウンタの値を得て関数等の実行情報を採取する機能(以
下,これをプロファイル機能という)と,動的ライブラ
リ関数が呼び出されたときにその情報を採取する機能
(以下,これをトレース機能という)を有している。こ
れらの機能を,以下の手段により,主ロードモジュール
30および動的ライブラリ33a,33b,…に手を加
えることなく,通常のロードモジュールの状態で実現す
る。
According to the present invention, there is a function of obtaining the value of the program counter at fixed time intervals and collecting execution information of functions (hereinafter referred to as profile function), and the information when the dynamic library function is called. It has a function to collect data (hereinafter referred to as the trace function). These functions are realized by the following means in a normal load module state without modifying the main load module 30 and the dynamic libraries 33a, 33b, ....

【0018】まず,プロファイル機能について説明す
る。入力装置51からのコマンド入力によりプロファイ
ル機能の実行指示があると,測定監視処理部40は,フ
ラグ設定部41によりその旨をカーネル内フラグ46に
設定する。カーネル45は,測定対象プロセス1の実行
開始時に,動的リンカ10に対しカーネル内フラグ46
の状態を通知する。
First, the profile function will be described. When there is an instruction to execute the profile function by inputting a command from the input device 51, the measurement / monitoring processing unit 40 sets the fact to the in-kernel flag 46 by the flag setting unit 41. The kernel 45 notifies the dynamic linker 10 of the in-kernel flag 46 at the start of execution of the measurement target process 1.
Notify the status of.

【0019】動的リンカ10は,通知されたフラグ情報
によりプロファイル機能の実行指示があることを知る
と,情報採取用ライブラリ20をマップし,まず初期処
理部21を呼び出す。初期処理部21は,実行情報採取
部22を所定の時間ごとに起動する設定を行う。その
後,主ロードモジュール30に実行制御を移すと,タイ
マのシグナル信号により一定時間ごとに実行情報採取部
22が起動される。
When the dynamic linker 10 learns from the notified flag information that there is an instruction to execute the profile function, it maps the information collection library 20 and first calls the initial processing section 21. The initial processing unit 21 makes settings to activate the execution information collection unit 22 at predetermined time intervals. After that, when the execution control is transferred to the main load module 30, the execution information collecting unit 22 is activated at regular intervals by the signal signal of the timer.

【0020】実行情報採取部22は,実行が中断された
主ロードモジュール30または動的ライブラリ33a,
33b等のプログラムカウンタの値を採取し,プログラ
ムカウンタの値に応じてそれが示すアドレスが何回採取
されたかをカウントし,そのカウント情報をプロセス内
メモリ63または共有メモリ60に記録する。主ロード
モジュール30の実行終了時または測定の終了時に,採
取情報出力部24は,プロセス内メモリ63または共有
メモリ60に格納された情報および測定対象に関する主
ロードモジュール30および動的ライブラリ33a,3
3bの命令テキスト部の先頭アドレス,最終アドレスを
所定の記憶装置53または出力装置52に出力する。ま
たは,カウント情報を共有メモリ60に出力した場合に
は測定監視処理部40内に設けられた共有メモリ情報出
力部42により,共有メモリ60内の測定情報を所定量
ごとに記憶装置53または出力装置52に出力する。
The execution information collecting unit 22 includes the main load module 30 or the dynamic library 33a whose execution is suspended,
The value of the program counter such as 33b is sampled, the number of times the address indicated by it is sampled is counted according to the value of the program counter, and the count information is recorded in the in-process memory 63 or the shared memory 60. At the end of the execution of the main load module 30 or the end of the measurement, the collected information output unit 24 causes the main load module 30 and the dynamic libraries 33a, 3 related to the information and the measurement target stored in the in-process memory 63 or the shared memory 60 to be collected.
The head address and the tail address of the instruction text portion of 3b are output to a predetermined storage device 53 or output device 52. Alternatively, when the count information is output to the shared memory 60, the shared memory information output unit 42 provided in the measurement monitoring processing unit 40 stores the measured information in the shared memory 60 for each predetermined amount in the storage device 53 or the output device. Output to 52.

【0021】上記処理開始前または処理開始時に,測定
監視処理部40は,入力装置51からのコマンド入力に
より,測定時期または測定対象プロセスに関する情報が
指定された場合,その情報を共有メモリ60に設定す
る。測定対象判定部11は,その情報を参照して,初期
処理部21による処理または実行情報採取部22による
処理を行うか否かを判定する。
Before or at the start of the processing, the measurement monitoring processing unit 40 sets the information in the shared memory 60 when the information about the measurement time or the process to be measured is specified by the command input from the input device 51. To do. The measurement target determining unit 11 refers to the information and determines whether to perform the process by the initial processing unit 21 or the process by the execution information collecting unit 22.

【0022】トレース機能は次のように実現される。入
力装置51からのコマンド入力によりトレース機能の実
行指示があると,測定監視処理部40は,フラグ設定部
41によりその旨をカーネル内フラグ46に設定する。
カーネル45は,測定対象プロセス1の実行開始時に,
動的リンカ10に対しカーネル内フラグ46の状態を通
知する。
The trace function is realized as follows. When a trace function execution instruction is given by a command input from the input device 51, the measurement monitoring processing unit 40 sets the fact to the in-kernel flag 46 by the flag setting unit 41.
When the execution of the measurement target process 1 is started, the kernel 45
The state of the in-kernel flag 46 is notified to the dynamic linker 10.

【0023】動的リンカ10は,動的ライブラリ33a
等をマップし,また通知されたフラグ情報によりトレー
ス機能の実行指示があることを知ると,情報採取用ライ
ブラリ20もマップし,関数実行トレース部23のアド
レスを得る。その後,主ロードモジュール30に実行制
御を移すと,動的ライブラリ33a等の各関数の最初の
呼び出し時に,動的リンク(結合)のため動的リンカ1
0が呼び出される。動的リンカ10は,PLTエントリ
書き換え部12により,リンク用テーブル32の該当エ
ントリの書き換えを行う。通常の場合にはリンク用テー
ブル32の該当エントリに,呼び出された動的ライブラ
リ関数のアドレス情報を設定するが,トレース機能の実
行が指示されていれば,動的ライブラリ関数のアドレス
情報を設定する代わりに,関数実行トレース部23のア
ドレス情報を設定し,関数実行トレース部23を呼び出
す。
The dynamic linker 10 includes the dynamic library 33a.
Etc., and when it is known that there is an instruction to execute the trace function from the notified flag information, the information collecting library 20 is also mapped and the address of the function execution trace unit 23 is obtained. After that, when the execution control is transferred to the main load module 30, the dynamic linker 1 for dynamic linking (coupling) is executed at the first call of each function such as the dynamic library 33a.
0 is called. In the dynamic linker 10, the PLT entry rewriting unit 12 rewrites the corresponding entry in the link table 32. Normally, the address information of the called dynamic library function is set in the corresponding entry of the link table 32, but if the execution of the trace function is instructed, the address information of the dynamic library function is set. Instead, the address information of the function execution trace unit 23 is set and the function execution trace unit 23 is called.

【0024】関数実行トレース部23は,現時刻,プロ
セスID,動的ライブラリ関数の関数名などの実行情報
を共有メモリ60に採取した後,呼び出された動的ライ
ブラリ33a等の関数に制御を渡す。リンク用テーブル
32の該当エントリが書き換えられているため,以後,
その動的ライブラリ関数が呼び出されるたびに,関数実
行トレース部23が関数の呼び出し元からダイレクトに
呼び出されることになる。主ロードモジュール30の実
行終了時または測定の終了時に,採取情報出力部24
は,共有メモリ60に格納された情報を所定の記憶装置
53または出力装置52に出力する。または,測定監視
処理部40内に設けられた共有メモリ情報出力部42に
より,共有メモリ60内の測定情報を所定量ごとに記憶
装置53または出力装置52に出力する。
The function execution trace unit 23 collects execution information such as the current time, the process ID, and the function name of the dynamic library function in the shared memory 60, and then passes control to the called function of the dynamic library 33a. . Since the corresponding entry in the link table 32 has been rewritten,
Each time the dynamic library function is called, the function execution trace unit 23 is directly called from the function calling source. When the execution of the main load module 30 ends or the measurement ends, the collected information output unit 24
Outputs the information stored in the shared memory 60 to a predetermined storage device 53 or output device 52. Alternatively, the shared memory information output unit 42 provided in the measurement monitoring processing unit 40 outputs the measurement information in the shared memory 60 to the storage device 53 or the output device 52 for each predetermined amount.

【0025】上記処理に関して,測定監視処理部40
は,入力装置51からのコマンド入力により,測定対象
となるプロセス,動的ライブラリまたは動的ライブラリ
内の関数に関する情報が指定された場合,その情報を共
有メモリ60に設定する。測定対象判定部11は,共有
メモリ60に設定された測定対象の情報に基づいて,P
LTエントリ書き換え部12によるリンク用テーブルの
エントリ書き換え対象を選別し,トレースの必要なプロ
セス,動的ライブラリまたは動的ライブラリ内の関数の
み関数実行トレース部23に制御が移行するようにPL
Tエントリ書き換え部12に指示する。
Regarding the above processing, the measurement monitoring processing unit 40
When information about a process to be measured, a dynamic library, or a function in the dynamic library is specified by a command input from the input device 51, the information is set in the shared memory 60. Based on the information of the measurement target set in the shared memory 60, the measurement target determination unit 11 sets the P
PL is selected so that the entry rewriting target of the link table by the LT entry rewriting unit 12 is selected, and control is transferred to the function execution tracing unit 23 only for the process, dynamic library, or function in the dynamic library that requires tracing.
The T entry rewriting unit 12 is instructed.

【0026】以上のプロファイル機能またはトレース機
能の実行時に,エラーが発生すると,エラー処理部25
が呼び出されるようになっており,エラー処理部25
は,採取情報出力部24を呼び出すようになっている。
採取情報出力部24は,共有メモリ60またはプロセス
内メモリ63に記録されたエラーが発生するまでの採取
情報を,記憶装置53または出力装置52に出力する。
または,プロファイル機能,トレース機能共に共有メモ
リ60に情報を出力している場合にはエラー処理部25
は共有メモリ情報出力部42を呼び出し,共有メモリ情
報出力部42により共有メモリ60内の測定情報を記憶
装置53または出力装置52に出力する。
If an error occurs during the execution of the above profile function or trace function, the error processing unit 25
Is called, and the error processing unit 25
Calls the collection information output unit 24.
The collection information output unit 24 outputs the collection information recorded in the shared memory 60 or the in-process memory 63 until an error occurs to the storage device 53 or the output device 52.
Alternatively, when both the profile function and the trace function output information to the shared memory 60, the error processing unit 25
Calls the shared memory information output unit 42, and the shared memory information output unit 42 outputs the measurement information in the shared memory 60 to the storage device 53 or the output device 52.

【0027】[0027]

【作用】請求項1記載の発明では,動的リンカ10の先
頭で初期処理部21を呼び出し,一定時間ごとに実行情
報採取部22に制御が移されるように設定するので,そ
の後,設定した一定時間ごとに実行情報採取部22によ
って,どの命令を実行しようとしていたかをカウントす
ることができる。アドレスごとに何回実行したかの情報
を得ることにより,実行回数の比率に応じた各関数ごと
の実行時間情報を算出することができる。また,実行情
報採取部22は動的ライブラリのアドレスについてもカ
ウントするため,動的ライブラリ関数の実行時間情報に
ついても算出できる。
According to the first aspect of the invention, the initial processing unit 21 is called at the head of the dynamic linker 10 and the execution information collecting unit 22 is set to transfer control at regular intervals. The instruction to be executed can be counted by the execution information collecting unit 22 every time. By obtaining information on how many times each address is executed, execution time information for each function can be calculated according to the ratio of the number of executions. Further, since the execution information collection unit 22 also counts the address of the dynamic library, the execution time information of the dynamic library function can be calculated.

【0028】従来技術の場合には,情報採取を開始する
ための命令を命令テキスト部31の先頭に書き込むため
に,プログラムを実行時間測定用に翻訳/結合する必要
があったが,本発明では情報採取を開始するための命令
を事前に主ロードモジュール30に書き込む必要はな
く,測定用の動的リンカ10内で対処するため,情報採
取をするための翻訳/結合をする必要がない。
In the case of the prior art, in order to write the command for starting the information collection at the head of the command text portion 31, it was necessary to translate / combine the program for measuring the execution time, but in the present invention, It is not necessary to write an instruction for starting information collection to the main load module 30 in advance, and it is not necessary to translate / combine for information collection because it is dealt with in the dynamic linker 10 for measurement.

【0029】請求項2および請求項3記載の発明では,
測定監視処理部40が測定をするか否かの情報をカーネ
ル45内に設定し,動的リンカ10では,カーネル45
からの通知により測定/非測定を判断して,非測定の場
合には,従来の動的リンカと同様に通常の処理だけを行
う。したがって,主ロードモジュール30および動的リ
ンカ10におけるオーバーヘッドは少なく,測定を行わ
ない時の性能劣化を非常に小さなものにすることが可能
となる。
In the inventions according to claim 2 and claim 3,
Information on whether or not the measurement monitoring processing unit 40 performs measurement is set in the kernel 45, and in the dynamic linker 10, the kernel 45 is set.
Measurement / non-measurement is judged by the notification from, and in the case of non-measurement, only normal processing is performed like the conventional dynamic linker. Therefore, the overhead in the main load module 30 and the dynamic linker 10 is small, and it is possible to make the performance deterioration when measurement is not performed very small.

【0030】請求項4記載の発明では,測定監視処理部
40と測定用の動的リンカ10を持つ各プロセスとの間
で共有される共有メモリ60を用い,共有メモリ60に
測定対象の情報を持たせることにより,各プロセスの初
期処理部21および実行情報採取部22から呼び出され
る測定対象判定部11で各プロセスが測定対象なのかど
うかをそれぞれ判定し,測定対象である場合には測定を
し,測定対象でない場合には測定をしないという処理が
できる。また,共有メモリ60内に,いつ実行情報の採
取を行うかというフラグ等を持たせることにより,情報
を取りたいときにだけ採取し,それ以外のときには採取
しないという処理ができる。
According to the fourth aspect of the present invention, the shared memory 60 shared by the measurement monitoring processing unit 40 and each process having the dynamic linker 10 for measurement is used. By having the process, the measurement target determination unit 11 called from the initial processing unit 21 and the execution information collection unit 22 of each process determines whether or not each process is a measurement target, and when it is a measurement target, the measurement is performed. However, it is possible to perform processing that does not perform measurement if it is not the measurement target. Further, by providing the shared memory 60 with a flag or the like indicating when to collect the execution information, it is possible to collect the information only when the information is desired to be collected and not to collect the information at other times.

【0031】したがって,各プロセスに対して,要求す
るプロセスのみの情報を,要求する部分だけ採取すると
いうことが可能となる。請求項5記載の発明では,関数
トレースのために,リンク用テーブル32のエントリを
書き換え,関数実行トレース部23に制御が渡るように
し,関数実行トレース部23は,動的ライブラリ関数に
入る直前で関数の情報(関数名,プロセス名,プロセス
ID,ライブラリ名,時刻等)を獲得するので,主ロー
ドモジュール30および動的ライブラリ33a等のソー
スプログラムの再翻訳/再結合を行うことなく,随時必
要な情報を取得することができる。
Therefore, for each process, it is possible to collect information about only the requested process and only the requested part. In the invention according to claim 5, for function tracing, the entry of the linking table 32 is rewritten so that control is passed to the function execution tracing section 23, and the function execution tracing section 23 immediately before entering the dynamic library function. Since the function information (function name, process name, process ID, library name, time, etc.) is acquired, it is necessary at any time without retranslating / rejoining the source programs such as the main load module 30 and the dynamic library 33a. Information can be obtained.

【0032】請求項6および請求項7記載の発明では,
測定監視処理部40が測定をするか否かの情報をカーネ
ル45内に設定し,動的リンカ10では,カーネル45
からの通知により測定/非測定を判断して,非測定の場
合には,従来の動的リンカと同様に通常の処理だけを行
う。したがって,主ロードモジュール30および動的リ
ンカ10におけるオーバーヘッドは少なく,測定を行わ
ない時の性能劣化を非常に小さなものにすることが可能
となる。
In the inventions according to claims 6 and 7,
Information on whether or not the measurement monitoring processing unit 40 performs measurement is set in the kernel 45, and in the dynamic linker 10, the kernel 45 is set.
Measurement / non-measurement is judged by the notification from, and in the case of non-measurement, only normal processing is performed like the conventional dynamic linker. Therefore, the overhead in the main load module 30 and the dynamic linker 10 is small, and it is possible to make the performance deterioration when measurement is not performed very small.

【0033】請求項8記載の発明では,測定監視処理部
40と測定用の動的リンカ10を持つ各プロセスとの間
で共有される共有メモリ60を用い,共有メモリ60に
測定対象の情報を持たせることにより,それによって測
定/非測定を判定し,動的リンカ10におけるPLTエ
ントリ書き換え部12による書き換え内容を,測定対象
の場合には関数実行トレース部23のアドレス情報と
し,測定対象でない場合には動的ライブラリ関数のアド
レス情報とするので,測定対象でない場合の動的ライブ
ラリ関数の呼び出しを従来と同様な通常の呼び出しイン
タフェースとすることができ,測定しない動的ライブラ
リ関数を呼び出す際のオーバーヘッドをなくすことがで
きる。
According to the eighth aspect of the present invention, the shared memory 60 shared by the measurement monitoring processing unit 40 and each process having the dynamic linker 10 for measurement is used, and the information of the measurement target is stored in the shared memory 60. By having it, the measurement / non-measurement is determined accordingly, and the content rewritten by the PLT entry rewriting unit 12 in the dynamic linker 10 is used as the address information of the function execution trace unit 23 in the case of the measurement target, and is not measured. Since the address information of the dynamic library function is used for, the call of the dynamic library function when it is not the measurement target can be made the same normal call interface as before, and the overhead when calling the dynamic library function that is not measured. Can be eliminated.

【0034】請求項9記載の発明では,情報採取中にエ
ラーが発生した場合,エラー処理部25を呼び出し,エ
ラー処理部25で採取情報出力部24を呼び出すことに
より,それまでに採取した情報を出力する。したがっ
て,情報採取中にエラーが発生した場合でも,それまで
に採取した情報が失われることなく,エラーが発生する
までの情報の出力が可能となる。
According to the ninth aspect of the invention, when an error occurs during information collection, the error processing section 25 is called, and the error processing section 25 calls the collected information output section 24 to collect the information collected up to that point. Output. Therefore, even if an error occurs during information collection, the information collected until then can be output without losing the information until the error occurs.

【0035】請求項10記載の発明では,実行情報採取
部22または関数実行トレース部23は,採取情報を共
有メモリ60に記録し,共有メモリ情報出力部42は,
それを所定量ごとに記憶装置53または出力装置52に
出力するので,情報採取時のオーバーヘッドを小さくす
ることができ,特に複数のプロセスの測定情報を収集す
る場合などに,個々のプロセスに大きな負荷をかけない
で,必要な情報の収集を行うことが可能になる。
In the tenth aspect of the invention, the execution information collecting unit 22 or the function execution tracing unit 23 records the collected information in the shared memory 60, and the shared memory information output unit 42
Since it is output to the storage device 53 or the output device 52 for each predetermined amount, the overhead at the time of collecting information can be reduced, and particularly when collecting measurement information of a plurality of processes, a large load is placed on each process. It is possible to collect necessary information without spending time.

【0036】[0036]

【実施例】以下に本発明の一実施例を図を用いて説明す
る。 〔第1の実施例〕図2は,本発明の一実施例構成図であ
る。
An embodiment of the present invention will be described below with reference to the drawings. [First Embodiment] FIG. 2 is a block diagram of an embodiment of the present invention.

【0037】図2において,図1と同符号のものは図1
に示すものに対応し,34はカーネル45が動的リンカ
10へ測定に関するフラグ情報(測定/非測定)を通知
するためのレジスタ,61は測定対象プロセス1と測定
監視処理部40とで共有する測定対象設定用共有メモ
リ,62は採取した情報を記録する採取情報記録用共有
メモリ,70は採取情報出力部24によって出力される
情報を記憶しておく採取情報ファイル,71は主ロード
モジュールのシンボルテーブル,72a,72bはそれ
ぞれ動的ライブラリ33a,33bのシンボルテーブ
ル,80は採取情報ファイル70の情報を編集して出力
する情報表示処理部を表す。
In FIG. 2, the same reference numerals as those in FIG.
Corresponding to the one shown in (1), 34 is a register for the kernel 45 to notify the dynamic linker 10 of flag information (measurement / non-measurement) regarding measurement, and 61 is shared by the measurement target process 1 and the measurement monitoring processing unit 40. Shared memory for setting measurement object, 62 is a shared memory for recording collected information for recording collected information, 70 is a collected information file for storing information output by the collected information output unit 24, 71 is a symbol of the main load module Tables 72a and 72b represent symbol tables of the dynamic libraries 33a and 33b, respectively, and 80 represents an information display processing unit for editing and outputting the information in the collection information file 70.

【0038】トレースまたはプロファイルに関する測定
開始(または測定準備)のコマンドが入力されると,測
定監視処理部40のフラグ設定部41は,カーネル内フ
ラグ46をON(測定)に設定する。また,測定終了の
コマンドを入力した場合には,フラグ設定部41は,カ
ーネル内フラグ46をOFF(非測定)に戻す。
When a measurement start (or measurement preparation) command for a trace or a profile is input, the flag setting unit 41 of the measurement monitoring processing unit 40 sets the in-kernel flag 46 to ON (measurement). Further, when the measurement end command is input, the flag setting unit 41 returns the in-kernel flag 46 to OFF (non-measurement).

【0039】プロセス1の起動時には,カーネル45が
このカーネル内フラグ46を判別して,動的リンカ10
に実行情報の測定/非測定を通知する。この通知には,
予め動的リンカ10とのインタフェースとして定めた未
使用のレジスタ34を用いる。
When the process 1 is started, the kernel 45 discriminates the in-kernel flag 46, and the dynamic linker 10
Notify the measurement / non-measurement of execution information to. This notification includes
An unused register 34, which is predetermined as an interface with the dynamic linker 10, is used.

【0040】また,測定監視処理部40は,測定指示の
コマンドで指定された情報に基づき,測定対象設定用共
有メモリ61にプロセス名,プロセスID,もしくはユ
ーザID,ユーザ名などのプロセスの測定を行うかどう
かを識別する判定条件,および,各時点で測定を行うの
かどうかというフラグを設定する。各時点で測定を行う
かどうかというフラグの設定処理は,例えばコマンドに
よって10分後に測定を開始すると指定された場合,1
0分経過時に測定開始のフラグを測定対象設定用共有メ
モリ61に設定するというような処理である。
Further, the measurement monitoring processing unit 40 measures the process such as process name, process ID, or user ID and user name in the measurement target setting shared memory 61 based on the information specified by the measurement instruction command. Set the judgment conditions that identify whether or not to perform, and the flag that indicates whether or not to perform measurement at each time point. For example, if the command specifies that measurement should be started after 10 minutes, the flag setting process of whether to perform measurement at each time point is 1
The processing is such that the measurement start flag is set in the measurement target setting shared memory 61 when 0 minutes has elapsed.

【0041】最初にプロセス1が起動されると,測定用
に改良された動的リンカ10に制御が渡される。動的リ
ンカ10は,プロセス1の最初でレジスタ34を判定す
る。レジスタ34が測定を行わないように設定されてい
る場合には,以後通常時(測定を行わない時)の処理を
行う。この通常時の処理は,従来の動的リンカとまった
く同様な処理である。また,測定を行うように設定され
ていた場合には,動的リンカ10は,情報採取用ライブ
ラリ20をマップし,さらにプロファイルに関する測定
の指示があった場合には,初期処理部21を呼出す。
When process 1 is first started, control is passed to the modified dynamic linker 10 for measurement. The dynamic linker 10 determines the register 34 at the beginning of process 1. When the register 34 is set so as not to perform the measurement, the normal processing (when the measurement is not performed) is performed thereafter. This normal process is exactly the same as the conventional dynamic linker. Further, when the measurement is set to perform measurement, the dynamic linker 10 maps the information collection library 20, and when there is a measurement instruction regarding the profile, calls the initial processing unit 21.

【0042】初期処理部21では,まず測定対象判定部
11を呼出し,自プロセス1が測定対象であるかどうか
を判定する。測定対象でないプロセスの場合には,その
まま何もせずに制御を動的リンカ10に戻し,以後通常
のプロセスの処理(測定を行わない場合の処理)を行
う。
The initial processing section 21 first calls the measurement object determination section 11 to determine whether or not the own process 1 is a measurement object. In the case of a process that is not the measurement target, control is returned to the dynamic linker 10 without doing anything, and the process of the normal process (process when the measurement is not performed) is performed thereafter.

【0043】また,測定対象である場合には,次にシグ
ナルの出口関数として実行情報採取部22を設定し,そ
のシグナルを定期的に発生させるようにタイマの設定を
行う。制御はこのあと動的リンカ10に戻す。
If it is a measurement target, then the execution information collecting unit 22 is set as an exit function of the signal, and the timer is set so that the signal is periodically generated. Control then returns to the dynamic linker 10.

【0044】初期処理部21での設定により一定時間ご
とに指定したシグナルがプロセスに対して発行され,実
行情報採取部22に制御が移される。ここではまず,そ
の時点で測定を行うのかどうかを測定対象判定部11で
判定し,測定を行う状態であれば,実行情報採取部22
から戻る主ロードモジュールや動的ライブラリの命令テ
キスト部のアドレスを採取し,そのアドレスが何回呼ば
れたかを示すカウンタを1増やす。
A signal specified by the initial processing unit 21 is issued to the process at regular intervals, and control is transferred to the execution information collecting unit 22. Here, first, the measurement target determination unit 11 determines whether or not to perform the measurement at that time, and if the measurement is performed, the execution information collection unit 22
Return the address of the instruction text part of the main load module or dynamic library and increment the counter that indicates how many times the address is called.

【0045】一方,プロセス1の命令テキスト部31に
おいて動的ライブラリ関数が呼ばれると,リンク用テー
ブル(PLT)32の該当するエントリに制御が渡され
る。その動的ライブラリ関数の呼び出しが第1回目であ
れば,従来と同様な制御移行方法により動的リンカ10
に制御が移る。動的リンカ10は,PLTエントリ書き
換え部12によって以下の処理を行う。
On the other hand, when the dynamic library function is called in the instruction text portion 31 of the process 1, the control is passed to the corresponding entry of the link table (PLT) 32. If the call to the dynamic library function is the first time, the dynamic linker 10 is operated by the control transfer method similar to the conventional one.
Control is transferred to. The dynamic linker 10 performs the following processing by the PLT entry rewriting unit 12.

【0046】トレースの指示によって情報採取用ライブ
ラリ20をマップしている場合,まず測定対象判定部1
1を呼び出し,測定対象判定部11は,測定対象設定用
共有メモリ61を参照し,プロセス,ライブラリまたは
関数が測定対象になっているかどうかを判断する。も
し,測定対象でない場合は,PLTエントリ書き換え部
12において,通常のPLT32の書き換えを行う。
When the information collecting library 20 is mapped by the trace instruction, first, the measuring object judging section 1
1, the measurement target determining unit 11 refers to the measurement target setting shared memory 61, and determines whether a process, a library, or a function is a measurement target. If it is not the measurement target, the PLT entry rewriting unit 12 rewrites the normal PLT 32.

【0047】測定対象である場合には,PLTエントリ
書き換え部12において,動的ライブラリ関数が2回目
以降呼ばれる時に直接関数実行トレース部23に制御が
渡るように,PLT32のエントリを,関数実行トレー
ス部23のアドレスとなるように書き換える。その後,
関数実行トレース部23を呼び出し,採取情報記録用共
有メモリ62に関数の実行情報を記録し,本来の動的ラ
イブラリ関数へ制御を移す。関数実行トレース部23の
処理では,採取情報記録用共有メモリ62の管理情報か
らレコードの出力先の要素番号を得,配列の要素を一つ
進めて,管理情報の要素番号を更新するとともに,最初
に獲得した要素番号の配列に,呼び出された関数名,呼
び出したプロセス名,プロセスID,時刻情報などの実
行情報をログ情報として格納する。
In the case of the measurement object, the PLT entry rewriting unit 12 sets the entry of the PLT 32 to the function execution trace unit so that the control is directly passed to the function execution trace unit 23 when the dynamic library function is called for the second time and thereafter. Rewrite so that the address becomes 23. afterwards,
The function execution trace unit 23 is called, the execution information of the function is recorded in the collection information recording shared memory 62, and control is transferred to the original dynamic library function. In the processing of the function execution trace unit 23, the element number of the output destination of the record is obtained from the management information of the collected information recording shared memory 62, the element of the array is advanced by one, and the element number of the management information is updated. Execution information such as the called function name, the called process name, the process ID, and the time information is stored as log information in the array of element numbers acquired in step 1.

【0048】実行情報採取部22または関数実行トレー
ス部23にてエラーが起きず,プロセスの処理が終了し
たなら,最後に動的リンカ10で終了処理が行われる
が,ここで採取情報出力部24を呼び出し,実行情報採
取部22からの命令テキスト部への戻りアドレスに対応
したカウンタの情報,情報採取した実行モジュールもし
くは動的ライブラリに関するアドレス情報(それぞれの
テキスト部の先頭アドレスおよび最終アドレス),およ
び,関数実行トレース部23にて採取した関数実行情報
を採取情報ファイル70に出力する。
If an error does not occur in the execution information collection unit 22 or the function execution trace unit 23 and the processing of the process is completed, the termination processing is finally performed by the dynamic linker 10. Here, the collection information output unit 24 is used. , Counter information corresponding to the return address from the execution information collection unit 22 to the instruction text portion, address information regarding the execution module or dynamic library for which information was collected (the start address and the final address of each text portion), and The function execution information collected by the function execution trace unit 23 is output to the collection information file 70.

【0049】実行情報採取部22または関数実行トレー
ス部23での情報採取の処理中にエラーが発生した場合
には,エラー処理部25を呼び出して,必要なエラー処
理を行った後,採取情報出力部24を呼び出して,それ
までに採取した各アドレスに対応したカウント情報,実
行モジュールのファイル(主ロードモジュールおよび動
的ライブラリ)に対応するアドレス情報(各テキスト部
の先頭アドレスおよび最終アドレス),および,関数実
行に関するトレース情報を出力する。
When an error occurs during the process of collecting information in the execution information collection unit 22 or the function execution trace unit 23, the error processing unit 25 is called to perform necessary error processing, and then the collected information is output. The count information corresponding to each address collected up to that time by calling the section 24, the address information corresponding to the file of the execution module (main load module and dynamic library) (start address and end address of each text part), and , Outputs trace information related to function execution.

【0050】また,測定の終了指示に対する処理では,
一定時間ごとに発生させていたシグナルを発生しないよ
うに設定し,以後,通常のプロセスの動作を行うように
する。
Further, in the processing for the measurement end instruction,
Set it so that it does not generate the signal that was being generated at regular intervals, and then perform normal process operations.

【0051】図3は,実行情報採取部による実行情報の
採取方法およびその出力を説明する図である。プロファ
イル情報の測定が設定されている場合,動的リンカ10
は図3に示すような情報採取領域100を確保する。こ
の情報採取領域100は,主ロードモジュール30およ
び動的に結合される動的ライブラリ33の命令テキスト
部のアドレスに対応して,各アドレスごとのカウント用
領域(初期値はオール0)を持つ。
FIG. 3 is a diagram for explaining a method of collecting execution information by the execution information collecting unit and its output. If the profile information measurement is set, the dynamic linker 10
Secures an information collection area 100 as shown in FIG. The information collection area 100 has a count area (initial value is all 0) for each address corresponding to the address of the instruction text part of the main load module 30 and the dynamically linked dynamic library 33.

【0052】実行情報採取部22は,一定時間ごとにタ
イマからのシグナルにより呼び出される。実行情報採取
部22は,復帰先のプログラムカウンタの値から,次に
主ロードモジュール30もしくは動的ライブラリ33の
どのアドレスを実行するかを知り,そのアドレスに対応
する情報採取領域100のカウント用領域Cを1カウン
トアップする。この処理を,定期的に呼び出されるごと
に繰り返す。
The execution information collecting unit 22 is called by a signal from a timer at regular time intervals. The execution information collecting unit 22 knows which address of the main load module 30 or the dynamic library 33 is to be executed next from the value of the program counter of the restoration destination, and the count area of the information collecting area 100 corresponding to the address. Count up C by 1. This process is repeated each time it is called.

【0053】採取情報出力部24は,この情報採取領域
100の情報と主ロードモジュールのアドレス情報(テ
キスト部の先頭アドレスと終了アドレス)101,各動
的ライブラリのアドレス情報(テキスト部の先頭アドレ
スと終了アドレス)102,103,…を採取情報ファ
イル70に格納する。
The collected information output unit 24 has information of the information collecting area 100, address information of the main load module (start address and end address of text portion) 101, address information of each dynamic library (start address of text portion and End addresses) 102, 103, ... Are stored in the collection information file 70.

【0054】採取した情報を表示する場合には,コマン
ド等により情報を採取した実行モジュール名(主ロード
モジュール名)を指定して情報表示処理部80を起動す
る。情報表示処理部80は,指定された実行モジュール
の中の実行時に必要な動的ライブラリ33のリストを取
得する。また,そこで得られた各動的ライブラリ33に
関しても同様にその動的ライブラリ33が実行時に必要
とする動的ライブラリのリストを取得する。以下同様に
して,測定対象となるプロセスが実行時に必要とするす
べての動的ライブラリ名を取得する。次に,こうして得
られた主ロードモジュールのシンボルテーブル71およ
び動的ライブラリすべてのシンボルテーブル72a,7
2b,…を取得する。
When displaying the collected information, the name of the execution module (name of the main load module) from which the information was collected is specified by a command or the like, and the information display processing unit 80 is started. The information display processing unit 80 acquires a list of the dynamic libraries 33 required for execution in the designated execution module. Similarly, for each dynamic library 33 obtained there, a list of dynamic libraries required by the dynamic library 33 at the time of execution is acquired. In the same way, obtain all the dynamic library names required by the process to be measured at the time of execution. Next, the symbol table 71 of the main load module and the symbol tables 72a, 7a of all the dynamic libraries thus obtained.
2b, ... Is acquired.

【0055】次に,情報表示処理部80は,採取情報出
力部24が出力した情報を採取情報ファイル70から読
み込む。採取情報ファイル70から読み込んだ情報に書
かれてある関数のアドレス情報(各テキスト部の先頭ア
ドレスおよび最終アドレス)を使って,実行情報採取部
22が採取した情報のどこからどこまでが主ロードモジ
ュール30に対する情報か,どこからどこまでがそれぞ
れ各動的ライブラリ33の情報かを調べる。そして,そ
れぞれ(主ロードモジュール,各動的ライブラリ)に対
して,シンボルテーブルの関数の先頭アドレスを使って
どこからどこまでがどの関数の情報かを調べ,その後,
各関数ごとにその情報を計算して実行時間を求める。最
後に,求めた結果を出力装置52もしくは記憶装置53
に出力する。
Next, the information display processing unit 80 reads the information output by the collected information output unit 24 from the collected information file 70. By using the address information (the start address and the end address of each text part) of the function written in the information read from the collection information file 70, from the information collected by the execution information collecting part 22 to where is the main load module 30. It is checked whether it is information or from where to where information of each dynamic library 33. Then, for each (main load module, each dynamic library), the start address of the function of the symbol table is used to check which function information is from where to where,
The execution time is calculated by calculating the information for each function. Finally, the obtained result is output to the output device 52 or the storage device 53.
Output to.

【0056】その結果,図3に示すように,各関数ごと
の実行比率,時間などの情報が得られることになる。す
なわち,アドレスごとのカウント情報と情報を採取した
一定時間をかけることにより,各関数の実行時間が分か
り,各関数の実行時間をそれらの総計で割ることによ
り,各関数の実行比率が求まる。また,図3では図示を
省略しているが,関数実行トレース部23によって得ら
れた各関数ごとの実行回数情報を利用すれば,各関数の
1回当りの実行時間についても情報を得ることができ
る。
As a result, as shown in FIG. 3, information such as the execution ratio and time for each function can be obtained. That is, the execution time of each function is known by multiplying the count information for each address and the fixed time for collecting the information, and the execution ratio of each function is obtained by dividing the execution time of each function by their total. Although not shown in FIG. 3, by using the execution count information for each function obtained by the function execution trace unit 23, it is possible to obtain information about the execution time per function of each function. it can.

【0057】図4および図5は,本発明の実施例におけ
る動的リンカの動作例を説明する図であって,図4は通
常時(測定しない場合)の動作例,図5はトレース時
(測定する場合)の動作例を示す。
FIGS. 4 and 5 are diagrams for explaining an operation example of the dynamic linker according to the embodiment of the present invention. FIG. 4 shows an operation example at a normal time (when no measurement is performed), and FIG. An operation example of (when measuring) is shown.

【0058】まず,通常時の動的ライブラリ関数の呼び
出しについて図4に示す〜に従って説明する。通常
時の場合の動作は,従来の動的リンカの動作と全く同様
である。
First, the call of the dynamic library function at the normal time will be described with reference to FIGS. The operation in the normal case is exactly the same as that of the conventional dynamic linker.

【0059】 主ロードモジュールの命令テキスト部
31から初めて動的ライブラリ関数fを呼び出した場
合,まずPLT32の該当エントリへ飛ぶ。 PLT32のエントリは,最初に動的リンカ10の
関数を呼び出すように設定されており,動的リンカ10
に制御が移る。
When the dynamic library function f is called from the instruction text portion 31 of the main load module for the first time, first, the corresponding entry of the PLT 32 is jumped to. The entry of the PLT 32 is set so as to call the function of the dynamic linker 10 first.
Control is transferred to.

【0060】 動的リンカ10は,PLT32の該当
エントリを動的ライブラリ関数fのアドレスへジャンプ
するように書き換えた後,その関数fを呼び出す。 〜 その後(2回目以降)に,命令テキスト部31
から動的ライブラリ関数fが呼び出されると,PLT3
2’の該当エントリが呼び出され,PLT32’の該当
エントリから直接,動的ライブラリ33の関数fに制御
が渡される。
The dynamic linker 10 rewrites the corresponding entry of the PLT 32 so as to jump to the address of the dynamic library function f, and then calls the function f. ~ After that (from the second time onward), the instruction text part 31
When the dynamic library function f is called from PLT3
The corresponding entry of 2'is called and the control is directly passed from the corresponding entry of PLT 32 'to the function f of the dynamic library 33.

【0061】これに対し,関数実行トレース時の動作
は,図5に示す〜のようになる。図5の〜は1
回目の関数呼び出し時の動作,〜は2回目以降の関
数呼び出し時の動作を示している。
On the other hand, the operation during the function execution trace is as shown in FIGS. 5 of FIG.
The operation when the function is called for the second time, and to indicate the operation when the function is called for the second time and thereafter.

【0062】 主ロードモジュールの命令テキスト部
31から初めて動的ライブラリ関数fを呼び出した場
合,まずPLT32の該当エントリへ飛ぶ。 PLT32のエントリは,最初に動的リンカ10の
関数を呼び出すように設定されており,動的リンカ10
に制御が移る。
When the dynamic library function f is called from the instruction text portion 31 of the main load module for the first time, first, the corresponding entry of the PLT 32 is jumped to. The entry of the PLT 32 is set so as to call the function of the dynamic linker 10 first.
Control is transferred to.

【0063】 動的リンカ10は,PLT32の該当
エントリを,動的ライブラリ関数fではなく,関数実行
トレース部(トレース用関数)23を呼び出すように書
き換える。その後,関数実行トレース部(トレース用関
数)23を呼び出す。
The dynamic linker 10 rewrites the corresponding entry of the PLT 32 so as to call the function execution trace unit (trace function) 23 instead of the dynamic library function f. After that, the function execution trace unit (trace function) 23 is called.

【0064】 トレース用関数は,動的ライブラリ関
数fに関する情報を採取し,記録した後,動的ライブラ
リ関数fのアドレスへジャンプする。〜 その後
(2回目以降)に,命令テキスト部31から動的ライブ
ラリ関数fが呼び出されると,PLT32’の該当エン
トリが呼び出され,PLT32’の該当エントリから,
関数実行トレース部(トレース用関数)23が呼び出さ
れる。関数実行トレース部(トレース用関数)23で情
報の採取・記録が行われた後,目的とする動的ライブラ
リ33の関数fに制御が渡される。
The tracing function collects and records information about the dynamic library function f, and then jumps to the address of the dynamic library function f. After that (after the second time), when the dynamic library function f is called from the instruction text part 31, the corresponding entry of PLT32 ′ is called, and from the corresponding entry of PLT32 ′,
The function execution trace unit (trace function) 23 is called. After information is collected and recorded by the function execution trace unit (trace function) 23, control is passed to the target function f of the dynamic library 33.

【0065】なお,図示省略するが,動的リンカ10で
は,トレース用関数から目的とする動的ライブラリ関数
への制御を移行できるようにするため,PLTエントリ
の書き換え時に,各エントリごとに目的とする動的ライ
ブラリ関数のアドレスを所定の作業域に退避する処理を
行う。
Although not shown, in the dynamic linker 10, in order to transfer control from the trace function to the target dynamic library function, the purpose of each entry is rewritten when the PLT entry is rewritten. A process of saving the address of the dynamic library function to be performed in a predetermined work area is performed.

【0066】図6は,測定監視処理部の処理フローチャ
ートである。本実施例では,測定用としてトレース,プ
ロファイル,およびその双方について開始/準備/終了
を指示するコマンドが用意されている。これらのコマン
ドが投入されると,測定監視処理部40が起動される。
測定監視処理部40は,まずステップS11の処理にお
いて,測定対象設定用共有メモリ61を獲得する。次に
ステップS12により,指示情報に応じて測定対象設定
用共有メモリ61の測定指示フラグの設定を行う。測定
指示フラグとしては例えばトレース/プロファイル/ト
レースおよびプロファイルを行うか否かのフラグがあ
る。ステップS13では,カーネル内フラグ46に測定
/非測定の設定を行う。
FIG. 6 is a processing flowchart of the measurement monitoring processing section. In this embodiment, commands for instructing start / preparation / end of the trace, profile, and both are prepared for measurement. When these commands are input, the measurement monitoring processing unit 40 is activated.
First, the measurement monitoring processing unit 40 acquires the measurement target setting shared memory 61 in the processing of step S11. Next, in step S12, the measurement instruction flag of the measurement target setting shared memory 61 is set according to the instruction information. The measurement instruction flag includes, for example, a trace / profile / trace and a flag indicating whether or not to perform a profile. In step S13, measurement / non-measurement is set for the in-kernel flag 46.

【0067】図7は,カーネルの処理フローチャートで
ある。プロセスのコマンド起動に対して,カーネル45
は,まずステップS21により,カーネル内フラグ46
がON(測定)かOFF(非測定)かを判定する。OF
Fの場合,ステップS23によって通常のプロセス起動
を行う。カーネル内フラグ46がONであれば,ステッ
プS22により,所定のレジスタ34にカーネル内フラ
グ46がONであることを示す情報を設定し,その後に
ステップS23を実行する。
FIG. 7 is a processing flowchart of the kernel. When the process command is started, the kernel 45
First, in step S21, the in-kernel flag 46
Is ON (measured) or OFF (non-measured). OF
In the case of F, normal process activation is performed in step S23. If the in-kernel flag 46 is ON, in step S22, information indicating that the in-kernel flag 46 is ON is set in a predetermined register 34, and then step S23 is executed.

【0068】図8は,動的リンカを含むプロセス内の処
理フローチャートである。プロセスが起動されると,ま
ず動的リンカ10へ制御が渡る。動的リンカ10では,
最初にステップS31により,所定のレジスタ34を参
照し,ON(測定)/OFF(非測定)を判定する。レ
ジスタがONであればステップS33の処理へ進み,O
FFであれば,ステップS32へ移って,従来と同様な
通常の動的リンカの処理を行う。
FIG. 8 is a processing flowchart in the process including the dynamic linker. When the process is started, control is first passed to the dynamic linker 10. In the dynamic linker 10,
First, in step S31, ON (measurement) / OFF (non-measurement) is determined by referring to a predetermined register 34. If the register is ON, the process proceeds to step S33
If it is FF, the process proceeds to step S32, and the normal dynamic linker process similar to the conventional process is performed.

【0069】ステップS33では,まず関数実行情報を
採取するための情報採取用ライブラリ20をマップし,
それらの処理部を呼び出すことができるようにする。次
に,ステップS34によって,測定に必要な作業領域の
確保などの動的リンカの初期化処理を行う。ステップS
35では,測定対象設定用共有メモリ61内の測定指示
フラグを参照して,プロファイルを行うかどうかを判定
する。プロファイルを行う場合は,ステップS36の処
理を行い,プロファイルを行わない場合は,ステップS
37の処理へ進む。
In step S33, first, the information collecting library 20 for collecting the function execution information is mapped,
Make it possible to call those processing units. Next, in step S34, initialization processing of the dynamic linker such as securing a work area required for measurement is performed. Step S
At 35, the measurement instruction flag in the measurement target setting shared memory 61 is referred to, and it is determined whether or not profiling is performed. If profiling is performed, the process of step S36 is performed. If profiling is not performed, step S36 is performed.
Proceed to step 37.

【0070】ステップS36では,初期処理部21を呼
び出し,実行情報採取部22を定期的に起動するための
初期化処理として,タイマの起動等の設定を行う。ステ
ップS37の処理において,主ロードモジュール30の
命令テキスト部31へ制御を移す。これにより,ユーザ
プログラムが実行されることになる(ステップS3
8)。命令テキスト部31において,1回目の動的ライ
ブラリ関数の呼び出しがあると(ステップS39),ス
テップS40で,PLT32を経由して動的リンカ10
を呼び出し,ステップS41で動的リンカ10へ制御を
移す。
In step S36, the initialization processing unit 21 is called, and as the initialization processing for periodically activating the execution information collecting unit 22, the activation of a timer is set. In the process of step S37, control is transferred to the instruction text part 31 of the main load module 30. As a result, the user program is executed (step S3).
8). When the first call of the dynamic library function is made in the instruction text portion 31 (step S39), the dynamic linker 10 is passed via the PLT 32 in step S40.
Is called, and control is transferred to the dynamic linker 10 in step S41.

【0071】動的リンカ10では,ステップS42の処
理で測定指示フラグを参照し,トレース準備/トレース
開始/トレースしないのいずれかを判定する。トレース
準備またはトレース開始であればステップS43の処理
を行い,トレースをしない場合には,ステップS45の
処理により,通常のPLT32のエントリの書き換えを
行う。
The dynamic linker 10 refers to the measurement instruction flag in the process of step S42 and determines whether the trace preparation / trace start / not trace is performed. If the trace preparation or the trace start is performed, the process of step S43 is performed. If the trace is not performed, the normal PLT 32 entry is rewritten by the process of step S45.

【0072】ステップS43では,PLT32の該当エ
ントリをログ採取用(関数実行トレース部23のアドレ
ス)に書き替える。さらにトレース開始の場合には,ス
テップS42によって,関数実行トレース部23を呼び
出し,関数実行情報の採取を行う。その後,ステップS
37へ戻り,呼び出された動的ライブラリ関数の命令テ
キスト部へ制御を移す。
In step S43, the corresponding entry of PLT 32 is rewritten for log collection (address of function execution trace section 23). Further, when the trace is started, the function execution trace unit 23 is called and the function execution information is collected in step S42. After that, step S
Returning to 37, control is transferred to the instruction text part of the called dynamic library function.

【0073】図9は,実行情報採取部の処理フローチャ
ートである。実行情報採取部22は,初期処理部21の
設定によってタイマ割り込みが発生したことを契機に呼
び出される。実行情報採取部22は,まずステップS5
1によって測定指示フラグを参照し,プロファイル準備
/プロファイル開始/プロファイルしないのいずれかを
判定する。プロファイル準備であればステップS54に
より何もしないでタイマ割込み時の呼び出し元へ戻る。
プロファイル開始であれば,ステップS52の処理によ
って,プログラムカウンタに関する実行情報のサンプリ
ング処理を行い,ステップS54によって呼び出し元へ
戻る。プロファイルしない(プロファイル終了)であれ
ば,ステップS53によってタイマによる実行情報採取
部22の起動を停止し,ステップS54によって復帰す
る。
FIG. 9 is a processing flowchart of the execution information collecting unit. The execution information collection unit 22 is called when a timer interrupt is generated by the setting of the initial processing unit 21. The execution information collecting unit 22 firstly executes step S5.
By referring to 1, the measurement instruction flag is referred to and it is determined whether profile preparation / profile start / no profile. If the profile is ready, the process returns to the caller at the time of the timer interrupt without doing anything in step S54.
If the profile is started, the execution information regarding the program counter is sampled by the process of step S52, and the process returns to the calling source by step S54. If the profile is not set (profile end), the activation of the execution information collecting unit 22 by the timer is stopped in step S53, and the process is restored in step S54.

【0074】図10は,関数実行トレース部の処理フロ
ーチャートである。既に一度,PLT32をトレース用
に書き換えてある関数の呼び出しを契機に関数実行トレ
ース部23が呼び出されると,ステップS61の処理に
より,測定指示フラグを参照し,トレースを開始するか
どうかを判定する。トレースを開始する場合はステップ
S62の処理を行い,関数実行情報の収集(ログ採取)
を行う。その後,ステップS63によって,動的ライブ
ラリ関数の命令テキスト部へ制御を移行する。測定指示
フラグがトレース準備中もしくはトレース終了でトレー
スを開始しない場合にはステップS62の処理を行わず
に,動的ライブラリ関数の命令テキスト部へ制御を移行
する。
FIG. 10 is a processing flow chart of the function execution tracing section. When the function execution trace unit 23 is called once when the function whose PLT 32 has been rewritten for tracing has already been called, the measurement instruction flag is referred to in the processing of step S61 to determine whether or not to start tracing. When starting the trace, the process of step S62 is performed, and the function execution information is collected (log collection).
I do. Then, in step S63, control is transferred to the instruction text portion of the dynamic library function. When the measurement instruction flag indicates that the trace is not being started or the trace is not started at the end of the trace, the control is transferred to the instruction text portion of the dynamic library function without performing the process of step S62.

【0075】〔第2の実施例〕第1の実施例では,採取
情報出力部24を呼び出すのはプロセスが終了した時と
実行情報採取部22でエラーが発生した場合だけである
が,実行情報採取部22で測定対象判定部11を呼び出
してその時点で測定を行うかを判定するときに,一度開
始していた測定の終了指示を検出した場合には採取情報
出力部24を呼び出し,それまでの情報を出力するとい
うように処理することもできる。
[Second Embodiment] In the first embodiment, the collection information output unit 24 is called only when the process ends and when an error occurs in the execution information collection unit 22. When the sampling unit 22 calls the measurement target determination unit 11 and determines whether or not to perform measurement at that time, when the end instruction of the measurement that has started once is detected, the sampling information output unit 24 is called and until then. It is also possible to process such as outputting the information of.

【0076】〔第3の実施例〕図2に示す採取情報ファ
イル70への書き込みを,動的リンカ10ではなく,測
定監視処理部40の共有メモリ情報出力部42が,ログ
量を監視することにより,または測定対象プロセスから
の通知により行うようにしてもよい。
[Third Embodiment] For writing to the collection information file 70 shown in FIG. 2, the shared memory information output unit 42 of the measurement monitoring processing unit 40 monitors the log amount, not the dynamic linker 10. Alternatively, or by notification from the process to be measured.

【0077】[0077]

【発明の効果】以上説明したように,本発明によれば,
測定対象の再翻訳/再結合をしないで,通常のロードモ
ジュールの状態のまま,実行情報を採取することがで
き,かつ動的ライブラリの実行情報をも得ることができ
る。また,要求するプロセスや要求する部分の情報のみ
を採取することができる。さらに,複数プロセスの情報
を同時に採取することができ,かつそれらの情報をまと
めることにより,マージ作業なしに測定対象プロセス全
体の情報を得ることができる。加えて,動的リンカは,
測定を行わない場合には,カーネルから通知されたフラ
グを判定するだけのオーバーヘッドで従来と同様の処理
を実行するので,性能劣化を極めて小さくすることがで
きる。
As described above, according to the present invention,
Execution information can be collected in the normal load module state without re-translation / recombination of the measurement target, and execution information of the dynamic library can also be obtained. Also, it is possible to collect only the information about the requested process and the requested part. Furthermore, the information of a plurality of processes can be collected at the same time, and by collecting the information, it is possible to obtain the information of the entire process to be measured without merging work. In addition, the dynamic linker
When the measurement is not performed, the same process as the conventional process is executed with the overhead of only determining the flag notified from the kernel, so that the performance deterioration can be made extremely small.

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

【図1】本発明の構成例を示す図である。FIG. 1 is a diagram showing a configuration example of the present invention.

【図2】本発明の一実施例構成図である。FIG. 2 is a configuration diagram of an embodiment of the present invention.

【図3】実行情報採取部による実行情報の採取方法およ
びその出力を説明する図である。
FIG. 3 is a diagram illustrating a method of collecting execution information by an execution information collection unit and its output.

【図4】本発明の実施例における通常時の動的リンカの
動作例を説明する図である。
FIG. 4 is a diagram illustrating an operation example of a dynamic linker at a normal time according to the embodiment of this invention.

【図5】本発明の実施例におけるトレース時の動的リン
カの動作例を説明する図である。
FIG. 5 is a diagram illustrating an operation example of a dynamic linker at the time of tracing according to the exemplary embodiment of the present invention.

【図6】測定監視処理部の処理フローチャートである。FIG. 6 is a processing flowchart of a measurement monitoring processing unit.

【図7】カーネルの処理フローチャートである。FIG. 7 is a processing flowchart of a kernel.

【図8】動的リンカを含むプロセス内の処理フローチャ
ートである。
FIG. 8 is a process flowchart in a process including a dynamic linker.

【図9】実行情報採取部の処理フローチャートである。FIG. 9 is a processing flowchart of an execution information collection unit.

【図10】関数実行トレース部の処理フローチャートで
ある。
FIG. 10 is a processing flowchart of a function execution trace unit.

【図11】従来の技術の説明図である。FIG. 11 is an explanatory diagram of a conventional technique.

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

1 プロセス 10 動的リンカ 11 測定対象判定部 12 PLTエントリ書き換え部 20 情報採取用ライブラリ 21 初期処理部 22 実行情報採取部 23 関数実行トレース部 24 採取情報出力部 25 エラー処理部 30 主ロードモジュール 31 命令テキスト部 32 リンク用テーブル(PLT) 33a,33b 動的ライブラリ 40 測定監視処理部 41 フラグ設定部 42 共有メモリ情報出力部 45 カーネル 46 カーネル内フラグ 51 入力装置 52 出力装置 53 記憶装置 60 共有メモリ 63 プロセス内メモリ 1 Process 10 Dynamic Linker 11 Measurement Target Judgment Part 12 PLT Entry Rewriting Part 20 Information Collection Library 21 Initial Processing Part 22 Execution Information Collection Part 23 Function Execution Trace Part 24 Collection Information Output Part 25 Error Processing Part 30 Main Load Module 31 Instruction Text part 32 Link table (PLT) 33a, 33b Dynamic library 40 Measurement monitoring processing part 41 Flag setting part 42 Shared memory information output part 45 Kernel 46 Kernel flag 51 Input device 52 Output device 53 Storage device 60 Shared memory 63 process Internal memory

Claims (10)

【特許請求の範囲】[Claims] 【請求項1】 主ロードモジュールと,動的ライブラリ
と,プロセス実行時に動的ライブラリの結合処理を行う
動的リンカとを備えた情報処理システムにおけるプロセ
ス実行情報採取装置において,プログラムカウンタの値
を採取し,プログラムカウンタの値に応じてそれが示す
アドレスが何回採取されたかをカウントする実行情報採
取部と,前記動的リンカにより呼び出され,前記実行情
報採取部を所定の時間ごとに起動する設定を行う初期処
理部と,前記実行情報採取部で採取した情報および測定
対象に関する主ロードモジュールおよび動的ライブラリ
の命令テキスト部のアドレス情報を所定のメモリ,記憶
装置または出力装置に出力する採取情報出力部とを備え
たことを特徴とするプロセス実行情報採取装置。
1. A process execution information collecting device in an information processing system comprising a main load module, a dynamic library, and a dynamic linker that performs a process of combining the dynamic libraries at the time of process execution, and collects a value of a program counter. Then, the execution information collecting unit that counts the number of times the address indicated by the program counter is collected according to the value of the program counter, and the setting that is invoked by the dynamic linker and starts the execution information collecting unit every predetermined time An initial processing unit for performing the above, and the collected information output for outputting the information collected by the execution information collecting unit and the address information of the instruction text part of the main load module and the dynamic library related to the measurement target to a predetermined memory, storage device or output device. And a process execution information collecting device.
【請求項2】 請求項1記載のプロセス実行情報採取装
置において,外部からの指示入力によりプログラムカウ
ンタ情報の採取を行うか否かの指示情報をカーネル内に
設定する測定監視処理部を備え,前記動的リンカは,カ
ーネルから得た前記指示情報により通常の動的結合処理
のみを行うか前記初期処理部の呼び出しを行うかを決定
する手段を持つことを特徴とするプロセス実行情報採取
装置。
2. The process execution information collecting device according to claim 1, further comprising a measurement monitoring processing unit that sets, in a kernel, instruction information as to whether or not to collect the program counter information by an instruction input from the outside, The dynamic linker has a means for deciding whether to perform only a normal dynamic binding process or to call the initial processing unit according to the instruction information obtained from the kernel, and the process execution information collecting device.
【請求項3】 請求項2記載のプロセス実行情報採取装
置において,前記初期処理部,前記実行情報採取部また
はその双方は,情報採取用ライブラリとして前記動的ラ
イブラリとは別のモジュールで構成され,前記動的リン
カは,前記測定監視処理部によって設定された指示情報
により前記情報採取用ライブラリを制御移行可能となる
ようにマップする手段を持つことを特徴とするプロセス
実行情報採取装置。
3. The process execution information collecting device according to claim 2, wherein the initial processing unit, the execution information collecting unit, or both are configured as modules for collecting information, which are different from the dynamic library. The process execution information collecting device, wherein the dynamic linker has means for mapping the information collecting library so that control transfer can be performed according to the instruction information set by the measurement monitoring processing unit.
【請求項4】 請求項2または請求項3記載のプロセス
実行情報採取装置において,前記測定監視処理部は,外
部からの指示入力によりプログラムカウンタ情報の採取
を行う時期または測定対象プロセスに関する情報を共有
メモリに設定する手段を持ち,前記共有メモリに設定さ
れた測定時期または測定対象の情報に基づいて,前記初
期処理部による処理または前記実行情報採取部による処
理を行うか否かを判定する測定対象判定部を備えたこと
を特徴とするプロセス実行情報採取装置。
4. The process execution information collecting device according to claim 2 or 3, wherein the measurement monitoring processing unit shares information on a time when the program counter information is collected by an instruction input from the outside or a process to be measured. A measuring object having means for setting in the memory, and determining whether or not to perform the processing by the initial processing section or the processing by the execution information collecting section based on the measurement time or the information of the measuring object set in the shared memory An apparatus for collecting process execution information, comprising a determination unit.
【請求項5】 主ロードモジュールと,動的ライブラリ
と,プロセス実行時に動的ライブラリの結合処理を行う
動的リンカとを備えた情報処理システムにおけるプロセ
ス実行情報採取装置において,動的ライブラリ関数への
制御移行時に呼び出され,その動的ライブラリ関数の実
行情報を採取する関数実行トレース部と,前記動的リン
カ内において,測定対象である動的ライブラリ関数への
最初の制御移行時に前記動的ライブラリ関数へのアドレ
ス情報が設定されるリンク用テーブルの該当エントリを
書き換え,前記関数実行トレース部に制御が移行するよ
うにアドレス情報を設定するPLTエントリ書き換え部
と,前記関数実行トレース部で採取した情報を所定のメ
モリ,記憶装置または出力装置に出力する採取情報出力
部とを備えたことを特徴とするプロセス実行情報採取装
置。
5. A process execution information collecting device in an information processing system comprising a main load module, a dynamic library, and a dynamic linker that performs a process of linking the dynamic libraries during process execution. A function execution trace unit that is called at the time of control transfer and collects the execution information of the dynamic library function, and the dynamic library function at the time of the first control transfer to the dynamic library function to be measured in the dynamic linker. The PLT entry rewriting unit that rewrites the corresponding entry in the link table in which the address information is set to the function execution trace unit, and the information collected by the function execution trace unit that sets the address information so that control is transferred to the function execution trace unit. It is provided with a collection information output unit for outputting to a predetermined memory, storage device or output device. Characterized process execution information collection device.
【請求項6】 請求項5記載のプロセス実行情報採取装
置において,外部からの指示入力により動的ライブラリ
関数実行情報の採取を行うか否かの指示情報をカーネル
内に設定する測定監視処理部を備え,前記動的リンカ
は,カーネルから得た前記指示情報により通常の動的結
合処理を行うか前記関数実行トレース部を経由する動的
結合処理を行うかを決定する手段を持つことを特徴とす
るプロセス実行情報採取装置。
6. The process execution information collecting device according to claim 5, further comprising a measurement monitoring processing unit for setting, in the kernel, instruction information as to whether or not to collect dynamic library function execution information by an instruction input from the outside. The dynamic linker has means for determining whether to perform a normal dynamic binding process or a dynamic binding process via the function execution trace unit based on the instruction information obtained from the kernel. A device for collecting process execution information.
【請求項7】 請求項6記載のプロセス実行情報採取装
置において,前記関数実行トレース部は,情報採取用ラ
イブラリとして前記動的ライブラリとは別のモジュール
で構成され,前記動的リンカは,前記測定監視処理部に
よって設定された指示情報により前記情報採取用ライブ
ラリを制御移行可能となるようにマップする手段を持つ
ことを特徴とするプロセス実行情報採取装置。
7. The process execution information collecting device according to claim 6, wherein the function execution trace unit is configured as a module different from the dynamic library as an information collecting library, and the dynamic linker is configured to perform the measurement. A process execution information collecting device having means for mapping the information collecting library so that control transfer is possible according to the instruction information set by the monitoring processing unit.
【請求項8】 請求項6または請求項7記載のプロセス
実行情報採取装置において,前記測定監視処理部は,外
部からの指示入力により測定対象となるプロセス,動的
ライブラリまたは動的ライブラリ内の関数に関する情報
を共有メモリに設定する手段を持ち,前記共有メモリに
設定された測定対象の情報に基づいて,前記PLTエン
トリ書き換え部によるリンク用テーブルのエントリ書き
換え対象を選別する測定対象判定部を備えたことを特徴
とするプロセス実行情報採取装置。
8. The process execution information collecting device according to claim 6 or 7, wherein the measurement monitoring processing unit is a process to be measured by a command input from the outside, a dynamic library, or a function in the dynamic library. And a measurement target determining unit that selects an entry rewriting target of the link table by the PLT entry rewriting unit based on the measurement target information set in the shared memory. A process execution information collection device characterized by the above.
【請求項9】 請求項1または請求項5記載のプロセス
実行情報採取装置において,前記実行情報採取部または
前記関数実行トレース部による情報採取中においてエラ
ーが発生した場合に呼び出されるエラー処理部を有し,
前記エラー処理部は前記採取情報出力部を呼び出すこと
により,エラーが発生するまでに採取した情報を,前記
採取情報出力部によって出力するようにしたことを特徴
とするプロセス実行情報採取装置。
9. The process execution information collection device according to claim 1, further comprising an error processing unit that is called when an error occurs during information collection by the execution information collection unit or the function execution trace unit. Then
The process execution information collecting device, wherein the error processing unit calls the collected information output unit so that the collected information output unit outputs information collected until an error occurs.
【請求項10】 請求項1または請求項5記載のプロセ
ス実行情報採取装置において,前記実行情報採取部また
は前記関数実行トレース部は,採取した測定情報を共有
メモリに記録するように構成され,測定対象プロセスと
は別のプロセス内に,共有メモリ内における測定情報の
蓄積状態に応じて,その測定情報を所定の記憶装置また
は出力装置に出力する共有メモリ情報出力部を備えたこ
とを特徴とするプロセス実行情報採取装置。
10. The process execution information collection device according to claim 1, wherein the execution information collection unit or the function execution trace unit is configured to record the collected measurement information in a shared memory, and perform measurement. A shared memory information output unit that outputs the measurement information to a predetermined storage device or output device according to the accumulation state of the measurement information in the shared memory is provided in a process different from the target process. Process execution information collection device.
JP28465794A 1994-11-18 1994-11-18 Process execution information collection device Expired - Fee Related JP3419916B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP28465794A JP3419916B2 (en) 1994-11-18 1994-11-18 Process execution information collection device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP28465794A JP3419916B2 (en) 1994-11-18 1994-11-18 Process execution information collection device

Publications (2)

Publication Number Publication Date
JPH08147199A true JPH08147199A (en) 1996-06-07
JP3419916B2 JP3419916B2 (en) 2003-06-23

Family

ID=17681300

Family Applications (1)

Application Number Title Priority Date Filing Date
JP28465794A Expired - Fee Related JP3419916B2 (en) 1994-11-18 1994-11-18 Process execution information collection device

Country Status (1)

Country Link
JP (1) JP3419916B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE19938084B4 (en) * 1998-12-11 2005-11-24 Daimlerchrysler Ag Guide bearing in connection with a pressure cylinder, in particular damping element for motor vehicles
JP2010079508A (en) * 2008-09-25 2010-04-08 Fujitsu Microelectronics Ltd Profiling method and profiling program
US9959191B2 (en) 2012-11-23 2018-05-01 Samsung Electronics Co., Ltd. Dynamic library profiling method and dynamic library profiling system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE19938084B4 (en) * 1998-12-11 2005-11-24 Daimlerchrysler Ag Guide bearing in connection with a pressure cylinder, in particular damping element for motor vehicles
JP2010079508A (en) * 2008-09-25 2010-04-08 Fujitsu Microelectronics Ltd Profiling method and profiling program
US8549505B2 (en) 2008-09-25 2013-10-01 Fujitsu Semiconductor Limited Profiling method, system, and recording medium having a profiling program
US9959191B2 (en) 2012-11-23 2018-05-01 Samsung Electronics Co., Ltd. Dynamic library profiling method and dynamic library profiling system

Also Published As

Publication number Publication date
JP3419916B2 (en) 2003-06-23

Similar Documents

Publication Publication Date Title
CN100538656C (en) The method and apparatus of debugging computer program in distributed debugger
US5528753A (en) System and method for enabling stripped object software monitoring in a computer system
US7185320B2 (en) System and method for processing breakpoint events in a child process generated by a parent process
KR100337748B1 (en) A method and apparatus for structured memory analysis of data processing systems and applications
US5634022A (en) Multi-media computer diagnostic system
EP0090804A1 (en) Method and apparatus for measurements of channel operation
US20040060043A1 (en) Method and apparatus for instrumentation ON/OFF
US7086034B2 (en) Method, program, and storage medium for acquiring logs
US5115502A (en) Method and apparatus for determining internal status of a processor using simulation guided by acquired data
US7426660B2 (en) Method, program, and storage medium for acquiring logs
JP3419916B2 (en) Process execution information collection device
US4813009A (en) Method and apparatus for determining internal status of a processor
US20070150870A1 (en) Method and apparatus for context oriented computer program tracing and visualization
CN112612697A (en) Software defect testing and positioning method and system based on byte code technology
CN111597111A (en) Application program starting speed monitoring method and device
JP4125055B2 (en) Log acquisition method
JP3389745B2 (en) Apparatus and method for measuring program performance
JP2004501472A (en) Method and apparatus for optimizing a test program
JP2798364B2 (en) Application evaluation method and system
JP3152178B2 (en) Lock operation measurement method
JPH05257720A (en) Virtual computer system
CN115017059B (en) Fuzzy test method and system for graphical user interface program
JP3399741B2 (en) Dump data display method and failure analysis system
CN116501562A (en) Hard disk testing method, device, equipment and storage medium
JPH0269837A (en) Program debug support device

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20030401

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080418

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090418

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees