JP5874433B2 - Trace coupling device and program - Google Patents
Trace coupling device and program Download PDFInfo
- Publication number
- JP5874433B2 JP5874433B2 JP2012034559A JP2012034559A JP5874433B2 JP 5874433 B2 JP5874433 B2 JP 5874433B2 JP 2012034559 A JP2012034559 A JP 2012034559A JP 2012034559 A JP2012034559 A JP 2012034559A JP 5874433 B2 JP5874433 B2 JP 5874433B2
- Authority
- JP
- Japan
- Prior art keywords
- instruction
- trace
- trace data
- synchronization
- unit
- 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
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
Description
本発明は、性能シミュレーションで複数のプロセッサが搭載されたシステムを評価するための複数のプロセッサのトレースを結合するトレース結合装置及びプログラムに関する。 The present invention relates to a trace combining device and a program for combining traces of a plurality of processors for evaluating a system in which a plurality of processors are mounted in performance simulation.
従来より、プロセッサのアーキテクチャ検討時の性能見積りのために性能シミュレータが使用されている。ベンチマークテスト等のプログラムを実行した際に、プロセッサが処理したすべての命令を含むトレースデータを取得しておく。そして、そのトレースデータとアーキテクチャに関するパラメータ(キャッシュサイズ、キャッシュプロトコル、パイプライン仕様等)とを性能シミュレータに入力して起動することで、トレースデータに基づく性能シミュレーションが実行され、評価対象のプロセッサのキャッシュヒット率、CPI(Clock Per Instruction)等の性能情報を出力する。そして、様々なパラメータを試しながら最適なアーキテクチャを決定していくことが行われている。 Conventionally, a performance simulator has been used for performance estimation when examining a processor architecture. When a program such as a benchmark test is executed, trace data including all instructions processed by the processor is acquired. Then, the trace data and architecture parameters (cache size, cache protocol, pipeline specifications, etc.) are input to the performance simulator and started, and a performance simulation based on the trace data is executed, and the cache of the evaluation target processor is executed. Outputs performance information such as hit rate and CPI (Clock Per Instruction). Then, the optimum architecture is determined while trying various parameters.
そして、近年、マルチプロセッサやマルチコア等の複数のコアが同時に動作する際のシミュレーションが行われている。シングルコア、即ち、CPU(Central Processing Unit)1個のシミュレーションを行う場合は、1つのトレースデータを順次入力することで、性能シミュレーションを実行できる。しかしながら、マルチコア等の場合、命令の並列実行が可能であるプロセッサである場合には、プロセッサ間通信中に処理が進むことによりトレースデータが動的に変わる可能性があること、シングルプロセッサ用のシミュレータを用いた場合、各プロセッサのトレースデータをその都度採取してシミュレーションを行うと、シミュレーションに要する時間が膨大になるという問題があった。 In recent years, simulations have been performed when a plurality of cores such as multiprocessors and multicores operate simultaneously. When performing simulation of a single core, that is, one CPU (Central Processing Unit), performance simulation can be executed by sequentially inputting one trace data. However, in the case of a multi-core or the like, if the processor is capable of executing instructions in parallel, the trace data may change dynamically as processing proceeds during inter-processor communication, and a simulator for a single processor However, if the simulation is performed by collecting the trace data of each processor each time, there is a problem that the time required for the simulation becomes enormous.
プロセッサ毎に採取された実行トレースデータから、プロセッサ内での実質的な処理実行時間を見積もり、プロセッサ毎に見積もられた処理実行時間を用いてマルチプロセッシングシステムのシミュレーションを行い、そのシミュレーション結果に基づいてマルチプロセッシングシステムの性能を評価すること等が提案されている。 Based on the execution trace data collected for each processor, the actual processing execution time in the processor is estimated, and the multiprocessing system is simulated using the processing execution time estimated for each processor. It has been proposed to evaluate the performance of multiprocessing systems.
しかしながら、上述した従来技術では、各プロセッサのトレースデータ毎に処理実行時間を見積もったものであるため、搭載されるプロセッサの数に相当するトレースデータを転送するための経路が必要となる。従って、性能シミュレーションにおいて、トレースデータの転送に係る構成がプロセッサ数に依存してしまうと言った問題があった。 However, in the above-described prior art, since the processing execution time is estimated for each trace data of each processor, a path for transferring the trace data corresponding to the number of installed processors is required. Therefore, in the performance simulation, there is a problem that the configuration related to the transfer of trace data depends on the number of processors.
よって、本発明の目的は、性能シミュレーションで複数のプロセッサが搭載されたシステムを評価するための複数のプロセッサのトレースを結合するトレース結合装置及びプログラムを提供することである。 Accordingly, an object of the present invention is to provide a trace combining device and a program for combining traces of a plurality of processors for evaluating a system in which a plurality of processors are mounted in performance simulation.
開示の技術は、一つのシステムで動作する複数のプロセッサの夫々に対応する複数のトレースデータを記憶した記憶部と、前記記憶部に記憶された前記複数のトレースデータの1つを所定順に従って選択し、各トレースデータからトレースされた命令を1つずつ読み込みながら、同期命令毎に区切って並べ替え、前記記憶部内の転送用トレースデータに追加することによって、各プロセッサのトレースを結合するトレース結合処理部とを有するトレース結合装置のように構成される。 In the disclosed technique, a storage unit storing a plurality of trace data corresponding to each of a plurality of processors operating in one system, and one of the plurality of trace data stored in the storage unit is selected in a predetermined order Trace combining processing for combining the traces of the respective processors by reading the instructions traced from the respective trace data one by one, sorting and rearranging them for each synchronous instruction, and adding them to the transfer trace data in the storage unit Configured as a trace coupling device.
また、上記課題を解決するための手段として、コンピュータに上記トレース結合装置として機能させるためのプログラム、そのプログラムを記録した記録媒体、及びトレース結合方法とすることもできる。 Further, as means for solving the above-mentioned problems, a program for causing a computer to function as the trace coupling device, a recording medium recording the program, and a trace coupling method can be used.
開示の技術では、複数のプロセッサの夫々に対応する複数のトレースデータに含まれる同期命令で区切って並べ替えて、前記複数のトレースデータが結合された一つの転送用トレースデータが作成される。性能シミュレーションにおいて、このように同期命令で区切って並べ替えて作成された転送用トレースデータを用いることによって、各プロセッサへの同期命令が全て終了した後に、同期命令後の命令が入力されるようにすることができる。 In the disclosed technique, one transfer trace data in which the plurality of trace data are combined is created by dividing and rearranging the synchronization commands included in the plurality of trace data corresponding to each of the plurality of processors. In the performance simulation, by using the transfer trace data created by separating and rearranging with the synchronous instruction in this way, the instruction after the synchronous instruction is input after all the synchronous instructions to each processor are completed. can do.
以下、本発明の実施の形態を図面に基づいて説明する。発明者は、マルチプロセッサやマルチコア等の複数のプロセッサ(CPU(Central Processing Unit))が同時に動作するシステムを評価するための性能シミュレーションの処理性能が、低下する原因となる同期命令を含むトレースデータを用いた場合について、処理性能が低下する現象について解析した。本実施の形態では、同期命令を含むトレースデータを用いた場合であっても、その処理性能を改善することができるトレースデータを作成することについて説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings. The inventor obtains trace data including a synchronous instruction that causes a decrease in processing performance of performance simulation for evaluating a system in which a plurality of processors (CPU (Central Processing Unit)) such as a multiprocessor and a multicore operate simultaneously. When it was used, the phenomenon that the processing performance deteriorated was analyzed. In this embodiment, generation of trace data that can improve the processing performance even when trace data including a synchronization instruction is used will be described.
まず、性能シミュレーションに係る基本構成について、図1で説明する。図1に示すシステム1000において、トレースデータ2とアーキテクチャ設定情報4とを性能シミュレータ5に入力し、性能シミュレータ5を動作させることによって、性能シミュレータ5から評価対象のプロセッサに係る性能情報レポート8が出力される。
First, a basic configuration related to performance simulation will be described with reference to FIG. In the system 1000 shown in FIG. 1, when the
トレースデータ2は、事前に実機又はISS(Instruction Set Simulator)等でプログラムを実行して取得した、実行順の命令3を含むデータファイルである。命令3は、PC(Program Counter)、命令、アドレス、データを示すデータである。アーキテクチャ設定情報4は、キャッシュサイズ、キャッシュプロトコル、パイプライン仕様等の評価対象のプロセッサに係るパラメータを示す。
The
性能シミュレータ5は、実際に命令を実行せずにパイプライン、メモリアクセス等のタイミングをシミュレーションする。性能シミュレータ5は、後述されるように、ソフトウェア又はハードウェアによって実現される。
The
性能情報レポート8は、CPI(Clock per Instruction)、キャッシュヒット率等を含む性能評価結果を示す。
The
図1に示す性能シミュレータ5がソフトウェア(プログラム)で実現されるシステム1000aにおいて、そのソフトウェアを実行するためのコンピュータ装置100aのハードウェア構成を図2で示す。図2に示すシステム1000aでは、コンピュータ装置100aが性能シミュレータ5として動作するためのハードウェア構成が示される。
In a system 1000a in which the
コンピュータ装置100aは、CPU11と、ROM(Read-Only Memory)12と、RAM(Random Access Memory)13と、ハードディスクドライブ14と、入力装置15と、出力装置16と、通信I/F17と、ドライブ18とを有し、それらはバスBに接続される。
The
CPU11は、ROM12又はRAM13に格納されたプログラムに従ってコンピュータ装置100aを制御する。主記憶装置としてのROM12及びRAM13は、CPU11にて実行されるプログラム、CPU11での処理に必要なデータ、CPU11での処理にて得られたデータ等を格納する。また、RAM13の一部の領域が、CPU11での処理に利用されるワークエリアとして割り付けられる。補助記憶装置としてのハードディスクドライブ14には、各種処理を実行するプログラム等のデータが格納される。
The
記憶部30は、ROM12、RAM13、ハードディスクドライブ14等の記憶領域を有する。記憶部30は、トレースデータ2、アーキテクチャ設定情報4、性能情報レポート8等を記憶する。
The
入力装置15は、マウス、キーボード等を有し、ユーザがコンピュータ装置100aが処理を行なうための必要な各種情報を入力するために用いられる。出力装置16は、LCD(Liquid Crystal Display)又はCRT(Cathode Ray Tube)等の表示装置や、プリンタ等を有し、CPU11の制御のもとに必要な各種情報を表示、又は/及び、ユーザからの指示に応じて各種情報を出力する。性能情報レポート8が出力装置16に表示又は/及び出力される。
The
通信I/F17は、例えばインターネット、LAN(Local Area Network)等に接続するためのインターフェースであり、外部装置との間の通信制御をするための装置である。
The communication I /
コンピュータ装置100aによって行われる処理を実現するプログラムは、例えば、CD−ROM(Compact Disc Read-Only Memory)等の記憶媒体19によってコンピュータ装置100aに提供される。即ち、プログラムが保存された記憶媒体19がドライブ18にセットされると、ドライブ18が記憶媒体19からプログラムを読み出し、その読み出されたプログラムがバスBを介してハードディスクドライブ14にインストールされる。そして、プログラムが起動されると、ハードディスクドライブ14にインストールされたプログラムに従ってCPU11がその処理を開始する。
A program that implements processing performed by the
尚、プログラムを格納する媒体としてCD−ROMに限定するものではなく、コンピュータが読み取り可能な媒体であればよい。コンピュータ読取可能な記憶媒体として、CD−ROMの他に、DVDディスク、USBメモリ等の可搬型記録媒体、フラッシュメモリ等の半導体メモリであっても良い。 The medium for storing the program is not limited to a CD-ROM, and any medium that can be read by a computer may be used. As a computer-readable storage medium, in addition to a CD-ROM, a portable recording medium such as a DVD disk or a USB memory, or a semiconductor memory such as a flash memory may be used.
また、コンピュータ装置100aによって行われる処理を実現するプログラムが、通信I/F17を介して外部装置から提供されてもよい。或いは、外部装置へ該プログラムを提供し、後述される各処理は外部装置で実現されるように構成してもよい。通信I/F17による通信は無線又は有線に限定されるものではない。
Further, a program that realizes processing performed by the
図3は、図2のコンピュータ装置100aの機能構成の概要を説明するための図である。図3では、複数コアの例として、CPUが4個の場合を例示しているが、個数を限定するものではない。以下の図においても同様である。
FIG. 3 is a diagram for explaining an outline of a functional configuration of the
図3において、CPU0〜CPU3が評価対象である場合、各CPU0〜CPU3に対応するトレースデータ200〜203が記憶部30に用意され格納される。トレースデータ200はCPU0用のトレースデータであり、トレースデータ201はCPU1用のトレースデータであり、トレースデータ202はCPU2用のトレースデータであり、トレースデータ203はCPU3用のトレースデータである。
In FIG. 3, when
コンピュータ装置100aは、CPU11が所定のプログラムを実行することによって性能シミュレーション部50aを実現する。性能シミュレーション部50aは性能シミュレータ5に相当する機能を行う処理部である。
The
性能シミュレーション部50aは、ハードウェア記述言語等で表現されたCPUモデルとしての各CPU0〜CPU3等を有する。この例では、モデルとしてCPU0〜CPU3のみを例示しているが、性能シミュレーション部50aは、メモリ、バス等のモデルを含んでいる。 The performance simulation unit 50a includes the CPU0 to CPU3 as CPU models expressed in a hardware description language or the like. In this example, only CPU0 to CPU3 are illustrated as models, but the performance simulation unit 50a includes models such as a memory and a bus.
トレースデータ200〜203が、記憶部30から性能シミュレーション部50aに入力されることによって、性能シミュレーション部50aが各CPU0〜CPU3の性能を評価する。性能シミュレーション部50aによる性能評価の結果を示す性能情報レポート8が、記憶部30に出力され格納される。
When the
次に、図1に示す性能シミュレータ5が専用装置等のハードウェアで実現されるシステム1000bのハードウェア構成を図4で示す。図4に示すシステム1000bは、コンピュータ装置100bと、性能シミュレーション装置50bとを有する。図4に示すコンピュータ装置100bのハードウェア構成のうち、図2に示すコンピュータ装置100aと同様のハードウェアには同様の符号を付し、その説明を省略する。
Next, FIG. 4 shows a hardware configuration of a system 1000b in which the
図2に示すコンピュータ装置100aとの違いにおいて、コンピュータ装置100bは、性能シミュレーション装置50bに対して上位装置であるホストPC(Personal Computer)であり、コンピュータ装置100aのハードウェア構成に加えて、更に、性能シミュレーション装置50bと接続し通信するための性能シミュレーション装置I/F20を有している。
In contrast to the
性能シミュレーション装置I/F20を介して、コンピュータ装置100bの記憶部30からトレースデータ2、アーキテクチャ設定情報4等が、性能シミュレーション装置50bへ入力され、性能シミュレーション装置50bによって性能評価が行われる。
性能シミュレーション装置50bによって実行された性能評価の結果を示す性能情報レポート8は、性能シミュレーション装置I/F20を介してコンピュータ装置100bの記憶部30に格納される。
The
性能シミュレーション装置50bは、FPGA(Field-Programmable Gate Array)等の装置であり、上位装置としてのコンピュータ装置100bから必要な情報を入力し、評価対象のプロセッサの性能を評価し、その結果を示す性能情報レポート8を出力する。
The
図5は、図4のシステム1000bの構成概要を説明するための図である。図5において、性能シミュレーション装置50bは、性能シミュレータ5と、I/F51bと、I/F52bとを有する。
FIG. 5 is a diagram for explaining the outline of the configuration of the system 1000b of FIG. In FIG. 5, the
性能シミュレータ5は、ハードウェア記述言語によるモデルとして表現されるCPU0〜CPU3の各々の動作に合わせて夫々対応するトレースデータ200〜203の命令3を読み込みながらシミュレーションを行う。
The
I/F51bは、ホストPCであるコンピュータ装置100bから各トレースデータ200〜203を受信して性能シミュレータ5へ入力するためのインターフェースである。I/F51bから入力されたトレースデータ200〜203に従って、対応するCPU0〜CPU3がシミュレーションされる。
The I /
I/F52bは、性能シミュレータ5が行ったCPU0〜CPU3の評価結果を示す性能情報レポート8を外部装置へ出力するためのインターフェースである。外部装置がコンピュータ装置100bである場合、性能情報レポート8は、I/F52bを介して、コンピュータ装置100bへ転送されて記憶部30に格納される。記憶部30に格納された性能情報レポート8は、CPU11の制御によって、出力装置16に結果表示として出力される。又は、I/F52bがコンピュータ装置100b以外の結果表示用の外部装置に接続される場合には、性能情報レポート8が外部装置で表示されてもよい。
The I /
このようなシステム1000bの構成では、各CPU0〜CPU3毎にホストPCのコンピュータ装置100bとの経路を用意し、夫々の経路で独立にデータ転送を行う。従って、コア数が増えるに従ってPCI-Express等の転送経路で必要となるリソースが増加していくため、費用が掛かってしまう。
In such a configuration of the system 1000b, a route to the
そこで、複数コアの夫々に対応するトレースデータ200〜203を1つの経路で入力することが考えられる。図6は、複数コアのトレースデータを1つの経路で入力するための構成例を示す図である。
Therefore, it is conceivable to input
図6に示すシステム1000cでは、複数コアに相当するCPU0〜CPU3の夫々に対応するトレースデータ200〜203は、1つの経路でI/F51bに入力される。そのため、性能シミュレーション装置50bは、トレース受信部6を更に有する。
In the system 1000c shown in FIG. 6, the
性能シミュレーション装置50bでは、記憶部30にトレースデータ2bが用意され格納される。トレースデータ2bに含まれる命令3bは、性能シミュレータ5のCPU0〜CPU3を特定するためのCPU番号、PC(Program Counter)、命令、アドレス、データ等を示す。
In the
トレース受信部6は、振り分け処理部6bと、性能シミュレータ5のCPU0〜CPU3の夫々に対応するバッファ0〜3とを有する。トレース受信部6は、ホストPCであるコンピュータ装置100bからシリアルに転送されてくるトレースデータ2bを受信し、各命令3bのCPU番号に対応するCPU用のバッファに命令を書き込む処理を行う。書き込もうとしたバッファがフルの時には、それ以上、トレースデータ2bを読み込まずにそのバッファが空くまで待つ。
The
振り分け処理部6bは、I/F51bを介して入力される各命令3bのCPU番号に基づいて、対応するバッファ0〜3の一つに格納する。例えば、命令3bのCPU番号がCPU0を指定する場合、命令3bはバッファ0に格納され、性能シミュレータ5のCPU0に与えられる。
The distribution processing unit 6b stores it in one of the
トレースデータ200〜203を1つの経路で転送する方法として、以下に説明する、転送時に複数コア(CPU0〜CPU3)の命令3bを並べ替える構成(図7)と、コア毎のトレースデータを予め格納しておくためのバッファを有する構成(図8)、複数コア(CPU0〜CPU3)間でトレースデータの命令3bを並べ替えて一つのトレースを作成しておく構成(図9)が考えられる。
As a method of transferring the
図7は、転送時に命令を並べ替える構成例を示す図である。図7に示す構成では、ホストPCであるコンピュータ装置100bは、転送処理部33を有する。コンピュータ装置100bでは、事前に命令3bを並べ替えることをせず、性能シミュレータ5からの各CPU0〜3の命令フェッチ時に送信されるリクエストに応じて、転送処理部33が、1命令単位で、対応するトレースデータから命令3bを取得する。
FIG. 7 is a diagram illustrating a configuration example in which instructions are rearranged at the time of transfer. In the configuration illustrated in FIG. 7, the
このような構成の場合、性能シミュレータ5がリクエストを出してから命令3bを含む応答があるまでの間、性能シミュレータ5の動作を停止しておくことで、実機と同じタイミングで実行することができる。しかし、1命令ごとにコンピュータ装置100b(ホストPC)との間で転送を行うため、転送処理部33による処理がボトルネックとなり実行速度を十分に得られない。
In such a configuration, the
図8は、コア毎のバッファを有する構成例を示す図である。図8に示す構成では、性能シミュレーション装置50bにおいて、トレース受信部6は、性能シミュレータ5のCPU0〜3の夫々に対応させてトレースサイズ分のバッファ0〜3を有する。
FIG. 8 is a diagram illustrating a configuration example having a buffer for each core. In the configuration shown in FIG. 8, in the
CPU0〜3の夫々に対応するトレースデータ200〜203は、性能シミュレータ5の動作が開始される前に、I/F51bを介してコンピュータ装置100b(ホストPC)から転送され、トレース受信部6のバッファ0〜3に格納される。しかし、この構成では、一般に、トレースデータのサイズが大きくなる(例えば、GB単位のサイズの)場合が多いため、性能シミュレーション装置50b側で全てを保持することは難しいと考えられる。
The
図9は、命令を並べ替えて一つのトレースを作成しておく構成例を示す図である。図9に示す構成では、性能シミュレータ5の動作の開始前に、コンピュータ装置100b(ホストPC)側で、各CPU0〜3の命令3bをトレースデータ200〜203から並べ替えて一つの並べ替え済みトレースデータ210を、記憶部30に用意しておく。
FIG. 9 is a diagram illustrating a configuration example in which instructions are rearranged to create one trace. In the configuration shown in FIG. 9, before the
性能シミュレータ5の実行時には、コンピュータ装置100b(ホストPC)の転送処理部33は、一つの並べ替え済トレースデータ210の先頭から順に命令3bを転送するのみでよく、転送速度の低下を防ぐことができる。
When the
次に、並べ替え済トレースデータ210に関して、複数コアの命令3を単純に並べ替えた例について説明する。図10は、実機での命令の実行タイミングを説明するための図である。図10において、CPU0〜CPU3の4つのCPUで夫々CPUn−0からCPUn−9までの順で、10個の命令を実行し、各命令の位置は、実機の実行タイミング9を示している。
Next, an example in which
例えば、CPU0の場合、クロックサイクル1でCPU0−0命令、サイクル3でCPU0−1命令、サイクル4でCPU0−2命令、サイクル6でCPU0−3命令、・・・のタイミングで実行される様子を示している。実行間隔が空く原因としては、キャッシュミス、データ依存待ち、分岐命令で分岐した場合等の様々な要因がある。
For example, in the case of CPU0, CPU0-0 instruction in
トレースデータでは命令間のタイミング情報を持たない。一方、実機の実行タイミング9では、同じ10命令であっても、各命令の遅延がコア毎に異なり、命令フェッチのタイミングが異なる。
Trace data does not have timing information between instructions. On the other hand, at the
CPU0からCPU3への順に、実行順序に従って、1命令ずつを取り出すこと(点線矢印の方向)を繰り返して、単純に並び替えた例を図11で説明する。図11は、単純に並べ替えたトレースデータを用いた実行タイミングを説明するための図である。
FIG. 11 illustrates an example of simple rearrangement in which the instructions are fetched one by one (in the direction of the dotted arrow) in the order from the
図11において、並べ替え済トレースデータ210を用いた場合、図10に示すように実際の命令実行時の遅延に加えて、並べ替えによるトレースの順序に依存した遅延が発生する。例えば、図10に示す実機の実行タイミング9では、CPU1−2命令よりも先にCPU2−2命令が実行されているが、図11では、入力されたトレースの順序がCPU1−2−>CPU2−2となっているため、CPU2−2命令はCPU1−2命令が実行されるまで入力できない状態となる。
In FIG. 11, when rearranged
また、トレースの順序に応じて遅延が追加されていき、実機の実行タイミング9と、性能シミュレーションによる実行タイミングとの誤差が大きくなっていく。
In addition, a delay is added according to the trace order, and an error between the
図12は、実機と、図11の並べ替え済トレースデータを用いた性能シミュレーションの場合の実行タイミングのずれを示す図である。実機と性能シミュレータ5とにおける実行タイミングの比較において、図12(A)はCPU0の実行タイミングのずれを示し、図12(B)はCPU1の実行タイミングのずれを示し、図12(C)はCPU2の実行タイミングのずれを示し、図12(D)はCPU3の実行タイミングのずれを示している。
FIG. 12 is a diagram illustrating a deviation in execution timing between the actual machine and the performance simulation using the rearranged trace data of FIG. In the execution timing comparison between the actual machine and the
10個の命令を終了した時点において、図12(A)では、性能シミュレータ5によるCPU0の性能シミュレーションは、実機と比べてd0遅れて終了している。図12(B)では、性能シミュレータ5によるCPU1の性能シミュレーションは、実機と比べてd1遅れて終了している。図12(C)では、性能シミュレータ5によるCPU2の性能シミュレーションは、実機と比べてd2遅れて終了している。図12(D)では、性能シミュレータ5によるCPU3の性能シミュレーションは、実機と比べてd3遅れて終了している。
At the time when 10 instructions are completed, in FIG. 12A, the performance simulation of the
この例では、CPU0〜3の夫々で実行タイミングのずれが発生しているが、性能シミュレーションの実行自体は完了している。
In this example, the execution timings of each of the
上述したような実行タイミングのずれに関して、マルチプロセッサの場合にはバリア同期命令等の複数のCPU間で同期を取る同期命令が使われる場合が多い。その場合、単純並べ替えで転送するとタイミングがずれるだけでなく、性能シミュレーションの途中で停止してしまう場合が発生する。その例を図13で説明する。 Regarding the above-described shift in execution timing, in the case of a multiprocessor, a synchronization instruction that synchronizes between a plurality of CPUs such as a barrier synchronization instruction is often used. In that case, when the transfer is performed by simple rearrangement, not only the timing is shifted, but also a case where the process stops during the performance simulation occurs. An example thereof will be described with reference to FIG.
図13は、プログラムに同期命令が含まれる場合の実行タイミングを説明するための図である。図13に示す実行タイミングにおいて、CPU0−4命令、CPU1−4命令、CPU2−2命令、及びCPU3−6命令が同期命令である場合を示している。同期命令は、指定された複数のCPU間で同時に完了する必要がある。つまり、同期命令の次の命令は、同期するように全てのCPUで同時に実行される。このような同期により、同じメモリ領域でデータ共有される場合にデータの正しいことを保証することができる。 FIG. 13 is a diagram for explaining execution timing when a synchronization instruction is included in a program. In the execution timing shown in FIG. 13, the CPU0-4 instruction, the CPU1-4 instruction, the CPU2-2 instruction, and the CPU3-6 instruction are synchronous instructions. The synchronization instruction needs to be completed simultaneously among a plurality of designated CPUs. That is, the instruction next to the synchronization instruction is executed simultaneously by all the CPUs so as to synchronize. Such synchronization can ensure that the data is correct when data is shared in the same memory area.
図13に示す実行タイミングにおいて、例えば、CPU1がCPU1−3命令で共有メモリ領域にデータを書き込み、CPU0、CPU2、及びCPU3が前記命令による書き込みが確実に完了した後で、CPU0−5命令、CPU2−3命令、CPU3−7命令によって、共有メモリ領域を読み出すために、CPU0−4命令、CPU1−4命令、CPU2−2命令、CPU3−6命令の同期命令が挿入されているとする。
At the execution timing shown in FIG. 13, for example, after the
この例では、最後の同期命令となるCPU1−4の実行後に、各CPU0〜CPU3で次の命令CPU0−5、CPU1−5、CPU2−3、及びCPU3−7が実行される。 In this example, after execution of CPU1-4 which is the last synchronization instruction, each of CPU0 to CPU3 executes the next instruction CPU0-5, CPU1-5, CPU2-3 and CPU3-7.
このような場合、図11で説明した単純な並べ替えの方法では、図13で示すように、同期命令によって各CPU0〜CPU3の処理が待ち状態になり、更に、性能シミュレータ5の動作が途中で停止してしまう場合がある。
In such a case, in the simple rearrangement method described with reference to FIG. 11, as shown in FIG. 13, the processing of each of the
図14は、性能シミュレータ5の動作が停止してしまう場合を説明するための図である。図14において、並べ替え済トレースデータ210からCPU0−0命令、CPU1−0命令、CPU2−0命令、CPU3−0命令、CPU0−1命令、・・・という順で性能シミュレーション装置50bのトレース受信部6に入力され、各命令のCPU番号に従って対応するCPU用のバッファに振り分けられた後、性能シミュレータ5に入力される。図14では、説明を簡潔にするため、バッファサイズを1命令分とする。
FIG. 14 is a diagram for explaining a case where the operation of the
CPU2−2命令を実行した後、全ての同期命令(CPU0−4命令、CPU1−4命令、及びCPU3−6命令)が実行されるまで、CPU2では、次の命令(CPU2−3)が実行されない。 After the CPU2-2 instruction is executed, the next instruction (CPU2-3) is not executed in the CPU2 until all synchronous instructions (CPU0-4 instruction, CPU1-4 instruction, and CPU3-6 instruction) are executed. .
並べ替え済トレースデータ210は、所定のCPUの順に1命令ずつを繰り返して並べているため、CPU2−2命令の後、CPU3−2命令、CPU0−3命令、CPU1−3命令と順に入力された後、CPU2−3命令がバッファ2に入った時点で、CPU2は、他のCPU0、2及び3で同期命令(CPU0−4命令、CPU1−4命令、及びCPU3−6命令)が実行されるのを待つ状態となる。CPU2は、命令フェッチを行わずに止まってしまう。
Since the rearranged
その後、更に、CPU3−3命令、CPU0−4命令、CPU1−4命令と入力された後、CPU2−4命令をバッファに入力できなくなり、そこで各CPU0〜CPU3による実行が止まり、性能シミュレータ5による性能シミュレーション全体の処理が停止してしまう。 Thereafter, after the CPU3-3 instruction, the CPU0-4 instruction, and the CPU1-4 instruction are further input, the CPU2-4 instruction cannot be input to the buffer, and the execution by each of the CPU0 to CPU3 is stopped. The entire simulation process stops.
発明者によって、上述したように、同期命令を含むトレースデータを単純に並べ替えて用いた場合に性能シミュレーションの処理が停止してしまう仕組みが解析された。そして、発明者は、以下に説明する本実施例に係るトレースデータ作成方法を見出した。 As described above, the inventor has analyzed a mechanism in which the performance simulation process stops when the trace data including the synchronization command is simply rearranged and used. And the inventor discovered the trace data creation method which concerns on a present Example demonstrated below.
本実施例に係るトレースデータ作成方法について説明する。図15は、トレースデータ作成方法の概要を説明するための図である。トレースデータ作成方法は、コンピュータ装置100a又は100bのCPU11によって行われる。
A trace data creation method according to the present embodiment will be described. FIG. 15 is a diagram for explaining the outline of the trace data creation method. The trace data creation method is performed by the
図15において、所定順に各CPU0〜3のトレースデータ200〜203からトレースされた順に1ずつ命令を取り出して転送用トレースデータ300に追加する。その際、取り出した命令が同期命令の場合、同期命令の現われたCPUのトレースデータから転送用トレースデータ300への命令の追加を行わずにスキップして、全ての同期命令が転送用トレースデータ300に追加された後、所定順に従って各トレースデータ200〜203から同期命令以降の命令の転送用トレースデータ300への追加を再開する。
In FIG. 15, instructions are fetched one by one from the
図15の例では、最初の同期命令CPU2−2が現われて、全ての同期命令CPU0−4、CPU1−4、及びCPU3−6を転送用トレースデータ300に追加するまでの、CPU0−0からCPU3−6までが最初の同期命令CPU2−2に基づく区切りとなり、同期命令CPU2−2に対応する最後の同期命令CPU3−6直後の区切り7で示している。
In the example of FIG. 15, the first synchronization instruction CPU 2-2 appears and CPU 0-0 to
また、最後の同期命令CPU3−6直後から、スキップした命令を含めて、所定順に各トレースデータ200〜203から同期命令以降の命令を1ずつ取り出して、転送用トレースデータ300に追加する。
Also, immediately after the last synchronization instruction CPU 3-6, one instruction after the synchronization instruction is taken out from each
従って、図15の例では、最初の同期命令CPU2−2の後には、全ての他CPU1、3、及び4で同期命令が出現するまでCPU2の命令が含まれない。同期命令CPU2−2の後に、同期命令CPU0−4が出現すると、CPU2及びCPU0以外の他CPU1及び3で同期命令が出現するまでCPU0の命令が含まれない。
Therefore, in the example of FIG. 15, the instruction of the
CPU1及びCPU3においても同様である。そして、同期命令CPU1−4と、同期命令CPU3−6が出現することによって、転送用トレースデータ300への命令の追加が、所定順で再開する。最後の同期命令CPU3−6後に、CPU0−5からCPU2−9までの命令が転送用トレースデータ300に追加されることによって、同期命令後に実行されることになる。
The same applies to CPU1 and CPU3. Then, when the synchronous instruction CPU1-4 and the synchronous instruction CPU3-6 appear, the addition of the instruction to the
トレース中に同期命令が現われるごとにこのように並べ替えを行うことによって、同期命令で区切られ、性能シミュレーションが停止することなく正常に動作する転送用トレースデータ300を作成することができる。
By performing such rearrangement every time a synchronous command appears in the trace, it is possible to create
図16は、転送用トレースデータを作成するための機能構成例を示す図である。図16に示す機能構成は、コンピュータ装置100a又は100bに実装される。コンピュータ装置100a又は100bは、マルチコア対応ISS部35と、トレース結合処理部36とを転送用トレースデータ300を作成するための処理部として有する。マルチコア対応ISS部35と、トレース結合処理部36とは、CPU11が対応するプログラムを実行することによる処理によって実現される。
FIG. 16 is a diagram illustrating a functional configuration example for creating transfer trace data. The functional configuration illustrated in FIG. 16 is implemented in the
マルチコア対応ISS部35は、記憶部30に格納されているマルチスレッドプログラム34を読み込んで、命令セットレベルのシミュレーションを行う。その結果として、トレースデータTD−1、TD−2、TD−3、・・・、TD−nが記憶部30に出力され格納される。
The multi-core
トレース結合処理部36は、所定順に、記憶部30に格納されているトレースデータTD−1、TD−2、TD−3、・・・、TD−nから命令を1つずつ読み出して、図15で説明したトレースデータ作成方法によって、一つの転送用トレースデータ300を作成して記憶部30に格納する。処理を簡潔にするため、各トレースデータTD−1、TD−2、TD−3、・・・、TD−nのファイル名に対応するCPU番号を含むようにして記憶部30に格納してもよい。
The trace
トレース結合処理部36によるトレース結合処理は、性能シミュレーションの実行の前に行われる。上述したように、トレース結合プログラムをCPU11が実行することによって実現されるように、ソフトウェアで実現してもよいし、ハードウェアで実現してもよい。また、コンピュータ装置100a及び100bとは、別の装置で実現してもよい。
The trace combination processing by the trace
図17は、トレース結合処理部によるトレース結合処理を説明するためのフローチャート図である。図17において、トレース結合処理部36は、トレースデータを選択するための所定順に従って、記憶部30に記憶されたCPU番号73のトレースデータからトレースされた順に命令3bを一つ読み込む(ステップS11)。
FIG. 17 is a flowchart for explaining the trace combination processing by the trace combination processing unit. In FIG. 17, the trace
選択の所定順は、命令3bを読み込む際のトレースデータを選択する順番をCPUの番号で示す。例えば、各トレースデータのファイル名にCPU番号を含めておくことで、降順又は昇順などのCPUの番号順に従って、トレースデータが選択されるようにすればよい。所定順がCPU0、CPU1、CPU2、・・・、CPUnの順番(0、1、2、・・・、n)である場合、CPU0用のトレースデータ、CPU1用のトレースデータ、CPU2用のトレースデータ、・・・、CPUn用のトレースデータの順に選択される。 The predetermined order of selection indicates the order of selecting the trace data when reading the instruction 3b by the CPU number. For example, by including the CPU number in the file name of each trace data, the trace data may be selected according to the CPU number order such as descending order or ascending order. When the predetermined order is the order of CPU0, CPU1, CPU2,..., CPUn (0, 1, 2,..., N), the trace data for CPU0, the trace data for CPU1, and the trace data for CPU2. ... Are selected in the order of trace data for CPUn.
トレース結合処理部36は、読み込んだ命令3bが同期命令か否かを判断する(ステップS12)。命令3bが同期命令である場合、CPU番号73のフラグテーブル71に同期フラグをセットして(ステップS13)、命令3bを転送用トレースデータ300に出力して格納する(ステップS14)。
The trace
フラグテーブル71は、記憶部30に格納され、例えば、コア数分のビット数を少なくとも有するようにすればよい。CPU番号と同期フラグとを対応付ければよい。同期フラグは、設定されることによって「1」を示す。即ち、CPU番号に対応する同期フラグが「1」を示せば、読み出した命令が同期命令であったことを示す。また、CPU番号に対応する同期フラグが「0」を示せば、未だ同期命令が読み出されていないことを示す。
The flag table 71 is stored in the
一方、ステップS12にて、読み込んだ命令が同期命令でないと判断した場合、トレース結合処理部36は、記憶部30に格納されているフラグテーブル71を参照して、CPU番号73の同期フラグがセットされているか否かを判断する(ステップS13−2)。同期フラグがセットされている場合、CPU番号73の同期用バッファ72に読み出した命令3bを保存する(ステップS14−2)。
On the other hand, if it is determined in step S12 that the read instruction is not a synchronous instruction, the trace
同期用バッファ72は、記憶部30内に用意されたCPU番号毎の作業用のバッファ領域である。読み出された同期命令と同一CPU番号を示す命令3bがトレースデータから読み出された場合、他CPUに対する全ての同期命令が検出されるまで、そのCPU番号の同期用バッファ72に格納される。
The
ステップS13−2にて、同期フラグがセットされていないと判断した場合、トレース結合処理部36は、命令3bを転送用トレースデータ300に出力し格納する(ステップS14−4)。
If it is determined in step S13-2 that the synchronization flag is not set, the trace
ステップS14、S14−2、S14−4の処理後、トレース結合処理部36は、フラグテーブル71を参照することによって、全てのCPUに対して同期フラグがセットされたか否かを判断する(ステップS15)。全てのCPUに対して同期フラグがセットされている場合、トレース結合処理部36は、全ての同期フラグをクリアする(ステップS16)。全ての同期フラグが「0」に設定される。
After the processing of steps S14, S14-2, and S14-4, the trace
そして、トレース結合処理部36は、図18に説明されるようなバッファ出力処理を実行する。バッファ出力処理の実行後、トレース結合処理部36は、ステップS18へと進む。
Then, the trace
ステップS15にて、全てのCPUに対して同期フラグがセットされていないと判断した場合、又は、同期フラグが未セットのCPUが存在すると判断した場合、トレース結合処理部36は、所定順において、CPU番号73が最後の番号であるか否かを判断する(ステップS18)。
If it is determined in step S15 that the synchronization flag has not been set for all the CPUs, or if it is determined that there is a CPU for which the synchronization flag has not been set, the trace
CPU番号73が最後の番号であると判断した場合、トレース結合処理部36は、CPU番号73を初期化して(ステップS19)、ステップS20へと進む。記憶部30に格納されているCPU番号73が、「0」に設定される。一方、CPU番号73が最後の番号ではないと判断した場合、トレース結合処理部36は、CPU番号73を1インクリメントして(ステップS19−2)、ステップS20へと進む。
When determining that the
そして、トレース結合処理部36は、全てのトレースの読み込みを完了したか否かを判断する(ステップS20)。全てのトレースの読み込みが未完了であると判断した場合、トレース結合処理部36は、ステップS11へ戻り、記憶部30に記憶されているCPU番号73に基づいて、上述した同様の処理を繰り返す。
Then, the trace
一方、ステップS20にて、全てのトレースの読み込みを完了したと判断した場合、トレース結合処理部36は、この処理を終了する。
On the other hand, if it is determined in step S20 that all the traces have been read, the trace
図18は、図17のステップS17でのバッファ出力処理を説明するための図である。図18において、トレース結合処理部36は、バッファ出力処理用のCPU番号73−2を初期化して(ステップS51)、CPU番号73−2の同期用バッファから命令3bを1つ読み込む(ステップS52)。
FIG. 18 is a diagram for explaining the buffer output process in step S17 of FIG. In FIG. 18, the trace
トレース結合処理部36は、読み込んだ命令を転送用トレースデータ300に出力する(ステップS53)。トレース結合処理部36は、所定順において、CPU番号73−2が最後の番号であるか否かを判断する(ステップS54)。
The trace
CPU番号73−2が最後の番号であると判断した場合、トレース結合処理部36は、CPU番号73−2を初期化して(ステップS55)、ステップS20へと進む。記憶部30に格納されているCPU番号73−2が、「0」に設定される。一方、CPU番号73−2が最後の番号ではないと判断した場合、トレース結合処理部36は、CPU番号73−2を1インクリメントして(ステップS55−2)、ステップS56へと進む。
When determining that the CPU number 73-2 is the last number, the trace
そして、トレース結合処理部36は、全ての同期用バッファ72が空か否かを判断する(ステップS56)。全ての同期用バッファ72が空である場合、トレース結合処理部36は、このバッファ出力処理を終了する。全ての同期用バッファ72が空でない場合、トレース結合処理部36は、ステップS52へと戻り、上述した同様の処理を繰り返す。
Then, the trace
上述したトレース結合処理部36によるトレース結合処理によって、作成された転送用トレースデータ300を用いた場合の実行タイミングについて、図19及び図20で説明する。図19及び図20では、図6に示す構成例において、トレースデータ300を用いた場合で説明する。トレースデータ300においても、命令3bのデータ構成は、トレースデータ2bの命令3bと同様である。
The execution timing when the
図19は、同期命令によって区切られた実行タイミングの例を示す図である。図19において、トレース結合処理部36によって作成された転送用トレースデータ300が、性能シミュレーション装置50bのトレース受信部6に入力されると、命令3bのCPU番号に対応するバッファに命令3bが格納される。
FIG. 19 is a diagram illustrating an example of execution timing divided by a synchronization instruction. In FIG. 19, when the
性能シミュレータ5によってシミュレーションされる各CPU0〜CPU3は、夫々の対応するバッファ0〜バッファ3から命令3bを読み込んで実行する。最初の同期命令CPU2−2をCPU2が実行すると、CPU2は、他CPU0、1及び3による同期命令の実行待ちとなる。
Each of the CPU0 to CPU3 simulated by the
次に、CPU0で同期命令CPU0−4を実行すると、CPU0は他CPU1及び3による同期命令の実行待ちとなる。更に、CPU1で同期命令CPU1−4を実行すると、CPU1は他CPU3による同期命令の実行待ちとなる。最後に、CPU3で同期命令CPU3−6を実行すると、全ての同期命令が実行済みとなり、各CPU0〜3による命令フェッチが滞ることなく実行される。その時点が区切り7で示される。区切り7以降において、各CPU0〜3によりトレースされた命令3bが順次実行される。
Next, when the synchronization instruction CPU0-4 is executed by the CPU0, the CPU0 waits for execution of the synchronization instruction by the
図20は、実機と、図19の転送用トレースデータを用いた性能シミュレーションの場合の実行タイミングのずれを比較するための図である。実機と性能シミュレータ5とにおける実行タイミングの比較において、図20(A)はCPU0の実行タイミングのずれを示し、図20(B)はCPU1の実行タイミングのずれを示し、図20(C)はCPU2の実行タイミングのずれを示し、図20(D)はCPU3の実行タイミングのずれを示している。
FIG. 20 is a diagram for comparing a difference in execution timing between the actual machine and the performance simulation using the transfer trace data of FIG. In the comparison of execution timing between the actual machine and the
10個の命令を終了した時点において、図20(A)では、性能シミュレータ5によるCPU0の性能シミュレーションは、実機と比べてd20遅れて終了している。図12(B)では、性能シミュレータ5によるCPU1の性能シミュレーションは、実機と比べてd21遅れて終了している。図12(C)では、性能シミュレータ5によるCPU2の性能シミュレーションは、実機と比べてd22遅れて終了している。図12(D)では、性能シミュレータ5によるCPU3の性能シミュレーションは、実機と比べてd23遅れて終了している。
At the time when 10 instructions are finished, in FIG. 20A, the performance simulation of the
図20(A)から図12(D)の夫々において、実機の実行タイミングにおける区切り7aに対する、性能シミュレータ5による実行タイミングにおける区切り7bの遅延分の差が性能シミュレータ5にはある。しかしながら、トレース結合処理部36によって作成された転送用トレースデータ300を用いることによって、性能シミュレーションが途中で停止することなく実行できている。また、全CPU0〜CPU3の同期による実行タイミングについても、区切り7bに示すように実現できている。
In each of FIG. 20A to FIG. 12D, the
上述したように、複数のプロセッサ(CPU)を搭載したシステムの性能評価において、同期命令毎に区切られるように、複数のCPU0〜CPUnでトレースされた命令3bを並べ替えて一つのトレースデータ300を作成することによって、同期命令を含むトレースに対しても、同期命令後の各プロセッサによる命令フェッチが滞りなく行われるため、性能シミュレーションが途中で停止することなく実行される。
As described above, in the performance evaluation of a system equipped with a plurality of processors (CPUs), one
本実施例では、複数プロセッサのシステムを評価する性能シミュレーションのための転送用トレースデータを、複数プロセッサへの全同期命令後に次の命令が入力されるように複数のトレースを同期命令毎に区切って結合して作成する。 In this embodiment, transfer trace data for performance simulation for evaluating a system of a plurality of processors is divided into a plurality of traces for each synchronization instruction so that the next instruction is input after all synchronization instructions to the plurality of processors. Create by combining.
本実施例に係る転送用トレースデータ300は、図2、図6から図9の構成によって行われる性能シミュレーションのために適用可能である。コンピュータ装置100a及び100bは、以下に説明されるトレース結合装置に相当する。
The
本発明は、具体的に開示された実施例に限定されるものではなく、特許請求の範囲から逸脱することなく、種々の変形や変更が可能である。 The present invention is not limited to the specifically disclosed embodiments, and various modifications and changes can be made without departing from the scope of the claims.
以上の実施例を含む実施形態に関し、更に以下の付記を開示する。
(付記1)
一つのシステムで動作する複数のプロセッサの夫々に対応する複数のトレースデータを記憶した記憶部と、
前記記憶部に記憶された前記複数のトレースデータの1つを所定順に従って選択し、各トレースデータからトレースされた命令を1つずつ読み込みながら同期命令毎に区切って並べ替え、前記記憶部内の転送用トレースデータに追加することによって、各プロセッサのトレースを結合するトレース結合処理部と
を有することを特徴とするトレース結合装置。
(付記2)
前記トレース結合処理部は、
前記記憶部の前記所定順に従って選択したトレースデータから命令を読み込む命令読込部と、
前記命令読込部によって読み込んだ命令が同期命令であるか否かを判断する同期命令判断部と、
前記同期命令判断部によって前記命令が同期命令でないと判断された場合、該命令がトレースされた前記プロセッサに対応させた同期用バッファに保存する命令保存部と、
全プロセッサ夫々に対応する前記複数のトレースデータから前記同期命令の読み出しが終了した場合、前記所定順に従って選択した前記同期用バッファから命令を1つずつ読み込み、前記転送用トレースデータへ出力して追加するバッファ出力部と
を有することを特徴とする付記1記載のトレース結合装置。
(付記3)
前記バッファ出力部による前記転送用トレースデータへの出力が終了すると、前記命令読込部による処理を再開することを特徴とする付記2記載のトレース結合装置。
(付記4)
前記同期命令判断部によって前記命令が同期命令であると判断された場合、前記記憶部内に格納される前記複数のプロセッサの夫々に対応する同期フラグを有するフラグテーブル内の、該命令がトレースされたプロセッサに対応する該同期フラグを設定するフラグ設定部と、
前記同期命令判断部によって前記命令が同期命令でないと判断された場合、前記フラグテーブルを参照することによって、該命令がトレースされたプロセッサに対応する該同期フラグが設定されているか否かを判断するフラグ判断部と、
前記フラグ判断部によって前記同期フラグが設定されていないと判断された場合、前記命令を前記転送用トレースデータへ出力して追加するフラグ未設定追加部と
を有することを特徴とする付記3記載のトレース結合装置。
(付記5)
前記同期命令判断部によって前記命令が同期命令でないと判断された場合であって、かつ、前記フラグ判断部によって前記同期フラグが設定されていると判断された場合に、該命令がトレースされた前記プロセッサに対応させた前記同期用バッファに保存する未設定命令保存部を有することを特徴とすることを特徴とする付記4記載のトレース結合装置。
(付記6)
前記同期命令判断部によって前記命令が同期命令であると判断され、前記フラグ設定部によって、前記フラグテーブル内の、該命令がトレースされたプロセッサに対応する該同期フラグが設定されると、該命令を前記転送用トレースデータへ出力して保存する設定後命令保存部を有することを特徴とする付記4又は5記載のトレース結合装置。
(付記7)
コンピュータによって実行されるトレース結合方法であって、
記憶部に記憶された一つのシステムで動作する複数のプロセッサの夫々に対応する複数のトレースデータから所定順に従ってトレースデータを選択し、
各トレースデータからトレースされた命令を1つずつ読み込みながら、同期命令毎に区切って並べ替えて、前記記憶部内の転送用トレースデータに追加することによって、各プロセッサのトレースを結合する
ことを特徴とするトレース結合方法。
(付記8)
記憶部に記憶された一つのシステムで動作する複数のプロセッサの夫々に対応する複数のトレースデータから所定順に従ってトレースデータを選択し、
各トレースデータからトレースされた命令を1つずつ読み込みながら、同期命令毎に区切って並べ替えて、前記記憶部内の転送用トレースデータに追加することによって、各プロセッサのトレースを結合する、
処理をコンピュータに実行させるプログラム。
(付記9)
記憶部に記憶された一つのシステムで動作する複数のプロセッサの夫々に対応する複数のトレースデータから所定順に従ってトレースデータを選択し、
各トレースデータからトレースされた命令を1つずつ読み込みながら、同期命令毎に区切って並べ替えて、前記記憶部内の転送用トレースデータに追加することによって、各プロセッサのトレースを結合する、
処理をコンピュータに実行させるプログラムを記憶したコンピュータ読取可能な記憶媒体。
The following additional notes are further disclosed with respect to the embodiment including the above examples.
(Appendix 1)
A storage unit storing a plurality of trace data corresponding to each of a plurality of processors operating in one system;
One of the plurality of trace data stored in the storage unit is selected according to a predetermined order, and the instructions traced from each trace data are read one by one and rearranged for each synchronous command, and transferred in the storage unit And a trace combination processing unit for combining the traces of the respective processors by adding to the trace data.
(Appendix 2)
The trace combination processing unit
An instruction reading unit for reading an instruction from the trace data selected according to the predetermined order of the storage unit;
A synchronous instruction determination unit for determining whether or not the instruction read by the instruction reading unit is a synchronous instruction;
An instruction storage unit that stores the instruction in the synchronization buffer associated with the processor in which the instruction is traced when the instruction is not a synchronization instruction by the synchronization instruction determination unit;
When reading of the synchronous instruction from the plurality of trace data corresponding to all the processors is completed, the instruction is read one by one from the synchronization buffer selected according to the predetermined order, and is output to the transfer trace data and added. The trace combining device according to
(Appendix 3)
3. The trace combining device according to
(Appendix 4)
When the synchronous instruction determination unit determines that the instruction is a synchronous instruction, the instruction is traced in a flag table having a synchronization flag corresponding to each of the plurality of processors stored in the storage unit. A flag setting unit for setting the synchronization flag corresponding to the processor;
When the synchronous instruction determination unit determines that the instruction is not a synchronous instruction, it determines whether or not the synchronous flag corresponding to the processor in which the instruction is traced is set by referring to the flag table. A flag determination unit;
The flag non-setting addition unit that outputs and adds the instruction to the transfer trace data when the flag determination unit determines that the synchronization flag is not set. Trace coupling device.
(Appendix 5)
A case wherein the instruction by the synchronization instruction determination unit is determined not to be synchronization command, and, when the synchronization flag by the flag determination unit determines a is configured, the instruction is traced The trace combining device according to
(Appendix 6)
When the synchronization instruction determination unit determines that the instruction is a synchronization instruction, and the flag setting unit sets the synchronization flag corresponding to the processor in which the instruction is traced in the flag table, the
(Appendix 7)
A trace combining method executed by a computer,
Selecting trace data according to a predetermined order from a plurality of trace data corresponding to each of a plurality of processors operating in one system stored in the storage unit;
The traces of the respective processors are combined by reading the traced instructions from each trace data one by one, sorting them in synchronization instructions and adding them to the trace data for transfer in the storage unit. How to combine traces.
(Appendix 8)
Selecting trace data according to a predetermined order from a plurality of trace data corresponding to each of a plurality of processors operating in one system stored in the storage unit;
The traces of the processors are combined by reading the traced instructions from each trace data one by one and sorting and sorting by each synchronous instruction and adding to the trace data for transfer in the storage unit.
A program that causes a computer to execute processing.
(Appendix 9)
Selecting trace data according to a predetermined order from a plurality of trace data corresponding to each of a plurality of processors operating in one system stored in the storage unit;
The traces of the processors are combined by reading the traced instructions from each trace data one by one and sorting and sorting by each synchronous instruction and adding to the trace data for transfer in the storage unit.
A computer-readable storage medium storing a program for causing a computer to execute processing.
2、2b トレースデータ
3、3b 命令
4 アーキテクチャ設定情報
5 性能シミュレータ
6 トレース受信部
7、7a、7b 区切り
8 性能情報レポート
9 実機の実行タイミング
11 CPU
12 ROM
13 RAM
14 ハードディスクドライブ
15 入力装置
16 出力装置
17 通信I/F
18 ドライブ
19 記憶媒体
20 性能シミュレーション装置I/F
30 記憶部
33 転送処理部
34 マルチスレッドプログラム
35 マルチコア対応ISS部
36 トレース結合処理部
50a 性能シミュレーション部
50b 性能シミュレーション装置
51b、52b I/F
71 フラグテーブル
72 同期用バッファ
73 CPU番号
100a、100b コンピュータ装置
200、201、202、203 トレースデータ
210 並べ替え済トレースデータ
300 転送用トレースデータ
2,
12 ROM
13 RAM
14
18
30
71 Flag table 72
Claims (5)
前記記憶部に記憶された前記複数のトレースデータの1つを所定順に従って選択し、各トレースデータからトレースされた命令を1つずつ読み込みながら、同期命令毎に区切って並べ替え、前記記憶部内の転送用トレースデータに追加することによって、各プロセッサのトレースを結合するトレース結合処理部と
を有することを特徴とするトレース結合装置。 A storage unit storing a plurality of trace data corresponding to each of a plurality of processors operating in one system;
Selecting one of the plurality of trace data stored in the storage unit according to a predetermined order, reading one instruction traced from each trace data one by one, rearranging the data by dividing each synchronization instruction, A trace combining device comprising: a trace combination processing unit for combining the traces of the processors by adding to the trace data for transfer.
前記記憶部の前記所定順に従って選択したトレースデータから命令を読み込む命令読込部と、
前記命令読込部によって読み込んだ命令が同期命令であるか否かを判断する同期命令判断部と、
前記同期命令判断部によって前記命令が同期命令であると判断された場合、前記記憶部内に格納される前記複数のプロセッサの夫々に対応する同期フラグを有するフラグテーブル内の、該命令がトレースされたプロセッサに対応する該同期フラグを設定するフラグ設定部と、
前記同期命令判断部によって前記命令が同期命令でないと判断された場合、前記フラグテーブルを参照することによって、該命令がトレースされたプロセッサに対応する該同期フラグが設定されているか否かを判断するフラグ判断部と、
前記フラグ判断部によって前記同期フラグが設定されていると判断された場合、前記命令がトレースされた前記プロセッサに対応させた同期用バッファに保存する命令保存部と、
全プロセッサ夫々に対応する前記複数のトレースデータから前記同期命令の読み出しが終了した場合、前記所定順に従って選択した前記同期用バッファから命令を1つずつ読み込み、前記転送用トレースデータへ出力して追加するバッファ出力部と
を有することを特徴とする請求項1記載のトレース結合装置。 The trace combination processing unit
An instruction reading unit for reading an instruction from the trace data selected according to the predetermined order of the storage unit;
A synchronous instruction determination unit for determining whether or not the instruction read by the instruction reading unit is a synchronous instruction;
When the synchronous instruction determination unit determines that the instruction is a synchronous instruction, the instruction is traced in a flag table having a synchronization flag corresponding to each of the plurality of processors stored in the storage unit. A flag setting unit for setting the synchronization flag corresponding to the processor;
When the synchronous instruction determining unit determines that the instruction is not a synchronous instruction, it is determined whether or not the synchronous flag corresponding to the processor in which the instruction is traced is set by referring to the flag table. A flag determination unit to
When the flag determination unit determines that the synchronization flag is set , an instruction storage unit that stores the instruction in a synchronization buffer corresponding to the processor in which the instruction is traced;
When reading of the synchronous instruction from the plurality of trace data corresponding to all the processors is completed, the instruction is read one by one from the synchronization buffer selected according to the predetermined order, and is output to the transfer trace data and added. 2. The trace combining device according to claim 1, further comprising a buffer output unit.
前記フラグ判断部によって前記同期フラグが設定されていないと判断された場合、前記命令を前記転送用トレースデータへ出力して追加するフラグ未設定追加部と
を有することを特徴とする請求項3記載のトレース結合装置。 The trace combination processing unit
4. A flag non-setting addition unit that outputs and adds the instruction to the transfer trace data when the flag determination unit determines that the synchronization flag is not set. Trace coupling device.
各トレースデータからトレースされた命令を1つずつ読み込みながら、同期命令毎に区切って並べ替えて、前記記憶部内の転送用トレースデータに追加することによって、各プロセッサのトレースを結合する、
処理をコンピュータに実行させるプログラム。 Selecting trace data according to a predetermined order from a plurality of trace data corresponding to each of a plurality of processors operating in one system stored in the storage unit;
The traces of the processors are combined by reading the traced instructions from each trace data one by one and sorting and sorting by each synchronous instruction and adding to the trace data for transfer in the storage unit.
A program that causes a computer to execute processing.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012034559A JP5874433B2 (en) | 2012-02-20 | 2012-02-20 | Trace coupling device and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012034559A JP5874433B2 (en) | 2012-02-20 | 2012-02-20 | Trace coupling device and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2013171410A JP2013171410A (en) | 2013-09-02 |
JP5874433B2 true JP5874433B2 (en) | 2016-03-02 |
Family
ID=49265302
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012034559A Expired - Fee Related JP5874433B2 (en) | 2012-02-20 | 2012-02-20 | Trace coupling device and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5874433B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10331446B2 (en) * | 2017-05-23 | 2019-06-25 | International Business Machines Corporation | Generating and verifying hardware instruction traces including memory data contents |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2583602B2 (en) * | 1989-03-01 | 1997-02-19 | 三菱電機株式会社 | Debugging device in multiprocessor system |
JP3491379B2 (en) * | 1995-04-11 | 2004-01-26 | 富士ゼロックス株式会社 | Information processing apparatus and trace information storage method |
GB2478328B (en) * | 2010-03-03 | 2015-07-01 | Advanced Risc Mach Ltd | Method, apparatus and trace module for generating timestamps |
-
2012
- 2012-02-20 JP JP2012034559A patent/JP5874433B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2013171410A (en) | 2013-09-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11748240B2 (en) | Scheduling of scenario models for execution within different computer threads and scheduling of memory regions for use with the scenario models | |
US20210311707A1 (en) | Method and system of command buffer between a cpu and gpu | |
TWI498728B (en) | Methods and apparatus for interactive debugging on a non-preemptible graphics processing unit | |
Lustig et al. | Reducing GPU offload latency via fine-grained CPU-GPU synchronization | |
JP5595633B2 (en) | Simulation method and simulation apparatus | |
JP4717492B2 (en) | Multi-core model simulator | |
EP2483772B1 (en) | Trap handler architecture for a parallel processing unit | |
JP4667206B2 (en) | Multi-core model simulation program, recording medium storing the program, multi-core model simulator, and multi-core model simulation method | |
US9606808B2 (en) | Method and system for resolving thread divergences | |
US20110295587A1 (en) | Methods and systems for simulating a processor | |
US9030480B2 (en) | Triggering performance event capture via pipelined state bundles | |
JP5874433B2 (en) | Trace coupling device and program | |
US20230109752A1 (en) | Deterministic replay of a multi-threaded trace on a multi-threaded processor | |
Lázaro-Muñoz et al. | A tasks reordering model to reduce transfers overhead on GPUs | |
JP2012203451A (en) | Semiconductor integrated circuit simulation device and semiconductor integrated circuit simulation method | |
Ma et al. | MCMG simulator: A unified simulation framework for CPU and graphic GPU | |
JP6223637B2 (en) | Simulation apparatus, simulation method, and simulation program | |
JP2014194746A (en) | Simulation device, simulation method and program | |
KR20100059822A (en) | Command synchronisation | |
WO2017158786A1 (en) | Simulation device, simulation method, and simulation program | |
JP2007328775A (en) | Simulation device, simulation method and simulation program | |
Nilsson | Paravirtualizing OpenGL ES in Simics | |
Rodríguez Corral et al. | Influence of input/output operations on processor performance | |
Crawford et al. | Software architecture and system validation of an open, unified model for accelerated multicore computing | |
Clarke et al. | Accelerated design space pruning for CMP memory architectures: work-in-progress |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20141007 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20150422 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20150519 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20150721 |
|
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: 20151222 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20160104 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5874433 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
LAPS | Cancellation because of no payment of annual fees |