JPH10269105A - Trace system, resource release omission detection system, and recording medium - Google Patents

Trace system, resource release omission detection system, and recording medium

Info

Publication number
JPH10269105A
JPH10269105A JP10013654A JP1365498A JPH10269105A JP H10269105 A JPH10269105 A JP H10269105A JP 10013654 A JP10013654 A JP 10013654A JP 1365498 A JP1365498 A JP 1365498A JP H10269105 A JPH10269105 A JP H10269105A
Authority
JP
Japan
Prior art keywords
dll
application
call
application program
information
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
JP10013654A
Other languages
Japanese (ja)
Inventor
Morimasa Tanimura
守正 谷村
Takeshi Nishisaka
毅 西坂
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.)
N T T DATA TSUSHIN KK
NTT Data Corp
Original Assignee
N T T DATA TSUSHIN KK
NTT Data Communications Systems 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 N T T DATA TSUSHIN KK, NTT Data Communications Systems Corp filed Critical N T T DATA TSUSHIN KK
Priority to JP10013654A priority Critical patent/JPH10269105A/en
Publication of JPH10269105A publication Critical patent/JPH10269105A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PROBLEM TO BE SOLVED: To globally trace an OS(operating system) without recompiling it, and to effectively detect memory lead because of it even in a system which is made by combining components provided in binary. SOLUTION: A hooking DLL(dynamic link library) 2 hooks an API(application interface) call of an application part 1. The DLL 2 is inserted instead of an original DLL that corresponds to an API call. A processing DLL 3 executes processing that corresponds to the API call. The DLL 2 hooks a call of the part 1, sends the call information to a log filing part 4 and also transfers the call to the DLL 3. The part 4 logs the call information that is hooked by the DLL 2. A viewer 5 reads and shows log contents in the part 4.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】この発明は、アプリケーショ
ンプログラムの開発或いはチェック等に際し、システム
全体のグローバルなトレースを行うためのトレースシス
テム及びリソースの解放漏れを検出するためのシステム
に係り、特にシステム全体のパフォーマンスチューニン
グやメモリリークの効果的な検出に好適なトレースシス
テム及びリソース解放漏れ検出システムに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a tracing system for performing global tracing of the entire system and a system for detecting omission of release of resources when developing or checking an application program, and more particularly to a system for detecting omission of resources. The present invention relates to a trace system and a resource release leak detection system suitable for performance tuning and effective detection of a memory leak.

【0002】[0002]

【従来の技術】オペレーティングシステム(OS: Operat
ing System〜以下、「OS」と称する)において動作す
るアプリケーションプログラム及びシステムプログラム
等のプログラムにおいては、OSのアプリケーションイ
ンタフェース(API: Application Program Interface:
以下、「API」と称する)を使用して、メモリ割り当
てを行う。
2. Description of the Related Art Operating systems (OS: Operat)
ing System, hereinafter referred to as an “OS”, an application program and a system program that operate on the OS, an application interface (API) of the OS.
Hereafter, memory allocation is performed using an “API”.

【0003】プログラムに対して割り当てられたメモリ
は、メモリが不要となった時点で、解放される。一般に
メモリ等のリソース(資源)には、限りがあるため、利
用済みのメモリが解放されなければ、利用できるメモリ
の量が低減し、プログラムを正常に実行できなくなる。
ところが、プログラムの不備により、一旦割り当てられ
たメモリが不要になった時点でも解放しないことがあ
る。このように、不要となったメモリを解放せずに割り
当てられたままにしておくことを、メモリリーク(メモ
リ解放漏れ)と称する。このメモリリークを放置する
と、前述のように、利用できるメモリの量が低減し、プ
ログラムを正常に実行できなくなる。
The memory allocated to a program is released when the memory becomes unnecessary. In general, resources such as memory are limited, and if the used memory is not released, the amount of available memory decreases and the program cannot be executed normally.
However, due to a defect in the program, the memory once allocated may not be released even when it becomes unnecessary. Leaving the memory that has become unnecessary without releasing it in this way is referred to as a memory leak (memory release omission). If this memory leak is left, as described above, the amount of available memory is reduced, and the program cannot be executed normally.

【0004】[0004]

【発明が解決しようとする課題】システムが、大きくな
ればなるほど、上述のメモリリークが発生してしまう可
能性が高くなる。一方、メモリリーク自体は、小さなメ
モリリークほど、開発における各種チェック工程で見落
とす可能性が高い。このように、開発工程でメモリリー
クが見落とされた場合、システムの最終確認フェーズ、
すなわち連続運転試験において、やっと発見されること
になる。しかも、メモリリークが、プログラムのどの部
分で発生しているかを見分けるためには、ソースレビュ
ーなどの地道な方法で行うしかなかった。
The larger the system, the greater the likelihood that the aforementioned memory leak will occur. On the other hand, the smaller the memory leak itself, the more likely it is to be overlooked in various check steps in development. In this way, if a memory leak is overlooked during the development process, the final confirmation phase of the system,
That is, in a continuous operation test, it is finally discovered. In addition, the only way to determine where in the program the memory leak is occurring is through a method such as source review.

【0005】特に、ウィンドウズNT(Windows NT)及
びウィンドウズ95(Windows 95)(「Windows」は登
録商標)等のOSは、複数のプロセスからなり、個々の
プロセスは、オブジェクトリンク及び埋め込み(以下、
「OLE」)機能を利用するOLEサーバオブジェクト
であるOLEコントロール(以下、「OCX」)、並び
にダイナミックリンクライブラリ(以下、「DLL」)
等を1つ以上含んでいる。なお、OCXは、最近では、
Active Xコントロールと称されるコンポーネントとして
位置付けられている。
In particular, an OS such as Windows NT (Windows NT) and Windows 95 (Windows 95) ("Windows" is a registered trademark) is composed of a plurality of processes.
OLE control (hereinafter, “OCX”), which is an OLE server object using the “OLE”) function, and a dynamic link library (hereinafter, “DLL”)
Etc. are included. OCX has recently been
It is positioned as a component called Active X control.

【0006】このようなOSでは、プロセス単位でしか
リソースを管理していないため、プロセスに属している
DLLやOCX等に問題があったとしても、それらを切
り分けることは不可能である。このため、場合によって
は、システムの全域にわたってメモリリークの原因を調
査する必要がある。
[0006] In such an OS, resources are managed only on a process-by-process basis. Therefore, even if there is a problem with a DLL or OCX belonging to a process, it is impossible to isolate them. Therefore, in some cases, it is necessary to investigate the cause of the memory leak over the entire system.

【0007】このように、アプリケーションプログラム
及びシステムプログラムの開発に際して、メモリリーク
が、一旦、発生してしまうと、その解決に膨大な時間を
費やすことが少なくない。
[0007] As described above, once a memory leak occurs in the development of an application program and a system program, an enormous amount of time is often spent for solving the problem.

【0008】通常、メモリリークの検出等を目的とし
て、プログラムのトレースを行う場合には、特別なオブ
ジェクト(ここで、オブジェクトとは、OBJファイル
又はC++におけるオブジェクトを指している)をリン
クするなどの手法を用いる。このため、プログラムのト
レースのために、ソースコードからのコンパイル及びリ
ンクを再度やり直す必要がある。しかしながら、この方
法では、最近、広く用いられているOCX及びActiveX
コントロール等のように、バイナリで提供されているコ
ンポーネントを組み合わせて作成したソフトウェアにお
いては、不完全な情報しか与えられず、有効に利用する
ことができない。
Normally, when tracing a program for the purpose of detecting a memory leak or the like, a special object (here, an object indicates an object in an OBJ file or C ++) is linked. Use a method. Therefore, in order to trace the program, it is necessary to compile and link from the source code again. However, in this method, OCX and ActiveX widely used recently are used.
In software created by combining components provided in binary, such as a control, only incomplete information is given and cannot be used effectively.

【0009】この発明は、上述した事情に鑑みてなされ
たもので、メモリリークの効果的な検出を可能とするこ
とを目的とする。
The present invention has been made in view of the above circumstances, and has as its object to enable effective detection of a memory leak.

【0010】[0010]

【課題を解決するための手段】上記目的を達成するた
め、この発明の第1の観点によるトレースシステムは、
アプリケーションプログラムとのインタフェースを取る
ためのアプリケーションインタフェースを備えるオペレ
ーティングシステムと、前記オペレーティングシステム
上でアプリケーションプログラムを実行するアプリケー
ション手段と、前記アプリケーション手段による前記ア
プリケーションプログラムの実行に際し、前記アプリケ
ーションプログラムによる前記アプリケーションインタ
フェースの呼び出しを中継するとともに、該呼び出しの
情報を取り込むフック手段と、前記フック手段で取り込
まれた前記情報を蓄積記録するログ記録手段と、を具備
することを特徴とする。
To achieve the above object, a trace system according to a first aspect of the present invention comprises:
An operating system having an application interface for interfacing with an application program; application means for executing the application program on the operating system; and execution of the application program by the application means. It is characterized by comprising hook means for relaying the call and taking in the information of the call, and log recording means for accumulating and recording the information taken in by the hook means.

【0011】このシステムによれば、アプリケーション
プログラム(AP)がオペレーティングシステム(O
S)のアプリケーションインタフェース(API)を呼
び出した際に、フック手段がこの呼び出しの情報を取り
込み、ログ記録手段がその内容を記録する。従って、例
えば、アプリケーションインタフェースの呼び出しが、
リソース、例えば、メモリの割り当てや解放に関するも
のである場合には、割り当て及び解放の履歴がログ記録
手段により自動的に生成される。従って、リソースの割
り当てと解放の対を判別し、割り当てたが解放されてい
ないものをログから判別することにより、リソースの解
放忘れを判別することができる。また、このような構成
によれば、アプリケーションプログラムとオペレーティ
ングシステムには、実質的な変更を加えることなく、呼
び出し情報の取得が可能となる。
According to this system, the application program (AP) is operated by the operating system (O).
When the application interface (API) of S) is called, the hook means takes in the information of this call, and the log recording means records the contents. So, for example, an application interface call
In the case of resource allocation and release, for example, memory, allocation and release history is automatically generated by the log recording means. Therefore, by discriminating a pair of resource allocation and release, and determining from the log what has been allocated but not released, it is possible to determine that the resource has been left unreleased. Further, according to such a configuration, it is possible to acquire the call information without substantially changing the application program and the operating system.

【0012】リソースのリークとしては、例えば、ファ
イル資源、セマフォ、Mutex等の排他資源、ペン、ブラ
シ、デバイスコンテキストなどのGDIオブジェクトの
リーク等がある。
Examples of the resource leak include a file resource, an exclusive resource such as a semaphore and a Mutex, and a leak of a GDI object such as a pen, a brush, and a device context.

【0013】前記フック手段は、例えば、前記アプリケ
ーションインタフェースに対するアプリケーションプロ
グラムの呼び出しを前記アプリケーションインタフェー
スの代わりに受ける手段と、前記呼び出しの情報を前記
ログ記録手段に提供する手段と、前記呼び出しを前記ア
プリケーションインタフェースに転送する手段とから構
成される。
The hook means includes, for example, means for receiving a call of an application program for the application interface in place of the application interface, means for providing the call information to the log recording means, and means for transmitting the call to the application interface. Means for transferring to

【0014】前記ログ記録手段で記録された前記呼び出
しの情報を出力する手段を配置してもよい。
[0014] A means for outputting the information of the call recorded by the log recording means may be arranged.

【0015】前記フック手段から前記ログ記録手段へ転
送された情報の記録のオンとオフを制御するロギング制
御手段を配置してもよい。このロギング制御手段は、前
記フック手段による前記アプリケーションインタフェー
スに対する前記呼び出しの転送の停止と実行を、例え
ば、外部操作に応答して制御する。
[0015] Logging control means for controlling on / off of recording of information transferred from the hook means to the log recording means may be arranged. The logging control means controls the suspension and execution of the transfer of the call to the application interface by the hook means in response to, for example, an external operation.

【0016】前記ロギング制御手段は、前記ログ記録手
段に記録される前記情報の内容を制御する手段を含んで
もよい。
[0016] The logging control means may include means for controlling the contents of the information recorded in the log recording means.

【0017】前記フック手段は、例えば、前記アプリケ
ーションプログラムによる前記アプリケーションインタ
フェースの呼び出しのうち、前記オペレーティングシス
テムのリソース割り当てに関するリソース割り当て情報
を取り込む。さらに、前記ログ記録手段により、記録さ
れたリソースの割り当てと解放の対を検出し、割り当て
と解放の一方のみを検出し、他方を検出できない時に、
その旨を報知する対検出手段を配置し、リソースの解放
漏れを報知できるようにしてもよい。
The hook means fetches, for example, resource allocation information relating to the resource allocation of the operating system in the call of the application interface by the application program. Further, the log recording means detects a pair of recorded resource allocation and release, detects only one of the allocation and release, and when the other can not be detected,
A pair detection means for notifying that may be provided so that a release omission of resources can be notified.

【0018】上記目的を達成するため、この発明の第2
の観点によるリソース解放漏れ検出システムは、オペレ
ーティングシステム上でアプリケーションプログラムを
実行するアプリケーション手段と、前記アプリケーショ
ンプログラムの実行に際し、前記アプリケーションプロ
グラムから前記オペレーティングシステムのアプリケー
ションインタフェースに送られるリソースの割り当てと
解放の要求に関するリソース割当情報を取り込むフック
手段と、前記フック手段で取り込まれた前記リソース割
り当て情報を蓄積記録するログ記録手段と、を具備する
ことを特徴とする。
In order to achieve the above object, a second aspect of the present invention is provided.
A resource release omission detection system according to the aspect of the present invention comprises: an application unit that executes an application program on an operating system; and a request for allocating and releasing resources transmitted from the application program to an application interface of the operating system when the application program is executed. And a log recording unit for accumulating and recording the resource allocation information captured by the hook unit.

【0019】前記ログ記録手段により記録されたリソー
スの割り当てと解放の対を検出し、割り当てと解放の一
方のみを検出し、他方を検出できない時に、その旨を報
知する対検出手段を配置しても良い。
A pair detecting means for detecting a pair of resource allocation and release recorded by the log recording means, detecting only one of the allocation and release and detecting the other when the other cannot be detected, is arranged. Is also good.

【0020】このようなシステムによれば、オペレーテ
ィングシステムとアプリケーションプログラムには、実
質的な影響を与えること無く、アプリケーションインタ
フェースの呼び出しを検出し、この呼び出し情報に基づ
いてリソースの割り当てと解放の履歴をログに取ること
ができる。従って、このログをチェックすることによ
り、リソースの解放忘れを判別することができる。リソ
ースとしては、例えば、ファイル資源、セマフォ、Mute
x等の排他資源、ペン、ブラシ、デバイスコンテキスト
などのGDIオブジェクト等がある。
According to such a system, the operating system and the application program detect the call of the application interface without substantially affecting them, and store the history of resource allocation and release based on the call information. Can be taken to the log. Therefore, by checking this log, it is possible to determine whether to release the resources. Resources include, for example, file resources, semaphores, and Mute
There are exclusive resources such as x, GDI objects such as pens, brushes, and device contexts.

【0021】前記ログ記録手段により記録されたリソー
スの割り当てと解放の対を検出し、割り当てと解放の一
方のみを検出し、他方を検出できない時に、その旨を報
知する対検出手段を配置して、リソースの解放漏れを自
動的に検出するようにしてもよい。リソースとしてメモ
リ等が好適である。
A pair detecting means for detecting a pair of resource allocation and release recorded by the log recording means, detecting one of the allocation and release, and not detecting the other when the other cannot be detected, is arranged. Alternatively, a resource release omission may be automatically detected. A memory or the like is suitable as a resource.

【0022】また、この発明の第3の観点にかかるコン
ピュータで読み取り可能な記録媒体には、コンピュータ
を、アプリケーションプログラムとのインタフェースを
取るためのアプリケーションインタフェースを備えるオ
ペレーティングシステム上でアプリケーションプログラ
ムを実行するアプリケーション手段、前記アプリケーシ
ョン手段による前記アプリケーションプログラムの実行
に際し、前記アプリケーションプログラムによる前記ア
プリケーションインタフェースの呼び出しを中継すると
ともに、該呼び出しの情報を取り込むフック手段と、前
記フック手段で取り込まれた前記呼び出しの情報を蓄積
記録するログ記録手段、として機能させるためのプログ
ラム(固定データを含む)が記録されている。
A computer-readable recording medium according to a third aspect of the present invention includes an application for executing an application program on an operating system having an application interface for interfacing with the application program. Means for relaying a call of the application interface by the application program when the application program is executed by the application means, and for storing the call information fetched by the hook means, and storing the call information fetched by the hook means A program (including fixed data) for functioning as a log recording means for recording is recorded.

【0023】また、この発明の第4の観点にかかるコン
ピュータで読み取り可能な記録媒体には、コンピュータ
を、オペレーティングシステム上でアプリケーションプ
ログラムを実行するアプリケーション手段、前記アプリ
ケーションプログラムの実行に際し、前記アプリケーシ
ョンプログラムから前記オペレーティングシステムのア
プリケーションインタフェースに送られるリソースの割
り当てと解放の要求に関するリソース割当情報を取り込
むフック手段、前記フック手段で取り込まれた前記リソ
ース割当情報を蓄積記録するログ記録手段、として機能
させるためのプログラムが記録されている。
A computer-readable recording medium according to a fourth aspect of the present invention includes: an application unit for executing an application program on an operating system; and an application program for executing the application program. A program for functioning as hook means for capturing resource allocation information relating to resource allocation and release requests sent to the application interface of the operating system, and log recording means for storing and recording the resource allocation information captured by the hook means. Is recorded.

【0024】[0024]

【発明の実施の形態】図1〜図6を参照して、この発明
の第1の実施の形態に係るトレースシステムについて説
明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS A trace system according to a first embodiment of the present invention will be described with reference to FIGS.

【0025】この実施の形態は、オペレーティングシス
テム(OS)として、ウィンドウズNT及びウィンドウ
ズ95等を使用し、これらのOSにおけるシステムコー
ルがダイナミックリンクライブラリ(Dynamic Link Lib
rary:DLL〜以下、「DLL」と称する)によってア
プリケーションプログラムとインタフェースしているこ
とに着目し、該DLLをフック用の特殊なDLLと置き
換える。このフック用のDLLによって、全てのアプリ
ケーションインタフェース(Application Program Inte
rface:API〜以下、「API」と称する)の呼び出
しを横取り、すなわちフックして、APIの呼び出し元
及び時刻等をロギングする。
This embodiment uses Windows NT, Windows 95, or the like as an operating system (OS), and a system call in these OSs is a dynamic link library (Dynamic Link Library).
rary: DLL-hereinafter, referred to as "DLL"), and replaces the DLL with a special hook hook DLL. This hook DLL allows all application interfaces (Application Program Interface)
rface: An API (hereinafter referred to as “API”) is intercepted, that is, hooked, and the API caller and the time are logged.

【0026】ロギングにより作成されるログファイル
を、必要なときに読み込み、これをビューワによってビ
ジュアルに表示する。このようにすることによって、O
Sのグローバルなトレースを実現し、システムの最適化
に必要な、プロセス別及びモジュール別などの情報を得
ることができる。さらに、メモリ割り当て及びハンドル
割り当て等のOSのリソースの割り当てに関する割り当
て状況を追跡することによって、メモリリークが発生し
ている箇所を効果的に解析及び表示することが可能とな
る。このシステムにより、メモリリークの自動的な解析
及び表示も実現可能となる。
A log file created by logging is read when necessary, and is visually displayed by a viewer. By doing so, O
By realizing a global trace of S, it is possible to obtain information, such as for each process and each module, necessary for system optimization. Further, by tracking the allocation status regarding the allocation of OS resources such as memory allocation and handle allocation, it is possible to effectively analyze and display the location where the memory leak has occurred. This system also enables automatic analysis and display of memory leaks.

【0027】また、メモリに限らず、ファイル資源、セ
マフォ、Mutex等の排他資源、ペン、ブラシ、デバイス
コンテキスト等のGDIオブジェクト等のリークもトレ
ース可能である。
In addition to the memory, it is possible to trace leaks of exclusive resources such as file resources, semaphores and mutexes, and GDI objects such as pens, brushes and device contexts.

【0028】図1は、この発明の第1の実施の形態に係
るトレースシステムの構成を示している。
FIG. 1 shows a configuration of a trace system according to a first embodiment of the present invention.

【0029】図1に示すトレースシステムは、アプリケ
ーション部1、第1のフック用DLL2、第1の処理用
DLL3、ログファイル部4、ビューワ5、第2のフッ
ク用DLL6、第2の処理用DLL7、及びコントロー
ルマネージャ8を具備している。アプリケーション部
1、第1のフック用DLL2、第1の処理用DLL3、
ビューワ5、第2のフック用DLL6、第2の処理用D
LL7、及びコントロールマネージャ8の各部は、コン
ポーネントとしてのプログラムモジュールにより構成さ
れる。また、ログファイル部4は、記憶装置に記憶され
るファイルにより構成される。
The trace system shown in FIG. 1 comprises an application section 1, a first hook DLL 2, a first processing DLL 3, a log file section 4, a viewer 5, a second hook DLL 6, and a second processing DLL 7. , And a control manager 8. Application unit 1, first hook DLL 2, first processing DLL 3,
Viewer 5, DLL 6 for second hook, D for second processing
Each part of the LL 7 and the control manager 8 is configured by a program module as a component. The log file unit 4 is composed of files stored in a storage device.

【0030】アプリケーション部1は、OS(オペレー
ティングシステム)上で、アプリケーションプログラム
(AP)を実行する。このアプリケーション部1とOS
とのインタフェースがアプリケーションインターフェー
ス(API)である。OSのシステムコールは、DLL
によりアプリケーション部1とインタフェースしてい
る。
The application section 1 executes an application program (AP) on an OS (operating system). This application unit 1 and OS
Is an application interface (API). The OS system call is DLL
Interface with the application unit 1.

【0031】第1のフック用DLL2は、アプリケーシ
ョン部1のAPI呼び出しをフック(横取り)するため
のDLLであり、API呼び出しに対応する本来のDL
Lの代わりに挿入される。
The first hook DLL 2 is a DLL for hooking (preempting) an API call of the application unit 1 and an original DLL corresponding to the API call.
Inserted instead of L.

【0032】第1の処理用DLL3は、アプリケーショ
ン部1のAPI呼び出しに対応する本来のDLLであ
り、OSの一部を構成し、該当するAPI呼び出しに対
応する処理を実行する。
The first processing DLL 3 is an original DLL corresponding to an API call of the application unit 1, constitutes a part of the OS, and executes processing corresponding to the corresponding API call.

【0033】第1のフック用DLL2は、アプリケーシ
ョン部1の本来のDLL(第1の処理用DLL3)に対
する呼び出しをフックし、該呼び出しの情報をログファ
イル部4に送信するとともに、該呼び出しを第1の処理
用DLL3に転送する。ログファイル部4は、第1のフ
ック用DLL2等でフックされた呼び出し情報をロギン
グ、すなわち記録・蓄積する。
The first hook DLL 2 hooks a call to the original DLL (first processing DLL 3) of the application unit 1, transmits information of the call to the log file unit 4, and transfers the call to the log file unit 4. 1 to the processing DLL 3. The log file unit 4 logs the call information hooked by the first hook DLL 2 or the like, that is, records and accumulates the call information.

【0034】ビューワ5は、ログファイル部4のログ内
容を読み込み表示する。このビューワ5自体も一種のア
プリケーションであるので、APIを使用する場合に
は、第2のフック用DLL6を介して、第2の処理用D
LL7を呼び出す。第2のフック用DLL6は、この呼
び出しをフックして、その呼び出しの情報をログファイ
ル部4に送る。
The viewer 5 reads and displays the log contents of the log file unit 4. Since the viewer 5 itself is also a kind of application, when using the API, the second processing DLL 6 via the second hook DLL 6 is used.
Call LL7. The second hook DLL 6 hooks this call and sends information of the call to the log file unit 4.

【0035】コントロールマネージャ8は、フック用D
LL2及び6の動作を制御・管理する。このコントロー
ルマネージャ8を外部操作することにより、呼び出し情
報のフックのオン/オフ、フックする呼び出し情報の設
定選択、並びに処理用DLL3及び7への呼び出しの転
送動作のストップ(停止)/ゴー(続行)を制御するこ
とができる。
The control manager 8 has a hook D
LL2 and LL6 are controlled and managed. By operating the control manager 8 externally, on / off of the hook of the call information, selection of the setting of the call information to be hooked, and the stop (go) / go (continue) of the transfer operation of the call to the processing DLLs 3 and 7 are performed. Can be controlled.

【0036】図2のフローチャートを参照して、トレー
スシステムのインストール時の処理の流れを説明する。
With reference to the flowchart of FIG. 2, the flow of processing when installing the trace system will be described.

【0037】インストールを開始すると、まず、トレー
スシステムを適用しようとする処理用DLL、例えば処
理用DLL3及び7を検索する(ステップS1)。処理
用DLL3及び7が検索されると、検索された処理用D
LL3及び7の原ファイル名が他のダミーファイル名に
リネームされる(ステップS2)。
When installation is started, first, a processing DLL to which the trace system is to be applied, for example, processing DLLs 3 and 7, is searched (step S1). When the processing DLLs 3 and 7 are searched, the searched processing D
The original file names of LL3 and LL7 are renamed to other dummy file names (step S2).

【0038】次に、フック用DLL2及び6が先にリネ
ームした処理用DLLの原ファイル名でシステムに導入
される(ステップS3)。そして、ログファイルを参照
するためのログファイルビューワがシステムに組み込ま
れ(ステップS4)、さらにフック用DLL2及び6を
制御するためのコントロールマネージャ8がシステムに
組み込まれる(ステップS5)。
Next, the hook DLLs 2 and 6 are introduced into the system with the original file name of the processing DLL renamed earlier (step S3). Then, a log file viewer for referring to the log file is incorporated into the system (step S4), and a control manager 8 for controlling the hook DLLs 2 and 6 is incorporated into the system (step S5).

【0039】上述の処理について、ここでは、OSとし
て、マイクロソフト社のウィンドウズNTシステムを使
用するものとし、該トレースシステムのDLLのフック
システムをバイルスシステム(VIRUSシステム)と
称することにする。
In the processing described above, a Windows NT system of Microsoft Corporation is used as the OS, and the DLL hook system of the trace system is referred to as a virus system (VIRUS system).

【0040】この場合、バイルスシステムがフックする
DLLは、32ビットグラフィックデバイスインタフェ
ース(Graphic Device Interface:GDI〜以下、「G
DI」と称する)用DLLであるGDI32.DLL、
32ビットユーザ用DLLであるUSER32.DL
L、ウィンドウズNT用DLL処理のためのDLLであ
るNTDLL.DLL及び32ビットOLE用のDLL
であるOLE32.DLLの4種類からなるデフォルト
の32ビットウィンドウズ用DLL(以下、「WIN3
2DLL」と称する)のうちのGDI32.DLL、U
SER32.DLL及びNTDLL.DLLである。
In this case, the DLL hooked by the virus system is a 32-bit graphic device interface (GDI), hereinafter referred to as “G”.
GDI32.DI). DLL,
USER32.32 which is a DLL for 32-bit users. DL
L, DLL for DLL processing for Windows NT. DLL and DLL for 32-bit OLE
OLE32. DLL for 32-bit Windows (hereinafter referred to as "WIN3
2DLL ”). DLL, U
SER32. DLL and NTDLL. DLL.

【0041】これらGDI32.DLL、USER3
2.DLL及びNTDLL.DLLは、メモリリークの
検出に使用することができる。ちなみに、これらのGD
I32.DLL、USER32.DLL及びNTDL
L.DLLは、基本的な32ビットウィンドウズシステ
ムにおけるグローバルトレースにも使用することがで
き、OLE32.DLLは、グローバルトレース用にの
み使用することができる。
The GDI 32. DLL, USER3
2. DLL and NTDLL. DLLs can be used to detect memory leaks. By the way, these GD
I32. DLL, USER32. DLL and NTDL
L. DLL can also be used for global tracing in a basic 32-bit Windows system, and OLE32. DLLs can only be used for global tracing.

【0042】図3は、バイルスシステムを導入する前の
GDI32.DLLに関するモジュール構成を示し、図
4は、バイルスシステム導入後のGDI32.DLLに
関するモジュール構成を示している。
FIG. 3 shows the GDI 32. 4 shows a module configuration related to DLL, and FIG. 2 shows a module configuration related to DLL.

【0043】導入に際して、バイルスシステムは、デフ
ォルトのWIN32.DLLであるGDI32.DLL
等の上述した3つのDLLファイルを、まず、別のダミ
ーのファイル名、例えばGDI32.DLLをVIRU
SGDI.DLLにリネームする。
At the time of installation, the Virus system uses the default WIN32. GDI32.DLL. DLL
First, the above three DLL files are stored in another dummy file name, for example, GDI32. DLL to VIRU
SGDI. Rename to DLL.

【0044】次に、フックによるロギング機構を持つバ
イルスシステム用のDLL、すなわちフック用DLL
を、GDI32.DLLとしてシステムに導入し、先に
リネームしたもとのGDI32.DLLと置換する。こ
のフック用DLLは、GDI32.DLLと同じ外部イ
ンタフェース及びパラメータ構成を有しているが、予め
設定した特定のAPIに対しては、API呼び出しに関
する情報をログファイル部4にロギングするように作成
されている。つまり、アプリケーションプログラムは、
もとの処理用DLLであるGDI32.DLLとリンク
しているものとして動作するが、実際には、バイルスシ
ステムのフック用DLLとリンクしていることになる。
バイルスシステムのフック用DLLは、ロギング後、V
IRUSGDI.DLLとして、本来のGDI32.D
LLを呼び出し、必要な情報を提供する。このようにし
て、GDI呼び出し情報をフックする。
Next, a DLL for a virus system having a logging mechanism using hooks, that is, a DLL for hooks
With GDI32. DLL that was introduced into the system and renamed earlier. Replace with DLL. This hook DLL is GDI32. It has the same external interface and parameter configuration as the DLL, but is created to log information on API calls to the log file unit 4 for a specific API set in advance. In other words, the application program
The original processing DLL GDI32. It operates as if it were linked to the DLL, but is actually linked to the hook DLL of the viral system.
The DLL for the hook of the Virus system is V
IRUSGDI. DLL as the original GDI 32. D
Call LL and provide the required information. In this way, the GDI call information is hooked.

【0045】上述したGDI32.DLL、USER3
2.DLL及びNTDLL.DLLのような通常のDL
Lは、処理実体である実体オブジェクトがDLLそのも
のに存在する。従って、これらのDLLは、アプリケー
ションプログラムから呼び出されると、エントリポイン
トだけをフックすれば、容易にロギングを行うログ機構
を構築することができる。
The GDI 32. DLL, USER3
2. DLL and NTDLL. Normal DL like DLL
In L, an entity object that is a processing entity exists in the DLL itself. Therefore, when these DLLs are called from an application program, a log mechanism for easily logging can be constructed by hooking only the entry point.

【0046】次に、図5に示すフローチャートを参照し
て、アプリケーションプログラムの実行時における動作
を説明する。アプリケーション部1でアプリケーション
が実行されると、アプリケーションは必要に応じて、A
PI呼び出しを行う(ステップS11)。このAPI呼
び出しは、第1のフック用DLL2でフックされる(ス
テップS12)。第1のフック用DLL2は、フックし
た呼び出しの情報をログファイルにロギングする(ステ
ップS13)。第1のフック用DLL2は、アプリケー
ション部1からの呼び出しに応じて、本来の第1の処理
用DLL3を呼び出す(ステップS14)。第1の処理
用DLL3は、該当するAPI処理を行う(ステップS
15)。
Next, the operation when the application program is executed will be described with reference to the flowchart shown in FIG. When the application is executed in the application unit 1, the application executes A if necessary.
A PI call is made (step S11). This API call is hooked by the first hook DLL 2 (step S12). The first hook DLL 2 logs information of the hooked call in a log file (step S13). The first hook DLL 2 calls the original first processing DLL 3 in response to the call from the application unit 1 (step S14). The first processing DLL 3 performs the corresponding API processing (step S
15).

【0047】アプリケーションプログラムの実行が終了
したか否かが判定され(ステップS16)、アプリケー
ションプログラムの実行中は、API呼び出し毎に、上
述したステップS11〜S15の処理が繰り返される。
このようにして、API呼び出し情報がロギングされ、
ログファイル部4にAPI呼び出し情報の履歴すなわち
ログが記録される。
It is determined whether or not the execution of the application program has been completed (step S16). During the execution of the application program, the above-described steps S11 to S15 are repeated for each API call.
In this way, API call information is logged,
The log file section 4 records the history of the API call information, that is, a log.

【0048】すなわち、バイルスシステムでは、API
の呼び出し時及び処理後のリターン時に、ロギング処理
を行い、呼び出したモジュール名、アドレス、時刻、及
びパフォーマンスカウント値等をログファイル部4に記
録する。このようにすることにより、あるポイントか
ら、あるポイントまでの処理時間を計測することができ
る。この場合、通常の局所的な計測とは異なり、OSの
ライブラリを置き換えているため、測定対象となるモジ
ュールには、一切、変更を加える必要がない。このよう
にすることによって、処理時間のボトルネックを容易に
調べることができる。
That is, in the Virus system, the API
At the time of calling and at the time of return after processing, a logging process is performed, and the called module name, address, time, performance count value, and the like are recorded in the log file unit 4. In this way, the processing time from a certain point to a certain point can be measured. In this case, unlike the normal local measurement, since the OS library is replaced, there is no need to change the module to be measured at all. By doing so, a bottleneck in the processing time can be easily checked.

【0049】さらに、メモリリーク等の、リソースの解
放漏れの検出は、このようなトレースシステムと、図6
に示すように、解析部9とを組み合わせて実現する。解
析部9は、例えば、在来のフューザに機能追加すること
によりソフトウエアで実現することができ、ログファイ
ル部4に記録されたログの内容をトレースし、メモリの
割り当てと解放を行ったモジュール名の対を検出し、割
り当てと解放が対になっていないモジュールをリストア
ップし、表示すると共に警告を発する。
Further, the detection of a resource release omission such as a memory leak is performed by using such a trace system as shown in FIG.
As shown in (1), it is realized in combination with the analysis unit 9. The analysis unit 9 can be implemented by software, for example, by adding a function to a conventional fuser. The analysis unit 9 traces the contents of the log recorded in the log file unit 4 and allocates and releases memory. Detect name pairs, list unassigned and unassigned modules, display them, and issue warnings.

【0050】即ち、メモリリークは、メモリ割り当ての
呼び出しがあるにもかかわらず、メモリが解放されない
場合に発生する。従って、モジュール名に着目してログ
をトレースし、割り当てと解放が対になっていないモジ
ュールをリストアップすることにより判別することがで
きる。まれに、メモリを割り当てるモジュールと解放を
行うモジュールが別々の場合もあるが、解放アドレス及
びハンドル値もトレースし、これらも表示することによ
り、正しいリーク情報を表示することができる。解放と
割り当てが別々の場合は、まれにプログラムのバグであ
ることも考えられるため、警告情報として出力する。
That is, a memory leak occurs when the memory is not released even though the memory allocation is called. Therefore, the log can be traced by focusing on the module name, and the module can be discriminated by listing the modules that are not paired and released. In rare cases, the module that allocates the memory and the module that releases the memory may be different. However, by tracing the release address and the handle value and displaying them, correct leak information can be displayed. If the release and the allocation are separate, it is output as warning information because it may be a bug of the program in rare cases.

【0051】このようにして、ウィンドウズNT及びウ
ィンドウズ95等のOSのAPIの呼び出しをフック用
DLL2及び6等によってフックして、APIの呼び出
し元及び時刻等をロギングすることができる。ログファ
イル部4をビューワによってビジュアルに表示すること
によって、OSのグローバルなトレースを実現して、シ
ステムの最適化に必要な、プロセス別及びモジュール別
などの情報を得ることができる。これらの情報に基づい
て、システムのパフォーマンスチューニングを実現する
ことができる。また、メモリ割り当て及びハンドル割り
当て等のOSのリソースの割り当て状況を追跡すること
によって、メモリリークが発生している箇所を効果的に
解析及び表示することが可能となる。このシステムを用
いることにより、メモリリークの自動的な解析及び表示
を実現することもできる。
In this manner, the call of the API of the OS such as Windows NT or Windows 95 can be hooked by the hook DLLs 2 and 6, and the caller and time of the API can be logged. By visually displaying the log file unit 4 with a viewer, a global trace of the OS can be realized, and information necessary for system optimization, such as for each process and each module, can be obtained. Based on this information, performance tuning of the system can be realized. In addition, by tracking the allocation status of OS resources such as memory allocation and handle allocation, it is possible to effectively analyze and display a location where a memory leak has occurred. By using this system, automatic analysis and display of a memory leak can be realized.

【0052】図7は、この発明の第2の実施の形態に係
るトレースシステムの構成を示している。図7は、OL
Eインタフェースのように、処理用DLL自体に処理用
のオブジェクトが埋め込まれておらず、別の実体モジュ
ールにリンクしていて、該実体モジュールを呼び出して
処理を行うものを含んでいる場合のトレースシステムを
示している。
FIG. 7 shows a configuration of a trace system according to a second embodiment of the present invention. FIG.
A trace system in which a processing object is not embedded in the processing DLL itself, but is linked to another entity module, and includes an entity that calls the entity module and performs processing, such as the E interface. Is shown.

【0053】図7のトレースシステムは、アプリケーシ
ョン部11、第1のフック用DLL12、第1の処理用
DLL13、実体モジュール14、ログファイル部4、
ビューワ5、第2のフック用DLL6、第2の処理用D
LL7、及びコントロールマネージャ8を具備してい
る。
The trace system shown in FIG. 7 includes an application section 11, a first hook DLL 12, a first processing DLL 13, a substantial module 14, a log file section 4,
Viewer 5, DLL 6 for second hook, D for second processing
An LL 7 and a control manager 8 are provided.

【0054】アプリケーション部11、第1のフック用
DLL12及び第1の処理用DLL13は、図1のアプ
リケーション部1、第1のフック用DLL2及び第1の
処理用DLL3とほぼ同様であるが、第1の処理用DL
L13が実体モジュール14を呼び出して処理を実行さ
せる。すなわち、第1の処理用DLL13は、その一部
又は全部のインタフェースに関して、第1の処理用DL
L13自体で処理を実行せず、実体モジュール14に処
理を実行させる。
The application section 11, the first hook DLL 12, and the first processing DLL 13 are substantially the same as the application section 1, the first hook DLL 2, and the first processing DLL 3 of FIG. DL for processing 1
L13 calls the entity module 14 to execute the processing. That is, the first processing DLL 13 is provided with the first processing DLL for some or all of its interfaces.
The process is executed by the entity module 14 without executing the process by the L13 itself.

【0055】第1のフック用DLL12が挿入されない
場合、第1の処理用DLL13が、最初の呼び出し時
に、アプリケーション部11に実体モジュール14のエ
ントリポイントを返し、以後は、アプリケーション部1
1から、実体モジュール14が直接呼び出される。そこ
で、第1のフック用DLL12は、実体モジュール14
のエントリポイントに代えてダミーのエントリポイント
として、第1のフック用DLL12のエントリポイント
を返す。このようにして、当該インタフェースを、アプ
リケーション部11が呼び出すたびに、第1のフック用
DLL12を通って実体モジュール14が呼び出され
る。したがって、実体モジュール14の呼び出しの直前
にロギングすることが可能になる。
If the first hook DLL 12 is not inserted, the first processing DLL 13 returns the entry point of the entity module 14 to the application unit 11 at the first call, and thereafter, the application unit 1
From 1, the entity module 14 is called directly. Therefore, the first hook DLL 12 is provided by the entity module 14.
, The entry point of the first hook DLL 12 is returned as a dummy entry point. In this way, every time the application unit 11 calls the interface, the entity module 14 is called through the first hook DLL 12. Therefore, logging can be performed immediately before the calling of the entity module 14.

【0056】ログファイル部4、ビューワ5、第2のフ
ック用DLL6、第2の処理用DLL7、及びコントロ
ールマネージャ8については、図1の場合と同一であ
る。アプリケーション部11、第1のフック用DLL1
2、第1の処理用DLL13、実体モジュール14、ビ
ューワ5、第2のフック用DLL6、第2の処理用DL
L7、及びコントロールマネージャ8の各部は、コンポ
ーネントとしてのプログラムモジュールにより構成され
る。また、ログファイル部4は、記憶装置に記憶される
ファイルにより構成される。
The log file unit 4, viewer 5, DLL for second hook 6, DLL for second processing 7, and control manager 8 are the same as those in FIG. Application unit 11, first hook DLL1
2. DLL for first processing 13, entity module 14, viewer 5, DLL for second hook 6, DL for second processing
Each part of the L7 and the control manager 8 is configured by a program module as a component. The log file unit 4 is composed of files stored in a storage device.

【0057】第1の処理用DLL13が処理を実体モジ
ュール14に依存せずに、それ自体で処理を実行する場
合の、第1のフック用DLL12及び第1の処理用DL
L13の機能及び動作は、図1における第1のフック用
DLL2及び第1の処理用DLL3と全く同様となる。
In the case where the first processing DLL 13 executes the processing by itself without depending on the actual module 14, the first hook DLL 12 and the first processing DLL
The function and operation of L13 are exactly the same as those of the first hook DLL 2 and the first processing DLL 3 in FIG.

【0058】次に、図7のトレースシステムのアプリケ
ーションの実行動作について具体的に説明する。図7の
トレースシステムのインストールは、図1のシステムと
同様に図2に示した流れに従って行われる。
Next, the execution operation of the application of the trace system of FIG. 7 will be specifically described. The installation of the trace system of FIG. 7 is performed in accordance with the flow shown in FIG. 2, similarly to the system of FIG.

【0059】前述のように、例えば、OLEのモジュー
ルであるOLE23.DLLの場合には、通常のDLL
と比して若干特殊な動作をする。すなわち、OLEはD
LLで実現されているものの、通常のDLLとは、イン
タフェースが異なっている。OLE32.DLLは、ア
プリケーションプログラムから呼び出されると、処理実
体である実体モジュール14を呼び出して、実体モジュ
ール14により処理を実行させる。したがって、ロギン
グのためのログ機構の構築に工夫が必要である。
As described above, for example, the OLE module OLE23. In the case of DLL, normal DLL
Performs a slightly special operation compared to. That is, OLE is D
Although implemented by LL, the interface is different from that of a normal DLL. OLE32. When called from the application program, the DLL calls the entity module 14 which is a processing entity, and causes the entity module 14 to execute a process. Therefore, it is necessary to devise a log mechanism for logging.

【0060】先に述べたように、通常のDLLは、アプ
リケーション部11で実行されるアプリケーションプロ
グラムから呼び出されると、処理実体がDLLそのもの
に埋め込まれて存在し、単に、エントリポイントだけを
フックするだけで容易にロギングすることができる。
As described above, when a normal DLL is called from an application program executed by the application unit 11, the processing entity exists in the DLL itself, and only the entry point is hooked. Can be easily logged.

【0061】ところが、OLEのインタフェースは、最
初の呼び出しは、OLEのDLLを通るが、それが実体
モジュールのポインタを返すため、次回以降の呼び出し
は、アプリケーションプログラムからDLLを経由せず
実体モジュールが呼び出される。
However, in the OLE interface, the first call passes through the OLE DLL, but returns the pointer of the physical module. Therefore, the subsequent calls are performed by the physical module without passing through the DLL from the application program. It is.

【0062】そこで、OLEのインタフェースでは、単
にOLEのDLLをフックしただけでは不充分であり、
第1のフック用DLL12において、ポインタとして、
ダミーのインタフェース、つまり、バイルスシステムの
DLLである第1のフック用DLL12のエントリポイ
ントを返す。そして、第1のフック用DLL12が実体
モジュール14を呼び出すようにすることによって、実
体モジュール14を呼び出す直前にロギング等を行うこ
とが可能となる。
In the OLE interface, it is not sufficient to simply hook the OLE DLL.
In the first hook DLL 12, as a pointer:
It returns the dummy interface, that is, the entry point of the first hook DLL 12 which is the DLL of the virus system. By causing the first hook DLL 12 to call the entity module 14, logging or the like can be performed immediately before calling the entity module 14.

【0063】次に、図8に示すフローチャートを参照し
て、アプリケーションの実行時における動作を説明す
る。アプリケーション部11でアプリケーションが実行
されると、API呼び出しが行われる(ステップS2
1)。API呼び出しは、第1のフック用DLL12で
フックされ(ステップS22)、フックされた呼び出し
の情報をログファイル部4にロギングする(ステップS
23)。第1のフック用DLL12は、アプリケーショ
ン部11からの呼び出しに応じて第1の処理用DLL1
3を呼び出し(ステップS24)、呼び出しがOLEイ
ンタフェースか否かが判定される(ステップS25)。
OLEでなければ、第1の処理用DLL13において、
該当するAPI処理を行う(ステップS26)。
Next, referring to the flowchart shown in FIG. 8, the operation at the time of executing the application will be described. When the application is executed by the application unit 11, an API call is made (step S2).
1). The API call is hooked by the first hook DLL 12 (step S22), and information of the hooked call is logged in the log file unit 4 (step S22).
23). The first hook DLL 12 responds to a call from the application unit 11 and the first processing DLL 1
3 is called (step S24), and it is determined whether or not the call is the OLE interface (step S25).
If not OLE, in the first processing DLL 13,
The corresponding API processing is performed (step S26).

【0064】その後、アプリケーション部11における
アプリケーションプログラムの実行が終了したか否かが
判定される(ステップS27)。ステップS25で、O
LEインタフェースであると判定されると、第1のフッ
ク用DLL12でエントリポイントが変換されて(ステ
ップS28)、実体モジュール14が呼び出される。実
体モジュール14で該当するAPI処理が行われ(ステ
ップS29)、ステップS27に移行する。なお、一
旦、ステップS28でエントリ変換が行われた後は、ス
テップS23のロギング後、第1のフック用DLL12
から、第1の処理用DLL13をその都度呼び出さず
に、実体モジュール14を直接呼び出すようにしてもよ
い。
Thereafter, it is determined whether or not the execution of the application program in the application section 11 has been completed (step S27). In step S25, O
If it is determined that the interface is the LE interface, the entry point is converted by the first hook DLL 12 (step S28), and the entity module 14 is called. The corresponding API processing is performed in the entity module 14 (step S29), and the process proceeds to step S27. Once the entry conversion is performed in step S28, after logging in step S23, the first hook DLL 12
Therefore, the entity module 14 may be directly called without calling the first processing DLL 13 each time.

【0065】ステップS27の判定に応じ、アプリケー
ションプログラムの実行中は、API呼び出し毎に、上
述したステップS21〜S26又はS21〜S25→S
28→S29の処理が繰り返される。このようにして、
API呼び出し情報がロギングされ、ログファイル部4
にAPI呼び出し情報の履歴すなわちログが記録され
る。
According to the determination in step S27, during execution of the application program, the above-described steps S21 to S26 or S21 to S25 → S
The processing of 28 → S29 is repeated. In this way,
API call information is logged and the log file part 4
The history of the API call information, that is, a log, is recorded in the log.

【0066】なお、図8では、ステップS25におい
て、OLEか否かの判別を行っているが、個々のDLL
を置き換える際に、ダミーのDLL(OSに付属してい
るものではなく、ロギング取得用に作成したもの)のロ
ジックの中にOLEを埋め込んでおき、OLEか否かの
判断を行わないようにしてもよい。
In FIG. 8, in step S25, it is determined whether or not OLE is selected.
When replacing OLE, OLE is embedded in the logic of the dummy DLL (created for logging acquisition, not attached to the OS) so that it is not determined whether or not the OLE is used. Is also good.

【0067】上述したOLEのモジュールの場合につい
て、さらに詳細に説明する。前述のように、OLEはD
LLで実現されているものの、通常のDLLとは、イン
タフェースが少し異る。図9に示すように、通常のDL
Lは、アプリケーションプログラムAPから呼び出され
ると処理実体がDLLそのものに存在し、単に、エント
リポイントだけをフックするようにすれば、ログ機構な
どを挿入することが容易である。
The case of the above-mentioned OLE module will be described in more detail. As mentioned above, OLE is D
Although implemented by LL, the interface is slightly different from that of a normal DLL. As shown in FIG.
When L is called from the application program AP, the processing entity exists in the DLL itself. If only the entry point is hooked, it is easy to insert a log mechanism or the like.

【0068】ところが、図9のように、OLEのインタ
フェースは、最初の呼び出しは、OLEのDLLを通る
が、それが実体モジュールのエントリのポインタを返す
ため、次回以降の呼び出しは、アプリケーションプログ
ラムAPからDLLを経由せずに実体モジュールが呼び
出される。従って、OLEのインタフェースでは、フッ
ク用DLLで、単にOLEのDLLをフックしただけで
は不充分であり、図10に示すように、エントリのポイ
ンタとして、ダミーのインタフェース、つまり、バイル
スシステムのDLL(フック用DLL)のエントリポイ
ントを返すようにする。該ポインタによって実体モジュ
ールを呼び出すようにすることで、実体モジュールを呼
び出す直前にロギング等を行うことが可能となる。
However, as shown in FIG. 9, in the OLE interface, the first call passes through the OLE DLL, but it returns a pointer to the entry of the substantial module. The entity module is called without going through the DLL. Therefore, in the OLE interface, it is not sufficient to simply hook the OLE DLL with the DLL for the hook, and as shown in FIG. 10, a dummy interface, that is, the DLL (hook) of the viral system is used as the pointer of the entry. DLL) entry point. By calling the entity module by the pointer, it is possible to perform logging or the like immediately before calling the entity module.

【0069】即ち、OLEインタフェース(OLEのイ
ンタフェース)は、C++のインプリメントと同様に、Co
CreateInstanceにて、ポインタを取得後、このポインタ
を元にしてそれぞれのインタフェースを呼び出す。バイ
ルスシステムでは、最初のCoCreateInstanceは、通常の
DLL同様、DLLインタフェースのフックにより、本
来のOLE32.DLLを呼び出すが、このとき返すオ
ブジェクトポインタを、OLE32.DLLが返すポイ
ンタでなく、自分自身のダミーのポインタに返す。する
と、OLEを呼び出したアプリケーションは、ダミーの
ポインタを本来のポインタとして取り扱うため、次にオ
ブジェクトを呼び出す時は、このダミーのポインタを元
にオブジェクトを呼び出す。このポインタは、バイルス
システムが払い出したポインタであり、アプリケーショ
ンがオブジェクトを呼び出す度に、バイルスシステムで
フックでき、1通りのロギング動作を行ってから、本来
のOLE32.DLLが返したポインタを呼び出す。こ
れらの点が通常のDLLと動作が異なる点である。
That is, the OLE interface (OLE interface) is similar to the C ++ implementation in that
After creating a pointer with CreateInstance, each interface is called based on this pointer. In the Virus system, the first CoCreateInstance uses the hook of the DLL interface to execute the original OLE 32. DLL is called, and the object pointer returned at this time is set to OLE32. Return to a dummy pointer of its own instead of the pointer returned by the DLL. Then, the application that has called the OLE treats the dummy pointer as an original pointer, so that the next time the object is called, the object is called based on the dummy pointer. This pointer is a pointer issued by the virus system. Every time an application calls an object, the pointer can be hooked by the virus system, and after performing one kind of logging operation, the original OLE 32. Call the pointer returned by the DLL. These points are points where the operation is different from that of a normal DLL.

【0070】既に述べたように、バイルスシステムは、
APIの呼び出し時及び処理終了後のリターン時に、ロ
ギング処理を行い、呼び出したモジュール名、アドレ
ス、時刻及びパフォーマンスカウント値等をログファイ
ルに記録する。このようにして、あるポイントから、あ
るポイントまでの処理時間を計測することができる。通
常の局所的な計測とは異なり、OSのライブラリを置き
換えているため、測定対象となるモジュールは一切変更
する必要がない。また、メモリリークの検出には、図6
に示したように、この仕組みと、解析部9とを組み合わ
せて使用する。
As already mentioned, the Virus system is:
Logging processing is performed at the time of calling the API and at the time of return after the processing is completed, and the called module name, address, time, performance count value, and the like are recorded in a log file. In this way, the processing time from a certain point to a certain point can be measured. Unlike ordinary local measurement, since the OS library is replaced, there is no need to change the module to be measured at all. In addition, FIG.
As shown in (1), this mechanism and the analysis unit 9 are used in combination.

【0071】図1及び図7に示したトレースシステム
を、さらに具体的に説明する。このシステムは、主とし
て図11に示すような、コンポーネントモジュールで構
成される。
The trace system shown in FIGS. 1 and 7 will be described more specifically. This system is mainly composed of component modules as shown in FIG.

【0072】図11は、GAP.EXE、GAPUI.
DLL、GAPUI.OCX、FSENGINE.DL
L、VRSCTRL.EXE、NOSIDEIF.DL
L、VIRUSTUB.DLL及びVIRUSLOG.
DLLの各モジュールを示す。
FIG. 11 shows GAP. EXE, GAPUI.
DLL, GAPUI. OCX, FSENGINE. DL
L, VRSCTRL. EXE, NOSIDEIF. DL
L, VIRUSTUB. DLL and VIRUSLOG.
4 shows each module of the DLL.

【0073】GAP.EXEは、ビューワの実行モジュ
ールであり、ビューワ5に相当する。GAPUI.DL
Lは、GAP.EXE特有のインタフェース用DLL、
GAPUI.OCXは、GAP.EXE用のOCX(O
LEコントロール)21である。
GAP. EXE is an execution module of the viewer and corresponds to the viewer 5. GAPUI. DL
L is GAP. EXE specific interface DLL,
GAPUI. OCX is available from GAP. OCX for EXE (O
LE control) 21.

【0074】VRSCTRL.EXEは、コントロール
マネージャの実行モジュールであり、コントロールマネ
ージャ8に相当する。VIRUSTUB.DLL及びV
IRUSLOG.DLLは、バイルスシステムのAPI
呼び出し情報をフックするためのDLLであり、これら
はフック用DLL2、6又は12に相当する。GAPU
I.DLL、FSENGINE.DLL及びNOSID
EIF.DLLは、各種処理を実行するためのDLLで
あり、処理用DLL3、7又は13に相当する。
VRSCTRL. EXE is an execution module of the control manager, and corresponds to the control manager 8. VIRSTUB. DLL and V
IRUSLOG. DLL is API of Virus System
DLLs for hooking call information, which correspond to the hook DLLs 2, 6, or 12. GAPU
I. DLL, FSENGINE. DLL and NOSID
EIF. The DLL is a DLL for executing various types of processing, and corresponds to the processing DLL 3, 7, or 13.

【0075】図11に示した、コンポーネントは、主と
して、次の4つのサービス提供する。 (1) カレント情報取得サービス 現在のGDIオブジェクトの割り当ての監視情報、並び
にOLE、GDI等のAPI呼び出しの発行状況の監視
情報を、ロギングバッファ及びログファイル部4の少な
くともいずれかから取得し、ビューワ5であるGAP.
EXEにより表示する。GDIオブジェクトの割り当て
の監視情報は、リソースの割り当てと開放、及びオーナ
の表示情報を含む。
The components shown in FIG. 11 mainly provide the following four services. (1) Current information acquisition service Obtains monitoring information of the current allocation of GDI objects and monitoring information of the issuance status of API calls such as OLE and GDI from at least one of the logging buffer and the log file unit 4 and obtains the viewer 5 GAP.
Display by EXE. The monitoring information on the assignment of the GDI object includes information on the assignment and release of the resource and the owner.

【0076】(2) ロギングサービス GDI及びOLE用のDLLの一部のインターフェース
について、VIRUSTUB.DLLによるパッチを当
てる。具体的には、上述したように、インストール時に
本来の処理用DLLをリネームして、代わりに、処理用
のDLLのファイル名としてフック用のダミーのDLL
を挿入する。
(2) Logging Service Some interfaces of DLL for GDI and OLE are described in VIRSTUB. Apply the DLL patch. Specifically, as described above, the original processing DLL is renamed at the time of installation, and instead, the dummy DLL for hook is used as the file name of the processing DLL.
Insert

【0077】このようにすることにより、必要なインタ
フェースが呼び出されるたびに、VIRUSのDLLを
経由することになり、呼び出し、オブジェクトの割り当
て、及び開放状況がすべて把握できる。この機能では、
DLL及び実行プログラム(以下、「EXE」と称す
る)毎にロギング機構をオン/オフ設定することがで
き、ロギングレベルも例えば0=OFF、1=呼び出し
のみ、及び2=呼び出しとパラメータ等の3段階に設定
することができる。ロギングにより、ログファイル等に
取得された情報は、フューザで表示させることができ
る。
In this way, every time a required interface is called, the interface goes through the DLL of VIRUS, and the call, the assignment of the object, and the release status can all be grasped. With this feature,
The logging mechanism can be set on / off for each DLL and execution program (hereinafter referred to as “EXE”), and the logging level can also be set to three levels, for example, 0 = OFF, 1 = call only, and 2 = call and parameters. Can be set to Information acquired in a log file or the like by logging can be displayed on a fuser.

【0078】(3) ダイナミックエグゼキューションサー
ビス このサービスは、ロギングサービスを利用して実現す
る。アプリケーションプログラムがOLE及びGDIを
呼び出す時に、コントロールマネージャ8であるVRS
CTRL、EXEからの指示で、ストップ/ゴーを指示
することができる。この機能は、デバッガを経由するこ
となしに、呼び出しパラメータを確認したり、OLEの
内部情報、及びGDIのリソース割り当て状況等を表示
させるときに使用する。
(3) Dynamic Execution Service This service is realized by using a logging service. When an application program calls OLE and GDI, VRS which is the control manager 8
Stop / go can be instructed by instructions from CTRL and EXE. This function is used when confirming call parameters and displaying OLE internal information and GDI resource allocation status without going through a debugger.

【0079】(4) デバッギングライブラリサービス プログラム言語、例えばビジュアルBASIC(Visual
Basic:VB)等の開発者用には、デバッグサポートラ
イブラリが提供される。
(4) Debugging library service A programming language such as Visual BASIC (Visual
A debug support library is provided for developers such as Basic: VB).

【0080】基本的な動作は、次のようになる。ウィン
ドウズNT及びウィンドウズ95等において、標準でサ
ポートされるAPI用のDLLを、このバイルスシステ
ムのVIRUSTUB.DLLで置換する。このDLL
では、全ての標準インタフェースのエントリポイントだ
けが定義されている。一方、既存のDLLは、リネーム
する。
The basic operation is as follows. DLLs for APIs that are supported as standard in Windows NT and Windows 95, etc., are provided by VIRUSTUB. Replace with DLL. This DLL
Defines only the entry points for all standard interfaces. On the other hand, the existing DLL is renamed.

【0081】アプリケーションからのAPI呼び出し
は、既存のライブラリではなく、置換されたバイルスシ
ステムのDLLを経由するようになる。一方、リネーム
された既存のDLLには、本来のAPIの機能が含まれ
ているため、ロギングした後は、そのライブラリを呼び
出すようにする。本来の処理後、再びバイルスシステム
のDLLに処理が戻ってくるため、その間の時間をロギ
ングすれば、処理時間などを把握することができる。
The API call from the application goes not through the existing library but through the DLL of the replaced virus system. On the other hand, the renamed existing DLL includes the function of the original API, so that after logging, the library is called. After the original processing, the processing returns to the DLL of the virus system again. If the time during the processing is logged, the processing time and the like can be grasped.

【0082】また、リソースの割り当ては、確保と開放
の呼び出しが存在するため、それらが対になっていない
ときは、リークが発生したと判断して、ビューワで警告
を与えるようにする。リソースは、モジュール名、ハン
ドル値及びアドレスなどによって特定することができ
る。
Also, in the resource allocation, since there are calls for reservation and release, when they are not paired, it is determined that a leak has occurred, and a warning is given by the viewer. A resource can be specified by a module name, a handle value, an address, and the like.

【0083】このようにして、ウィンドウズNT及びウ
ィンドウズ95等のOSにおけるAPI呼び出しをフッ
ク用DLL12及び6等によってフックして、APIの
呼び出し元及び時刻等をロギングすることができる。ロ
グファイル部4をビューワ5によってビジュアルに表示
することによって、OSのグローバルなトレースを実現
して、システムの最適化に必要な、プロセス別及びモジ
ュール別などの情報を得ることができる。しかも、リコ
ンパイルや再リンク等の操作も不要である。
In this manner, the API call in the OS such as Windows NT or Windows 95 can be hooked by the hook DLLs 12 and 6 to log the API caller and the time. By visually displaying the log file unit 4 with the viewer 5, a global trace of the OS can be realized, and information necessary for system optimization, such as for each process and each module, can be obtained. Moreover, operations such as recompilation and relinking are not required.

【0084】上述のトレースシステムは、専用のシステ
ムによらず、通常のコンピュータシステムを用いて実現
可能である。例えば、コンピュータに上述の動作を実行
するためのプログラムを記録した媒体(フロッピーディ
スク、CD−ROM等)から該プログラムをインストー
ルすることにより、上述の処理を実行するシステムを構
成することができる。
The above-described trace system can be realized by using a general computer system without using a dedicated system. For example, by installing the program from a medium (a floppy disk, a CD-ROM, or the like) on which a program for executing the above-described operation is recorded in a computer, a system that executes the above-described processing can be configured.

【0085】また、コンピュータにプログラムを供給す
るための媒体は、通信媒体(通信回線、通信ネットワー
ク、通信システムのように、一時的に流動的にプログラ
ムを保持する媒体)でも良い。例えば、通信ネットワー
クの掲示板(BBS)に該プログラムを掲示し、これを
ネットワークを介して配信してもよい。そして、このプ
ログラムを起動し、OSの制御下で、他のアプリケーシ
ョンプログラムと同様に実行することにより、上述の処
理を実行することができる。
Further, the medium for supplying the program to the computer may be a communication medium (a medium that temporarily and dynamically holds the program, such as a communication line, a communication network, or a communication system). For example, the program may be posted on a bulletin board (BBS) of a communication network and distributed via the network. Then, by starting this program and executing it in the same manner as other application programs under the control of the OS, the above-described processing can be executed.

【0086】なお、OSが上述のシステムの機能の一部
を担当する場合、或いは、OSとアプリケーションプロ
グラムが共同して上述の機能の一部又は全部を達成する
場合には、記録媒体にはOS以外のプログラム部分又は
データ部分を格納しておけばよい。
When the OS takes part of the functions of the above-mentioned system, or when the OS and the application program cooperate to achieve some or all of the above-mentioned functions, the recording medium contains the OS. Other program portions or data portions may be stored.

【0087】[0087]

【発明の効果】以上説明したように、この発明のトレー
スシステム及びメモリリーク検出システムでは、アプリ
ケーションプログラムのインタフェース呼び出しのたび
に、その呼び出しに係る呼び出し情報やリソース割り当
て情報をフックしてログ記録するので、オペレーティン
グシステムのグローバルなトレース及びメモリリーク等
のリソースの解放漏れの効果的な検出を行うことができ
る。すなわち、この発明では、リコンパイルが不要で、
バイナリで提供されたコンポーネントを組み合わせて作
成されたシステムにおいても、OSのグローバルなトレ
ース及びそれによるメモリリークの効果的な検出を可能
とし、メモリリークの検出及び解決を始めとするシステ
ムのパフォーマンスチューニングに効果的に利用し得る
トレースシステム及びメモリリーク検出システムを提供
することができる。
As described above, in the trace system and the memory leak detection system according to the present invention, every time an interface of an application program is called, call information and resource allocation information relating to the call are hooked and recorded. Effective detection of resource release omissions such as global trace of the operating system and memory leaks can be performed. That is, in the present invention, recompilation is unnecessary,
Even in a system created by combining components provided in binary, it is possible to globally trace the OS and effectively detect memory leaks thereby, and to perform system performance tuning including memory leak detection and resolution A trace system and a memory leak detection system that can be used effectively can be provided.

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

【図1】この発明の第1の実施の形態に係るトレースシ
ステムの構成を模式的に示すブロック図である。
FIG. 1 is a block diagram schematically showing a configuration of a trace system according to a first embodiment of the present invention.

【図2】図1のトレースシステムにおけるインストール
動作を説明するためのフローチャートである。
FIG. 2 is a flowchart for explaining an installation operation in the trace system of FIG. 1;

【図3】図1のトレースシステムのDLLの動作原理を
説明するための模式図である。
FIG. 3 is a schematic diagram for explaining an operation principle of a DLL of the trace system of FIG. 1;

【図4】図1のトレースシステムのフックの原理を説明
するための模式図である。
FIG. 4 is a schematic diagram for explaining the principle of a hook of the trace system of FIG. 1;

【図5】図1のトレースシステムにおけるアプリケーシ
ョンプログラムの実行動作を説明するためのフローチャ
ートである。
FIG. 5 is a flowchart illustrating an operation of executing an application program in the trace system of FIG. 1;

【図6】メモリリーク等のリソースの解放漏れを検出す
るシステムの構成を示すブロック図である。
FIG. 6 is a block diagram showing a configuration of a system for detecting a resource release omission such as a memory leak.

【図7】この発明の第2の実施の形態に係るトレースシ
ステムの構成を模式的に示すブロック図である。
FIG. 7 is a block diagram schematically showing a configuration of a trace system according to a second embodiment of the present invention.

【図8】図7のトレースシステムにおけるアプリケーシ
ョンプログラムの実行動作を説明するためのフローチャ
ートである。
FIG. 8 is a flowchart illustrating an operation of executing an application program in the trace system of FIG. 7;

【図9】図7のトレースシステムの通常のDLLと、O
LEのDLLの動作原理を説明するための模式図であ
る。
FIG. 9 shows a normal DLL of the trace system of FIG.
FIG. 4 is a schematic diagram for explaining the operation principle of the DLL of the LE.

【図10】図7のトレースシステムのOLEのDLLの
フックの原理を説明するための模式図である。
FIG. 10 is a schematic diagram for explaining the principle of the DLL hook of the OLE of the trace system of FIG. 7;

【図11】図1及び図7のトレースシステムにおける具
体的なモジュール構成の一例を示す模式図である。
FIG. 11 is a schematic diagram showing an example of a specific module configuration in the trace system of FIGS. 1 and 7;

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

1,11 アプリケーション部 2,6,12 フック用ダイナミックリンクライブラリ
(DLL) 3,7,13 処理用ダイナミックリンクライブラリ
(DLL) 4 ログファイル部 5 ビューワ 8 コントロールマネージャ 14 実体モジュール
1,11 Application section 2,6,12 Hook dynamic link library (DLL) 3,7,13 Processing dynamic link library (DLL) 4 Log file section 5 Viewer 8 Control manager 14 Real module

Claims (13)

【特許請求の範囲】[Claims] 【請求項1】アプリケーションプログラムとのインタフ
ェースを取るためのアプリケーションインタフェースを
備えるオペレーティングシステムと、 前記オペレーティングシステム上でアプリケーションプ
ログラムを実行するアプリケーション手段と、 前記アプリケーション手段による前記アプリケーション
プログラムの実行に際し、前記アプリケーションプログ
ラムによる前記アプリケーションインタフェースの呼び
出しを中継するとともに、該呼び出しの情報を取り込む
フック手段と、 前記フック手段で取り込まれた前記呼び出しの情報を蓄
積記録するログ記録手段と、を具備することを特徴とす
るトレースシステム。
An operating system having an application interface for interfacing with an application program; an application means for executing the application program on the operating system; and an application program for executing the application program by the application means. And a log recording means for storing and recording the information of the call fetched by the hook means while relaying the call of the application interface according to the above. system.
【請求項2】前記フック手段は、前記アプリケーション
インタフェースに対するアプリケーションプログラムの
呼び出しを前記アプリケーションインタフェースの代わ
りに受ける手段と、前記呼び出しの情報を前記ログ記録
手段に提供する手段と、前記呼び出しを前記アプリケー
ションインタフェースに転送する手段とを含むことを特
徴とする請求項1に記載のトレースシステム。
2. The information processing apparatus according to claim 2, wherein said hook means receives a call of an application program for said application interface in place of said application interface, provides said log information to said log recording means, and transmits said call to said application interface. 2. A trace system according to claim 1, further comprising:
【請求項3】前記ログ記録手段で記録された前記呼び出
しの情報を出力する手段をさらに含むことを特徴とする
請求項1又は2に記載のトレースシステム。
3. The trace system according to claim 1, further comprising means for outputting the information of the call recorded by the log recording means.
【請求項4】前記フック手段から前記ログ記録手段へ転
送された情報の記録のオンとオフを制御するロギング制
御手段をさらに含むことを特徴とする請求項1乃至3の
うちのいずれか1項に記載のトレースシステム。
4. The apparatus according to claim 1, further comprising logging control means for controlling on / off of recording of information transferred from said hook means to said log recording means. Trace system described in 1.
【請求項5】前記ロギング制御手段は、前記フック手段
から前記アプリケーションインタフェースへの前記情報
の転送の停止と実行を、外部操作に応答して、制御する
手段をさらに含むことを特徴とする請求項4に記載のト
レースシステム。
5. The apparatus according to claim 1, wherein said logging control means further comprises means for controlling a stop and execution of transfer of said information from said hook means to said application interface in response to an external operation. 5. The trace system according to 4.
【請求項6】前記ロギング制御手段は、前記ログ記録手
段に記録される前記情報の内容を制御する手段をさらに
含むことを特徴とする請求項4又は5に記載のトレース
システム。
6. The trace system according to claim 4, wherein said logging control means further includes means for controlling the contents of said information recorded in said log recording means.
【請求項7】前記フック手段は、前記アプリケーション
プログラムによる前記アプリケーションインタフェース
の呼び出しのうち、前記オペレーティングシステムのリ
ソース割り当てに関するリソース割り当て情報を取り込
む手段を備えることを特徴とする請求項1乃至6のいず
れか1項に記載のトレースシステム。
7. The apparatus according to claim 1, wherein said hook means includes means for taking in resource allocation information relating to resource allocation of said operating system among calls of said application interface by said application program. The trace system according to claim 1.
【請求項8】前記ログ記録手段により、記録されたリソ
ースの割り当てと解放の対を検出し、割り当てと解放の
一方のみを検出し、他方を検出できない時に、その旨を
報知する対検出手段をさらに含むことを特徴とする請求
項7に記載のトレースシステム。
8. A pair detecting means for detecting a pair of recorded resource allocation and release by the log recording means, detecting only one of the allocation and release, and notifying the fact when the other cannot be detected. The trace system according to claim 7, further comprising:
【請求項9】オペレーティングシステム上でアプリケー
ションプログラムを実行するアプリケーション手段と、 前記アプリケーションプログラムの実行に際し、前記ア
プリケーションプログラムから前記オペレーティングシ
ステムのアプリケーションインタフェースに送られるリ
ソースの割り当てと解放の要求に関するリソース割当情
報を取り込むフック手段と、 前記フック手段で取り込まれた前記リソース割当情報を
蓄積記録するログ記録手段と、を具備することを特徴と
するリソース解放漏れ検出システム。
9. Application means for executing an application program on an operating system; and resource allocation information on resource allocation and release requests sent from the application program to an application interface of the operating system when executing the application program. A resource release omission detection system, comprising: hook means for taking in; and log recording means for storing and recording the resource allocation information taken in by the hook means.
【請求項10】前記ログ記録手段により記録されたリソ
ースの割り当てと解放の対を検出し、割り当てと解放の
一方のみを検出し、他方を検出できない時に、その旨を
報知する対検出手段をさらに含むことを特徴とする請求
項9に記載のリソース解放漏れ検出システム。
10. A pair detecting means for detecting a pair of resource allocation and release recorded by the log recording means, detecting only one of the allocation and release, and notifying the fact when the other cannot be detected. The resource release omission detection system according to claim 9, comprising:
【請求項11】前記リソースはメモリである、ことを特
徴とする請求項9又は10に記載のリソース解放漏れ検
出システム。
11. The resource release omission detection system according to claim 9, wherein the resource is a memory.
【請求項12】コンピュータを、 アプリケーションプログラムとのインタフェースを取る
ためのアプリケーションインタフェースを備えるオペレ
ーティングシステム上でアプリケーションプログラムを
実行するアプリケーション手段、 前記アプリケーション手段による前記アプリケーション
プログラムの実行に際し、前記アプリケーションプログ
ラムによる前記アプリケーションインタフェースの呼び
出しを中継するとともに、該呼び出しの情報を取り込む
フック手段と、 前記フック手段で取り込まれた前記呼び出しの情報を蓄
積記録するログ記録手段、として機能させるためのプロ
グラムを記録したコンピュータで読み取り可能な記録媒
体。
12. An application unit for executing an application program on an operating system having an application interface for interfacing with an application program, wherein the application unit executes the application program by the application unit. A computer that records a program for functioning as a hook unit that relays the call of the interface and captures the information of the call, and a log recording unit that stores and records the information of the call captured by the hook unit. Recording medium.
【請求項13】コンピュータを、 オペレーティングシステム上でアプリケーションプログ
ラムを実行するアプリケーション手段、 前記アプリケーションプログラムの実行に際し、前記ア
プリケーションプログラムから前記オペレーティングシ
ステムのアプリケーションインタフェースに送られるリ
ソースの割り当てと解放の要求に関するリソース割当情
報を取り込むフック手段、 前記フック手段で取り込まれた前記リソース割当情報を
蓄積記録するログ記録手段、として機能させるためのプ
ログラムを記録したコンピュータで読み取り可能な記録
媒体。
13. An application means for executing an application program on an operating system, comprising: a computer for executing an application program; and resource allocation relating to a request for allocation and release of a resource sent from the application program to an application interface of the operating system when the application program is executed. A computer-readable recording medium storing a program for functioning as hook means for taking in information, and log recording means for storing and recording the resource allocation information taken in by the hook means.
JP10013654A 1997-01-27 1998-01-27 Trace system, resource release omission detection system, and recording medium Pending JPH10269105A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10013654A JPH10269105A (en) 1997-01-27 1998-01-27 Trace system, resource release omission detection system, and recording medium

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP1301297 1997-01-27
JP9-13012 1997-01-27
JP10013654A JPH10269105A (en) 1997-01-27 1998-01-27 Trace system, resource release omission detection system, and recording medium

Publications (1)

Publication Number Publication Date
JPH10269105A true JPH10269105A (en) 1998-10-09

Family

ID=26348728

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10013654A Pending JPH10269105A (en) 1997-01-27 1998-01-27 Trace system, resource release omission detection system, and recording medium

Country Status (1)

Country Link
JP (1) JPH10269105A (en)

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000181749A (en) * 1998-12-14 2000-06-30 Nec Software Kyushu Ltd Error process test system of software, testing method, and recording medium for test program
JP2000250783A (en) * 1999-03-04 2000-09-14 Ntt Communicationware Corp Method for checking omission of extraction from test item of exchange program
JP2001154872A (en) * 1999-11-25 2001-06-08 Nec Ic Microcomput Syst Ltd Device and method for supporting software development and recording medium having the same program recorded thereon
JP2005527008A (en) * 2001-09-19 2005-09-08 ヒューレット・パッカード・カンパニー Runtime monitoring of component-based systems
US6983453B2 (en) 2001-08-30 2006-01-03 International Business Machines Corporation Method and system for obtaining performance data from software compiled with or without trace hooks
JP2006172205A (en) * 2004-12-16 2006-06-29 Canon Inc Information processor and control method therefor, computer program and storage medium
JP2007042007A (en) * 2005-08-05 2007-02-15 Yafoo Japan Corp Memory leak detection program, device, and method
CN100347669C (en) * 2003-12-30 2007-11-07 佳能株式会社 Operation log acquiring method, program and storage medium
JP2007329937A (en) * 2001-02-26 2007-12-20 4Thpass Inc Method and system for billing based on application communication
KR100875997B1 (en) 2006-11-13 2008-12-24 한국전자통신연구원 Network Fuzzing Using Windows Sockets Application Program Hooking
US7665066B2 (en) 2001-04-12 2010-02-16 Siemens Aktiengesellschaft Method for determining and recording system information and function in distributed parallel component based software systems
JP2011107833A (en) * 2009-11-13 2011-06-02 Ricoh Co Ltd Information processor, api program, and log environment provision method
JP2012003611A (en) * 2010-06-18 2012-01-05 Denso Corp Time monitoring apparatus and method
JP4911530B2 (en) * 2005-05-31 2012-04-04 サイエンスパーク株式会社 Surveillance system, system program, and recording medium recording the program
JP2012164098A (en) * 2011-02-06 2012-08-30 Mitsubishi Electric Corp Entry rewriting device and entry rewriting program
JP2012248166A (en) * 2011-05-31 2012-12-13 Fuji Electric Co Ltd Program development support device and program thereof
JP2013535069A (en) * 2010-06-28 2013-09-09 ヒョンダイ モーター カンパニー System test equipment
KR101375142B1 (en) * 2012-08-31 2014-03-17 에스코어 주식회사 Method and apparatus for detecting resource leak after executing a user program
JP2014523022A (en) * 2011-06-20 2014-09-08 マイクロソフト コーポレーション Computer-implemented method and computer system

Cited By (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000181749A (en) * 1998-12-14 2000-06-30 Nec Software Kyushu Ltd Error process test system of software, testing method, and recording medium for test program
JP2000250783A (en) * 1999-03-04 2000-09-14 Ntt Communicationware Corp Method for checking omission of extraction from test item of exchange program
JP2001154872A (en) * 1999-11-25 2001-06-08 Nec Ic Microcomput Syst Ltd Device and method for supporting software development and recording medium having the same program recorded thereon
JP2007329937A (en) * 2001-02-26 2007-12-20 4Thpass Inc Method and system for billing based on application communication
US7665066B2 (en) 2001-04-12 2010-02-16 Siemens Aktiengesellschaft Method for determining and recording system information and function in distributed parallel component based software systems
US6983453B2 (en) 2001-08-30 2006-01-03 International Business Machines Corporation Method and system for obtaining performance data from software compiled with or without trace hooks
JP2005527008A (en) * 2001-09-19 2005-09-08 ヒューレット・パッカード・カンパニー Runtime monitoring of component-based systems
CN100347669C (en) * 2003-12-30 2007-11-07 佳能株式会社 Operation log acquiring method, program and storage medium
JP2006172205A (en) * 2004-12-16 2006-06-29 Canon Inc Information processor and control method therefor, computer program and storage medium
US7886279B2 (en) 2004-12-16 2011-02-08 Canon Kabushiki Kaisha Information processing apparatus, control method therefor, computer program, and storage medium
JP4911530B2 (en) * 2005-05-31 2012-04-04 サイエンスパーク株式会社 Surveillance system, system program, and recording medium recording the program
JP2007042007A (en) * 2005-08-05 2007-02-15 Yafoo Japan Corp Memory leak detection program, device, and method
KR100875997B1 (en) 2006-11-13 2008-12-24 한국전자통신연구원 Network Fuzzing Using Windows Sockets Application Program Hooking
JP2011107833A (en) * 2009-11-13 2011-06-02 Ricoh Co Ltd Information processor, api program, and log environment provision method
JP2012003611A (en) * 2010-06-18 2012-01-05 Denso Corp Time monitoring apparatus and method
JP2013535069A (en) * 2010-06-28 2013-09-09 ヒョンダイ モーター カンパニー System test equipment
US9354996B2 (en) 2010-06-28 2016-05-31 Hyundai Motor Company System test apparatus
JP2012164098A (en) * 2011-02-06 2012-08-30 Mitsubishi Electric Corp Entry rewriting device and entry rewriting program
JP2012248166A (en) * 2011-05-31 2012-12-13 Fuji Electric Co Ltd Program development support device and program thereof
JP2014523022A (en) * 2011-06-20 2014-09-08 マイクロソフト コーポレーション Computer-implemented method and computer system
US9785470B2 (en) 2011-06-20 2017-10-10 Microsoft Technology Licensing, Llc Memory management model and interface for unmodified applications
KR101375142B1 (en) * 2012-08-31 2014-03-17 에스코어 주식회사 Method and apparatus for detecting resource leak after executing a user program

Similar Documents

Publication Publication Date Title
US7047521B2 (en) Dynamic instrumentation event trace system and methods
JPH10269105A (en) Trace system, resource release omission detection system, and recording medium
US7415699B2 (en) Method and apparatus for controlling execution of a child process generated by a modified parent process
US8832665B2 (en) Method and system for tracing individual transactions at the granularity level of method calls throughout distributed heterogeneous applications without source code modifications including the detection of outgoing requests
US7000150B1 (en) Platform for computer process monitoring
US8234631B2 (en) Method and system for tracing individual transactions at the granularity level of method calls throughout distributed heterogeneous applications without source code modifications
US7185320B2 (en) System and method for processing breakpoint events in a child process generated by a parent process
US8239838B2 (en) Kernel-aware debugging system, medium, and method
US8356286B2 (en) Method and system for providing on-demand profiling infrastructure for profiling at virtual machines
US8522209B2 (en) Method and system for integrating profiling and debugging
EP1172729B1 (en) Apparatus and method for cataloguing symbolic data for use in performance analysis of computer programs
US5630049A (en) Method and apparatus for testing software on a computer network
US8667471B2 (en) Method and system for customizing profiling sessions
US8601469B2 (en) Method and system for customizing allocation statistics
EP0632377B1 (en) Method for testing a message-driven operating system
US7716643B2 (en) Methods and apparatus for software profiling
US6766511B1 (en) Apparatus and method for performing symbolic resolution of modules using static representations of a trace
US8495430B2 (en) Generate diagnostic data for overdue thread in a data processing system
US20100095280A1 (en) Method and system for providing loitering trace in virtual machines
US20080282229A1 (en) Apparatus and method of detecting errors in embedded software
US9355003B2 (en) Capturing trace information using annotated trace output
CA2325684A1 (en) Automation and isolation of software component testing
JP2002082926A (en) Distributed application test and operation management system
US8347274B2 (en) Debugging support device, debugging support method, and program thereof
US8005940B2 (en) Method and system for unit testing web framework applications