JPH07191882A - Memory access frequency measuring system - Google Patents

Memory access frequency measuring system

Info

Publication number
JPH07191882A
JPH07191882A JP5329364A JP32936493A JPH07191882A JP H07191882 A JPH07191882 A JP H07191882A JP 5329364 A JP5329364 A JP 5329364A JP 32936493 A JP32936493 A JP 32936493A JP H07191882 A JPH07191882 A JP H07191882A
Authority
JP
Japan
Prior art keywords
area
access
trace
memory access
address
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
JP5329364A
Other languages
Japanese (ja)
Inventor
Hisayuki Aoki
久幸 青木
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP5329364A priority Critical patent/JPH07191882A/en
Publication of JPH07191882A publication Critical patent/JPH07191882A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To efficiently improve performance by grasping the load distribution of a target software. CONSTITUTION:A trace sampling means 1 is integrated into a target computer system, and the history of memory access at target software operating time is sampled in a trace file F. Continuously, continuous areas on an address space are set by a user, and the number of times of access for each of continuous areas and for each access type is summed up from the address of memory access recorded in the trace file F, edited and displayed. Thus, the heavy processing part of the target software is made clear from the number of times of instruction fetch, and the data of high access frequency are made clear from the number of times of operand access. Since these high load parts are mainly improved, the performance can be efficiently improved.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、計算機システムにおい
て、ソフトウェアの処理の重いルーチンやアクセス頻度
が多いデータを検出するメモリアクセス頻度測定方式に
関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a memory access frequency measuring method for detecting routines with heavy software processing and data with high access frequency in a computer system.

【0002】[0002]

【従来の技術】従来の、ソフトウェアの処理分布を計測
する方式としては、特開平01−177140号公報の
ように、命令コード毎の実行回数を測定する方式があ
る。これは各命令コードの実行回数を正確に計数する方
式であり、実行回数の多い命令などが分かる。この方式
は、ハードウェアの改善などにおいて、高速化による改
善効果が高い命令を判定するのには向いている。しか
し、ソフトウェアの性能改善にはあまり効果がない。こ
れは、一般の命令がソフトウェア中のいたるところで使
われるので、命令毎の実行回数からチューニングターゲ
ットを絞ることが困難なためである。
2. Description of the Related Art As a conventional method for measuring the processing distribution of software, there is a method for measuring the number of executions for each instruction code as disclosed in Japanese Patent Laid-Open No. 01-177140. This is a method of accurately counting the number of executions of each instruction code, and it is possible to recognize an instruction having a large number of executions. This method is suitable for determining an instruction that is highly improved by speeding up in hardware improvement. However, it is not very effective in improving software performance. This is because it is difficult to narrow down the tuning target based on the number of executions of each instruction, since general instructions are used everywhere in software.

【0003】一方、UNIXにはプロファイラと呼ばれ
るルーチン毎の実行回数測定機能がある。これは、図9
に示すように、プログラム実行中に定期的に割り込みを
起こし、割り込み処理ルーチンのステップ91で、割り
込み発生時のプログラムカウンタの値を入手し、ステッ
プ92で、実行されていたルーチンを検索し、ステップ
93で、そのルーチンの実行回数を加算することを繰り
返す。この方式では、各ルーチン毎の実行命令数の相対
頻度が判明する。サンプリングによる計測なので、個々
のルーチンの正確な命令実行回数は分からない。しか
し、十分長い期間サンプリングを行えば、ある程度の精
度で、計測された全頻度に対する個々のルーチンの相対
頻度が分かる。これにより、プログラム中の処理の重い
ルーチンが判明し、そこを改善することで、プログラム
の効果的な性能改善が可能になる。ただし、この方式の
場合、サンプリング期間が長く取れない場合や、プログ
ラムが大きすぎて個々の実行頻度が少ない場合などは、
精度が悪くなってしまう。また、図9に示したように、
割り込み禁止区間では割り込みが発生せず、割り込み禁
止が解除されてから割り込まれる。従って、割り込み禁
止区間中のルーチンは一切カウントされず、かつ、割り
込み解除直後のサンプリングが多目になる。このよう
に、この方式では根本的に計測できない部分が発生す
る。
On the other hand, UNIX has a function of measuring the number of executions for each routine called a profiler. This is shown in FIG.
As shown in, an interrupt is periodically generated during the program execution, the value of the program counter at the time of the interrupt is acquired in step 91 of the interrupt processing routine, and the routine being executed is searched in step 92, and the step At 93, the addition of the number of executions of the routine is repeated. In this method, the relative frequency of the number of execution instructions for each routine is known. Since it is measured by sampling, the exact number of instruction executions of each routine is unknown. However, if sampling is performed for a sufficiently long period, the relative frequency of each routine with respect to the total measured frequency can be known with some accuracy. This makes it possible to identify a heavy-duty routine in the program, and improve the routine to effectively improve the performance of the program. However, in the case of this method, if the sampling period cannot be taken long, or if the program is too large and individual execution frequency is low,
The accuracy becomes worse. Also, as shown in FIG.
No interrupt is generated in the interrupt disabled section, and an interrupt is generated after the interrupt is disabled. Therefore, the routines in the interrupt disabled section are not counted at all, and sampling is performed immediately after the interrupt is released. Thus, in this method, there are some areas that cannot be fundamentally measured.

【0004】[0004]

【発明が解決しようとする課題】オペレーティングシス
テムなどのように、プログラムが大く、かなりの割り込
み禁止区間を含むようなソフトウェアの場合、サンプリ
ングによるルーチン毎の相対命令実行頻度では精度に不
安がある。また、データ構造の変更による性能改善を期
待するときなどは、ルーチン毎の命令実行頻度を調べた
だけでは、ターゲットを絞りきれない場合がある。すな
わち、ルーチン毎の命令実行頻度は、負荷分布の側面を
現しているに過ぎない。
In the case of software, such as an operating system, which has a large program and includes a considerable interrupt prohibited section, there is concern about the accuracy of the relative instruction execution frequency for each routine by sampling. In addition, when it is expected to improve the performance by changing the data structure, the target may not be narrowed down only by examining the instruction execution frequency for each routine. That is, the instruction execution frequency for each routine only shows the aspect of the load distribution.

【0005】そこで、本発明は、正確なルーチン毎の命
令実行頻度を測定可能にし、さらに、オペランドアクセ
ス頻度などの他の側面からの負荷分布把握も可能にする
メモリアクセス頻度測定方式を提供することを目的とす
る。
Therefore, the present invention provides a memory access frequency measuring method which enables accurate measurement of instruction execution frequency for each routine and also grasps load distribution from other aspects such as operand access frequency. With the goal.

【0006】[0006]

【課題を解決するための手段】本発明のメモリアクセス
頻度測定方式は、メモリアクセスのタイプとアドレスを
記録したトレースファイルと、連続領域の定義情報とア
クセスタイプ毎のカウンタとを含む領域テーブルと、タ
ーゲット計算機システム上でターゲットソフトウェア実
行中のメモリアクセスの履歴をトレースファイルに記録
するトレース採取手段と、ユーザから指定されたアドレ
ス空間中の連続領域を領域テーブルに登録する領域設定
手段と、トレースファイルに記録されたメモリアクセス
情報から領域テーブルに登録された各領域へのタイプ毎
のアクセス回数をカウントするプロファイリング手段
と、領域テーブルを編集して印字するプロファイル印字
手段とを有している。
A memory access frequency measuring method according to the present invention includes a trace file recording a memory access type and an address, an area table including definition information of continuous areas and a counter for each access type. Trace collection means for recording the history of memory access during execution of target software on the target computer system in the trace file, area setting means for registering continuous areas in the address space specified by the user in the area table, and trace file It has a profiling means for counting the number of times of each type access to each area registered in the area table from the recorded memory access information, and a profile printing means for editing and printing the area table.

【0007】[0007]

【作用】図1は本発明の構成要素を示す図である。図1
において、1はトレース採取手段、2は領域設定手段、
3はプロファイリング手段、4はプロファイル印字手
段、Fはトレースファイル、Tは領域テーブルである。
図1に記述された構成全体で、ターゲット計算機システ
ム上で動作するソフトウェアの領域毎かつアクセスタイ
プ毎のメモリアクセス頻度が測定可能になる。ここで
は、各構成要素の作用について説明する。
1 is a diagram showing the components of the present invention. Figure 1
, 1 is a trace sampling means, 2 is a region setting means,
3 is a profiling means, 4 is a profile printing means, F is a trace file, and T is an area table.
With the entire configuration described in FIG. 1, the memory access frequency can be measured for each area of software operating on the target computer system and for each access type. Here, the operation of each component will be described.

【0008】トレース採取手段は、ターゲット計算機シ
ステムの中で動作し、メモリアクセスの履歴をトレース
ファイルに記録する。一回のメモリアクセスでトレース
ファイルにひとつのエントリが記録される。このエント
リには、そのメモリアクセスの種類とアクセスしたアド
レスが含まれる。すなわち、トレース採取手段を取り付
けた計算機システム上でソフトウェアを動作させると、
そのソフトウェア動作時に発生するメモリアクセスの履
歴がトレースファイルに記録される。
The trace collection means operates in the target computer system and records the history of memory access in the trace file. One entry is recorded in the trace file with one memory access. This entry includes the type of memory access and the accessed address. That is, when the software is operated on the computer system equipped with the trace collection means,
The history of memory access that occurs when the software operates is recorded in the trace file.

【0009】トレースファイルを採取したら、領域設定
手段で、アドレス空間上の複数の連続領域を領域テーブ
ルに登録する。続いて、プロファイリング手段で、、ト
レースファイルの各エントリに記録されたアドレスが属
する連続領域を領域テーブルから探し出し、該当領域の
カウンタを1加算する。このとき、カウンタはアクセス
タイプ毎にあり、トレースエントリに記録されたアクセ
スの種類から、加算するカウンタを決定する。以上の操
作は、トレースファイルの全エントリに対して行われ
る。プロファイリング手段完了時には、入力トレースフ
ァイルに含まれる、すなわち、トレースを採取したとき
に動作していたソフトウェアから出た、各連続領域毎か
つアクセスタイプ毎のメモリアクセス回数が計数されて
いる。最後に、プロファイリング手段で、これらのカウ
ンタ値を領域定義情報と共に印字する。
After collecting the trace file, the area setting means registers a plurality of continuous areas in the address space in the area table. Then, the profiling means searches the area table for a continuous area to which the address recorded in each entry of the trace file belongs, and increments the counter of the corresponding area by one. At this time, there is a counter for each access type, and the counter to be added is determined from the type of access recorded in the trace entry. The above operation is performed for all entries in the trace file. When the profiling means is completed, the number of memory accesses included in the input trace file, that is, the number of memory accesses for each continuous area and for each access type, which is generated from the software operating when the trace was collected, is counted. Finally, the profiling means prints these counter values together with the area definition information.

【0010】アクセスタイプには、命令フェッチ・オペ
ランド読み出し・オペランド書き込みがある。領域とし
て、各サブルーチンのコード領域を登録して、命令フェ
ッチの回数を調べれば、そのサブルーチン内で実行され
た正確な命令数が分かる。また、領域として、各変数領
域を登録して、オペランド読み出し・オペランド書き込
みの回数を調べれば、その変数への正確なアクセス回数
が判明する。当然、読み出し回数と書き込み回数が別々
に分かる。
Access types include instruction fetch, operand read, and operand write. By registering the code area of each subroutine as the area and checking the number of instruction fetches, the correct number of instructions executed in the subroutine can be known. Further, by registering each variable area as an area and checking the number of times of operand read / operand write, the accurate number of times of access to the variable can be found. Of course, the number of times of reading and the number of times of writing can be known separately.

【0011】領域テーブルには複数の領域を設定可能な
ので、調べたい全てのメモリアクセス回数を一度の操作
でカウントすることができる。
Since a plurality of areas can be set in the area table, all the memory access times to be checked can be counted by one operation.

【0012】[0012]

【実施例】次に本発明について図面を参照して説明す
る。
The present invention will be described below with reference to the drawings.

【0013】図1に示すように、本発明の実施例は、メ
モリアクセスのタイプとアドレスを記録したトレースフ
ァイルFと、連続領域の定義情報とアクセスタイプ毎の
カウンタとを含む領域テーブルTと、ターゲット計算機
システム内でメモリアクセスの履歴をトレースファイル
Fに記録するトレース採取手段1と、ユーザから指定さ
れたアドレス空間中の連続領域を領域テーブルTに登録
する領域設定手段2と、トレースファイルFに記録され
たメモリアクセス情報から領域テーブルTに登録された
各領域へのタイプ毎のアクセス回数をカウントするプロ
ファイリング手段3と、領域テーブルTを編集して印字
するプロファイル印字手段4とから構成される。
As shown in FIG. 1, according to the embodiment of the present invention, a trace file F recording the type and address of memory access, an area table T including definition information of continuous areas and a counter for each access type, Trace collection means 1 for recording the history of memory access in the trace file F in the target computer system, area setting means 2 for registering a continuous area in the address space designated by the user in the area table T, and trace file F It comprises a profiling means 3 for counting the number of times each type of access to each area registered in the area table T from the recorded memory access information and a profile printing means 4 for editing and printing the area table T.

【0014】本発明の場合、ターゲット計算機システム
に、トレース採取手段1を埋め込む必要がある。トレー
ス採取手段1の実現方式は、ターゲット計算機システム
の種類や形態、さらに、埋め込みかたによって変わって
くる。ここでは、実際のマシンではなく、命令レベルの
シミュレータにトレース採取手段1を組み込む場合の実
施例について説明する。
In the case of the present invention, it is necessary to embed the trace collecting means 1 in the target computer system. The implementation method of the trace collection unit 1 varies depending on the type and form of the target computer system and the embedding method. Here, an embodiment will be described in which the trace collecting means 1 is incorporated in an instruction level simulator instead of an actual machine.

【0015】図2はトレースファイルFの内部構造を示
す図である。トレースファイルFは、トレースエントリ
21の並びである。各トレースエントリ21は、メモリ
アクセスの種類を示すアクセスタイプのフィールド22
と、アクセスしたアドレスのフィールド23とから構成
される。アクセスタイプの種類は、ターゲットとする計
算機システムや、プロファイルデータの利用目的に応じ
て、様々な定義が可能である。ここでは、最も一般的と
思われる命令フェッチ・オペランド読み出し・オペラン
ド書き込みの3種類に分類するものとする。命令フェッ
チは、命令語読み出しのためのメモリアクセスであり、
オペランド読み出しは、命令実行によって発生した読み
出しアクセスであり、オペランド書き込みは、同じく命
令実行によって発生した書き込みアクセスである。
FIG. 2 shows the internal structure of the trace file F. The trace file F is an array of trace entries 21. Each trace entry 21 has an access type field 22 indicating the type of memory access.
And a field 23 of the accessed address. Various types of access types can be defined according to the target computer system and the purpose of using the profile data. Here, there are three types of instruction fetch, operand read, and operand write, which are considered to be the most common. Instruction fetch is a memory access for reading an instruction word,
Operand read is a read access generated by instruction execution, and operand write is a write access also generated by instruction execution.

【0016】図3は領域テーブルTの内部構造を示す図
である。領域テーブルTは、領域頁目毎にプロファイリ
ング動作に必要なデータを登録した配列になっている。
各領域項目には、領域の名前フィールド31と、領域を
規定する先頭アドレスフィールド32とサイズフィール
ド33と、各アクセスタイプ毎のカウンタとが含まれ
る。カウンタには、命令フェッチの回数を計数するカウ
ンタ34と、オペランド書き込み回数を計数するカウン
タ35と、オペランド読み出し回数を計数するカウンタ
36とがある。
FIG. 3 is a view showing the internal structure of the area table T. The area table T is an array in which data necessary for the profiling operation is registered for each area page.
Each area item includes an area name field 31, a head address field 32 defining the area, a size field 33, and a counter for each access type. The counter includes a counter 34 that counts the number of instruction fetches, a counter 35 that counts the number of operand writes, and a counter 36 that counts the number of operand reads.

【0017】図4はトレース採取手段1の処理を示す流
れ図である。トレース採取手段1は、ターゲット計算機
システムの命令レベルシミュレータに組み込まれ、メモ
リをアクセスするときに呼び出される。このとき、アク
セスタイプとアクセスアドレスが、呼び出し側から渡さ
れる。ステップ41で、渡されたアクセスタイプとアク
セスアドレスをトレースエントリのバッファに設定し、
ステップ42でバッファが全部いっぱいになったかどう
かを判定する。まだ空きが残っているときは、そのまま
読み出し元に戻る。ステップ42で、バッファが全部埋
まったと判定されたときは、ステップ43で、バッファ
をトレースファイルに書き出し、ステップ44でバッフ
ァをクリアする。バッファリングを行わないでも、機能
的には動作するが、シミュレーションが非常に遅くな
る。一般に、トレース採取手段1はターゲット計算機シ
ステムの動作のオーバーヘッドになる。従って、オーバ
ーヘッドを少なくする工夫が必要である。
FIG. 4 is a flow chart showing the processing of the trace sampling means 1. The trace collection means 1 is incorporated in the instruction level simulator of the target computer system and is called when accessing the memory. At this time, the access type and access address are passed from the caller. In step 41, the passed access type and access address are set in the trace entry buffer,
In step 42 it is determined whether the buffer is all full. If there is still space left, the process returns to the reading source as it is. When it is determined in step 42 that the buffer is completely filled, the buffer is written to the trace file in step 43, and the buffer is cleared in step 44. It works functionally without buffering, but the simulation is very slow. Generally, the trace collection means 1 becomes an operation overhead of the target computer system. Therefore, it is necessary to devise to reduce the overhead.

【0018】図5は領域設定手段2の処理を示す流れ図
である。領域設定手段2は、ステップ51で、ユーザか
らコマンドを受け取り、ステップ52で、そのコマンド
を判定する。領域の登録要求でない場合は、登録処理を
完了する。ステップ52の判定結果が領域登録要求の場
合は、ステップ53で、領域テーブルTから空きエント
リを確保し、ステップ54で、指定された名前・先頭ア
ドレス・領域サイズをステップ53で確保したエントリ
に設定し、ステップ55で、そのエントリのカウンタ群
をゼロクリアする。なお、ここでは最も基本的な領域設
定方法を説明した。他にも、事前に領域の定義をファイ
ルに書き込んでおき、これを読み込む方式や、実行可能
形式ファイルなどに含まれるプログラム上のシンボル情
報から領域を自動的に抽出する方式などがある。後者の
場合、シンボルの現わすアドレスで区切られる領域を登
録し、名前としてはシンボル名を登録すればよい。この
シンボル名による領域定義は、プログラムのサブルーチ
ン単位やデータ構造単位の領域を一括登録するときに便
利である。
FIG. 5 is a flow chart showing the processing of the area setting means 2. The area setting means 2 receives a command from the user in step 51, and determines the command in step 52. If it is not the area registration request, the registration processing is completed. If the result of the determination in step 52 is the area registration request, a free entry is secured from the area table T in step 53, and the designated name / start address / area size is set in the entry secured in step 53 in step 54. Then, in step 55, the counter group of the entry is cleared to zero. Here, the most basic area setting method has been described. In addition, there is a method of writing the definition of the area in a file in advance and reading the definition, or a method of automatically extracting the area from the symbol information on the program included in the executable file or the like. In the latter case, the area delimited by the address represented by the symbol may be registered, and the symbol name may be registered as the name. The area definition by the symbol name is convenient when collectively registering areas of program subroutine units or data structure units.

【0019】図6はプロファイリング手段3の処理を示
す流れ図である。ステップ61で、トレースファイルか
らひとつのトレースエントリ21を読み出し、ステップ
62で、ファイル終了を判定する。ファイルが終了だっ
た場合は、ここで処理を終了する。ステップ62で、ま
だデータがあった場合は、ステップ63で、取り出した
トレースエントリ21のアクセスアドレスフィールド2
3に記録されたアドレスを含む領域項目を領域テーブル
Tから検索する。アドレスを含む領域項目とは、先頭ア
ドレス32から領域サイズ33の間にそのアドレスが含
まれる項目を意味する。ステップ64で、検索結果を判
定する。領域テーブルTに、トレースエントリ21に記
録されたアクセスアドレス23を含む領域項目が無かっ
た場合は、ステップ61に戻る。ステップ64で、領域
テーブルTに、トレースエントリ21に記録されたアク
セスアドレス23を含む領域項目が有った場合は、ステ
ップ65で、ステップ63で検索した領域項目の、トレ
ースエントリ21のアクセスタイプ22に該当するカウ
ンタを1加算する。アクセスタイプ22が、命令フェッ
チを示しているときは、命令フェッチ用カウンタ34
を、オペランド書き込みを示しているときは、オペラン
ド書き込み用カウンタ35を、オペランド読み出しを示
しているときは、オペランド読み出し用カウンタ36を
加算する。ステップ65が終わったら、ステップ61に
戻り、同じ要領で次のトレースエントリを処理する。
FIG. 6 is a flow chart showing the processing of the profiling means 3. At step 61, one trace entry 21 is read from the trace file, and at step 62, the end of the file is judged. If the file has ended, the process ends here. If there is still data in step 62, in step 63, the access address field 2 of the trace entry 21 extracted
The area table T is searched for an area item including the address recorded in No. 3. The area item including the address means an item including the address between the head address 32 and the area size 33. In step 64, the search result is judged. If there is no area item including the access address 23 recorded in the trace entry 21 in the area table T, the process returns to step 61. If there is an area item including the access address 23 recorded in the trace entry 21 in the area table T in step 64, the access type 22 of the trace entry 21 of the area item searched in step 63 is found in step 65. The counter corresponding to is incremented by 1. When the access type 22 indicates instruction fetch, the instruction fetch counter 34
When the operand write is indicated, the operand write counter 35 is added, and when the operand read is indicated, the operand read counter 36 is added. When step 65 ends, the process returns to step 61 and the next trace entry is processed in the same manner.

【0020】図7はプロファイル印字手段4の処理を示
す流れ図である。プロファイル印字手段4は、ステップ
71で、領域テーブルTからひとつの領域項目を読み込
み、ステップ72で、その領域項目の名前、・先頭アド
レス32・領域サイズ33・命令フェッチ用カウンタ3
4・オペランド書き込み用カウンタ35・オペランド読
み出し用カウンタ36を編集し、印字する。ステップ7
3で、領域テーブルTの全領域項目を処理したかどうか
を判定し、まだ残りの領域項目がある場合は、ステップ
71に戻り次の領域項目の処理を行う。ステップ73、
全ての領域項目完了と判定された場合は、処理を終了す
る。
FIG. 7 is a flow chart showing the processing of the profile printing means 4. The profile printing means 4 reads one area item from the area table T in step 71, and in step 72, the name of the area item, the head address 32, the area size 33, and the instruction fetch counter 3
4. Operand write counter 35 and operand read counter 36 are edited and printed. Step 7
In step 3, it is determined whether or not all the area items in the area table T have been processed. If there are still remaining area items, the process returns to step 71 to process the next area item. Step 73,
If it is determined that all area items have been completed, the processing ends.

【0021】最後に、図4のトレース採取手段1を埋め
込んだ実施例を説明する。図8は、計算機システムの命
令レベルシミュレータにトレース採取手段1を埋め込ん
だものである。まず、トレース採取手段1を埋め込む前
のシミュレータ自体の動作を説明する。ステップ81
で、命令語を読み込み、ステップ82で、読み込んだ命
令語を解読する。ステップ83で、オペランド読み出し
が必要かどうかを判定する。オペランド読み出しが必要
な場合は、ステップ84で、実効アドレスを計算し、ス
テップ85でオペランドを読み出す。ステップ83でオ
ペランド読み出しが必要無いと判定された場合と、ステ
ップ85の読み出しが終わった後は、ステップ86で、
命令語に対応した処理を行い、ステップ87で、オペラ
ンド書き込みが必要かどうかを判定する。オペランド書
き込みが必要と判定された場合は、ステップ88で、実
効アドレスを計算し、ステップ89で、書き込みを実施
する。ステップ87でオペランド書き込みが必要無いと
判定された場合と、ステップ89の書き込みが終わった
後は、ステップ8Aで、プログラムカウンタを1命令語
分先に進め、ステップ81に戻る。図8の命令レベルシ
ミュレータの場合は、ステップ81の命令フェッチの直
前と、ステップ85のオペランド読み出しの直前と、ス
テップ89のオペランド書き込みの直前とで、トレース
採取手段1を呼び出す。ステップ81の前で呼び出すと
きは、アクセスタイプとして命令フェッチを、アクセス
アドレスとして命令語のアドレスを、トレース採取手段
1に渡す。ステップ85の前で呼び出すときは、アクセ
スタイプとしてオペランド読み出しを、アクセスアドレ
スとしてオペランドのアドレスを、トレース採取手段1
に渡す。ステップ89の前で呼び出すときは、アクセス
タイプとしてオペランド書き込みを、アクセスアドレス
としてオペランドのアドレスを、トレース採取手段1に
渡す。
Finally, an embodiment in which the trace sampling means 1 of FIG. 4 is embedded will be described. FIG. 8 shows the instruction level simulator of the computer system in which the trace collecting means 1 is embedded. First, the operation of the simulator itself before embedding the trace collecting means 1 will be described. Step 81
Then, the instruction word is read, and in step 82, the read instruction word is decoded. In step 83, it is determined whether operand reading is necessary. If operand reading is required, the effective address is calculated in step 84 and the operand is read in step 85. If it is determined in step 83 that operand reading is not necessary, and after the reading in step 85 is completed, in step 86,
The processing corresponding to the instruction word is performed, and in step 87, it is determined whether or not the operand writing is necessary. When it is determined that the operand write is necessary, the effective address is calculated in step 88, and the write is executed in step 89. When it is determined in step 87 that the operand writing is not necessary and after the writing in step 89 is completed, the program counter is advanced by one instruction word in step 8A, and the process returns to step 81. In the case of the instruction level simulator shown in FIG. 8, the trace collection unit 1 is called immediately before the instruction fetch at step 81, immediately before the operand read at step 85, and immediately before the operand write at step 89. When calling before step 81, the instruction fetch as the access type and the address of the instruction word as the access address are passed to the trace collection means 1. When calling before step 85, the operand read is used as the access type and the operand address is used as the access address.
Pass to. When calling before step 89, the write operand is written as the access type, and the address of the operand is passed as the access address to the trace collection means 1.

【0022】[0022]

【発明の効果】以上に説明したように、本発明のメモリ
アクセス頻度測定方式を使用すれば、ターゲット計算機
システム上で動作するソフトウェアの、アクセスの種類
毎かつアドレス空間上の連続領域毎のメモリアクセス頻
度が測定可能になる。
As described above, when the memory access frequency measuring method of the present invention is used, the memory access of the software operating on the target computer system for each access type and each continuous area in the address space is performed. Frequency becomes measurable.

【0023】個々のサブルーチンのコード部を領域とし
て設定し、領域毎の命令フェッチ回数を見れば、各サブ
ルーチン内で実行された正確な命令個数が判明する。こ
れにより、ソフトウェアの処理の重い部分が明確にな
る。また、個々の変数を領域として設定し、領域毎のオ
ペランドアクセス回数を見れば、各変数が使われる回数
が判明する。これにより、アクセスが集中する変数が明
確になる。このように、正確なルーチン毎の命令実行回
数が測定可能になり、かつ、オペランドアクセス回数な
どの負荷分布も測定可能になる。
By setting the code part of each subroutine as an area and looking at the number of instruction fetches for each area, the correct number of instructions executed in each subroutine can be found. This reveals the heavy parts of software processing. Also, by setting each variable as an area and looking at the number of operand accesses for each area, the number of times each variable is used can be found. This makes it clear which variables access is concentrated on. In this way, it is possible to accurately measure the number of instruction executions for each routine, and it is also possible to measure the load distribution such as the number of operand accesses.

【0024】ソフトウェアの性能を改善する場合、処理
の重い部分や頻繁にアクセスされる変数やデータ構造を
改善したほうが、効果が大きい。従って、本発明のメモ
リアクセス頻度測定方式を使えば、ソフトウェアの効率
的な性能チューニングが可能になる。
In order to improve the performance of software, it is more effective to improve the heavy processing part, the frequently accessed variables and the data structure. Therefore, the memory access frequency measuring method of the present invention enables efficient performance tuning of software.

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

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

【図2】トレースファイルFの構造を示す図。FIG. 2 is a diagram showing the structure of a trace file F.

【図3】領域テーブルTの構造を示す図。FIG. 3 is a diagram showing a structure of a region table T.

【図4】トレース採取手段1の処理を示す流れ図。FIG. 4 is a flowchart showing the processing of the trace collection unit 1.

【図5】領域設定手段2の処理を示す流れ図。FIG. 5 is a flowchart showing the processing of the area setting means 2.

【図6】プロファイリング手段3の処理を示す図。FIG. 6 is a diagram showing processing of profiling means 3.

【図7】プロファイル印字手段4の処理を示す流れ図。FIG. 7 is a flowchart showing the processing of the profile printing means 4.

【図8】トレース採取手段1をターゲット計算機システ
ムへ埋め込む方法を示す図である。
FIG. 8 is a diagram showing a method of embedding the trace collection means 1 in a target computer system.

【図9】従来の技術を説明するための図。FIG. 9 is a diagram for explaining a conventional technique.

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

1 トレース採取手段 2 領域設定手段 3 プロファイリング手段 4 プロファイル印字手段 F トレースファイル T 領域テーブル 1 trace sampling means 2 area setting means 3 profiling means 4 profile printing means F trace file T area table

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 メモリアクセスのタイプとアドレスを記
録したトレースファイルと、連続領域の定義情報とアク
セスタイプ毎のカウンタとを含む領域テーブルと、ター
ゲットソフトウェア実行中にメモリアクセスの履歴を前
記トレースファイルに記録するトレース採取手段と、ユ
ーザから指定されたアドレス空間中の連続領域を前記領
域テーブルに登録する領域設定手段と、前記トレースフ
ァイルに記録されたメモリアクセス情報から前記領域テ
ーブルに登録された各領域へのタイプ毎のアクセス回数
をカウントするプロファイリング手段と、前記領域テー
ブルを編集して印字するプロファイル印字手段とから構
成されるメモリアクセス頻度測定方式。
1. A trace file in which types and addresses of memory access are recorded, an area table including definition information of continuous areas and a counter for each access type, and a history of memory access during execution of target software in the trace file. Trace collecting means for recording, area setting means for registering a continuous area in the address space designated by the user in the area table, and each area registered in the area table from the memory access information recorded in the trace file A memory access frequency measuring method comprising a profiling means for counting the number of accesses to each type and a profile printing means for editing and printing the area table.
JP5329364A 1993-12-27 1993-12-27 Memory access frequency measuring system Pending JPH07191882A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5329364A JPH07191882A (en) 1993-12-27 1993-12-27 Memory access frequency measuring system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5329364A JPH07191882A (en) 1993-12-27 1993-12-27 Memory access frequency measuring system

Publications (1)

Publication Number Publication Date
JPH07191882A true JPH07191882A (en) 1995-07-28

Family

ID=18220637

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5329364A Pending JPH07191882A (en) 1993-12-27 1993-12-27 Memory access frequency measuring system

Country Status (1)

Country Link
JP (1) JPH07191882A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008033359A2 (en) * 2006-09-14 2008-03-20 Analog Devices Inc. A technique to visually present memory location and usage during code execution
JP2009032197A (en) * 2007-07-30 2009-02-12 Fujitsu Microelectronics Ltd Software simulation method, program for software simulation, and software simulation device
JP2009075812A (en) * 2007-09-20 2009-04-09 Fujitsu Microelectronics Ltd Profiling method and program
US8762975B2 (en) 2006-03-17 2014-06-24 Fujitsu Semiconductor Limited Performance tuning apparatus, performance tuning method, and computer product
JP2016162008A (en) * 2015-02-27 2016-09-05 富士通株式会社 Data arrangement determination apparatus, data arrangement determination program, and data arrangement determination method

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS58223855A (en) * 1982-06-23 1983-12-26 Mitsubishi Electric Corp Storage address controller using microprogram
JPS59148962A (en) * 1983-02-14 1984-08-25 Hitachi Denshi Ltd Monitoring device of memory data
JPH03235138A (en) * 1990-02-13 1991-10-21 Agency Of Ind Science & Technol Memory access frequency measuring device
JPH0495144A (en) * 1990-08-07 1992-03-27 Nec Corp Resource use condition measuring circuit
JPH05143399A (en) * 1991-11-15 1993-06-11 Mitsubishi Electric Corp Analyzer
JPH05158740A (en) * 1991-12-09 1993-06-25 Matsushita Electric Ind Co Ltd Computer performance evaluating device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS58223855A (en) * 1982-06-23 1983-12-26 Mitsubishi Electric Corp Storage address controller using microprogram
JPS59148962A (en) * 1983-02-14 1984-08-25 Hitachi Denshi Ltd Monitoring device of memory data
JPH03235138A (en) * 1990-02-13 1991-10-21 Agency Of Ind Science & Technol Memory access frequency measuring device
JPH0495144A (en) * 1990-08-07 1992-03-27 Nec Corp Resource use condition measuring circuit
JPH05143399A (en) * 1991-11-15 1993-06-11 Mitsubishi Electric Corp Analyzer
JPH05158740A (en) * 1991-12-09 1993-06-25 Matsushita Electric Ind Co Ltd Computer performance evaluating device

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8762975B2 (en) 2006-03-17 2014-06-24 Fujitsu Semiconductor Limited Performance tuning apparatus, performance tuning method, and computer product
WO2008033359A2 (en) * 2006-09-14 2008-03-20 Analog Devices Inc. A technique to visually present memory location and usage during code execution
WO2008033359A3 (en) * 2006-09-14 2008-05-15 Analog Devices Inc A technique to visually present memory location and usage during code execution
JP2009032197A (en) * 2007-07-30 2009-02-12 Fujitsu Microelectronics Ltd Software simulation method, program for software simulation, and software simulation device
JP2009075812A (en) * 2007-09-20 2009-04-09 Fujitsu Microelectronics Ltd Profiling method and program
JP2016162008A (en) * 2015-02-27 2016-09-05 富士通株式会社 Data arrangement determination apparatus, data arrangement determination program, and data arrangement determination method
US9842049B2 (en) 2015-02-27 2017-12-12 Fujitsu Limited Data deployment determination apparatus, data deployment determination program, and data deployment determination method

Similar Documents

Publication Publication Date Title
US8214628B2 (en) Computer performance monitoring by associating counter values with particular processes when an interrupt is detected
US7346476B2 (en) Event tracing with time stamp compression
KR100337748B1 (en) A method and apparatus for structured memory analysis of data processing systems and applications
US7493224B2 (en) Event tracing with time stamp compression and history buffer based compression
KR100292642B1 (en) Systems and Methods for Interfering Code Instrumentation
JP3366475B2 (en) How to evaluate data processing speed
US20090083716A1 (en) Profiling method and program
US20060212243A1 (en) Event tracing using hash tables with support for dynamic address to name resolution
JPH07191882A (en) Memory access frequency measuring system
US6332117B1 (en) General event stamping scheme
US7100155B1 (en) Software set-value profiling and code reuse
US10114725B2 (en) Information processing apparatus, method, and computer readable medium
US7590792B2 (en) Cache memory analyzing method
US7885806B2 (en) Simulation method and simulation system of instruction scheduling
Dubey et al. Pro le-driven sampled trace generation
JP3687203B2 (en) Data processing equipment for chromatographic mass spectrometry
JPH0887417A (en) Compiler device
JPH08263372A (en) Device for collection of cache miss information and tuning
JP3213792B2 (en) Logic simulation verification method
JP3055271B2 (en) Task identification method
JPS5852760A (en) Analyzing device for program dynamic characteristics
JP3549338B2 (en) Test pattern creation method and test pattern creation device
Janecek et al. Uncovering Steady State Executions in Java Microbenchmarking with Call Graph Analysis
JPH06259245A (en) Instrument and method for measuring performance of program
JPH10260872A (en) Computer system and recording medium

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 19980707