JP4503203B2 - Method and apparatus for creating test program for evaluating information processing apparatus, and program describing processing for the same - Google Patents

Method and apparatus for creating test program for evaluating information processing apparatus, and program describing processing for the same Download PDF

Info

Publication number
JP4503203B2
JP4503203B2 JP2001202323A JP2001202323A JP4503203B2 JP 4503203 B2 JP4503203 B2 JP 4503203B2 JP 2001202323 A JP2001202323 A JP 2001202323A JP 2001202323 A JP2001202323 A JP 2001202323A JP 4503203 B2 JP4503203 B2 JP 4503203B2
Authority
JP
Japan
Prior art keywords
instruction
address
program
interrupt
written
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.)
Expired - Fee Related
Application number
JP2001202323A
Other languages
Japanese (ja)
Other versions
JP2003015914A (en
Inventor
真理子 坂本
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2001202323A priority Critical patent/JP4503203B2/en
Publication of JP2003015914A publication Critical patent/JP2003015914A/en
Application granted granted Critical
Publication of JP4503203B2 publication Critical patent/JP4503203B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、情報処理装置を評価するためのテストプログラムを作成する方法および装置に係わり、特に、ベンチマークプログラムを作成する方法および装置に係わる。
【0002】
【従来の技術】
各種情報処理装置(主に、コンピュータ)は、通常、その出荷前に様々な性能評価が行われる。例えば、ハードウェア開発時には、ロジックシミュレータ等を用いて、情報処理装置に搭載すべきCPUの論理が検証される。また、装置が完成した段階では、その装置に標準的なプログラムを実行させたときの処理時間を計測することにより、装置全体の性能の評価が行われる。なお、後者の評価は、しばしば「ベンチマークテスト」と呼ばれており、ベンチマークテストにおいて使用されるプログラムは「ベンチマークプログラム」を呼ばれている。
【0003】
【発明が解決しようとする課題】
しかし、ロジックシミュレータは、論理の検証を主目的としているので、情報処理装置の性能を評価するための機能が十分でない。例えば、ロジックシミュレータには、通常、OS(Operating System)をインストール出来ないので、OS上でアプリケーションを実行した場合の動作をロジックシミュレータを用いて評価することがではない。また、ロジックシミュレータは、通常、外部メモリ等の外部デバイスを接続できないので、I/O命令を含む動作の評価を行うことができない。
【0004】
一方、ベンチマークテストでは、完成した情報処理装置を利用して所定のプログラム(ベンチマークプログラム)が実行されるので、実行速度等を測定することは可能である。しかし、既存のベンチマークテストで実行される処理は、一般に、比較的単純なものであり、実際に使用すべきアプリケーションプログラムを実行した場合の性能を評価することは困難であった。従って、もし、実際に使用すべきアプリケーションプログラムを実行した場合の性能を正確に評価するのであれば、実際にそのアプリケーションプログラムを実行してみる必要がある。しかし、この場合は、通常、評価対象の情報処理装置に外部デバイスを接続した状態でテストを行う必要がある。例えば、データベース系のアプリケーションプログラムを実行した場合の動作を評価する場合には、情報処理装置に外部記憶装置が接続された状態でテストを行う必要がある。このため、上記テストを行うためには、かなりの時間と費用を要することになる。
【0005】
また、ベンチマークテストは、評価対象の情報処理装置が完成した後に行われるので、もしその時点で一定の性能が得られないことが判明すると、設計変更等に要する手間が非常に多くなってしまう。すなわち、製品の開発時間が長くなってしまう。
【0006】
このように、従来は、情報処理装置の完成前にその性能を正確に評価することはできなかった。
本発明の課題は、情報処理装置が完成する前にその性能を正確に評価できるようにすることである。
【0007】
【課題を解決するための手段】
本発明の方法は、情報処理装置を評価するためのテストプログラムを作成する方法であって、プロセッサおよびメモリを備えるコンピュータを用いてオリジナルプログラムが実行されているときに上記プロセッサにより実行される命令および上記メモリへのアクセス内容を検出し、検出された情報を実行履歴情報として時系列に格納し、実行履歴情報に基づいて上記コンピュータにより実行された命令実行シーケンスを再現するロードモジュール形式のプログラムを作成する。
【0008】
上記ロードモジュール形式のプログラムには、オリジナルプログラムが実行されたときの命令だけでなく、メモリのアクセス内容も含んでいる。よって、評価対象の情報処理装置にこのロードモジュールが与えられると、その装置は、上記コンピュータの動作を忠実に再現できる。また、上記コンピュータにOSがインストールされているものとすると、上記ロードモジュールは、そのOSの命令も含むことになる。したがって、評価対象の情報処理装置にOSがインストールされていなくても、上記コンピュータの動作を再現できる。
【0009】
本発明の他の形態のテストプログラム作成方法は、プロセッサおよびメモリを備えるコンピュータを用いてオリジナルプログラムが実行されているときに、上記プロセッサにより実行された命令に対応する命令コード、その命令に係わる命令情報、上記メモリに書き込まれる又はそのメモリから読み出されるバイナリデータ、および上記メモリへのアクセス内容を表すアクセス情報を検出し、検出された情報を実行履歴情報として時系列に格納し、上記実行履歴情報を時系列に解析して予め用意されているメモリスペースに上記命令情報に基づいて上記命令コードを書き込むと共に上記アクセス情報に基づいて上記バイナリデータを書き込むことによりロードモジュール形式のプログラムを作成する。
【0010】
この方法においても、基本的に上述の方法と同様に、評価対象の情報処理装置において上記コンピュータの動作が忠実に再現される。
なお、上記方法において、当該テストプログラムが与えられる装置が実行できない命令である第1の命令が上記コンピュータにより実行された場合は、上記第1の命令に起因する上記コンピュータの動作を代替する処理ルーチンプログラムを作成して上記メモリスペースに書き込み、上記第1の命令の代わりに上記処理ルーチンプログラムを呼び出す命令を上記メモリスペースに書き込むようにしてもよい。この場合、評価対象の情報処理装置が実行できない命令は、評価対象の情報処理装置が実行できる処理ルーチンプログラムに置き換えられるので、評価対象の情報処理装置において上記コンピュータの動作が忠実に再現される。
【0011】
また、上記方法において、上記コンピュータにより実行されたときと当該テストプログラムが与えられる装置により実行されたときとで異なる動作を引き起こす可能性のある命令である第2の命令が上記コンピュータにより実行された場合に、上記コンピュータにおいて上記第2の命令が実行されたときに上記プロセッサが参照した条件を上記メモリスペースに書き込み、上記第2の命令の代わりに上記条件を呼び出す命令を上記メモリスペースに書き込むようにしてもよい。この場合、上記コンピュータおよび評価対象の情報処理装置の実行速度または動作環境が互いに異なっていても、それらの間で整合性がとられるので、評価対象の情報処理装置において上記コンピュータの動作が忠実に再現される。
【0012】
更に、上記方法において、当該テストプログラムが与えられる装置が実施できない動作である第1の動作が上記コンピュータにより実施された場合に、上記コンピュータにおいて上記第1の動作が実施されたタイミングの近傍で実行された命令である第3の命令を命令シーケンスを切り替える命令に置き換えて上記メモリスペースに書き込み、上記第1の動作を代替する処理ルーチンプログラムを作成して上記メモリスペースに書き込み、上記命令シーケンスを切り替える命令と上記処理ルーチンプログラムとをリンクするようにしてもよい。この場合、評価対象の情報処理装置が実行できない動作は、その情報処理装置が実行できる処理ルーチンプログラムに置き換えられるので、評価対象の情報処理装置において上記コンピュータの動作が忠実に再現される。
【0013】
【発明の実施の形態】
以下、本発明の実施形態について図面を参照しながら説明する。
図1は、本実施形態のプログラム作成方法の概観を説明する図である。なお、本実施形態では、情報処理装置を評価するためのテストプログラムを作成する。具体的には、コンピュータ(主に、コンピュータのハードウェア)の性能を評価するためのテストプログラムを作成する。以下では、このプログラムのことを、「ベンチマークプログラム」と呼ぶ。
【0014】
オリジナルプログラム実行マシン1は、所定のオペレーティングシステム(OS:Operating System)がインストールされたコンピュータにより実現され、与えられたアプリケーションプログラムを実行する。そして、各命令が実行されるごと、或いはメモリがアクセスされるごとに、その動作を表す情報を時系列に蓄積してゆくことにより、実行履歴情報2を作成する。なお、オリジナルプログラム実行マシン1により実行されるプログラム(OSを含む)のことを、「オリジナルプログラム」と呼ぶことがある。
【0015】
解析ツール3は、実行履歴情報2を解析し、基本データ4および補正データ5を生成する。ここで、基本データ4は、オリジナルプログラム実行マシン1により実行された命令実行シーケンスを再現するデータである。また、補正データ5は、基本データ4を補正するためのデータである。なお、補正データ5は、補正ツール6により適切な状態に加工される。
【0016】
ベンチマークプログラム7は、基本データ4および補正ツール6により加工された補正データ5から構成される。なお、ベンチマークプログラム7は、オリジナルプログラム実行マシン1における動作を表すロードモジュールである。
【0017】
シミュレータ8は、評価対象の情報処理装置の代替装置であり、ベンチマークプログラム7が与えられ、それに従って動作する。なお、シミュレータ8は、完成前の情報処理装置、またはロジックシミュレータ等であってもよい。また、シミュレータ8には、必ずしもOSがインストールされてなくてもよい。さらに、シミュレータ8には、外部デバイスが接続されてないものとする。
【0018】
ベンチマークプログラム7は、ロードモジュールであり、シミュレータ8に与えられる。ここで、このロードモジュールは、オリジナルプログラム実行マシン1により実行されたアプリケーションプログラムの命令シーケンスだけでなく、オリジナルプログラム実行マシン1にインストールされているOSの命令シーケンスも含んでいる。したがって、シミュレータ8にOSがインストールされていない場合であっても、ベンチマークプログラム7が与えられると、シミュレータ8において、オリジナルプログラム実行マシン1により実行された命令シーケンスが再現される。また、オリジナルプログラム実行マシン1において外部デバイスに係わる動作が発生した場合は、その動作は、補正データ5を用いてシミュレータ8が処理できる形式で表される。したがって、外部デバイスが接続されていないシミュレータ8を用いて、外部デバイスに係わる動作の評価を行うことができる。
【0019】
図2は、オリジナルプログラム実行マシン1の構成図である。オリジナルプログラム実行マシン1は、少なくとも、CPU(Central Processing Unit )11およびメモリ12を備える。
【0020】
CPU11は、メモリ12に格納されているプログラムを実行することによって、データを受け取り、そのデータを使って演算を行い、その演算結果を出力するまでの一連の動作を提供する。なお、CPU11は、複数のレジスタを備えている。
【0021】
メモリ12は、CPU11によりアクセスされる記憶領域であり、OSプログラム13、アプリケーションプログラム14、および各種データを格納する。ここで、OSプログラム13は、特に限定されるものではないが、評価対象の情報処理装置にインストールすべきOSと同じもの、或いはそれと互換性があるものが使用される。また、アプリケーションプログラム14は、評価対象の情報処理装置において実行されるものであることが好適である。
【0022】
トレーサ15は、CPU11の動作およびメモリ12へのアクセスを検出し、時系列にその検出結果を出力する。なお、トレーサ15は、図2に示す例では、メモリ12に格納されているが、他の記憶領域に設けられてもよい。
【0023】
外部デバイス21は、オリジナルプログラム実行マシン1に接続されるデバイスであり、例えば、外部記憶装置、キーボード等の入力装置である。
図3は、トレーサ15の動作を示すフローチャートである。この処理は、例えば、CPU11により何らかの処理が実行されるごと、或いはメモり12に何らかのアクセスが発生するごとに起動される。
【0024】
ステップS1では、CPU11により命令が実行されたか否かを調べる。ここで、「命令」は、アプリケーションプログラム14の命令だけでなく、OS処理に伴う命令も含む。そして、CPU11により命令が実行された場合は、ステップS2において対応する命令レコードを作成する。ここで、命令レコードは、例えば、下記の情報から構成される。
・命令コード
・命令格納アドレス(実アドレス、論理アドレス)
・書込み先レジスタ情報
・書込み先アドレス(実アドレス、論理アドレス)
・書込みデータ長
・参照レジスタ情報
・参照アドレス(実アドレス、論理アドレス)
・参照データ長
「命令コード」は、CPU11に与えられる命令そのものであり、機械語で表現されている。なお、この命令コードは、たとえば、CPU11が備える命令レジスタに書き込まれたデータ列を抽出することにより得られる。「命令格納アドレス」は、当該命令が格納されているアドレスである。「書込先レジスタ情報」は、当該命令によりデータを書き込むべきレジスタを識別する。「書込み先アドレス」および「書込みデータ長」は、それぞれ、当該命令によりデータがメモリ12に書き込まれるときの、そのデータが書き込まれるアドレスおよびそのデータのデータ長である。「参照レジスタ情報」は、当該命令によりデータを参照すべきレジスタを識別する。「参照アドレス」および「参照データ長」は、それぞれ、当該命令によりメモリ12内のデータが参照されるときの、そのデータが格納されているアドレスおよびそのデータのデータ長である。なお、「命令格納アドレス」〜「参照データ長」を検出する方法は、既存の技術により実現可能である。
【0025】
ステップS3では、CPU11が備えるレジスタが更新されたか否か調べる。そして、1または複数のレジスタが更新された場合は、ステップS4において対応するレジスタレコードを作成する。ここで、レジスタレコードは、例えば、更新されたレジスタを識別する情報、およびそのレジスタに新たに書き込まれたデータ(レジスタ値)を含む。
【0026】
ステップS5では、CPU11に対する割込が発生したか否かを調べる。そして、CPU11に対する割込が発生した場合は、ステップS6において対応する割込みレコードを作成する。ここで、割込は、この実施例では、I/O割込、プログラム割込、外部割込、特権(SVC)割込等を想定する。下記に、各割込に対応する割込みレコードの例を示す。
I/O割込
・割込み発生前のPSW値
・割込みコード
プログラム割込
・割込み発生前のPSW値
・命令長
・割込みコード
・例外種別を判定するコード
・現象識別コード
外部割込
・割込み発生前のPSW値
・命令長
・現象識別コード
特権(SVC)割込
・割込み発生前のPSW値
・割込み発生後のPSW値
・命令長
・現象識別コード
ステップS7では、メモリ12がアクセスされたか否かを調べる。ここで、アクセスは、メモリ12にデータを書き込む動作、およびメモリ12に格納されているデータを参照する動作を含む。そして、メモリ12がアクセスされた場合には、ステップS8において対応するメモリデータレコードを作成する。ここで、メモリデータレコードは、例えば、下記の情報から構成される。
・実アドレス
・メモリデータ
・データ長
・アクセス種別
「実アドレス」は、アクセスされた実アドレスを表す。「メモリデータ」は、メモリ12に書き込まれるデータまたはメモリ12から読み出されるデータである。「データ長」は、メモリ12に書き込まれるデータまたはメモリ12から読み出されるデータのデータ長を表示する。「アクセス種別」は、書込または参照を識別する。
【0027】
ステップS9では、OSが管理している各種テーブルを更新するための命令が実効されたか否かを調べる。ここでは、アドレス変換テーブルを更新する命令が実効されたか否かが調べられるものとする。なお、アドレス変換テーブルには、CPU11が認識する論理アドレスをメモリ12上の実アドレスに変換するための情報が登録されている。そして、アドレス変換テーブルを更新する命令が実効された場合は、ステップS10において対応するテーブル参照レコードを作成する。ここで、テーブル参照レコードは、例えば、下記の情報から構成される。
・対応動作
・変換アドレス
・テーブルアドレス
・データ長
「対応動作」は、アドレス変換を要求した動作を表し、命令フェッチ、データ参照、データ書込みを識別する。「変換アドレス」は、変換処理に係わる1組の論理アドレスと実アドレスである。「テーブルアドレス」は、参照されたアドレス変換テーブルが格納されているアドレスである。「データ長」は、参照されたアドレス変換テーブルにより変換されたデータのデータ長である。
【0028】
ステップS11では、キー情報が設定されたか否かを調べる。なお、キー情報は、記憶領域を構成する各ページを管理するための情報であり、OSにより使用される。そして、キー情報が設定された場合は、ステップS12において対応するキー情報レコードを作成する。ここで、キー情報レコードは、例えば、下記の情報から構成される。なお、キー情報は、メモリレコード、命令レコード、レジスタ値から導き出すようにしてもよい。
・アクセス側キー情報
・命令コード
・アクセス種別(命令フェッチ、オペランド読出し、オペランド書込み、オペランド番号)
・メモリアクセス論理アドレス
・メモリアクセス実アドレス
・セグメントテーブル先頭アドレス
・セグメントテーブルエントリ番号
・データ長
このように、トレーサ15は、CPU11によりオリジナルプログラムが実行されると、命令、メモリデータ、関連情報などを検出し、対応するレコードを作成していく。そして、トレーサ15により次々と作成されるレコードは、実行履歴情報2として時系列に格納される。
【0029】
なお、トレーサ15は、CPU11により命令が実行されると、それに対応する命令レコードを作成するが、例えばその命令に起因してメモリアクセスが発生した場合には、そのメモリアクセスに対応するメモリデータレコードも同時に作成する。すなわち、トレーサ15は、CPU11により1つの命令が実行されると、その命令に対応する1または複数のレコードを作成する。
【0030】
また、上述の例では、メモリ12がアクセスされたときに対応するメモリデータレコードが作成されるが、メモリ12に格納されているあるデータが参照(読出)された場合には、解析ツール3は、そのデータが最初に参照されたときにのみメモリデータレコードを作成するようにしてもよい。
【0031】
さらに、ある命令に従ってメモり12が更新されるとき、その更新内容が容易に推測できる場合には、解析ツール3は、メモリデータレコードの代わりに他のレコードを作成するようにしてもよい。例えば、メモリ12に格納されているメモリデータをレジスタにロードするだけの単純なロード命令であれば、メモリデータレコードを作成する代わりに、レジスタレコードのみを作成するようにしてもよい。この場合、このレジスタレコードには、ロード命令のオペランドアドレス(メモリ12の参照アドレス)が登録される。このとき、ロード命令実行後にロード先のレジスタに格納されている値は、レジスタレコードに登録されることになるが、この値は、ロード命令のオペランドアドレスに格納されているメモリデータと一致する。なお、命令レコードから更新内容を導く出すようにしてもよい。
【0032】
図4は、実行履歴情報2の実施例である。実行履歴情報2は、ファイル等に格納される際に、レコード番号を用いて管理される。すなわち、トレーサ15により作成された各レコードは、それぞれその作成順にレコード番号が付与されて蓄積される。また、各レコードには、それぞれレコードタイプが付与される。この実施例では、「命令レコード」「レジスタレコード」「メモリデータレコード」に対してそれぞれ「01」「02」「03」が割り当てられている。そして、トレーサ15により検出された情報は、それぞれそのまま実行情報として格納される。この実施例では、例えば、「レコード番号=453」により識別されるレコードに命令レコードが格納されている。具体的には、このレコードのレコードタイプには「01」が設定されており、さらに、実行情報としてトレーサ15により検出された命令コード、各種アドレス、データ長などが格納されている。
【0033】
なお、上述の実施例では、実機上でトレーサ15を動かすことにより実行履歴情報2を作成するために必要な情報を採取しているが、他の方法で採取するようにしてもよい。例えば、アーキテクチャシミュレータを用いて必要な情報を採取してもよい。また、実行履歴情報2を作成するために必要な情報は、評価対象の装置により異なる。すなわち、採取すべき情報は、評価対象の装置にインストールされるOS、評価対象の装置に実装されるCPUの命令アーキテクチャ、評価対象の装置のシステム構成などに依存して決定される。
【0034】
上述のようにして作成された実行履歴情報2は、解析ツール3により解析される。以下、解析ツール3の動作について説明する。
解析ツール3は、実行履歴情報2の各レコードを1つずつ順番に解析し、その結果を図5に示す初期メモリスペース30を書き込んでいく。初期メモリスペース30は、基本メモリスペース31および補正用メモリスペース32から構成されている。ここで、基本メモリスペース31は、オリジナルプログラム実行マシン1が備えるメモリ12の実空間と同じサイズの記憶領域である。なお、図1に示した基本データ4および補正データ5は、それぞれ基本メモリスペース31および補正用メモリスペース32に書き込まれる。
【0035】
また、解析ツール3は、レジスタレコードに登録されている情報を反映させるためのレジスタ群33を備える。レジスタ群33は、オリジナルプログラム実行マシン1のCPU11と同じ数のレジスタから構成され、初期メモリスペース30にデータを書き込む際に利用される。
【0036】
解析ツール3は、実行履歴情報2の各レコードを解析することにより得られた結果を、順次、基本メモリスペース31に書き込んでいく。例えば、解析ツール3は、命令レコードを抽出したときは、そのレコードに登録されている「命令コード」を、そのレコードに登録されている「命令格納アドレス(実アドレス)」をキーとして、基本メモリスペース31内の対応する領域に書き込む。この時、「命令コード」に付随するデータがあれば、その情報を「命令コード」に続く領域に書き込む。これにより、オリジナルプログラム実行マシン1により実行された命令の命令コードが、基本メモリスペース31に書き込まれることになる。このとき、この命令コードは、メモリ12および基本メモリスペース31において互いに同一のアドレスに存在する。
【0037】
例えば、図6に示す例では、オリジナルプログラム実行マシン1が備えるメモリ12の"aaaa"番地に格納されているstore 命令が実行され、それに対応する命令レコードが作成されている。そして、この命令レコードが解析され、それに伴って基本メモリスペース31の"aaaa"番地にstore命令が書き込まれている。
【0038】
なお、上述のようにして命令コードを基本メモリスペース31に書き込む際、対応する領域に何らかのデータが既に格納されていた場合は、解析ツール3は、その書込み処理を実行しない。ここで、上書きを禁止する機能は、例えば、基本メモリスペース31をバイト単位で管理するテーブルを設け、そのテーブルを用いて各領域にデータが格納されているか否かを管理することにより実現可能である。
【0039】
同様に、解析ツール3は、実行履歴情報2からメモリデータレコードを抽出したときは、そのレコードに登録されている「メモリデータ」を、そのレコードに登録されている「実アドレス」をキーとして基本メモリスペース31内の対応する領域に書き込む。これにより、オリジナルプログラム実行マシン1のメモリ12および基本メモリスペース31の同じアドレスに同じメモリデータが存在することになる。
【0040】
なお、他の種類のレコードについては、後に示すフローチャートを参照しながら後述する。
このように、解析ツール3は、実行履歴情報2を解析することにより、オリジナルプログラム実行マシン1のメモリ12の内容を初期メモリスペース30の基本メモリスペース31に反映させる。この場合、任意時刻においてメモリ12の内容を基本メモリスペース31にコピーすることによっても、同様の結果を得ることができる。
【0041】
ところで、本実施形態のベンチマークテストは、評価対象の情報処理装置が完成する前にその装置の性能を調べることを想定している。したがって、評価対象の装置をテストする際には、その装置と同等の仕様を備えるシミュレータ(図1に示すシミュレータ8)を用意し、本実施形態のベンチマークプログラムをそのシミュレータ8に実行させることにより評価対象の装置の性能が推定される。ここで、このシミュレータ8には、評価対象の情報処理装置が備えるCPU又はそれと同等のプロセッサが実装されているが、OSがインストールされていないことも想定される。また、シミュレータ8には、外部デバイスが接続されていない場合も想定される。このため、シミュレータ8は、オリジナルプログラム実行マシン1により実行される命令または処理の一部を実行できない。
【0042】
本実施形態のプログラム作成方法では、オリジナルプログラム実行マシン1により実行される命令/処理のうち、シミュレータ8が実行できない命令/処理をシミュレータ8が実行できる命令/処理に置き換えることにより、上記問題の解決を図る。以下では、この置換え処理のことを、「補正」と呼ぶことがある。また、図1に示した補正データ5は、この補正処理のために使用される。
【0043】
以下の実施例では、補正の必要な命令または処理として、非同期割込み(I/O割込みを含む)、I/O命令、動的情報を参照する命令を採り上げる。
非同期割込み(その1)
ここでは、オリジナルプログラム実行マシン1において、外部デバイス21からのI/O割込により、メモリ12が更新される場合(メモリ12に新たなデータが書き込まれる場合)を想定する。
【0044】
非同期割込みは、OSの命令またはアプリケーションプログラムの命令の実行と無関係に発生する。すなわち、I/O割込みによるメモリ12の更新は、ジョブが実行されている最中に行われる。このとき、このメモリ更新は、実行中のジョブから見ると、I/O割込の発生により認識される。
【0045】
ところで、I/O割込みによりメモリ12が更新されると、トレーサ15は、対応する割込みレコードおよびメモリデータレコードを作成する。このため、解析ツール3は、基本的には、これらのレコードに従って初期メモリスペース30を更新する処理を実行すべきである。しかし、実際には、上記メモリデータレコードの内容が初期メモリスペース30に反映されれば、オリジナルプログラム実行マシン1において実行されたメモリ更新と同じ結果が得られるはずである。
【0046】
図7は、I/O割込によるメモリ更新が発生したときの解析ツール3の処理を説明する図である。この実施例では、オリジナルプログラム実行マシン1において、外部デバイス21からI/O割込みによりメモリ12の"bbbb"番地にデータAが書き込まれ、それに対応する割込みレコードおよびメモリデータレコードが作成されている。この場合、メモリデータレコードの内容に従って、基本メモリスペース31の"bbbb"番地にデータAが書き込まれる。
【0047】
このように、オリジナルプログラム実行マシン1においては、外部デバイス21からの割込によりメモリ12の"bbbb"番地にデータAが書き込まれる。これに対して、基本メモリスペース31の"bbbb"番地には、予めデータAが書き込まれる。
【0048】
ここで、初期メモリスペース30に格納されているデータは、最終的には、ベンチマークプログラムとして使用される。具体的には、基本メモリスペース31に格納されている命令がシミュレータにより順番に実行されていく。このとき、図7に示すようにして初期メモリスペース30が作成されたものとすると、ベンチマークテストの開始時に、基本メモリスペース31の"bbbb"番地には既にデータAが格納されていることになる。そして、この状態は、基本メモリスペース31に格納されている命令とは無関係にデータAが"bbbb"番地に書き込まれたことと等価である。すなわち、この状態は、外部デバイス21からのI/O割込みにより"bbbb"番地にデータAが書き込まれたのと実質的に等価である。従って、I/O割込みによるメモリ更新は、メモリデータレコードの内容を初期メモリスペース30に反映させることで実現される。すなわち、シミュレータ8に外部デバイス21を接続できない状況であっても、ベンチマークテストにおいてその外部デバイス21が接続されているときと同じ結果が得られる。なお、"bbbb"番地にデータAと異なるデータA1が存在し、後でI/O割込みによりそのデータA1をデータAに変更するケースもある得る。この場合、メモリ31上では、上記I/O命令の発生時点で上記更新が反映される。
I/O命令
ここでは、オリジナルプログラム実行マシン1において、I/O命令が実行され、それに伴ってメモリ12が更新されたものとする。このI/O命令は、例えば、外部デバイス21からデータを読み出してそれをメモリ12に書き込む命令である。
【0049】
オリジナルプログラム実行マシン1においてI/O命令が実行されると、トレーサ15は、そのI/O命令に対応する命令レコードを作成する。また、この命令に伴ってメモり12が更新されると、更新されたメモリデータを含むメモリデータレコードが作成される。さらに、上記I/O命令を実行することにより更新された情報(例えば、レジスタ値、コンディションコード等)が対応するレコードに登録される。
【0050】
解析ツール3は、上記各レコードに基づいて、初期メモリスペース30に必要な情報を書き込む。具体的には、上記I/O命令により更新されたメモリデータおよび各種情報を、補正データとして補正用メモリスペース32に書き込む。また、解析ツール3は、上記I/O命令の代わりに割込属性命令を生成し、それを基本メモリスペース31内の対応するアドレスに書き込む。ここで、この割込属性命令は、先に補正用メモリスペース32に格納してある補正データを処理するための命令である。
【0051】
図8は、I/O命令によるメモリ更新が発生したときの解析ツール3の処理を説明する図である。この例では、オリジナルプログラム実行マシン1において、メモリ12の"cccc"番地に格納されているI/O命令が実行されることにより、"dddd"番地にデータBが書き込まれている。このとき、トレーサ15は、対応するレコードを作成する。そして、解析ツール3は、まず、メモリデータレコードを利用して、データBを補正用メモリスペース32内の所定の領域に書き込む。なお、図8では、データBのみが補正用メモリスペース32に書き込まれているが、実際には、他の関連情報も一緒に格納される。続いて、解析ツール3は、上記I/O命令に対応する処理ルーチンプログラム(sub-p)を作成し、それを補正用メモリスペース32内の所定の領域に書き込む。この処理ルーチンプログラムには、以下の処理が記述されている。
・補正用メモリスペース32に格納されているデータBを、基本メモリ領域31の"dddd"番地に書き込む処理
・補正用メモリスペース32に格納されている他の関連情報に従って、レジスタ等を更新する処理
さらに、解析ツール3は、基本メモリスペース31の"cccc"番地に割込属性命令を書き込む。すなわち、I/O命令に代わりに割込属性命令が書き込まれることになる。ここで、この割込属性命令は、割込を発生する属性を持った命令であり、補正用メモリスペース32に格納されている処理ルーチンプログラムを呼び出すことができる。
【0052】
上述のようにして作成されたベンチマークプログラムをシミュレータ8に与えると、以下の動作が実現される。すなわち、シミュレータ8は、基本メモリスペース31に格納されている命令を順番に実行していく。そして、図8において設定された割込属性命令が実行されると、補正用メモリスペース32に格納されている処理ルーチンプログラムが起動される。そして、この処理ルーチンプログラムにより、補正用メモリスペース32に格納されているデータBが基本メモリ領域31の"dddd"番地に書き込まれると共に、レジスタ等が更新される。その後、上記割込属性命令の次の命令に処理が戻る。
【0053】
このように、シミュレータ8に上記ベンチマークプログラムを与えると、オリジナルプログラム実行マシン1において上記I/O命令に起因して生じた動作と同じ動作が実現されることになる。ここで、上記ベンチマークプログラムにおいては、I/O命令が割込属性命令に置き換えられている。したがって、シミュレータ8がI/O命令を実行できない場合であっても、そのシミュレータ8を用いてI/O命令に対応する動作が実現される。
動的情報を参照する命令
ここでは、オリジナルプログラム実行マシン1において、動的情報を参照する命令が実行されるものとする。なお、「動的情報」とは、たとえば、命令が実行される時刻、あるいは所定の処理を実行するために要した時間に関する情報である。また、「動的情報を参照する命令」とは、上記動的情報に依存して異なる動作を導き出す命令である。例えば、「プログラム起動時から10秒以内に実行される場合はXX番地にジャンプし、それ以降に実行される場合にはYY番地にジャンプする」が定義された分岐命令である。
【0054】
上述のような動的情報を参照する命令(以下、動的情報参照命令)は、基本的に、シミュレータ8でも実行することができる。しかし、シミュレータ8の実行速度は、必ずしもオリジナルプログラム実行マシン1のそれと同じではない。このため、オリジナルプログラム実行マシン1およびシミュレータ8に同じプログラムが与えられたとき、動的情報参照命令による処理結果が同じになるとは限らない。
【0055】
本実施形態のプログラム作成方法では、この問題を解決するために、オリジナルプログラム実行マシン1により動的情報参照命令が実行された場合は、その命令を他の命令(例えば、ロード命令)に置き換えると共に、シミュレータ8において同等の動作が実現されるように補正処理が行われる。
【0056】
図9は、動的情報参照命令が実行されたときの解析ツール3の処理を説明する図である。なお、図9では、動的情報参照命令のことを「D命令」と記載してある。
【0057】
オリジナルプログラム実行マシン1において、メモリ12の"eeee"番地に格納されている動的情報参照命令を実行することにより、"ffff"番地に格納されている動的情報が参照され、その動的情報の値に従って以降の処理が決定されたものとする。ここで、メモリ12の"ffff"番地は、例えば、プログラムの起動時からの経過時間を書き込むための領域として使用されている。そして、この経過時間が動的情報として使用される。また、この動的情報参照命令は、例えば、メモリ12の"ffff"番地に格納されている動的情報を所定のレジスタにロードして、それを予め決められているしきい値と比較することにより以降の処理を決定する命令である。
【0058】
この場合、トレーサ15は、対応する命令レコードおよびレジスタレコードを作成する。このとき、この命令レコードには、少なくとも、動的情報参照命令を識別する命令コード、動的情報参照命令の格納アドレス、動的情報の格納アドレスが登録される。また、レジスタレコードには、少なくとも、レジスタ値が登録される。ここで、このレジスタ値は、メモリ12の"ffff"番地から読み出した動的情報と上記しきい値との比較結果である。
【0059】
解析ツール3は、作成されたレコードを解析することにより、以下の処理を行う。すなわち、解析ツール3は、まず、命令レコードに基づいて、基本メモリスペース31の"eeee"番地にロード命令を書き込む。このロード命令は、"ffff"番地に格納されているデータを所定のレジスタにロードする命令である。また、解析ツール3は、上記レジスタレコードに登録されているレジスタ値を基本メモリスペース31の"ffff"番地に書き込む。
【0060】
上述のようにして作成されたベンチマークプログラムをシミュレータ8に与えると、以下の動作が実現される。すなわち、シミュレータ8において、上記ロード命令が実行されると、基本メモリスペース31の"ffff"番地に格納されているデータが所定のレジスタにロードされる。ここで、"ffff"番地には、オリジナルプログラム実行マシン1において上記動的情報と上記しきい値とが比較されたときの比較結果が格納されている。したがって、シミュレータ8において、このロード命令が実行されると、オリジナルプログラム実行マシン1において動的情報参照命令が実行されたときと同等の動作が実現される。
【0061】
このように、シミュレータ8に上記ベンチマークプログラムを与えると、動的情報を参照することなく、オリジナルプログラム実行マシン1において動的情報参照命令が実行されたときと同等の動作が実現される。すなわち、オリジナルプログラム実行マシン1およびシミュレータ8の実行速度または動作環境が互いに異なっていても、オリジナルプログラム実行マシン1の動作がシミュレータ8上で再現される。
【0062】
なお、図9に示す例では、動的情報参照命令をロード命令に置き換えることにより、オリジナルプログラム実行マシン1およびシミュレータ8において同じ動作が実現されるようにしているが、これに限定されるものではない。すなわち、例えば、動的情報参照命令による処理が複雑な場合や、命令が複数回実行されてその実行の都度レジスタ値が異なる場合等には、上述したI/O命令についての処理と同様に、割込属性命令を利用してもよい。すなわち、動的情報参照命令を割込属性命令に置き換えると共に、その割込属性命令による割込が発生したときに呼び出される処理ルーチンプログラムを補正メモリスペース32に格納する。この場合、この処理ルーチンプログラムには、動的情報参照命令に対応する処理が記述される。
非同期割込み(その2)
ここでは、オリジナルプログラム実行マシン1において、外部デバイス21からのI/O割込が発生し、その割込に対応する処理が実行されたものとする。
【0063】
図10(a) は、オリジナルプログラム実行マシン1において上記割込みが発生した場合の命令シーケンスを示す図である。ここでは、命令A〜F...が順番に実行されるシーケンスにおいて、命令Cが実行された直後に割込が発生したものとする。そして、その割込により命令a〜dを含む処理ルーチン41が実行され、その後に命令Dに処理が戻っている。
【0064】
本実施形態のベンチマークプログラムを作成する際には、上記非同期割込に起因する動作をシミュレータ8において再現するために、その非同期割込の直前の命令が処理ルーチン41を呼び出すための命令に置き換えられる。上述の例の場合は、図10(b) に示すように、命令Cが、処理ルーチン42を呼び出すための割込属性命令に置き換えられる。ここで、処理ルーチン42は、処理ルーチン41を構成する命令a〜dに加え、命令Cに起因する動作をエミュレートしたデータ(エミュレーションデータ)を含んでいる。また、命令Cのエミュレーションデータは、例えば、命令Cが実行されたときの演算結果や、レジスタ更新に係わる情報などを含む。
【0065】
なお、上述の例では、非同期割込の直前の命令が割込属性命令に置き換えられているが、必ずしも直前の命令が置き換えられる必要はなく、非同期割込が発生したタイミングの近傍の他の命令が割込属性命令に置き換えられてもよい。この場合、エミュレーションが容易な命令(例えば、ADD命令など)が割込属性命令に置き換えられることが望ましい。
【0066】
図11は、非同期割込が発生したときの解析ツール3の処理を説明する図である。なお、図11では、図10に示した例に対応する実施例を示す。
オリジナルプログラム実行マシン1において、メモリ12の"gggg"番地に格納されている命令Cが実行された直後に非同期割込が発生し、この割込により処理ルーチン41が呼び出されたものとする。この場合、トレーサ15は、命令Cに対応する命令レコード、命令Cに起因して更新された情報に対応するレコード、非同期割込に対応する割込みレコード、処理ルーチン41に含まれている命令に対応するレコードなどを作成する。
【0067】
解析ツール3は、作成されたレコードに基づいて、以下の処理を行う。すなわち、解析ツール3は、まず、レジスタレコード等を参照して命令Cのエミュレーションデータを作成し、そのエミュレーションデータを含み且つ命令aに処理を渡す命令が最後に実行される処理ルーチン42を作成する。そして、その処理ルーチン42を補正用メモリスペース32の所定領域に書き込む。また、解析ツール3は、基本メモリスペース31の"gggg"番地に割込属性命令を書き込む。この割込属性命令は、処理ルーチン42を呼び出す命令である。
【0068】
上述のようにして作成されたベンチマークプログラムをシミュレータ8に与えると、以下の動作が実現される。すなわち、シミュレータ8において、上記割込属性命令が実行されると、処理ルーチン42が呼び出される。これにより、命令Cに対応する動作が実現される。続いて、処理ルーチン41に制御が渡る。処理ルーチン41が実行された後、処理は、命令Cの次の命令に戻る。
【0069】
このように、シミュレータ8に上記ベンチマークプログラムを与えると、非同期割込を発生させることなく、オリジナルプログラム実行マシン1において非同期割込に起因して生じた動作と同等の動作が再現される。すなわち、シミュレータ8が非同期割込を受け付ける機能を備えていなくても、オリジナルプログラム実行マシン1において非同期割込が発生したときと同等の動作がシミュレータ8上で再現される。
【0070】
なお、上記実施例では割込命令が使用されているが、この割込命令は、命令シーケンスを切り替える命令の一例である。即ち、図11において、命令Cは、命令シーケンスを切り替える命令に置き換えられればよい。この場合、この命令シーケンスを切り替える命令と、処理ルーチン42がリンクされる。
【0071】
図12は、解析ツール3の動作を説明するフローチャートである。解析ツール3は、上述したように、実行履歴情報2の各レコードを順番に解析することにより、ベンチマークプログラム7の元となる基本データ4および補正データ5を作成する。なお、基本データ4および補正データ5は、初期メモリスペース30に書き込まれる。
【0072】
ステップS21は、実行履歴情報2の各レコードを先頭から1つずつ抽出する処理である。ステップS22〜S27では、抽出されたレコードの属性が調べられる。ここで、レコードの属性は、図4に示したレコードタイプにより識別される。
【0073】
実行履歴情報2から抽出したレコードが命令レコードであった場合は、ステップS31へ進む。ステップS31では、当該レコードに割込命令が登録されているか否かが調べられる。そして、割込命令が登録されていた場合は、ステップS32において、その割込命令に関連する情報を管理リストに登録する。管理リストは、図13(a) に示すように、各割込命令に係わる情報をその登場順に登録する。なお、新たな割込命令がこの管理リストに登録される際、その割込命令に対してシリアル番号が付与される。また、このとき、その割込命令に対応するアドレス情報が図13(b)に示す割込管理テーブルに追加される。割込管理テーブルは、各割込命令に付与されているシリアル番号と、割込命令に起因して実行される処理を記述した処理ルーチンプログラムを格納するアドレスとの対応関係を管理している。
【0074】
抽出されたレコードに割込命令が登録されていなかった場合は、ステップS33へ進む。ステップS33では、抽出されたレコードに「他の命令に置き換え可能な命令(割込を発生させるポイントの候補)」が登録されているか否かが調べられる。「他の命令に置き換え可能な命令」は、先の実施例では、例えば、図9に示した動的情報参照命令に相当する。そして、当該レコードにそのような命令が登録されていた場合には、ステップS34において、置換え前の命令と置換え後の命令との対応関係を登録する。具体的には、置換え候補を記録するための変数に対応する命令IDを登録する。
【0075】
抽出されたレコードに「他の命令に置き換え可能な命令」が登録されていなかった場合は、ステップS35へ進む。ステップS35では、抽出されたレコードに実行不可能命令が登録されているか否かが調べられる。実行不可能命令とは、シミュレータ8が実行できない命令であって、先の実施例では、例えば、図8に示したI/O命令に相当する。そして、当該レコードに実行不可能命令が登録されていた場合は、ステップS36において、エミュレート処理(エミュレート処理のための処理ルーチンプログラム)を作成する。
【0076】
なお、図8に示したように、実行不可能命令が割込命令に置き換えられる場合には、その割込命令も図13(a) に示した管理リストに登録される。そして、その割込命令のシリアル番号と、その割込命令に起因して実行される処理を記述した処理ルーチンプログラムを格納するアドレスとの対応関係が図13(b)に示す割込管理テーブルに設定される。
【0077】
抽出されたレコードに一般的な命令が格納されていた場合(ステップS31、33、35において「No」と判断された場合)は、ステップS37において、初期メモリスペース30を更新する。この処理は、例えば、図6に示した手順に相当する。また、ステップS36においてエミュレート処理が作成された場合もステップS37が実行される。この処理は、例えば、図8において、割込属性命令およびデータBを初期メモリスペース30に書き込む手順に相当する。
【0078】
実行履歴情報2から抽出したレコードがレジスタレコードであった場合は、ステップS41へ進む。ステップS41では、抽出されたレジスタレコードの内容に従ってレジスタ(図5に示したレジスタ群33)を更新する。
【0079】
実行履歴情報2から抽出したレコードが割込レコードであった場合は、ステップS42へ進む。ステップS42では、必要に応じて割込命令を生成し、それを図13(a) に示す管理リストに登録する。例えば、図10〜図11に示した例では、命令Cが割込属性命令に置き換えられているので、その割込属性命令が管理リストに登録される。この場合、対応する情報が図13(b)に示す割込管理テーブルに設定される。
【0080】
実行履歴情報2から抽出したレコードがメモリデータレコードであった場合には、ステップS37において、対応するデータを初期メモリスペース30に書き込む。
【0081】
実行履歴情報2から抽出したレコードがテーブル参照レコードであった場合には、ステップS37において、更新後のテーブルの内容をメモリスペース30に書き込む。なお、ここでは、論理アドレスを実アドレスに変換するアドレス変換テーブルを想定する。また、アドレス変換テーブルについては、後で別途説明をする。
【0082】
実行履歴情報2から抽出したレコードがキー情報レコードであった場合は、ステップS43において、対応するキー情報を登録する。なお、キー情報は、補正用メモリスペース32に書き込まれる。
【0083】
実行履歴情報2を構成する全てのレコードについて上記ステップS21〜S43の処理が実行されると、ステップS51において、各割込命令から対応する処理ルーチンを呼び出すために必要は情報が設定される。このとき、図13(b) に示した割込管理テーブルが参照され、置換え処理により生成された割込命令については、補正用メモリスペース32から対応する処理ルーチンを呼び出すための情報(命令を含む)が設定される。
【0084】
このように、本実施形態のベンチマークプログラムは、基本メモリスペース31および補正用メモリスペース32から構成される初期メモリスペース30に格納されている。そして、オリジナルプログラム実行マシン1により実行された命令は、基本メモリスペース31に書き込まれる。このとき、各命令は、オリジナルプログラム実行マシン1のメモリ12に格納されていたときと同じアドレスに書き込まれる。また、オリジナルプログラム実行マシン1においてメモリ更新またはメモリ参照が発生した場合は、対応するメモリデータが基本メモリスペース31に書き込まれる。このとき、メモリデータは、オリジナルプログラム実行マシン1のメモリ12に格納されていたときと同じアドレスに書き込まれる。
【0085】
シミュレータ8において実施できない動作については、補正用メモリスペース32を利用して同等の動作が提供される。例えば、オリジナルプログラム実行マシン1においてI/O命令が実行された場合は、そのI/O命令の代わりに割込命令が基本メモリスペース31に書き込まれると共に、上記I/O命令に起因する動作を実現するための情報(補正データ)が補正用メモリスペース32に書き込まれる。そして、上記割込命令から補正用メモリスペース32に格納された補正データが呼び出されるように必要な情報が設定される。また、オリジナルプログラム実行マシン1において非同期割込が発生した場合は、その割込が発生したタイミングの近傍で実行されるべき所定の命令が割込命令に置き換えられる。そして、同様の方法で補正用メモリスペース32に格納された補正データが呼び出されるように必要な情報が設定される。
【0086】
したがって、シミュレータ8に上記ベンチマークプログラムが与えられると、オリジナルプログラム実行マシン1においてアプリケーションプログラムが実行されたときと同じ命令シーケンスが実行されてゆく。このとき、オリジナルプログラム実行マシン1において実行された処理のうち、シミュレータ8が実行できない処理については、そのシミュレータ8が実行できる形式に書き換えられている。したがって、シミュレータ8は、オリジナルプログラム実行マシン1と同等に機能を備えていなくても、オリジナルプログラム実行マシン1において実現された動作を忠実に再現できる。この結果、シミュレータ8を用いて信頼性の高い評価を行うことができる。
【0087】
次に、アドレス変換テーブルについて説明する。アドレス変換テーブルは、CPUが認識している論理アドレスを実アドレスに変換する際に参照されるテーブルであり、オリジナルプログラム実行マシン1においてはメモリ12内の所定の領域に格納されている。ただし、論理アドレスと実アドレスとの対応関係は、通常、命令シーケンスが実行されていく際に、時々刻々と変化していく。したがって、ベンチマークプログラムにおいても、論理アドレスと実アドレスとの対応関係の変化が記述されている必要がある。
【0088】
このため、オリジナルプログラム実行マシン1においてアプリケーションプログラムが実行されている期間、トレーサ15は、アドレス変換テーブルが参照されるごとに1セットの変換前アドレスおよび変換後アドレスを含むテーブル参照レコードを順次作成していく。そして、解析ツール3は、作成されたテーブル参照レコードに基づいて、オリジナルプログラム実行マシン1において実際に参照されたアドレス変換テーブルを初期メモリスペース30上に生成する。ここで、オリジナルプログラム実行マシン1に設けられているアドレス変換テーブルにおいて、命令の実行に際して実際に参照されるのは、その一部のみである。すなわち、初期メモリスペース30に再現されるアドレス変換テーブルは、その一部のみに有効な情報が格納されることになる。したがって、初期メモリスペース30に再現されるアドレス変換テーブルは、圧縮することができる。以下、図14を参照しながらアドレス変換テーブルの圧縮について説明する。
【0089】
ここでは、図14(a) および図14(b) に示すように、テーブルAが論理アドレス空間の所定の領域を実アドレス空間の1000〜2000番地に変換し、テーブルBが論理アドレス空間の他の所定の領域を実アドレス空間の3000〜4000番地に変換するものとする。また、テーブルAおよびテーブルBは、図14(b)に示すように、それぞれ斜線で示すエリアのみがオリジナルプログラム実行マシン1において実際に参照されたものとする。この場合、テーブルAおよびテーブルBが初期メモリスペース30に再現されたとき、斜線で示すエリアのみに有効な変換情報が格納されることになる。さらに、図14(b)に示すように、テーブルAおよびテーブルBが管理する実アドレス空間が同一であったと仮定したときに、それら2つのテーブルにおいて有効な変換情報が格納されている実アドレスが重複していないものとする。
【0090】
この場合、図14(b) に示すように、初期メモリスペース30において、テーブルAおよびテーブルBを互いにマージ(統合)することができる。そして、この結果、上記2つのテーブルにより管理されていた実アドレス空間も互いにマージすることができる。例えば、テーブルAおよびテーブルBがマージされる前に1000〜2000番地および3000〜4000番地に格納されていたデータは、図15(c)に示すように、1000〜2000番地のみに格納される。これにより、初期メモリスペース30を小さくできる。
【0091】
図15は、ベンチマークプログラム7を作成および検証するシステムの構成図である。ここで、オリジナルプログラム実行マシン1、実行履歴情報2、解析ツール3、基本データ4、補正データ5、ベンチマークプログラム7は、それぞれ図1おいて同一の符号が付されているユニットに相当する。
【0092】
図15において、モニタソース51には、補正データ5を加工するためのプログラム等が格納されている。これらのプログラムは、例えば、高水準言語で記述されている。モニタソース51の中に格納されているプログラムの1つを図16に示す。
【0093】
図16は、シミュレータ8においてベンチマークプログラムが実行されるときに、各割込命令に対応する処理を決定する手順を示すフローチャートである。
ステップS61では、まず、割込み前処理が実行される。この処理では、例えば、レジスタのバックアップ等が行われる。続いて、ステップS62では、発生した割込みについて補正が必要か否かを調べる。そして、補正が必要であれば、ステップS63において、制御変数を検索キーとして図13(b) に示す割込管理テーブルをサーチする。そして、その制御変数と一致するシリアル番号を持ったエントリから対応するアドレスを抽出し、そのアドレスに格納されている処理ルーチンプログラムを実行する。ステップS64では、制御変数に「1」が加えられる。ステップS65では、割込み後処理が実行される。これにより、処理が、割込み元あるいは制御を渡す命令に戻る。
【0094】
オブジェクト生成部52は、補正データ5およびモニタソース51をコンパイルするコンパイラ、およびリンカから構成される。なお、オブジェクト生成部52の出力は、初期メモリスペース30の補正用メモリスペース32に格納すべきデータ列である。アドレス解決部53は、基本メモリスペース31に格納されているデータと、補正用メモリスペース32に格納すべきデータとの連続性が確保されるようにアドレスを解決する。そして、解析ツール3により生成された基本データ4およびアドレス解決部53によりアドレス解決されたデータとを統合することにより、ベンチマークプログラム7が得られる。
【0095】
なお、モニタソース51、オブジェクト生成部52、およびアドレス解決部53は、図1に示した補正ツール6に対応する。
作成されたベンチマークプログラム7は、アーキテクチャシミュレータ61により検証される。このとき、動的解析ツール62は、実行履歴情報2およびアーキテクチャシミュレータ61によるシミュレーション結果に基づいて、トレーサ15または解析ツール3の不具合等をチェックする。そして、そのチェック結果は、必要に応じてトレーサ15および解析ツール3にフィードバックされる。
【0096】
ところで、上述の実施例は、実行履歴情報2が、オリジナルプログラム実行マシン1の動作に係わるすべての情報を含んでいることを前提としている。すなわち、上述の実施例では、トレーサ15が、アプリケーションプログラムの実行と並列に且つ継続的に動作している。
【0097】
しかし、アプリケーションによってはトレーサ15の負荷が重くなることがある。この場合、トレーサ15を継続的に動作させると、アプリケーションプログラムの実行に悪影響を及ぼすおそれがある。このため、オリジナルプログラム実行マシン1は、トレーサ15を断続的に動作させることができる。
【0098】
図17は、トレーサ15を断続的に動作させた場合の処理を説明するための図である。ここでは、トレーサ15が動作している期間と停止している期間とから構成されるサイクルが繰り返されるものとする。
【0099】
トレーサ15は、動作期間中は実行履歴情報を出力するが、停止時にはそれを出力しない。このため、オリジナルプログラム実行マシン1の動作を忠実に再現するためのベンチマークプログラムを作成するためには、解析ツール3は、トレーサ15が停止している期間のオリジナルプログラム実行マシン1の動作を推定する必要がある。例えば、図17のサイクルnにおいては、時刻Ta 〜Tb の実行履歴情報は出力されるが、時刻Tb 〜Tc の実行履歴情報は出力されない。この場合、解析ツール3は、時刻Tb 〜Tc におけるオリジナルプログラム実行マシン1の実行履歴を推定する必要がある。
【0100】
解析ツール3は、以下のようにして、時刻Tb 〜Tc におけるオリジナルプログラム実行マシン1の動作を推定する。ただし、オリジナルプログラム実行マシン1の動作を完全に求めることは困難なので、ここでは、時刻Tb〜Tc におけるメモリ12の更新内容を推定するものとする。時刻Tb 〜Tc におけるメモリ12の更新内容は、時刻Tb における動的メモリスペースの内容と、時刻Tc以降の実行履歴情報に基づいて作成されたメモリスペースの内容との差分により表される。なお、動的メモリスペースは、メモリデータレコードの内容を出願順にすべて反映させたメモリ空間であり、基本的に、初期メモリスペース30と異なる空間に作成される。また、時刻Tc以降の実行履歴情報に基づいて作成されるメモリスペースも、基本的に、初期メモリスペース30と異なる空間に作成される。
【0101】
解析ツール3は、時刻Ta 〜Tb の実行履歴情報に基づいて初期メモリスペース30に対応するデータを書き込んだ後、時刻Tb〜Tc におけるメモリ12の更新内容を初期メモリスペース30に書き込む。以降、解析ツール3は、後続のサイクルについても同様の処理を繰り返す。これにより、トレーサ15が断続的に動作する場合であっても、オリジナルプログラム実行マシン1の動作を忠実に再現するためのベンチマークプログラムが作成される。
【0102】
このように、本実施形態のベンチマークプログラム7は、オリジナルプログラム実行マシン1においてオリジナルプログラムが実行されたときの命令シーケンスを再現するロードモジュールである。このとき、このベンチマークプログラム7は、上記オリジナルプログラムの一部のみが実行されたときの命令シーケンスを表すロードモジュールであってもよい。
【0103】
なお、ベンチマークプログラム(ロードモジュール)7を作成する機能は、コンピュータを用いて上述のシーケンスを記述したプログラムを実行することにより実現される。そのプログラムを実行するコンピュータ100の構成を図18に示す。
【0104】
CPU101は、上述のシーケンスに示した処理を記述したプログラムを記憶装置102からメモリ103にロードして実行する。記憶装置102は、大容量記憶デバイスであり、上記プログラムを格納する。一方、メモリ103は、例えば半導体メモリであり、CPU101の作業領域として使用される。なお、初期メモリスペース30は、メモリ103を利用して実現することができる。
【0105】
記録媒体ドライバ104は、CPU101の指示に従って可搬性記録媒体105にアクセスする。可搬性記録媒体105は、例えば、半導体デバイス(PCカード等)、磁気的作用により情報が入出力される媒体(フロッピーディスク、磁気テープなど)、光学的作用により情報が入出力される媒体(光ディスクなど)を含む。通信制御装置106は、CPU101の指示に従って網との間でデータを送受信する。
【0106】
ここで、ベンチマークプログラム7は、オリジナルプログラム実行マシン1から実行履歴情報2を抽出するトレーサ15、および実行履歴情報2を解析する解析ツール3(ここでは、補正ツール6と含むものとする)により作成される。そして、トレーサ15は、オリジナルプログラム実行マシン1において図3のフローチャートを実行することにより実現される。一方、解析ツール3は、図18に示すコンピュータ100において図12のフローチャート(図6〜図11に示したシーケンスを含む)を実行することにより実現される。ただし、解析ツール3は、必ずしもオリジナルプログラム実行マシン1と異なるコンピュータにより実現される必要はなく、オリジナルプログラム実行マシン1により実現されてもよい。
【0107】
図19は、ベンチマークプログラムを作成するためのプログラムの提供方法を説明する図である。ベンチマークプログラムを作成するためのプログラムは、例えば、以下の3つの方法の中の任意の方法により提供される。
【0108】
(a) コンピュータにインストールされて提供される。この場合、プログラム等は、例えば、出荷前にプレインストールされる。
(b) 可搬性記録媒体に格納されて提供される。この場合、可搬性記録媒体105に格納されているプログラム等は、基本的に、記録媒体ドライバ104を介して記憶装置102にインストールされる。
【0109】
(c) 網上のサーバから提供される。この場合、基本的には、コンピュータ100がサーバに格納されているプログラム等をダウンロードすることによってそのプログラム等を取得する。
【0110】
なお、作成されたベンチマークプログラムは、CD−ROM等の可搬性記録媒体に格納してユーザに提供してもよいし、ネットワークを介してユーザ端末へ送るようにしてもよい。
【0111】
(付記1)情報処理装置を評価するためのテストプログラムを作成する方法であって、
プロセッサおよびメモリを備えるコンピュータを用いてオリジナルプログラムが実行されているときに、上記プロセッサにより実行される命令および上記メモリへのアクセス内容を検出し、
検出された情報を実行履歴情報として時系列に格納し、
上記実行履歴情報に基づいて上記コンピュータにより実行された命令実行シーケンスを再現するロードモジュール形式のプログラムを作成することを特徴とするテストプログラム作成方法。
【0112】
(付記2)情報処理装置を評価するためのテストプログラムを作成する方法であって、
プロセッサおよびメモリを備えるコンピュータを用いてオリジナルプログラムが実行されているときに、上記プロセッサにより実行された命令に対応する命令コード、その命令に係わる命令情報、上記メモリに書き込まれる又はそのメモリから読み出されるバイナリデータ、および上記メモリへのアクセス内容を表すアクセス情報を検出し、
検出された情報を実行履歴情報として時系列に格納し、
上記実行履歴情報を時系列に解析し、予め用意されているメモリスペースに、上記命令情報に基づいて上記命令コードを書き込むと共に上記アクセス情報に基づいて上記バイナリデータを書き込むことにより、ロードモジュール形式のプログラムを作成することを特徴とするテストプログラム作成方法。
【0113】
(付記3)付記2に記載のテストプログラム作成方法であって、
上記メモリスペースは、上記コンピュータが備えるメモリと実質的に同じアドレス空間を有する。
【0114】
(付記4)付記2に記載のテストプログラム作成方法であって、
当該テストプログラムが与えられる装置が実行できない命令である第1の命令が上記コンピュータにより実行された場合は、
上記第1の命令に起因する上記コンピュータの動作を代替する処理ルーチンプログラムを作成して上記メモリスペースに書き込み、
上記第1の命令の代わりに上記処理ルーチンプログラムを呼び出す命令を上記メモリスペースに書き込む。
【0115】
(付記5)付記4に記載のテストプログラム作成方法であって、
上記第1の命令は、I/O命令である。
(付記6)付記2に記載のテストプログラム作成方法であって、
上記コンピュータにより実行されたときと当該テストプログラムが与えられる装置により実行されたときとで異なる動作を引き起こす可能性のある命令である第2の命令が上記コンピュータにより実行された場合に、
上記コンピュータにおいて上記第2の命令が実行されたときに上記プロセッサが参照した条件を上記メモリスペースに書き込み、
上記第2の命令の代わりに上記条件を呼び出す命令を上記メモリスペースに書き込む。
【0116】
(付記7)付記2に記載のテストプログラム作成方法であって、
当該テストプログラムが与えられる装置が実施できない動作である第1の動作が上記コンピュータにより実施された場合に、
上記コンピュータにおいて上記第1の動作が実施されたタイミングの近傍で実行された命令である第3の命令を命令シーケンスを切り替える命令に置き換えて上記メモリスペースに書き込み、
上記第1の動作を代替する処理ルーチンプログラムを作成して上記メモリスペースに書き込み、
上記命令シーケンスを置き換える命令と上記処理ルーチンプログラムとをリンクする。
【0117】
(付記8)付記7に記載のテストプログラム作成方法であって、
上記第1の動作は、非同期割込である。
(付記9)付記7に記載のテストプログラム作成方法であって、
上記処理ルーチンプログラムは、上記第3の命令のエミュレーションを含む。
【0118】
(付記10)付記2に記載のテストプログラム作成方法であって、
上記コンピュータにおいて複数のアドレス変換テーブルを用いて論理アドレスが実アドレスに変換されている場合に、
上記複数のアドレス変換テーブルが参照されたときにその参照内容を表す参照情報を時系列に格納し、
格納された参照情報に基づいて、上記複数のアドレス変換テーブルに対応する複数のテーブルを作成し、それらのテーブルをマージした結果を上記メモリスペースに書き込む。
【0119】
(付記11)付記2に記載のプログラム作成方法であって、
上記命令コード、命令情報、バイナリデータ、アクセス情報が検出されない期間における上記メモリの更新内容を推定し、
推定された更新内容を上記メモリスペースに書き込む。
【0120】
(付記12)情報処理装置を評価するためのテストプログラムを作成するシステムであって、
プロセッサおよびメモリを備えるコンピュータを用いてオリジナルプログラムが実行されているときに、上記プロセッサにより実行される命令および上記メモリへのアクセス内容を検出する検出手段と、
検出された情報を実行履歴情報として時系列に格納する格納手段と、
上記実行履歴情報に基づいて上記コンピュータにより実行された命令実行シーケンスを再現するロードモジュール形式のプログラムを作成する作成手段と
を有することを特徴とするテストプログラム作成システム。
【0121】
(付記13)情報処理装置を評価するためのテストプログラムを作成するシステムであって、
プロセッサおよびメモリを備えるコンピュータを用いてオリジナルプログラムが実行されているときに、上記プロセッサにより実行された命令に対応する命令コード、その命令に係わる命令情報、上記メモリに書き込まれる又はそのメモリから読み出されるバイナリデータ、および上記メモリへのアクセス内容を表すアクセス情報を検出する検出手段と、
検出された情報を実行履歴情報として時系列に格納する格納手段と、
上記実行履歴情報を時系列に解析し、予め用意されているメモリスペースに、上記命令情報に基づいて上記命令コードを書き込むと共に上記アクセス情報に基づいて上記バイナリデータを書き込むことにより、ロードモジュール形式のプログラムを作成する作成手段と
を有することを特徴とするテストプログラム作成システム。
【0122】
(付記14)情報処理装置を評価するためのテストプログラムを作成するために、コンピュータを、
プロセッサおよびメモリを備える他のコンピュータを用いてオリジナルプログラムが実行されているときに検出された上記プロセッサにより実行される命令および上記メモリへのアクセス内容に基づいて、上記他のコンピュータにより実行された命令実行シーケンスを再現するロードモジュール形式のプログラムを作成する作成手段、
として機能させるためのテストプログラム作成プログラム。
【0123】
(付記15)情報処理装置を評価するためのテストプログラムを作成するために、コンピュータを、
プロセッサおよびメモリを備えるコンピュータを用いてオリジナルプログラムが実行されているときに検出された上記プロセッサにより実行された命令に対応する命令コード、その命令に係わる命令情報、上記メモリに書き込まれる又はそのメモリから読み出されるバイナリデータ、および上記メモリへのアクセス内容を表すアクセス情報を解析する解析手段と、
上記解析手段による解析結果に基づいて、予め用意されているメモリスペースに上記命令情報に基づいて上記命令コードを書き込むと共に上記アクセス情報に基づいて上記バイナリデータを書き込むことにより、ロードモジュール形式のプログラムを作成する作成手段、
として機能させるためのテストプログラム作成プログラム。
【0124】
(付記16)情報処理装置を評価するためのテストプログラムを作成するために、コンピュータを、
当該コンピュータを用いてオリジナルプログラムが実行されているときに、当該コンピュータのプロセッサにより実行される命令および当該コンピュータのメモリへのアクセス内容を検出する検出手段と、
上記検出手段により検出された情報に基づいて当該コンピュータにより実行された命令実行シーケンスを再現するロードモジュール形式のプログラムを作成する作成手段、
として機能させるためのテストプログラム作成プログラム。
【0125】
(付記17)情報処理装置を評価するためのテストプログラムを作成するために、コンピュータを、
当該コンピュータを用いてオリジナルプログラムが実行されているときに、上記プロセッサにより実行された命令に対応する命令コード、その命令に係わる命令情報、上記メモリに書き込まれる又はそのメモリから読み出されるバイナリデータ、および上記メモリへのアクセス内容を表すアクセス情報を検出する検出手段と、
上記検出手段により検出された情報を時系列に基づいて、予め用意されているメモリスペースに上記命令情報に基づいて上記命令コードを書き込むと共に上記アクセス情報に基づいて上記バイナリデータを書き込むことにより、ロードモジュール形式のプログラムを作成する作成手段、
として機能させるためのテストプログラム作成プログラム。
【0126】
(付記18)情報処理装置を評価するためのテストプログラムを作成するために、コンピュータを、
当該コンピュータを用いてオリジナルプログラムが実行されているときに、当該コンピュータのプロセッサにより実行される命令および当該コンピュータのメモリへのアクセス内容を検出する検出手段と、
上記検出手段により検出された情報に基づいて当該コンピュータにより実行された命令実行シーケンスを再現するロードモジュール形式のプログラムを作成する作成手段、
として機能させるためのテストプログラム作成プログラムを記録したコンピュータ読取り可能な記録媒体。
【0127】
(付記19)情報処理装置を評価するためのテストプログラムを作成するために、コンピュータを、
当該コンピュータを用いてオリジナルプログラムが実行されているときに、上記プロセッサにより実行された命令に対応する命令コード、その命令に係わる命令情報、上記メモリに書き込まれる又はそのメモリから読み出されるバイナリデータ、および上記メモリへのアクセス内容を表すアクセス情報を検出する検出手段と、
上記検出手段により検出された情報を時系列に基づいて、予め用意されているメモリスペースに上記命令情報に基づいて上記命令コードを書き込むと共に上記アクセス情報に基づいて上記バイナリデータを書き込むことにより、ロードモジュール形式のプログラムを作成する作成手段、
として機能させるためのテストプログラム作成プログラムを記録したコンピュータ読取り可能な記録媒体。
【0128】
(付記20)情報処理装置を評価するためのテストプログラムであって、
プロセッサおよびメモリを備えるコンピュータを用いてオリジナルプログラムが実行されているときに検出された上記プロセッサにより実行される命令および上記メモリへのアクセス内容に基づいて上記コンピュータにより実行された命令実行シーケンスを再現するロードモジュール形式のテストプログラム。
【0129】
【発明の効果】
本発明によれば、情報処理装置が完成する前にその性能を正確に評価できる。このため、情報処理装置の開発期間を短縮できる。また、目標特性に近づけるためのデザインの変更を効率的に行うことができる。
【図面の簡単な説明】
【図1】本実施形態のプログラム作成方法の概観を説明する図である。
【図2】オリジナルプログラム実行マシンの構成図である。
【図3】トレーサの動作を示すフローチャートである。
【図4】実行履歴情報の実施例である。
【図5】初期メモリスペースの構成図である。
【図6】命令コードを初期メモリスペースに書き込む処理の実施例である。
【図7】I/O割込によるメモリ更新が発生したときの解析ツールの処理を説明する図である。
【図8】I/O命令によるメモリ更新が発生したときの解析ツールの処理を説明する図である。
【図9】動的情報参照命令が実行されたときの解析ツールの処理を説明する図である。
【図10】 (a) は、オリジナルプログラム実行マシンにおいて非同期割込みが発生した場合の命令シーケンスを示す図であり、(b)は、(a) に示すシーケンスを実現するための方法を説明する図である。
【図11】非同期割込が発生したときの解析ツールの処理を説明する図である。
【図12】解析ツールの動作を説明するフローチャートである。
【図13】 (a) は、割込命令を管理するリストの例、(b) は、割込命令を識別する方法の一例を示す図である。
【図14】アドレス変換テーブルの圧縮について説明する図である。
【図15】ベンチマークプログラムを作成および検証するシステムの構成図である。
【図16】ベンチマークプログラムが実行される際に各割込命令に対応する処理を決定する手順を示すフローチャートである。
【図17】トレーサを断続的に動作させた場合の処理を説明するための図である。
【図18】本発明の機能を記述したプログラムを実行するコンピュータのブロック図である。
【図19】本発明に係わるソフトウェアプログラムなどの提供方法を説明する図である。
【符号の説明】
1 オリジナルプログラム実行マシン
2 実行履歴情報
3 解析ツール
4 基本データ
5 補正データ
6 補正ツール
7 ベンチマークプログラム
11 CPU
12 メモリ
13 OS
14 アプリケーションプログラム
15 トレーサ
21 外部デバイス
30 初期メモリスペース
31 基本メモリスペース
32 補正用メモリスペース
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a method and apparatus for creating a test program for evaluating an information processing apparatus, and more particularly, to a method and apparatus for creating a benchmark program.
[0002]
[Prior art]
Various information processing apparatuses (mainly computers) are usually subjected to various performance evaluations before shipping. For example, at the time of hardware development, the logic of the CPU to be mounted on the information processing apparatus is verified using a logic simulator or the like. In addition, when the apparatus is completed, the performance of the entire apparatus is evaluated by measuring the processing time when the apparatus executes a standard program. The latter evaluation is often called “benchmark test”, and the program used in the benchmark test is called “benchmark program”.
[0003]
[Problems to be solved by the invention]
However, since the logic simulator is mainly intended for logic verification, the function for evaluating the performance of the information processing apparatus is not sufficient. For example, since an OS (Operating System) cannot normally be installed in a logic simulator, the operation when an application is executed on the OS cannot be evaluated using the logic simulator. Further, since the logic simulator cannot normally connect an external device such as an external memory, it cannot evaluate an operation including an I / O instruction.
[0004]
On the other hand, in the benchmark test, a predetermined program (benchmark program) is executed using the completed information processing apparatus, so that the execution speed and the like can be measured. However, the processing executed in the existing benchmark test is generally relatively simple, and it is difficult to evaluate the performance when an application program to be actually used is executed. Therefore, if the performance when an application program to be actually used is accurately evaluated, it is necessary to actually execute the application program. However, in this case, it is usually necessary to perform a test with an external device connected to the information processing apparatus to be evaluated. For example, when evaluating an operation when a database application program is executed, it is necessary to perform a test in a state where an external storage device is connected to the information processing apparatus. For this reason, considerable time and cost are required to perform the test.
[0005]
In addition, since the benchmark test is performed after the information processing apparatus to be evaluated is completed, if it is found that a certain level of performance cannot be obtained at that time, the effort required for the design change becomes very large. That is, the product development time becomes longer.
[0006]
Thus, conventionally, it was impossible to accurately evaluate the performance of the information processing apparatus before completion.
An object of the present invention is to enable accurate evaluation of the performance of an information processing apparatus before it is completed.
[0007]
[Means for Solving the Problems]
The method of the present invention is a method for creating a test program for evaluating an information processing apparatus, and includes instructions executed by the processor when an original program is executed using a computer having a processor and a memory. Detects the contents of access to the memory, stores the detected information in time series as execution history information, and creates a load module format program that reproduces the instruction execution sequence executed by the computer based on the execution history information To do.
[0008]
The load module format program includes not only instructions when the original program is executed but also memory access contents. Therefore, when this load module is given to the information processing apparatus to be evaluated, the apparatus can faithfully reproduce the operation of the computer. Further, assuming that an OS is installed in the computer, the load module includes instructions for the OS. Therefore, even if the OS is not installed in the information processing apparatus to be evaluated, the operation of the computer can be reproduced.
[0009]
According to another aspect of the present invention, there is provided a test program creation method comprising: an instruction code corresponding to an instruction executed by the processor when an original program is executed using a computer having a processor and a memory; and an instruction related to the instruction Information, binary data written to or read from the memory, and access information representing access contents to the memory are detected, and the detected information is stored as execution history information in time series, and the execution history information Is written in a time series and the instruction code is written in a memory space prepared in advance based on the instruction information and the binary data is written on the basis of the access information to create a load module format program.
[0010]
Also in this method, basically, the operation of the computer is faithfully reproduced in the information processing apparatus to be evaluated, as in the above-described method.
In the above method, when the first instruction, which is an instruction that cannot be executed by the device to which the test program is provided, is executed by the computer, a processing routine that substitutes for the operation of the computer caused by the first instruction A program may be created and written to the memory space, and an instruction for calling the processing routine program may be written to the memory space instead of the first instruction. In this case, since an instruction that cannot be executed by the information processing apparatus to be evaluated is replaced with a processing routine program that can be executed by the information processing apparatus to be evaluated, the operation of the computer is faithfully reproduced in the information processing apparatus to be evaluated.
[0011]
In the above method, the computer executes a second instruction that is an instruction that may cause different operations when executed by the computer and when executed by a device to which the test program is given. In this case, the condition referred to by the processor when the second instruction is executed in the computer is written to the memory space, and an instruction for calling the condition is written to the memory space instead of the second instruction. It may be. In this case, even if the execution speed or the operating environment of the computer and the information processing apparatus to be evaluated are different from each other, consistency is achieved between them, so that the operation of the computer is faithfully performed in the information processing apparatus to be evaluated. It is reproduced.
[0012]
Further, in the above method, when the first operation, which is an operation that cannot be performed by the apparatus to which the test program is applied, is performed by the computer, the computer executes the first operation in the vicinity of the timing at which the first operation is performed. The third instruction, which is the changed instruction, is replaced with an instruction for switching the instruction sequence and written to the memory space, a processing routine program for substituting the first operation is created and written to the memory space, and the instruction sequence is switched. You may make it link a command and the said processing routine program. In this case, since the operation that cannot be executed by the information processing apparatus to be evaluated is replaced with a processing routine program that can be executed by the information processing apparatus, the operation of the computer is faithfully reproduced in the information processing apparatus to be evaluated.
[0013]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 is a diagram illustrating an overview of a program creation method according to the present embodiment. In this embodiment, a test program for evaluating the information processing apparatus is created. Specifically, a test program for evaluating the performance of a computer (mainly computer hardware) is created. Hereinafter, this program is referred to as a “benchmark program”.
[0014]
The original program execution machine 1 is realized by a computer in which a predetermined operating system (OS) is installed, and executes a given application program. Then, each time each instruction is executed or each time the memory is accessed, execution history information 2 is created by accumulating information representing the operation in time series. Note that a program (including an OS) executed by the original program execution machine 1 may be referred to as an “original program”.
[0015]
The analysis tool 3 analyzes the execution history information 2 and generates basic data 4 and correction data 5. Here, the basic data 4 is data that reproduces an instruction execution sequence executed by the original program execution machine 1. The correction data 5 is data for correcting the basic data 4. The correction data 5 is processed into an appropriate state by the correction tool 6.
[0016]
The benchmark program 7 includes basic data 4 and correction data 5 processed by the correction tool 6. The benchmark program 7 is a load module that represents an operation in the original program execution machine 1.
[0017]
The simulator 8 is an alternative device of the information processing device to be evaluated, and is given a benchmark program 7 and operates according to it. The simulator 8 may be an information processing apparatus before completion, a logic simulator, or the like. The simulator 8 does not necessarily have an OS installed. Furthermore, it is assumed that no external device is connected to the simulator 8.
[0018]
The benchmark program 7 is a load module and is given to the simulator 8. Here, the load module includes not only the instruction sequence of the application program executed by the original program execution machine 1 but also the instruction sequence of the OS installed in the original program execution machine 1. Therefore, even when the OS is not installed in the simulator 8, when the benchmark program 7 is given, the instruction sequence executed by the original program execution machine 1 is reproduced in the simulator 8. When an operation related to an external device occurs in the original program execution machine 1, the operation is expressed in a format that can be processed by the simulator 8 using the correction data 5. Therefore, the operation related to the external device can be evaluated using the simulator 8 to which no external device is connected.
[0019]
FIG. 2 is a configuration diagram of the original program execution machine 1. The original program execution machine 1 includes at least a CPU (Central Processing Unit) 11 and a memory 12.
[0020]
The CPU 11 executes a program stored in the memory 12 to receive data, perform an operation using the data, and provide a series of operations until outputting the operation result. Note that the CPU 11 includes a plurality of registers.
[0021]
The memory 12 is a storage area accessed by the CPU 11, and stores the OS program 13, the application program 14, and various data. Here, the OS program 13 is not particularly limited, but an OS program that is the same as or compatible with the OS to be installed in the information processing apparatus to be evaluated is used. The application program 14 is preferably executed by the information processing apparatus to be evaluated.
[0022]
The tracer 15 detects the operation of the CPU 11 and access to the memory 12 and outputs the detection results in time series. In the example shown in FIG. 2, the tracer 15 is stored in the memory 12, but may be provided in another storage area.
[0023]
The external device 21 is a device connected to the original program execution machine 1, and is an input device such as an external storage device or a keyboard.
FIG. 3 is a flowchart showing the operation of the tracer 15. This process is activated every time the CPU 11 executes some process or every time the memory 12 is accessed.
[0024]
In step S1, it is checked whether or not an instruction is executed by the CPU 11. Here, the “instruction” includes not only an instruction of the application program 14 but also an instruction associated with the OS processing. If the instruction is executed by the CPU 11, a corresponding instruction record is created in step S2. Here, the instruction record includes, for example, the following information.
・ Instruction code
-Instruction storage address (real address, logical address)
-Write destination register information
-Write destination address (real address, logical address)
・ Write data length
Reference register information
・ Reference address (real address, logical address)
・ Reference data length
The “instruction code” is an instruction itself given to the CPU 11 and is expressed in machine language. This instruction code is obtained, for example, by extracting a data string written in an instruction register provided in the CPU 11. “Instruction storage address” is an address where the instruction is stored. “Write destination register information” identifies a register to which data is to be written by the instruction. The “write destination address” and “write data length” are an address at which the data is written and the data length of the data when the data is written to the memory 12 by the instruction. “Reference register information” identifies a register whose data should be referred to by the instruction. “Reference address” and “reference data length” are the address at which the data is stored and the data length of the data, respectively, when the data in the memory 12 is referred to by the instruction. The method of detecting “instruction storage address” to “reference data length” can be realized by existing technology.
[0025]
In step S3, it is checked whether or not the register included in the CPU 11 has been updated. If one or more registers are updated, a corresponding register record is created in step S4. Here, the register record includes, for example, information for identifying the updated register and data (register value) newly written in the register.
[0026]
In step S5, it is checked whether or not an interrupt to the CPU 11 has occurred. If an interrupt to the CPU 11 occurs, a corresponding interrupt record is created in step S6. Here, in this embodiment, the interrupt is assumed to be an I / O interrupt, a program interrupt, an external interrupt, a privilege (SVC) interrupt, or the like. An example of an interrupt record corresponding to each interrupt is shown below.
I / O interrupt
・ PSW value before interrupt occurrence
・ Interrupt code
Program interruption
・ PSW value before interrupt occurrence
・ Instruction length
・ Interrupt code
-Code to determine exception type
・ Phenomenon identification code
External interrupt
・ PSW value before interrupt occurrence
・ Instruction length
・ Phenomenon identification code
Privileged (SVC) interrupt
・ PSW value before interrupt occurrence
-PSW value after an interrupt occurs
・ Instruction length
・ Phenomenon identification code
In step S7, it is checked whether or not the memory 12 has been accessed. Here, the access includes an operation of writing data in the memory 12 and an operation of referring to data stored in the memory 12. When the memory 12 is accessed, a corresponding memory data record is created in step S8. Here, the memory data record is composed of the following information, for example.
・ Real address
・ Memory data
·Data length
・ Access type
The “real address” represents the accessed real address. “Memory data” is data written to the memory 12 or data read from the memory 12. “Data length” indicates the data length of data written to the memory 12 or data read from the memory 12. “Access type” identifies writing or reference.
[0027]
In step S9, it is checked whether or not an instruction for updating various tables managed by the OS has been executed. Here, it is assumed that it is checked whether or not an instruction for updating the address conversion table has been executed. In the address conversion table, information for converting a logical address recognized by the CPU 11 into a real address on the memory 12 is registered. If an instruction to update the address conversion table is executed, a corresponding table reference record is created in step S10. Here, the table reference record includes, for example, the following information.
・ Supported operation
・ Translation address
・ Table address
·Data length
“Corresponding operation” represents an operation that requested address translation, and identifies instruction fetch, data reference, and data write. The “translation address” is a set of logical address and real address related to the conversion process. The “table address” is an address where the referenced address conversion table is stored. “Data length” is the data length of the data converted by the referenced address conversion table.
[0028]
In step S11, it is checked whether key information has been set. The key information is information for managing each page constituting the storage area, and is used by the OS. If key information is set, a corresponding key information record is created in step S12. Here, the key information record includes, for example, the following information. The key information may be derived from a memory record, an instruction record, and a register value.
・ Access side key information
・ Instruction code
Access type (instruction fetch, operand read, operand write, operand number)
・ Memory access logical address
・ Real memory access address
・ Segment table start address
-Segment table entry number
·Data length
In this way, when the original program is executed by the CPU 11, the tracer 15 detects instructions, memory data, related information, and the like, and creates corresponding records. The records created one after another by the tracer 15 are stored in time series as the execution history information 2.
[0029]
When the CPU 11 executes an instruction, the tracer 15 creates an instruction record corresponding to the instruction. For example, when a memory access occurs due to the instruction, the memory data record corresponding to the memory access is generated. Create at the same time. That is, when one instruction is executed by the CPU 11, the tracer 15 creates one or a plurality of records corresponding to the instruction.
[0030]
In the above example, a corresponding memory data record is created when the memory 12 is accessed. However, when certain data stored in the memory 12 is referenced (read), the analysis tool 3 The memory data record may be created only when the data is first referred to.
[0031]
Furthermore, when the memory 12 is updated according to a certain instruction, if the updated contents can be easily estimated, the analysis tool 3 may create another record instead of the memory data record. For example, in the case of a simple load instruction that only loads memory data stored in the memory 12 into a register, only a register record may be created instead of creating a memory data record. In this case, the operand address of the load instruction (reference address of the memory 12) is registered in this register record. At this time, the value stored in the load destination register after execution of the load instruction is registered in the register record, but this value matches the memory data stored in the operand address of the load instruction. The update content may be derived from the instruction record.
[0032]
FIG. 4 is an example of the execution history information 2. The execution history information 2 is managed using a record number when stored in a file or the like. That is, each record created by the tracer 15 is stored with a record number assigned in the order of creation. Each record is given a record type. In this embodiment, “01”, “02”, and “03” are assigned to “instruction record”, “register record”, and “memory data record”, respectively. The information detected by the tracer 15 is stored as execution information as it is. In this embodiment, for example, an instruction record is stored in a record identified by “record number = 453”. Specifically, “01” is set as the record type of this record, and further, an instruction code, various addresses, a data length, and the like detected by the tracer 15 are stored as execution information.
[0033]
In the above-described embodiment, information necessary for creating the execution history information 2 is collected by moving the tracer 15 on the actual machine, but may be collected by other methods. For example, necessary information may be collected using an architecture simulator. Further, the information necessary for creating the execution history information 2 varies depending on the device to be evaluated. That is, the information to be collected is determined depending on the OS installed in the evaluation target device, the instruction architecture of the CPU mounted in the evaluation target device, the system configuration of the evaluation target device, and the like.
[0034]
The execution history information 2 created as described above is analyzed by the analysis tool 3. Hereinafter, the operation of the analysis tool 3 will be described.
The analysis tool 3 analyzes each record of the execution history information 2 one by one in order, and writes the result in the initial memory space 30 shown in FIG. The initial memory space 30 includes a basic memory space 31 and a correction memory space 32. Here, the basic memory space 31 is a storage area having the same size as the real space of the memory 12 provided in the original program execution machine 1. The basic data 4 and the correction data 5 shown in FIG. 1 are written in the basic memory space 31 and the correction memory space 32, respectively.
[0035]
The analysis tool 3 also includes a register group 33 for reflecting information registered in the register record. The register group 33 includes the same number of registers as the CPU 11 of the original program execution machine 1 and is used when data is written to the initial memory space 30.
[0036]
The analysis tool 3 sequentially writes the results obtained by analyzing each record of the execution history information 2 in the basic memory space 31. For example, when extracting the instruction record, the analysis tool 3 uses the “instruction code” registered in the record as a key and the “instruction storage address (real address)” registered in the record as a key. Write to the corresponding area in space 31. At this time, if there is data accompanying the “instruction code”, the information is written in an area following the “instruction code”. As a result, the instruction code of the instruction executed by the original program execution machine 1 is written into the basic memory space 31. At this time, the instruction code exists at the same address in the memory 12 and the basic memory space 31.
[0037]
For example, in the example shown in FIG. 6, the store instruction stored in the address “aaaa” of the memory 12 provided in the original program execution machine 1 is executed, and an instruction record corresponding to the store instruction is created. Then, this instruction record is analyzed, and a store instruction is written in the address “aaaa” of the basic memory space 31 accordingly.
[0038]
When writing the instruction code to the basic memory space 31 as described above, if some data has already been stored in the corresponding area, the analysis tool 3 does not execute the writing process. Here, the function of prohibiting overwriting can be realized, for example, by providing a table for managing the basic memory space 31 in units of bytes and using the table to manage whether data is stored in each area. is there.
[0039]
Similarly, when the analysis tool 3 extracts a memory data record from the execution history information 2, the “memory data” registered in the record is used as a key with the “real address” registered in the record as a key. Write to the corresponding area in the memory space 31. As a result, the same memory data exists at the same address in the memory 12 and the basic memory space 31 of the original program execution machine 1.
[0040]
Other types of records will be described later with reference to flowcharts shown later.
As described above, the analysis tool 3 analyzes the execution history information 2 to reflect the contents of the memory 12 of the original program execution machine 1 in the basic memory space 31 of the initial memory space 30. In this case, the same result can be obtained by copying the contents of the memory 12 to the basic memory space 31 at an arbitrary time.
[0041]
By the way, the benchmark test of the present embodiment assumes that the performance of an evaluation target information processing apparatus is checked before the information processing apparatus is completed. Therefore, when testing a device to be evaluated, a simulator (simulator 8 shown in FIG. 1) having the same specifications as that of the device is prepared, and evaluation is performed by causing the simulator 8 to execute the benchmark program of this embodiment. The performance of the target device is estimated. Here, the simulator 8 includes a CPU included in the information processing apparatus to be evaluated or a processor equivalent thereto, but it is also assumed that the OS is not installed. Further, it is assumed that an external device is not connected to the simulator 8. For this reason, the simulator 8 cannot execute a part of instructions or processing executed by the original program execution machine 1.
[0042]
In the program creation method of this embodiment, among the instructions / processes executed by the original program execution machine 1, instructions / processes that cannot be executed by the simulator 8 are replaced with instructions / processes that can be executed by the simulator 8, thereby solving the above problem. Plan. Hereinafter, this replacement process may be referred to as “correction”. The correction data 5 shown in FIG. 1 is used for this correction process.
[0043]
In the following embodiment, asynchronous interrupts (including I / O interrupts), I / O instructions, and instructions that refer to dynamic information are taken as instructions or processes that require correction.
Asynchronous interrupt (part 1)
Here, it is assumed that in the original program execution machine 1, the memory 12 is updated by an I / O interrupt from the external device 21 (new data is written in the memory 12).
[0044]
Asynchronous interrupts occur independently of the execution of OS instructions or application program instructions. In other words, the memory 12 is updated by the I / O interrupt while the job is being executed. At this time, this memory update is recognized by the occurrence of an I / O interrupt when viewed from the job being executed.
[0045]
By the way, when the memory 12 is updated by an I / O interrupt, the tracer 15 creates a corresponding interrupt record and memory data record. For this reason, the analysis tool 3 should basically execute a process of updating the initial memory space 30 according to these records. However, in practice, if the contents of the memory data record are reflected in the initial memory space 30, the same result as the memory update executed in the original program execution machine 1 should be obtained.
[0046]
FIG. 7 is a diagram for explaining processing of the analysis tool 3 when a memory update due to an I / O interrupt occurs. In this embodiment, in the original program execution machine 1, data A is written to the address “bbbb” of the memory 12 by an I / O interrupt from the external device 21, and an interrupt record and a memory data record corresponding to the data A are created. In this case, data A is written to the address “bbbb” of the basic memory space 31 according to the contents of the memory data record.
[0047]
As described above, in the original program execution machine 1, the data A is written to the address “bbbb” of the memory 12 by the interruption from the external device 21. On the other hand, data A is written in advance at address “bbbb” of the basic memory space 31.
[0048]
Here, the data stored in the initial memory space 30 is finally used as a benchmark program. Specifically, instructions stored in the basic memory space 31 are sequentially executed by the simulator. At this time, assuming that the initial memory space 30 is created as shown in FIG. 7, the data A is already stored in the address “bbbb” of the basic memory space 31 at the start of the benchmark test. . This state is equivalent to the data A being written to the address “bbbb” regardless of the instruction stored in the basic memory space 31. That is, this state is substantially equivalent to data A being written at address “bbbb” by an I / O interrupt from the external device 21. Therefore, the memory update by the I / O interrupt is realized by reflecting the contents of the memory data record in the initial memory space 30. That is, even when the external device 21 cannot be connected to the simulator 8, the same result as that when the external device 21 is connected in the benchmark test can be obtained. There may be a case where data A1 different from data A exists at address "bbbb", and the data A1 is changed to data A by an I / O interrupt later. In this case, the update is reflected on the memory 31 when the I / O instruction is generated.
I / O instruction
Here, it is assumed that the I / O instruction is executed in the original program execution machine 1 and the memory 12 is updated accordingly. This I / O instruction is, for example, an instruction that reads data from the external device 21 and writes it to the memory 12.
[0049]
When an I / O instruction is executed in the original program execution machine 1, the tracer 15 creates an instruction record corresponding to the I / O instruction. Further, when the memory 12 is updated in accordance with this command, a memory data record including the updated memory data is created. Further, information updated by executing the I / O instruction (for example, register value, condition code, etc.) is registered in the corresponding record.
[0050]
The analysis tool 3 writes necessary information in the initial memory space 30 based on each record. Specifically, the memory data and various information updated by the I / O instruction are written in the correction memory space 32 as correction data. The analysis tool 3 generates an interrupt attribute instruction instead of the I / O instruction and writes it to the corresponding address in the basic memory space 31. Here, this interrupt attribute command is a command for processing the correction data previously stored in the correction memory space 32.
[0051]
FIG. 8 is a diagram for explaining processing of the analysis tool 3 when a memory update by an I / O instruction occurs. In this example, in the original program execution machine 1, the data B is written to the "dddd" address by executing the I / O instruction stored in the "cccc" address of the memory 12. At this time, the tracer 15 creates a corresponding record. The analysis tool 3 first writes the data B into a predetermined area in the correction memory space 32 using the memory data record. In FIG. 8, only the data B is written in the correction memory space 32, but actually other related information is also stored together. Subsequently, the analysis tool 3 creates a processing routine program (sub-p) corresponding to the I / O instruction and writes it in a predetermined area in the correction memory space 32. This processing routine program describes the following processing.
A process of writing the data B stored in the correction memory space 32 to the “dddd” address in the basic memory area 31
A process for updating the register or the like according to other related information stored in the correction memory space 32
Further, the analysis tool 3 writes an interrupt attribute command at the address “cccc” of the basic memory space 31. That is, an interrupt attribute instruction is written instead of the I / O instruction. Here, the interrupt attribute instruction is an instruction having an attribute for generating an interrupt, and a processing routine program stored in the correction memory space 32 can be called.
[0052]
When the benchmark program created as described above is given to the simulator 8, the following operations are realized. That is, the simulator 8 executes the instructions stored in the basic memory space 31 in order. Then, when the interrupt attribute instruction set in FIG. 8 is executed, the processing routine program stored in the correction memory space 32 is started. Then, by this processing routine program, the data B stored in the correction memory space 32 is written to the “dddd” address of the basic memory area 31 and the register and the like are updated. Thereafter, the processing returns to the instruction next to the interrupt attribute instruction.
[0053]
As described above, when the benchmark program is provided to the simulator 8, the same operation as that caused by the I / O instruction is realized in the original program execution machine 1. Here, in the benchmark program, the I / O instruction is replaced with an interrupt attribute instruction. Therefore, even when the simulator 8 cannot execute the I / O instruction, the operation corresponding to the I / O instruction is realized using the simulator 8.
Instructions that reference dynamic information
Here, it is assumed that an instruction referring to dynamic information is executed in the original program execution machine 1. The “dynamic information” is information relating to, for example, the time when an instruction is executed or the time required to execute a predetermined process. Further, the “instruction for referring to dynamic information” is an instruction for deriving different operations depending on the dynamic information. For example, it is a branch instruction in which “jump to address XX if executed within 10 seconds from program startup and jump to address YY if executed after that” is defined.
[0054]
An instruction for referring to the dynamic information as described above (hereinafter referred to as a dynamic information reference instruction) can basically be executed also by the simulator 8. However, the execution speed of the simulator 8 is not necessarily the same as that of the original program execution machine 1. For this reason, when the same program is given to the original program execution machine 1 and the simulator 8, the processing result by the dynamic information reference instruction is not always the same.
[0055]
In the program creation method of this embodiment, in order to solve this problem, when a dynamic information reference instruction is executed by the original program execution machine 1, the instruction is replaced with another instruction (for example, a load instruction). Then, correction processing is performed so that an equivalent operation is realized in the simulator 8.
[0056]
FIG. 9 is a diagram for explaining processing of the analysis tool 3 when a dynamic information reference instruction is executed. In FIG. 9, the dynamic information reference instruction is described as “D instruction”.
[0057]
In the original program execution machine 1, the dynamic information stored in the address "ffff" is referred to by executing the dynamic information reference instruction stored in the address "eeee" of the memory 12, and the dynamic information It is assumed that the subsequent processing is determined according to the value of. Here, the address “ffff” in the memory 12 is used as an area for writing the elapsed time from the start of the program, for example. This elapsed time is used as dynamic information. This dynamic information reference instruction loads, for example, the dynamic information stored in the address “ffff” of the memory 12 into a predetermined register and compares it with a predetermined threshold value. This is an instruction for determining subsequent processing.
[0058]
In this case, the tracer 15 creates corresponding instruction records and register records. At this time, at least the instruction code for identifying the dynamic information reference instruction, the storage address of the dynamic information reference instruction, and the storage address of the dynamic information are registered in this instruction record. Further, at least a register value is registered in the register record. Here, the register value is a comparison result between the dynamic information read from the address “ffff” of the memory 12 and the threshold value.
[0059]
The analysis tool 3 performs the following processing by analyzing the created record. That is, the analysis tool 3 first writes a load instruction at the address “eeee” in the basic memory space 31 based on the instruction record. This load instruction is an instruction for loading the data stored at the address “ffff” into a predetermined register. Further, the analysis tool 3 writes the register value registered in the register record in the address “ffff” of the basic memory space 31.
[0060]
When the benchmark program created as described above is given to the simulator 8, the following operations are realized. That is, when the load instruction is executed in the simulator 8, the data stored at the “ffff” address in the basic memory space 31 is loaded into a predetermined register. Here, the address “ffff” stores a comparison result when the dynamic information is compared with the threshold value in the original program execution machine 1. Therefore, when this load instruction is executed in the simulator 8, an operation equivalent to that when the dynamic information reference instruction is executed in the original program execution machine 1 is realized.
[0061]
As described above, when the benchmark program is given to the simulator 8, an operation equivalent to that when the dynamic information reference instruction is executed in the original program execution machine 1 is realized without referring to the dynamic information. That is, even if the execution speed or the operating environment of the original program execution machine 1 and the simulator 8 are different from each other, the operation of the original program execution machine 1 is reproduced on the simulator 8.
[0062]
In the example shown in FIG. 9, the same operation is realized in the original program execution machine 1 and the simulator 8 by replacing the dynamic information reference instruction with the load instruction. However, the present invention is not limited to this. Absent. That is, for example, when the processing by the dynamic information reference instruction is complicated, or when the instruction is executed a plurality of times and the register value is different every time it is executed, as in the processing for the I / O instruction described above, An interrupt attribute command may be used. That is, the dynamic information reference instruction is replaced with an interrupt attribute instruction, and a processing routine program called when an interrupt is generated by the interrupt attribute instruction is stored in the correction memory space 32. In this case, processing corresponding to the dynamic information reference instruction is described in the processing routine program.
Asynchronous interrupt (part 2)
Here, it is assumed that an I / O interrupt from the external device 21 occurs in the original program execution machine 1 and a process corresponding to the interrupt is executed.
[0063]
FIG. 10A is a diagram showing an instruction sequence when the above interrupt occurs in the original program execution machine 1. Here, instructions A to F. . . Assume that an interrupt is generated immediately after instruction C is executed in a sequence in which are executed sequentially. Then, the processing routine 41 including the instructions a to d is executed by the interruption, and then the processing returns to the instruction D.
[0064]
When creating the benchmark program of this embodiment, the instruction immediately before the asynchronous interrupt is replaced with an instruction for calling the processing routine 41 in order to reproduce the operation caused by the asynchronous interrupt in the simulator 8. . In the case of the above example, the instruction C is replaced with an interrupt attribute instruction for calling the processing routine 42 as shown in FIG. Here, the processing routine 42 includes data (emulation data) emulating the operation caused by the instruction C in addition to the instructions a to d constituting the processing routine 41. Further, the emulation data of the instruction C includes, for example, an operation result when the instruction C is executed, information related to register update, and the like.
[0065]
In the above example, the instruction immediately before the asynchronous interrupt is replaced with the interrupt attribute instruction. However, it is not always necessary to replace the previous instruction, and another instruction in the vicinity of the timing at which the asynchronous interrupt occurs. May be replaced with an interrupt attribute instruction. In this case, it is desirable that an instruction that can be easily emulated (for example, an ADD instruction) is replaced with an interrupt attribute instruction.
[0066]
FIG. 11 is a diagram illustrating the processing of the analysis tool 3 when an asynchronous interrupt occurs. FIG. 11 shows an embodiment corresponding to the example shown in FIG.
Assume that in the original program execution machine 1, an asynchronous interrupt is generated immediately after the instruction C stored in the address “gggg” of the memory 12 is executed, and the processing routine 41 is called by this interrupt. In this case, the tracer 15 corresponds to the instruction record corresponding to the instruction C, the record corresponding to the information updated due to the instruction C, the interrupt record corresponding to the asynchronous interrupt, and the instruction included in the processing routine 41. Create records to be used.
[0067]
The analysis tool 3 performs the following processing based on the created record. That is, the analysis tool 3 first creates emulation data of the instruction C by referring to a register record or the like, and creates a processing routine 42 that finally executes an instruction including the emulation data and passing the process to the instruction a. . Then, the processing routine 42 is written in a predetermined area of the correction memory space 32. Further, the analysis tool 3 writes an interrupt attribute command at the “gggg” address of the basic memory space 31. This interrupt attribute instruction is an instruction for calling the processing routine 42.
[0068]
When the benchmark program created as described above is given to the simulator 8, the following operations are realized. That is, when the interrupt attribute command is executed in the simulator 8, the processing routine 42 is called. Thereby, the operation corresponding to the instruction C is realized. Subsequently, control is passed to the processing routine 41. After the processing routine 41 is executed, the process returns to the instruction next to the instruction C.
[0069]
As described above, when the benchmark program is given to the simulator 8, an operation equivalent to the operation caused by the asynchronous interrupt is reproduced in the original program execution machine 1 without generating the asynchronous interrupt. In other words, even if the simulator 8 does not have a function of accepting asynchronous interrupts, an operation equivalent to that when an asynchronous interrupt occurs in the original program execution machine 1 is reproduced on the simulator 8.
[0070]
Although an interrupt instruction is used in the above embodiment, this interrupt instruction is an example of an instruction for switching an instruction sequence. That is, in FIG. 11, the instruction C may be replaced with an instruction for switching the instruction sequence. In this case, the instruction for switching the instruction sequence and the processing routine 42 are linked.
[0071]
FIG. 12 is a flowchart for explaining the operation of the analysis tool 3. As described above, the analysis tool 3 generates the basic data 4 and the correction data 5 that are the basis of the benchmark program 7 by sequentially analyzing the records of the execution history information 2. The basic data 4 and the correction data 5 are written in the initial memory space 30.
[0072]
Step S21 is a process of extracting each record of the execution history information 2 one by one from the top. In steps S22 to S27, the attribute of the extracted record is examined. Here, the attribute of the record is identified by the record type shown in FIG.
[0073]
If the record extracted from the execution history information 2 is an instruction record, the process proceeds to step S31. In step S31, it is checked whether an interrupt instruction is registered in the record. If an interrupt instruction has been registered, information related to the interrupt instruction is registered in the management list in step S32. As shown in FIG. 13A, the management list registers information related to each interrupt instruction in the order of appearance. When a new interrupt instruction is registered in this management list, a serial number is assigned to the interrupt instruction. At this time, the address information corresponding to the interrupt instruction is added to the interrupt management table shown in FIG. The interrupt management table manages the correspondence between the serial number assigned to each interrupt instruction and the address storing the processing routine program describing the process executed due to the interrupt instruction.
[0074]
If no interrupt instruction is registered in the extracted record, the process proceeds to step S33. In step S33, it is checked whether or not “an instruction that can be replaced with another instruction (candidate point that generates an interrupt)” is registered in the extracted record. The “instruction that can be replaced with another instruction” corresponds to, for example, the dynamic information reference instruction shown in FIG. 9 in the previous embodiment. If such an instruction is registered in the record, the correspondence relationship between the instruction before replacement and the instruction after replacement is registered in step S34. Specifically, an instruction ID corresponding to a variable for recording a replacement candidate is registered.
[0075]
If no “instruction that can be replaced with another instruction” is registered in the extracted record, the process proceeds to step S35. In step S35, it is checked whether or not an inexecutable instruction is registered in the extracted record. The non-executable instruction is an instruction that the simulator 8 cannot execute, and corresponds to, for example, the I / O instruction shown in FIG. 8 in the previous embodiment. If an inexecutable instruction is registered in the record, an emulation process (a process routine program for the emulation process) is created in step S36.
[0076]
As shown in FIG. 8, when an inexecutable instruction is replaced with an interrupt instruction, the interrupt instruction is also registered in the management list shown in FIG. The correspondence relationship between the serial number of the interrupt instruction and the address storing the processing routine program describing the process executed due to the interrupt instruction is shown in the interrupt management table shown in FIG. Is set.
[0077]
When a general command is stored in the extracted record (when “No” is determined in steps S31, 33, and 35), the initial memory space 30 is updated in step S37. This process corresponds to, for example, the procedure shown in FIG. Step S37 is also executed when an emulation process is created in step S36. This process corresponds to, for example, a procedure for writing an interrupt attribute instruction and data B in the initial memory space 30 in FIG.
[0078]
If the record extracted from the execution history information 2 is a register record, the process proceeds to step S41. In step S41, the register (register group 33 shown in FIG. 5) is updated according to the contents of the extracted register record.
[0079]
If the record extracted from the execution history information 2 is an interrupt record, the process proceeds to step S42. In step S42, an interrupt instruction is generated as necessary, and is registered in the management list shown in FIG. For example, in the example shown in FIGS. 10 to 11, since the instruction C is replaced with an interrupt attribute instruction, the interrupt attribute instruction is registered in the management list. In this case, the corresponding information is set in the interrupt management table shown in FIG.
[0080]
If the record extracted from the execution history information 2 is a memory data record, the corresponding data is written in the initial memory space 30 in step S37.
[0081]
If the record extracted from the execution history information 2 is a table reference record, the updated table contents are written in the memory space 30 in step S37. Here, an address conversion table for converting a logical address into a real address is assumed. The address conversion table will be separately described later.
[0082]
If the record extracted from the execution history information 2 is a key information record, the corresponding key information is registered in step S43. The key information is written in the correction memory space 32.
[0083]
When the processing of steps S21 to S43 is executed for all the records constituting the execution history information 2, information necessary to call the corresponding processing routine from each interrupt instruction is set in step S51. At this time, the interrupt management table shown in FIG. 13B is referred to, and for the interrupt instruction generated by the replacement process, information (including the instruction) for calling the corresponding processing routine from the correction memory space 32 is included. ) Is set.
[0084]
As described above, the benchmark program of the present embodiment is stored in the initial memory space 30 including the basic memory space 31 and the correction memory space 32. The instruction executed by the original program execution machine 1 is written in the basic memory space 31. At this time, each instruction is written at the same address as that stored in the memory 12 of the original program execution machine 1. Further, when a memory update or memory reference occurs in the original program execution machine 1, the corresponding memory data is written in the basic memory space 31. At this time, the memory data is written at the same address as that stored in the memory 12 of the original program execution machine 1.
[0085]
For operations that cannot be performed in the simulator 8, equivalent operations are provided using the correction memory space 32. For example, when an I / O instruction is executed in the original program execution machine 1, an interrupt instruction is written in the basic memory space 31 instead of the I / O instruction, and an operation caused by the I / O instruction is performed. Information (correction data) for realization is written in the correction memory space 32. Then, necessary information is set so that the correction data stored in the correction memory space 32 is called from the interrupt instruction. When an asynchronous interrupt occurs in the original program execution machine 1, a predetermined instruction to be executed in the vicinity of the timing at which the interrupt occurs is replaced with an interrupt instruction. Then, necessary information is set so that the correction data stored in the correction memory space 32 is called in the same manner.
[0086]
Therefore, when the benchmark program is given to the simulator 8, the same instruction sequence as when the application program is executed in the original program execution machine 1 is executed. At this time, among the processes executed in the original program execution machine 1, processes that cannot be executed by the simulator 8 are rewritten into a format that can be executed by the simulator 8. Therefore, even if the simulator 8 does not have a function equivalent to that of the original program execution machine 1, it can faithfully reproduce the operation realized in the original program execution machine 1. As a result, highly reliable evaluation can be performed using the simulator 8.
[0087]
Next, the address conversion table will be described. The address conversion table is a table that is referred to when a logical address recognized by the CPU is converted into a real address, and is stored in a predetermined area in the memory 12 in the original program execution machine 1. However, the correspondence between the logical address and the real address usually changes from moment to moment as the instruction sequence is executed. Therefore, the benchmark program must also describe the change in the correspondence between the logical address and the real address.
[0088]
For this reason, during the period in which the application program is being executed in the original program execution machine 1, the tracer 15 sequentially creates a table reference record including a set of pre-conversion addresses and post-conversion addresses each time the address conversion table is referenced. To go. Then, the analysis tool 3 generates an address translation table actually referred to in the original program execution machine 1 in the initial memory space 30 based on the created table reference record. Here, only a part of the address conversion table provided in the original program execution machine 1 is actually referred to when the instruction is executed. That is, valid information is stored only in a part of the address conversion table reproduced in the initial memory space 30. Therefore, the address conversion table reproduced in the initial memory space 30 can be compressed. Hereinafter, compression of the address conversion table will be described with reference to FIG.
[0089]
Here, as shown in FIGS. 14 (a) and 14 (b), the table A converts a predetermined area in the logical address space to the address 1000 to 2000 in the real address space, and the table B is the other in the logical address space. Are converted into addresses 3000 to 4000 in the real address space. In addition, as shown in FIG. 14B, only the areas indicated by hatching in Table A and Table B are actually referred to in the original program execution machine 1. In this case, when the table A and the table B are reproduced in the initial memory space 30, effective conversion information is stored only in the area indicated by the oblique lines. Further, as shown in FIG. 14B, when it is assumed that the real address spaces managed by the table A and the table B are the same, the real addresses in which effective translation information is stored in the two tables are It shall not be duplicated.
[0090]
In this case, as shown in FIG. 14B, the table A and the table B can be merged (integrated) with each other in the initial memory space 30. As a result, the real address spaces managed by the two tables can also be merged with each other. For example, data stored at addresses 1000 to 2000 and 3000 to 4000 before table A and table B are merged are stored only at addresses 1000 to 2000 as shown in FIG. Thereby, the initial memory space 30 can be reduced.
[0091]
FIG. 15 is a configuration diagram of a system for creating and verifying the benchmark program 7. Here, the original program execution machine 1, the execution history information 2, the analysis tool 3, the basic data 4, the correction data 5, and the benchmark program 7 correspond to units having the same reference numerals in FIG.
[0092]
In FIG. 15, the monitor source 51 stores a program for processing the correction data 5. These programs are written in a high-level language, for example. One of the programs stored in the monitor source 51 is shown in FIG.
[0093]
FIG. 16 is a flowchart showing a procedure for determining a process corresponding to each interrupt instruction when the benchmark program is executed in the simulator 8.
In step S61, first, pre-interrupt processing is executed. In this processing, for example, register backup is performed. Subsequently, in step S62, it is checked whether or not correction is necessary for the generated interrupt. If correction is necessary, in step S63, the interrupt management table shown in FIG. 13B is searched using the control variable as a search key. Then, the corresponding address is extracted from the entry having the serial number that matches the control variable, and the processing routine program stored at the address is executed. In step S64, “1” is added to the control variable. In step S65, post-interrupt processing is executed. As a result, the process returns to the interrupt source or the instruction to pass control.
[0094]
The object generation unit 52 includes a compiler that compiles the correction data 5 and the monitor source 51, and a linker. The output of the object generation unit 52 is a data string to be stored in the correction memory space 32 of the initial memory space 30. The address resolution unit 53 resolves addresses so as to ensure continuity between the data stored in the basic memory space 31 and the data to be stored in the correction memory space 32. Then, the benchmark program 7 is obtained by integrating the basic data 4 generated by the analysis tool 3 and the data resolved by the address resolution unit 53.
[0095]
The monitor source 51, the object generation unit 52, and the address resolution unit 53 correspond to the correction tool 6 illustrated in FIG.
The created benchmark program 7 is verified by the architecture simulator 61. At this time, the dynamic analysis tool 62 checks the malfunction of the tracer 15 or the analysis tool 3 based on the execution history information 2 and the simulation result by the architecture simulator 61. The check result is fed back to the tracer 15 and the analysis tool 3 as necessary.
[0096]
By the way, the above-described embodiment is based on the premise that the execution history information 2 includes all information related to the operation of the original program execution machine 1. That is, in the above-described embodiment, the tracer 15 operates continuously in parallel with the execution of the application program.
[0097]
However, depending on the application, the load on the tracer 15 may become heavy. In this case, if the tracer 15 is continuously operated, the execution of the application program may be adversely affected. For this reason, the original program execution machine 1 can operate the tracer 15 intermittently.
[0098]
FIG. 17 is a diagram for explaining processing when the tracer 15 is operated intermittently. Here, it is assumed that a cycle composed of a period in which the tracer 15 is operating and a period in which the tracer 15 is stopped is repeated.
[0099]
The tracer 15 outputs execution history information during the operation period, but does not output it when stopped. For this reason, in order to create a benchmark program for faithfully reproducing the operation of the original program execution machine 1, the analysis tool 3 estimates the operation of the original program execution machine 1 during the period in which the tracer 15 is stopped. There is a need. For example, in the cycle n of FIG. 17, the execution history information at times Ta to Tb is output, but the execution history information at times Tb to Tc is not output. In this case, the analysis tool 3 needs to estimate the execution history of the original program execution machine 1 at times Tb to Tc.
[0100]
The analysis tool 3 estimates the operation of the original program execution machine 1 at times Tb to Tc as follows. However, since it is difficult to completely determine the operation of the original program execution machine 1, the update contents of the memory 12 at times Tb to Tc are estimated here. The updated contents of the memory 12 at the times Tb to Tc are expressed by the difference between the contents of the dynamic memory space at the time Tb and the contents of the memory space created based on the execution history information after the time Tc. The dynamic memory space is a memory space that reflects all the contents of the memory data record in the order of application, and is basically created in a space different from the initial memory space 30. Also, the memory space created based on the execution history information after time Tc is basically created in a space different from the initial memory space 30.
[0101]
The analysis tool 3 writes the data corresponding to the initial memory space 30 based on the execution history information at the times Ta to Tb, and then writes the updated contents of the memory 12 at the times Tb to Tc into the initial memory space 30. Thereafter, the analysis tool 3 repeats the same processing for subsequent cycles. Thereby, even if the tracer 15 operates intermittently, a benchmark program for faithfully reproducing the operation of the original program execution machine 1 is created.
[0102]
As described above, the benchmark program 7 of the present embodiment is a load module that reproduces an instruction sequence when the original program is executed in the original program execution machine 1. At this time, the benchmark program 7 may be a load module representing an instruction sequence when only a part of the original program is executed.
[0103]
The function of creating the benchmark program (load module) 7 is realized by executing a program describing the above-described sequence using a computer. FIG. 18 shows the configuration of a computer 100 that executes the program.
[0104]
The CPU 101 loads a program describing the processing shown in the above sequence from the storage device 102 to the memory 103 and executes it. The storage device 102 is a mass storage device and stores the program. On the other hand, the memory 103 is a semiconductor memory, for example, and is used as a work area of the CPU 101. Note that the initial memory space 30 can be realized using the memory 103.
[0105]
The recording medium driver 104 accesses the portable recording medium 105 according to instructions from the CPU 101. The portable recording medium 105 is, for example, a semiconductor device (PC card or the like), a medium (floppy disk, magnetic tape, etc.) to which information is input / output by magnetic action, or a medium (optical disk) to which information is input / output by optical action. Etc.). The communication control device 106 transmits / receives data to / from the network according to instructions from the CPU 101.
[0106]
Here, the benchmark program 7 is created by the tracer 15 that extracts the execution history information 2 from the original program execution machine 1 and the analysis tool 3 (here, including the correction tool 6) that analyzes the execution history information 2. . The tracer 15 is realized by executing the flowchart of FIG. 3 in the original program execution machine 1. On the other hand, the analysis tool 3 is realized by executing the flowchart of FIG. 12 (including the sequences shown in FIGS. 6 to 11) in the computer 100 shown in FIG. However, the analysis tool 3 is not necessarily realized by a computer different from the original program execution machine 1, and may be realized by the original program execution machine 1.
[0107]
FIG. 19 is a diagram for explaining a program providing method for creating a benchmark program. A program for creating a benchmark program is provided by any of the following three methods, for example.
[0108]
(a) Provided installed on a computer. In this case, the program or the like is preinstalled before shipment, for example.
(b) Provided by being stored in a portable recording medium. In this case, the program stored in the portable recording medium 105 is basically installed in the storage device 102 via the recording medium driver 104.
[0109]
(c) Provided by a server on the network. In this case, basically, the computer 100 obtains the program or the like by downloading the program or the like stored in the server.
[0110]
The created benchmark program may be stored in a portable recording medium such as a CD-ROM and provided to the user, or may be sent to the user terminal via a network.
[0111]
(Appendix 1) A method for creating a test program for evaluating an information processing apparatus,
When an original program is executed using a computer having a processor and a memory, instructions executed by the processor and contents of access to the memory are detected,
Store the detected information as execution history information in time series,
A test program creation method, comprising: creating a load module format program for reproducing an instruction execution sequence executed by the computer based on the execution history information.
[0112]
(Appendix 2) A method for creating a test program for evaluating an information processing apparatus,
When an original program is executed by using a computer having a processor and a memory, an instruction code corresponding to an instruction executed by the processor, instruction information related to the instruction, written to the memory, or read from the memory Detects binary data and access information indicating access contents to the memory,
Store the detected information as execution history information in time series,
By analyzing the execution history information in time series and writing the instruction code based on the instruction information and writing the binary data based on the access information in a memory space prepared in advance, A test program creation method characterized by creating a program.
[0113]
(Appendix 3) A test program creation method according to appendix 2,
The memory space has substantially the same address space as the memory included in the computer.
[0114]
(Appendix 4) A test program creation method according to appendix 2,
When the first instruction, which is an instruction that cannot be executed by the device to which the test program is given, is executed by the computer,
Create a processing routine program that replaces the operation of the computer due to the first instruction and write it to the memory space;
An instruction for calling the processing routine program is written in the memory space instead of the first instruction.
[0115]
(Appendix 5) A test program creation method according to appendix 4,
The first instruction is an I / O instruction.
(Appendix 6) A test program creation method according to appendix 2,
When a second instruction, which is an instruction that may cause different operations between when executed by the computer and when executed by an apparatus provided with the test program, is executed by the computer,
Writing the condition referenced by the processor to the memory space when the second instruction is executed in the computer;
An instruction for calling the condition is written to the memory space instead of the second instruction.
[0116]
(Appendix 7) A test program creation method according to appendix 2,
When the first operation, which is an operation that cannot be performed by the apparatus to which the test program is given, is performed by the computer,
Replacing the third instruction, which is an instruction executed in the vicinity of the timing at which the first operation is performed in the computer, with an instruction to switch the instruction sequence, and writing to the memory space;
Create a processing routine program that substitutes for the first operation and write it to the memory space;
An instruction for replacing the instruction sequence is linked to the processing routine program.
[0117]
(Appendix 8) A test program creation method according to appendix 7,
The first operation is an asynchronous interrupt.
(Appendix 9) A test program creation method according to appendix 7,
The processing routine program includes emulation of the third instruction.
[0118]
(Additional remark 10) It is a test program creation method of Additional remark 2, Comprising:
When a logical address is converted to a real address using a plurality of address conversion tables in the computer,
When the plurality of address conversion tables are referenced, reference information representing the reference contents is stored in time series,
Based on the stored reference information, a plurality of tables corresponding to the plurality of address conversion tables are created, and the result of merging these tables is written into the memory space.
[0119]
(Supplementary note 11) The program creation method according to supplementary note 2,
Estimating the update contents of the memory during a period in which the instruction code, instruction information, binary data, and access information are not detected,
Write the estimated update contents into the memory space.
[0120]
(Supplementary note 12) A system for creating a test program for evaluating an information processing apparatus,
Detecting means for detecting instructions executed by the processor and contents of access to the memory when an original program is executed using a computer having a processor and a memory;
Storage means for storing detected information in time series as execution history information;
Creating means for creating a load module type program that reproduces an instruction execution sequence executed by the computer based on the execution history information;
A test program creation system comprising:
[0121]
(Supplementary note 13) A system for creating a test program for evaluating an information processing apparatus,
When an original program is executed by using a computer having a processor and a memory, an instruction code corresponding to an instruction executed by the processor, instruction information related to the instruction, written to the memory, or read from the memory Detecting means for detecting binary data and access information representing access contents to the memory;
Storage means for storing detected information in time series as execution history information;
By analyzing the execution history information in time series and writing the instruction code based on the instruction information and writing the binary data based on the access information in a memory space prepared in advance, Creating means to create programs and
A test program creation system comprising:
[0122]
(Supplementary note 14) In order to create a test program for evaluating the information processing apparatus,
Instructions executed by the processor detected when the original program is executed using another computer having a processor and a memory, and instructions executed by the other computer based on the access contents to the memory Creation means for creating a load module format program that reproduces the execution sequence,
Test program creation program to function as
[0123]
(Supplementary Note 15) In order to create a test program for evaluating the information processing apparatus,
An instruction code corresponding to an instruction executed by the processor, detected when the original program is executed using a computer having a processor and a memory, instruction information related to the instruction, written into the memory, or from the memory Analysis means for analyzing read binary data and access information representing access contents to the memory;
Based on the analysis result by the analysis means, the instruction code is written to a memory space prepared in advance based on the instruction information and the binary data is written based on the access information. Creation means to create,
Test program creation program to function as
[0124]
(Supplementary Note 16) In order to create a test program for evaluating an information processing apparatus,
Detecting means for detecting instructions executed by a processor of the computer and contents of access to the memory of the computer when the original program is executed using the computer;
Creating means for creating a load module format program for reproducing the instruction execution sequence executed by the computer based on the information detected by the detecting means;
Test program creation program to function as
[0125]
(Supplementary Note 17) In order to create a test program for evaluating the information processing apparatus,
When an original program is executed using the computer, an instruction code corresponding to an instruction executed by the processor, instruction information related to the instruction, binary data written to or read from the memory, and Detection means for detecting access information representing access contents to the memory;
The information detected by the detection means is loaded by writing the instruction code on the basis of the instruction information and writing the binary data on the basis of the access information in a previously prepared memory space based on the time series. Creation means for creating a modular program,
Test program creation program to function as
[0126]
(Supplementary Note 18) In order to create a test program for evaluating the information processing apparatus,
Detecting means for detecting instructions executed by a processor of the computer and contents of access to the memory of the computer when the original program is executed using the computer;
Creating means for creating a load module format program for reproducing the instruction execution sequence executed by the computer based on the information detected by the detecting means;
A computer-readable recording medium in which a test program creation program for functioning as a computer is recorded.
[0127]
(Supplementary note 19) In order to create a test program for evaluating the information processing apparatus,
When an original program is executed using the computer, an instruction code corresponding to an instruction executed by the processor, instruction information related to the instruction, binary data written to or read from the memory, and Detection means for detecting access information representing access contents to the memory;
The information detected by the detection means is loaded by writing the instruction code on the basis of the instruction information and writing the binary data on the basis of the access information in a previously prepared memory space based on the time series. Creation means for creating a modular program,
A computer-readable recording medium in which a test program creation program for functioning as a computer is recorded.
[0128]
(Supplementary note 20) A test program for evaluating an information processing apparatus,
An instruction execution sequence executed by the computer is reproduced based on an instruction executed by the processor detected when the original program is executed using a computer having a processor and a memory and contents of access to the memory Load module test program.
[0129]
【The invention's effect】
According to the present invention, the performance can be accurately evaluated before the information processing apparatus is completed. For this reason, the development period of the information processing apparatus can be shortened. In addition, it is possible to efficiently change the design to bring it closer to the target characteristic.
[Brief description of the drawings]
FIG. 1 is a diagram illustrating an overview of a program creation method according to an embodiment.
FIG. 2 is a configuration diagram of an original program execution machine.
FIG. 3 is a flowchart showing the operation of the tracer.
FIG. 4 is an example of execution history information.
FIG. 5 is a configuration diagram of an initial memory space.
FIG. 6 is an example of a process for writing an instruction code to an initial memory space.
FIG. 7 is a diagram illustrating processing of an analysis tool when a memory update occurs due to an I / O interrupt.
FIG. 8 is a diagram for explaining processing of an analysis tool when a memory update by an I / O instruction occurs.
FIG. 9 is a diagram illustrating processing of an analysis tool when a dynamic information reference instruction is executed.
FIG. 10A is a diagram showing an instruction sequence when an asynchronous interrupt occurs in the original program execution machine, and FIG. 10B is a diagram for explaining a method for realizing the sequence shown in FIG. It is.
FIG. 11 is a diagram for explaining processing of an analysis tool when an asynchronous interrupt occurs.
FIG. 12 is a flowchart for explaining the operation of the analysis tool.
13A is an example of a list for managing interrupt instructions, and FIG. 13B is a diagram illustrating an example of a method for identifying interrupt instructions.
FIG. 14 is a diagram illustrating compression of an address conversion table.
FIG. 15 is a configuration diagram of a system for creating and verifying a benchmark program.
FIG. 16 is a flowchart showing a procedure for determining a process corresponding to each interrupt instruction when a benchmark program is executed;
FIG. 17 is a diagram for explaining processing when the tracer is operated intermittently;
FIG. 18 is a block diagram of a computer that executes a program describing functions of the present invention.
FIG. 19 is a diagram illustrating a method for providing a software program or the like according to the present invention.
[Explanation of symbols]
1 Original program execution machine
2 Execution history information
3 Analysis tools
4 Basic data
5 Correction data
6 Correction tool
7 Benchmark program
11 CPU
12 memory
13 OS
14 Application programs
15 Tracer
21 External devices
30 Initial memory space
31 Basic memory space
32 Memory space for correction

Claims (7)

I/O装置が接続された第1の情報処理装置上でオリジナルプログラムを実行した、少なくとも、命令コード、書き込み先アドレス、参照先アドレスを格納する履歴を利用して、I/O装置が接続されていない第2の情報処理装置を評価するためのテストプログラムを作成する作成プログラムであって、
コンピュータに、
前記オリジナルプログラムによって実行された命令コードと該命令コードの格納アドレスとの組を複数含む前記履歴を、第1記憶部から読み出す手順と、
読み出された前記命令コードがI/O命令でない場合、第2記憶部に書き出すアドレスが該命令コードの格納アドレスであるアドレスに、該命令コードを書き出し、
前記命令コードがI/O命令である場合、該第2記憶部に書き出すアドレスが該命令コードの格納アドレスであるアドレスに、I/O装置へのI/Oアクセスをエミュレートするロードモジュールへ分岐する分岐コードを書き出し、該第2記憶部の該分岐コード先のアドレスに、該ロードモジュールを書き出して、テストプログラムのロードモジュールを作成する手順と、
を実行させるための作成プログラム。
The I / O device is connected using at least the history of executing the original program on the first information processing device to which the I / O device is connected and storing the instruction code, the write destination address, and the reference destination address. A creation program for creating a test program for evaluating a second information processing apparatus that is not,
On the computer,
The history including a plurality of sets of the storage address of the instruction code and the instruction code executed by the original program, the procedure for reading from the first memory unit,
If the read instruction code is not an I / O instruction, the instruction code is written to an address where the address to be written to the second storage unit is the storage address of the instruction code;
If the instruction code is an I / O instruction, branch to the load module that emulates I / O access to the I / O device at an address written to the second storage unit that is the storage address of the instruction code Writing a branch code to be written, writing the load module to the branch code destination address of the second storage unit, and creating a test program load module;
Created program to execute.
前記読み出された前記命令コードが割り込み命令であるときは、該割り込み命令の割り込み先アドレスに対応する前記第2記憶部のアドレスに、該第1記憶部の割り込み先アドレスのデータを書き込むことを特徴とする請求項1に記載の作成プログラム。When the read instruction code is an interrupt instruction, the data of the interrupt destination address of the first storage unit is written to the address of the second storage unit corresponding to the interrupt destination address of the interrupt instruction . The creation program according to claim 1, wherein 前記読み出された前記命令コードが動的情報参照命令であるときは、前記第1記憶部内の動的情報参照命令のアドレスに対応する前記第2記憶部のアドレスに、参照先のデータのロード命令を書き込み、あるいは、前記第2の情報処理装置が該第1の情報処理装置と同等の動作を行なうように、割込属性命令に置き換えると共に、該割込属性命令による割り込みが発生したときに呼び出される、該動的情報参照命令に対応する処理を行なう処理ルーチンプログラムを格納することを特徴とする請求項1または2に記載の作成プログラム。When the read instruction code is a dynamic information reference instruction, the reference destination data is loaded into the address of the second storage unit corresponding to the address of the dynamic information reference instruction in the first storage unit. write the instruction, or the second information processing apparatus to perform the information processing apparatus equivalent to the operation of the first, is replaced with the interrupt attribute instruction, interrupt by該割write attribute command is generated The creation program according to claim 1 or 2, further comprising a processing routine program for performing processing corresponding to the dynamic information reference instruction, which is sometimes called . 前記読み出された前記命令コードの実行後に非同期割り込みを発生し、処理ルーチン呼び出されたときは、前記第1記憶部内の該命令コードに対応する前記第2記憶部のアドレスの命令コードを処理ルーチンを呼び出すための命令に置き換え、該処理ルーチンの先頭には、置き換え命令のエミュレーションデータを付加することを特徴とする請求項1〜3のいずれか1つに記載の作成プログラム。The asynchronous interrupt occurs after execution of said read the instruction code, when the processing routine is called, the instruction code address in the second storage unit corresponding to the instruction code of the first storage unit 4. The creation program according to claim 1, wherein the creation program is replaced with an instruction for calling a processing routine, and emulation data of the replacement instruction is added to a head of the processing routine . 前記コンピュータは、前記第1の情報処理装置である、請求項1〜4のいずれか1つに記載の作成プログラム。  The creation program according to any one of claims 1 to 4, wherein the computer is the first information processing apparatus. I/O装置が接続された第1の情報処理装置上でオリジナルプログラムを実行した、少なくとも、命令コード、書き込み先アドレス、参照先アドレスを格納する履歴を利用して、I/O装置が接続されていない第2の情報処理装置を評価するためのテストプログラムを作成する作成装置であって、
前記オリジナルプログラムによって実行された命令コードと該命令コードの格納アドレスとの組を複数含む前記履歴を、第1記憶部から読み出す手段と、
読み出された前記命令コードがI/O命令でない場合、第2記憶部に書き出すアドレスが該命令コードの格納アドレスであるアドレスに、該命令コードを書き出し、前記命令コードがI/O命令である場合、該第2記憶部に書き出すアドレスが該命令コードの格納アドレスであるアドレスに、I/O装置へのI/Oアクセスをエミュレートするロードモジュールへ分岐する分岐コードを書き出し、該第2記憶部の該分岐コード先のアドレスに、該ロードモジュールを書き出して、テストプログラムのロードモジュールを作成する手段と、
を備える作成装置。
The I / O device is connected using at least the history of storing the instruction code, the write destination address, and the reference destination address when the original program is executed on the first information processing device to which the I / O device is connected. A creation device for creating a test program for evaluating a second information processing device that is not,
Means for reading out the history including a plurality of sets of instruction codes executed by the original program and storage addresses of the instruction codes from the first storage unit;
If the read instruction code is not an I / O instruction, the instruction code is written to an address whose address to be written to the second storage unit is the storage address of the instruction code, and the instruction code is an I / O instruction A branch code that branches to a load module that emulates an I / O access to an I / O device is written to an address whose address to be written to the second storage unit is the storage address of the instruction code, and the second storage Means for writing out the load module to the address of the branch code destination of a section to create a load module of a test program;
A creation device comprising:
I/O装置が接続された第1の情報処理装置上でオリジナルプログラムを実行した、少なくとも、命令コード、書き込み先アドレス、参照先アドレスを格納する履歴を利用して、I/O装置が接続されていない第2の情報処理装置を評価するためのテストプログラムを作成する作成方法であって、
コンピュータに、
前記オリジナルプログラムによって実行された命令コードと該命令コードの格納アドレスとの組を複数含む前記履歴を、第1記憶部から読み出すステップと、
読み出された前記命令コードがI/O命令でない場合、第2記憶部に書き出すアドレスが該命令コードの格納アドレスであるアドレスに、該命令コードを書き出し、前記命令コードがI/O命令である場合、該第2記憶部に書き出すアドレスが該命令コードの格納アドレスであるアドレスに、I/O装置へのI/Oアクセスをエミュレートするロードモジュールへ分岐する分岐コードを書き出し、該第2記憶部の該分岐コード先のアドレスに、該ロードモジュールを書き出して、テストプログラムのロードモジュールを作成するステップと、
を実行させる作成方法。
The I / O device is connected using at least the history of storing the instruction code, the write destination address, and the reference destination address when the original program is executed on the first information processing device to which the I / O device is connected. A creation method for creating a test program for evaluating a second information processing apparatus that is not,
On the computer,
Reading the history including a plurality of sets of instruction codes executed by the original program and storage addresses of the instruction codes from the first storage unit;
If the read instruction code is not an I / O instruction, the instruction code is written to an address whose address to be written to the second storage unit is the storage address of the instruction code, and the instruction code is an I / O instruction A branch code that branches to a load module that emulates an I / O access to an I / O device is written to an address whose address to be written to the second storage unit is the storage address of the instruction code, and the second storage Writing the load module to the branch code destination address of a section to create a test program load module;
How to create.
JP2001202323A 2001-07-03 2001-07-03 Method and apparatus for creating test program for evaluating information processing apparatus, and program describing processing for the same Expired - Fee Related JP4503203B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001202323A JP4503203B2 (en) 2001-07-03 2001-07-03 Method and apparatus for creating test program for evaluating information processing apparatus, and program describing processing for the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001202323A JP4503203B2 (en) 2001-07-03 2001-07-03 Method and apparatus for creating test program for evaluating information processing apparatus, and program describing processing for the same

Publications (2)

Publication Number Publication Date
JP2003015914A JP2003015914A (en) 2003-01-17
JP4503203B2 true JP4503203B2 (en) 2010-07-14

Family

ID=19039145

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001202323A Expired - Fee Related JP4503203B2 (en) 2001-07-03 2001-07-03 Method and apparatus for creating test program for evaluating information processing apparatus, and program describing processing for the same

Country Status (1)

Country Link
JP (1) JP4503203B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4874916B2 (en) * 2007-09-28 2012-02-15 株式会社東芝 Content emulation apparatus and content emulation method
JP4634525B2 (en) 2007-10-15 2011-02-16 富士通株式会社 Simulation method, simulation program, and simulation apparatus
JP5200675B2 (en) * 2008-06-11 2013-06-05 富士通株式会社 SIMULATION DEVICE, SIMULATION METHOD, SIMULATION PROGRAM, AND COMPUTER-READABLE RECORDING MEDIUM CONTAINING THE PROGRAM
JP5298967B2 (en) * 2009-03-06 2013-09-25 富士通株式会社 Verification support program, information processing apparatus, and verification support method
WO2011018828A1 (en) * 2009-08-14 2011-02-17 富士通株式会社 Device for creating program and method for creating program

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2919302B2 (en) * 1995-05-08 1999-07-12 株式会社エヌイーシー情報システムズ CPU simulation method
JP3295803B2 (en) * 1997-05-20 2002-06-24 株式会社日立製作所 Processor method Performance measurement method

Also Published As

Publication number Publication date
JP2003015914A (en) 2003-01-17

Similar Documents

Publication Publication Date Title
US6678883B1 (en) Apparatus and method for creating a trace file for a trace of a computer program based on loaded module information
US5870607A (en) Method and apparatus for selective replay of computer programs
EP1172729B1 (en) Apparatus and method for cataloguing symbolic data for use in performance analysis of computer programs
US6766511B1 (en) Apparatus and method for performing symbolic resolution of modules using static representations of a trace
US20100115494A1 (en) System for dynamic program profiling
US20050097399A1 (en) Techniques for managed code debugging
US20080189529A1 (en) Controlling instruction execution in a processing environment
KR20090071596A (en) Generating a transition system for use with model checking
US20070011664A1 (en) Device and method for generating an instruction set simulator
US10614227B2 (en) Method and system for identifying functional attributes that change the intended operation of a compiled binary extracted from a target system
US6708169B1 (en) Apparatus and method for generating a merged symbol file for verifying symbolic data
JP2006185211A (en) Program analysis system, test execution device, and analysis method and program thereof
US10839124B1 (en) Interactive compilation of software to a hardware language to satisfy formal verification constraints
CN111428233A (en) Security analysis method for embedded equipment firmware
US7624381B1 (en) Portable detection of start and completion of object construction
JP4503203B2 (en) Method and apparatus for creating test program for evaluating information processing apparatus, and program describing processing for the same
JP6890557B2 (en) Analytical model creation system, programming device and analytical model creation method
JPH03118635A (en) Incremental compiler for source code developing system
CN112905474B (en) Hardware-based advanced program dynamic control flow tracking method and device
US20030070117A1 (en) Simulation apparatus and simulation method
JP4125053B2 (en) Log acquisition method
JPH10320212A (en) Cache optimizing method
JP2004326237A (en) Test case creation device, test case creation method, test case, and test method
JP2009064125A (en) Server device and program thereof
JP2000207226A (en) Code optimizing device, language processor, and code optimization method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20061218

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090109

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20091027

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20091218

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100126

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100326

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20100420

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100421

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20130430

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20140430

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees