JP5874433B2 - Trace coupling device and program - Google Patents

Trace coupling device and program Download PDF

Info

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
Application number
JP2012034559A
Other languages
Japanese (ja)
Other versions
JP2013171410A (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 JP2012034559A priority Critical patent/JP5874433B2/en
Publication of JP2013171410A publication Critical patent/JP2013171410A/en
Application granted granted Critical
Publication of JP5874433B2 publication Critical patent/JP5874433B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

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.

特開平11−096130号公報Japanese Patent Laid-Open No. 11-096130

しかしながら、上述した従来技術では、各プロセッサのトレースデータ毎に処理実行時間を見積もったものであるため、搭載されるプロセッサの数に相当するトレースデータを転送するための経路が必要となる。従って、性能シミュレーションにおいて、トレースデータの転送に係る構成がプロセッサ数に依存してしまうと言った問題があった。   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.

性能シミュレーションに係る基本構成を説明するための図である。It is a figure for demonstrating the basic composition which concerns on a performance simulation. 図1に示す性能シミュレータをソフトウェアで実行するためのコンピュータ装置のハードウェア構成を示す図である。It is a figure which shows the hardware constitutions of the computer apparatus for performing the performance simulator shown in FIG. 1 with software. 図2のコンピュータ装置の機能構成の概要を説明するための図である。It is a figure for demonstrating the outline | summary of a function structure of the computer apparatus of FIG. 図1に示す性能シミュレータをハードウェアで実現するためのシステムのハードウェア構成を示す図である。It is a figure which shows the hardware constitutions of the system for implement | achieving the performance simulator shown in FIG. 1 by hardware. 図4のシステムの構成概要を説明するための図である。FIG. 5 is a diagram for explaining a configuration outline of the system of FIG. 4. 複数コアのトレースデータを1つの経路で入力するための構成例を示す図である。It is a figure which shows the structural example for inputting the trace data of multiple cores by one path | route. 転送時に命令を並べ替える構成例を示す図である。It is a figure which shows the structural example which rearranges an instruction | indication at the time of transfer. コア毎のバッファを有する構成例を示す図である。It is a figure which shows the structural example which has the buffer for every core. 命令を並べ替えて一つのトレースを作成しておく構成例を示す図である。It is a figure which shows the structural example which rearranges an instruction | indication and produces one trace. 実機での命令の実行タイミングを説明するための図である。It is a figure for demonstrating the execution timing of the command in a real machine. 単純に並べ替えたトレースデータを用いた実行タイミングを説明するための図である。It is a figure for demonstrating the execution timing using the trace data rearranged simply. 実機と、図11の並べ替え済トレースデータを用いた性能シミュレーションの場合の実行タイミングのずれを比較するための図である。It is a figure for comparing the shift | offset | difference of execution timing in the case of a performance simulation using a real machine and the rearranged trace data of FIG. プログラムに同期命令が含まれる場合の実行タイミングを説明するための図である。It is a figure for demonstrating the execution timing when a synchronous command is included in a program. 性能シミュレータの動作が停止してしまう場合を説明するための図である。It is a figure for demonstrating the case where operation | movement of a performance simulator stops. トレースデータ作成方法の概要を説明するための図である。It is a figure for demonstrating the outline | summary of the trace data creation method. 転送用トレースデータを作成するための機能構成例を示す図である。It is a figure which shows the example of a function structure for producing the trace data for transfer. トレース結合処理部によるトレース結合処理を説明するためのフローチャート図である。It is a flowchart for demonstrating the trace joint process by a trace joint process part. 図17のステップS17でのバッファ出力処理を説明するための図である。It is a figure for demonstrating the buffer output process in step S17 of FIG. 同期命令によって区切られた実行タイミングの例を示す図である。It is a figure which shows the example of the execution timing divided | segmented by the synchronous command. 実機と、図19の転送用トレースデータを用いた性能シミュレーションの場合の実行タイミングのずれを比較するための図である。FIG. 20 is a diagram for comparing a difference in execution timing between an actual machine and a performance simulation using the transfer trace data of FIG. 19.

以下、本発明の実施の形態を図面に基づいて説明する。発明者は、マルチプロセッサやマルチコア等の複数のプロセッサ(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 trace data 2 and the architecture setting information 4 are input to the performance simulator 5 and the performance simulator 5 is operated, the performance information report 8 relating to the evaluation target processor is output from the performance simulator 5. Is done.

トレースデータ2は、事前に実機又はISS(Instruction Set Simulator)等でプログラムを実行して取得した、実行順の命令3を含むデータファイルである。命令3は、PC(Program Counter)、命令、アドレス、データを示すデータである。アーキテクチャ設定情報4は、キャッシュサイズ、キャッシュプロトコル、パイプライン仕様等の評価対象のプロセッサに係るパラメータを示す。   The trace data 2 is a data file including instructions 3 in the execution order obtained by executing a program in advance with an actual machine or an ISS (Instruction Set Simulator). The instruction 3 is data indicating a PC (Program Counter), an instruction, an address, and data. The architecture setting information 4 indicates parameters related to an evaluation target processor such as a cache size, a cache protocol, and a pipeline specification.

性能シミュレータ5は、実際に命令を実行せずにパイプライン、メモリアクセス等のタイミングをシミュレーションする。性能シミュレータ5は、後述されるように、ソフトウェア又はハードウェアによって実現される。   The performance simulator 5 simulates the timing of pipelines, memory accesses, etc. without actually executing instructions. The performance simulator 5 is realized by software or hardware as will be described later.

性能情報レポート8は、CPI(Clock per Instruction)、キャッシュヒット率等を含む性能評価結果を示す。   The performance information report 8 shows performance evaluation results including CPI (Clock per Instruction), cache hit rate, and the like.

図1に示す性能シミュレータ5がソフトウェア(プログラム)で実現されるシステム1000aにおいて、そのソフトウェアを実行するためのコンピュータ装置100aのハードウェア構成を図2で示す。図2に示すシステム1000aでは、コンピュータ装置100aが性能シミュレータ5として動作するためのハードウェア構成が示される。   In a system 1000a in which the performance simulator 5 shown in FIG. 1 is realized by software (program), a hardware configuration of a computer device 100a for executing the software is shown in FIG. In the system 1000a shown in FIG. 2, a hardware configuration for the computer apparatus 100a to operate as the performance simulator 5 is shown.

コンピュータ装置100aは、CPU11と、ROM(Read-Only Memory)12と、RAM(Random Access Memory)13と、ハードディスクドライブ14と、入力装置15と、出力装置16と、通信I/F17と、ドライブ18とを有し、それらはバスBに接続される。   The computer device 100a includes a CPU 11, a ROM (Read-Only Memory) 12, a RAM (Random Access Memory) 13, a hard disk drive 14, an input device 15, an output device 16, a communication I / F 17, and a drive 18. And they are connected to bus B.

CPU11は、ROM12又はRAM13に格納されたプログラムに従ってコンピュータ装置100aを制御する。主記憶装置としてのROM12及びRAM13は、CPU11にて実行されるプログラム、CPU11での処理に必要なデータ、CPU11での処理にて得られたデータ等を格納する。また、RAM13の一部の領域が、CPU11での処理に利用されるワークエリアとして割り付けられる。補助記憶装置としてのハードディスクドライブ14には、各種処理を実行するプログラム等のデータが格納される。   The CPU 11 controls the computer device 100 a according to a program stored in the ROM 12 or the RAM 13. The ROM 12 and the RAM 13 as main storage devices store programs executed by the CPU 11, data necessary for processing by the CPU 11, data obtained by processing by the CPU 11, and the like. Also, a partial area of the RAM 13 is allocated as a work area used for processing by the CPU 11. The hard disk drive 14 serving as an auxiliary storage device stores data such as programs for executing various processes.

記憶部30は、ROM12、RAM13、ハードディスクドライブ14等の記憶領域を有する。記憶部30は、トレースデータ2、アーキテクチャ設定情報4、性能情報レポート8等を記憶する。   The storage unit 30 has storage areas such as a ROM 12, a RAM 13, and a hard disk drive 14. The storage unit 30 stores trace data 2, architecture setting information 4, a performance information report 8, and the like.

入力装置15は、マウス、キーボード等を有し、ユーザがコンピュータ装置100aが処理を行なうための必要な各種情報を入力するために用いられる。出力装置16は、LCD(Liquid Crystal Display)又はCRT(Cathode Ray Tube)等の表示装置や、プリンタ等を有し、CPU11の制御のもとに必要な各種情報を表示、又は/及び、ユーザからの指示に応じて各種情報を出力する。性能情報レポート8が出力装置16に表示又は/及び出力される。   The input device 15 includes a mouse, a keyboard, and the like, and is used by a user to input various information necessary for the computer device 100a to perform processing. The output device 16 includes a display device such as an LCD (Liquid Crystal Display) or CRT (Cathode Ray Tube), a printer, and the like, and displays various information necessary under the control of the CPU 11 or / and from the user. Various information is output according to the instructions. The performance information report 8 is displayed or / and output on the output device 16.

通信I/F17は、例えばインターネット、LAN(Local Area Network)等に接続するためのインターフェースであり、外部装置との間の通信制御をするための装置である。   The communication I / F 17 is an interface for connecting to the Internet, a LAN (Local Area Network), etc., for example, and is a device for controlling communication with an external device.

コンピュータ装置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 computer apparatus 100a is provided to the computer apparatus 100a by a storage medium 19 such as a CD-ROM (Compact Disc Read-Only Memory). That is, when the storage medium 19 storing the program is set in the drive 18, the drive 18 reads the program from the storage medium 19, and the read program is installed in the hard disk drive 14 via the bus B. When the program is activated, the CPU 11 starts its processing according to the program installed in the hard disk drive 14.

尚、プログラムを格納する媒体として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 computer device 100a may be provided from an external device via the communication I / F 17. Alternatively, the program may be provided to an external device, and each process described below may be realized by the external device. Communication by the communication I / F 17 is not limited to wireless or wired.

図3は、図2のコンピュータ装置100aの機能構成の概要を説明するための図である。図3では、複数コアの例として、CPUが4個の場合を例示しているが、個数を限定するものではない。以下の図においても同様である。   FIG. 3 is a diagram for explaining an outline of a functional configuration of the computer apparatus 100a of FIG. In FIG. 3, as an example of a plurality of cores, a case where there are four CPUs is illustrated, but the number is not limited. The same applies to the following drawings.

図3において、CPU0〜CPU3が評価対象である場合、各CPU0〜CPU3に対応するトレースデータ200〜203が記憶部30に用意され格納される。トレースデータ200はCPU0用のトレースデータであり、トレースデータ201はCPU1用のトレースデータであり、トレースデータ202はCPU2用のトレースデータであり、トレースデータ203はCPU3用のトレースデータである。   In FIG. 3, when CPU 0 to CPU 3 are evaluation targets, trace data 200 to 203 corresponding to each of CPU 0 to CPU 3 are prepared and stored in the storage unit 30. Trace data 200 is trace data for CPU0, trace data 201 is trace data for CPU1, trace data 202 is trace data for CPU2, and trace data 203 is trace data for CPU3.

コンピュータ装置100aは、CPU11が所定のプログラムを実行することによって性能シミュレーション部50aを実現する。性能シミュレーション部50aは性能シミュレータ5に相当する機能を行う処理部である。   The computer apparatus 100a implements the performance simulation unit 50a by the CPU 11 executing a predetermined program. The performance simulation unit 50 a is a processing unit that performs a function corresponding to the performance simulator 5.

性能シミュレーション部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 trace data 200 to 203 is input from the storage unit 30 to the performance simulation unit 50a, the performance simulation unit 50a evaluates the performance of each of the CPU0 to CPU3. A performance information report 8 indicating the result of performance evaluation by the performance simulation unit 50 a is output and stored in the storage unit 30.

次に、図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 performance simulator 5 shown in FIG. 1 is realized by hardware such as a dedicated device. A system 1000b illustrated in FIG. 4 includes a computer device 100b and a performance simulation device 50b. Of the hardware configuration of the computer apparatus 100b shown in FIG. 4, the same reference numerals are given to the same hardware as the computer apparatus 100a shown in FIG. 2, and the description thereof is omitted.

図2に示すコンピュータ装置100aとの違いにおいて、コンピュータ装置100bは、性能シミュレーション装置50bに対して上位装置であるホストPC(Personal Computer)であり、コンピュータ装置100aのハードウェア構成に加えて、更に、性能シミュレーション装置50bと接続し通信するための性能シミュレーション装置I/F20を有している。   In contrast to the computer device 100a shown in FIG. 2, the computer device 100b is a host PC (Personal Computer) which is a host device with respect to the performance simulation device 50b, and in addition to the hardware configuration of the computer device 100a, A performance simulation apparatus I / F 20 for connecting and communicating with the performance simulation apparatus 50b is provided.

性能シミュレーション装置I/F20を介して、コンピュータ装置100bの記憶部30からトレースデータ2、アーキテクチャ設定情報4等が、性能シミュレーション装置50bへ入力され、性能シミュレーション装置50bによって性能評価が行われる。   Trace data 2, architecture setting information 4 and the like are input from the storage unit 30 of the computer apparatus 100b to the performance simulation apparatus 50b via the performance simulation apparatus I / F 20, and performance evaluation is performed by the performance simulation apparatus 50b.

性能シミュレーション装置50bによって実行された性能評価の結果を示す性能情報レポート8は、性能シミュレーション装置I/F20を介してコンピュータ装置100bの記憶部30に格納される。   The performance information report 8 indicating the result of the performance evaluation executed by the performance simulation device 50b is stored in the storage unit 30 of the computer device 100b via the performance simulation device I / F 20.

性能シミュレーション装置50bは、FPGA(Field-Programmable Gate Array)等の装置であり、上位装置としてのコンピュータ装置100bから必要な情報を入力し、評価対象のプロセッサの性能を評価し、その結果を示す性能情報レポート8を出力する。   The performance simulation device 50b is a device such as a field-programmable gate array (FPGA), inputs necessary information from the computer device 100b as a host device, evaluates the performance of the evaluation target processor, and shows the result. An information report 8 is output.

図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 performance simulation apparatus 50b includes a performance simulator 5, an I / F 51b, and an I / F 52b.

性能シミュレータ5は、ハードウェア記述言語によるモデルとして表現されるCPU0〜CPU3の各々の動作に合わせて夫々対応するトレースデータ200〜203の命令3を読み込みながらシミュレーションを行う。   The performance simulator 5 performs a simulation while reading the instruction 3 of the trace data 200 to 203 corresponding to each operation of the CPU0 to CPU3 expressed as a model in the hardware description language.

I/F51bは、ホストPCであるコンピュータ装置100bから各トレースデータ200〜203を受信して性能シミュレータ5へ入力するためのインターフェースである。I/F51bから入力されたトレースデータ200〜203に従って、対応するCPU0〜CPU3がシミュレーションされる。   The I / F 51b is an interface for receiving each trace data 200 to 203 from the computer device 100b which is a host PC and inputting it to the performance simulator 5. Corresponding CPU0 to CPU3 are simulated in accordance with the trace data 200 to 203 input from the I / F 51b.

I/F52bは、性能シミュレータ5が行ったCPU0〜CPU3の評価結果を示す性能情報レポート8を外部装置へ出力するためのインターフェースである。外部装置がコンピュータ装置100bである場合、性能情報レポート8は、I/F52bを介して、コンピュータ装置100bへ転送されて記憶部30に格納される。記憶部30に格納された性能情報レポート8は、CPU11の制御によって、出力装置16に結果表示として出力される。又は、I/F52bがコンピュータ装置100b以外の結果表示用の外部装置に接続される場合には、性能情報レポート8が外部装置で表示されてもよい。   The I / F 52b is an interface for outputting a performance information report 8 indicating the evaluation results of the CPU0 to CPU3 performed by the performance simulator 5 to an external device. When the external device is the computer device 100b, the performance information report 8 is transferred to the computer device 100b via the I / F 52b and stored in the storage unit 30. The performance information report 8 stored in the storage unit 30 is output as a result display to the output device 16 under the control of the CPU 11. Alternatively, when the I / F 52b is connected to an external device for displaying results other than the computer device 100b, the performance information report 8 may be displayed on the external device.

このようなシステム1000bの構成では、各CPU0〜CPU3毎にホストPCのコンピュータ装置100bとの経路を用意し、夫々の経路で独立にデータ転送を行う。従って、コア数が増えるに従ってPCI-Express等の転送経路で必要となるリソースが増加していくため、費用が掛かってしまう。   In such a configuration of the system 1000b, a route to the computer device 100b of the host PC is prepared for each CPU0 to CPU3, and data is transferred independently through each route. Therefore, as the number of cores increases, the resources required for the transfer path such as PCI-Express increase, which increases costs.

そこで、複数コアの夫々に対応するトレースデータ200〜203を1つの経路で入力することが考えられる。図6は、複数コアのトレースデータを1つの経路で入力するための構成例を示す図である。   Therefore, it is conceivable to input trace data 200 to 203 corresponding to each of a plurality of cores through one path. FIG. 6 is a diagram illustrating a configuration example for inputting trace data of a plurality of cores through one path.

図6に示すシステム1000cでは、複数コアに相当するCPU0〜CPU3の夫々に対応するトレースデータ200〜203は、1つの経路でI/F51bに入力される。そのため、性能シミュレーション装置50bは、トレース受信部6を更に有する。 In the system 1000c shown in FIG. 6, the trace data 200 to 203 corresponding to s husband CPU0~CPU3 corresponding to multiple cores is input to I / F51b on one path. Therefore, the performance simulation device 50b further includes a trace receiving unit 6.

性能シミュレーション装置50bでは、記憶部30にトレースデータ2bが用意され格納される。トレースデータ2bに含まれる命令3bは、性能シミュレータ5のCPU0〜CPU3を特定するためのCPU番号、PC(Program Counter)、命令、アドレス、データ等を示す。   In the performance simulation device 50b, the trace data 2b is prepared and stored in the storage unit 30. The instruction 3b included in the trace data 2b indicates a CPU number, a PC (Program Counter), an instruction, an address, data, and the like for specifying the CPU0 to CPU3 of the performance simulator 5.

トレース受信部6は、振り分け処理部6bと、性能シミュレータ5のCPU0〜CPU3の夫々に対応するバッファ0〜3とを有する。トレース受信部6は、ホストPCであるコンピュータ装置100bからシリアルに転送されてくるトレースデータ2bを受信し、各命令3bのCPU番号に対応するCPU用のバッファに命令を書き込む処理を行う。書き込もうとしたバッファがフルの時には、それ以上、トレースデータ2bを読み込まずにそのバッファが空くまで待つ。   The trace receiving unit 6 includes a distribution processing unit 6 b and buffers 0 to 3 corresponding to the CPU 0 to CPU 3 of the performance simulator 5. The trace receiving unit 6 receives the trace data 2b transferred serially from the computer device 100b, which is the host PC, and performs a process of writing the command to the CPU buffer corresponding to the CPU number of each command 3b. When the buffer to be written is full, the process waits until the buffer becomes empty without reading the trace data 2b.

振り分け処理部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 corresponding buffers 0 to 3 based on the CPU number of each instruction 3b input via the I / F 51b. For example, when the CPU number of the instruction 3b specifies CPU0, the instruction 3b is stored in the buffer 0 and given to the CPU0 of the performance simulator 5.

トレースデータ200〜203を1つの経路で転送する方法として、以下に説明する、転送時に複数コア(CPU0〜CPU3)の命令3bを並べ替える構成(図7)と、コア毎のトレースデータを予め格納しておくためのバッファを有する構成(図8)、複数コア(CPU0〜CPU3)間でトレースデータの命令3bを並べ替えて一つのトレースを作成しておく構成(図9)が考えられる。   As a method of transferring the trace data 200 to 203 through one route, a configuration (FIG. 7) for rearranging the instructions 3b of a plurality of cores (CPU0 to CPU3) at the time of transfer and the trace data for each core are stored in advance. A configuration (FIG. 8) having a buffer for storing the data (FIG. 8) and a configuration (FIG. 9) in which the trace data instructions 3b are rearranged between a plurality of cores (CPU0 to CPU3) to create one trace.

図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 computer device 100 b that is a host PC includes a transfer processing unit 33. The computer apparatus 100b does not rearrange the instructions 3b in advance, and the transfer processing unit 33 responds in units of instructions in response to a request transmitted at the time of fetching instructions of the CPUs 0 to 3 from the performance simulator 5. The instruction 3b is acquired from the trace data to be processed.

このような構成の場合、性能シミュレータ5がリクエストを出してから命令3bを含む応答があるまでの間、性能シミュレータ5の動作を停止しておくことで、実機と同じタイミングで実行することができる。しかし、1命令ごとにコンピュータ装置100b(ホストPC)との間で転送を行うため、転送処理部33による処理がボトルネックとなり実行速度を十分に得られない。   In such a configuration, the performance simulator 5 can be stopped at the same timing as the actual machine by stopping the operation of the performance simulator 5 from when the performance simulator 5 issues a request until there is a response including the instruction 3b. . However, since data is transferred to and from the computer device 100b (host PC) for each instruction, the processing by the transfer processing unit 33 becomes a bottleneck and the execution speed cannot be sufficiently obtained.

図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 performance simulation device 50 b, the trace receiving unit 6 includes buffers 0 to 3 corresponding to the trace size corresponding to the CPUs 0 to 3 of the performance simulator 5.

CPU0〜3の夫々に対応するトレースデータ200〜203は、性能シミュレータ5の動作が開始される前に、I/F51bを介してコンピュータ装置100b(ホストPC)から転送され、トレース受信部6のバッファ0〜3に格納される。しかし、この構成では、一般に、トレースデータのサイズが大きくなる(例えば、GB単位のサイズの)場合が多いため、性能シミュレーション装置50b側で全てを保持することは難しいと考えられる。   The trace data 200 to 203 corresponding to each of the CPUs 0 to 3 are transferred from the computer device 100b (host PC) via the I / F 51b before the operation of the performance simulator 5 is started, and the trace data of the trace receiving unit 6 is buffered. 0 to 3 are stored. However, in this configuration, in general, the size of the trace data often increases (for example, the size in GB units), so it is considered difficult to hold all of the data on the performance simulation device 50b side.

図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 performance simulator 5 starts its operation, the computer device 100b (host PC) side rearranges the instructions 3b of the CPUs 0 to 3 from the trace data 200 to 203 to form one rearranged trace. Data 210 is prepared in the storage unit 30.

性能シミュレータ5の実行時には、コンピュータ装置100b(ホストPC)の転送処理部33は、一つの並べ替え済トレースデータ210の先頭から順に命令3bを転送するのみでよく、転送速度の低下を防ぐことができる。   When the performance simulator 5 is executed, the transfer processing unit 33 of the computer device 100b (host PC) only has to transfer the instruction 3b in order from the top of one rearranged trace data 210, thereby preventing a decrease in transfer speed. it can.

次に、並べ替え済トレースデータ210に関して、複数コアの命令3を単純に並べ替えた例について説明する。図10は、実機での命令の実行タイミングを説明するための図である。図10において、CPU0〜CPU3の4つのCPUで夫々CPUn−0からCPUn−9までの順で、10個の命令を実行し、各命令の位置は、実機の実行タイミング9を示している。   Next, an example in which instructions 3 of a plurality of cores are simply rearranged with respect to the rearranged trace data 210 will be described. FIG. 10 is a diagram for explaining the instruction execution timing in the actual machine. In FIG. 10, ten instructions are executed in the order of CPUn-0 to CPUn-9 by the four CPUs CPU0 to CPU3, and the position of each instruction indicates the execution timing 9 of the actual machine.

例えば、CPU0の場合、クロックサイクル1でCPU0−0命令、サイクル3でCPU0−1命令、サイクル4でCPU0−2命令、サイクル6でCPU0−3命令、・・・のタイミングで実行される様子を示している。実行間隔が空く原因としては、キャッシュミス、データ依存待ち、分岐命令で分岐した場合等の様々な要因がある。   For example, in the case of CPU0, CPU0-0 instruction in clock cycle 1, CPU0-1 instruction in cycle 3, CPU0-2 instruction in cycle 4, CPU0-3 instruction in cycle 6, and so on. Show. There are various causes of the execution interval being free, such as a cache miss, waiting for data dependency, and branching by a branch instruction.

トレースデータでは命令間のタイミング情報を持たない。一方、実機の実行タイミング9では、同じ10命令であっても、各命令の遅延がコア毎に異なり、命令フェッチのタイミングが異なる。   Trace data does not have timing information between instructions. On the other hand, at the execution timing 9 of the actual machine, even with the same 10 instructions, the delay of each instruction is different for each core, and the instruction fetch timing is different.

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 CPU 0 to the CPU 3 in accordance with the execution order. FIG. 11 is a diagram for explaining execution timing using trace data simply rearranged.

図11において、並べ替え済トレースデータ210を用いた場合、図10に示すように実際の命令実行時の遅延に加えて、並べ替えによるトレースの順序に依存した遅延が発生する。例えば、図10に示す実機の実行タイミング9では、CPU1−2命令よりも先にCPU2−2命令が実行されているが、図11では、入力されたトレースの順序がCPU1−2−>CPU2−2となっているため、CPU2−2命令はCPU1−2命令が実行されるまで入力できない状態となる。   In FIG. 11, when rearranged trace data 210 is used, a delay depending on the order of traces due to rearrangement occurs in addition to the delay at the time of actual instruction execution as shown in FIG. For example, at the execution timing 9 of the actual machine shown in FIG. 10, the CPU2-2 instruction is executed prior to the CPU1-2 instruction, but in FIG. 11, the input trace order is CPU1-2> CPU2- Therefore, the CPU2-2 instruction cannot be input until the CPU1-2 instruction is executed.

また、トレースの順序に応じて遅延が追加されていき、実機の実行タイミング9と、性能シミュレーションによる実行タイミングとの誤差が大きくなっていく。   In addition, a delay is added according to the trace order, and an error between the execution timing 9 of the actual machine and the execution timing by the performance simulation increases.

図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 performance simulator 5, FIG. 12A shows the deviation of the execution timing of the CPU 0, FIG. 12B shows the deviation of the execution timing of the CPU 1, and FIG. FIG. 12D shows a deviation in execution timing of the CPU 3.

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 CPU 0 by the performance simulator 5 ends with a delay of d0 compared to the actual machine. In FIG. 12 (B), the performance simulation of the CPU 1 by the performance simulator 5 is finished with a delay of d1 compared to the actual machine. In FIG. 12 (C), the performance simulation of the CPU 2 by the performance simulator 5 ends with a delay of d2 compared to the actual machine. In FIG. 12 (D), the performance simulation of the CPU 3 by the performance simulator 5 is completed with a delay of d3 compared to the actual machine.

この例では、CPU0〜3の夫々で実行タイミングのずれが発生しているが、性能シミュレーションの実行自体は完了している。   In this example, the execution timings of each of the CPUs 0 to 3 are shifted, but the performance simulation execution itself has been completed.

上述したような実行タイミングのずれに関して、マルチプロセッサの場合にはバリア同期命令等の複数の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 CPU 1 writes data to the shared memory area with the CPU 1-3 instruction and the CPU 0, CPU 2, and CPU 3 have completed writing by the instruction without fail, the CPU 0-5 instruction, CPU 2 In order to read the shared memory area by the -3 instruction and the CPU 3-7 instruction, it is assumed that a synchronization instruction of the CPU 0-4 instruction, the CPU 1-4 instruction, the CPU 2-2 instruction, and the CPU 3-6 instruction is inserted.

この例では、最後の同期命令となる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 CPUs 0 to 3 is put into a waiting state by the synchronization command, and the operation of the performance simulator 5 is in progress. It may stop.

図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 performance simulator 5 stops. In FIG. 14, the trace receiving unit of the performance simulation apparatus 50b in the order of rearranged trace data 210, CPU0-0 instruction, CPU1-0 instruction, CPU2-0 instruction, CPU3-0 instruction, CPU0-1 instruction,. 6 and distributed to the corresponding CPU buffer according to the CPU number of each instruction, and then input to the performance simulator 5. In FIG. 14, the buffer size is assumed to be one instruction in order to simplify the description.

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 trace data 210 is repeatedly arranged one by one in the order of a predetermined CPU, after the CPU2-2 instruction, the CPU3-2 instruction, the CPU0-3 instruction, and the CPU1-3 instruction are sequentially input. When the CPU2-3 instruction enters the buffer 2, the CPU2 waits for the synchronization instructions (CPU0-4 instruction, CPU1-4 instruction, and CPU3-6 instruction) to be executed by the other CPUs 0, 2, and 3. It will be in a waiting state. The CPU 2 stops without performing the instruction fetch.

その後、更に、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 CPU 11 of the computer apparatus 100a or 100b.

図15において、所定順に各CPU0〜3のトレースデータ200〜203からトレースされた順に1ずつ命令を取り出して転送用トレースデータ300に追加する。その際、取り出した命令が同期命令の場合、同期命令の現われたCPUのトレースデータから転送用トレースデータ300への命令の追加を行わずにスキップして、全ての同期命令が転送用トレースデータ300に追加された後、所定順に従って各トレースデータ200〜203から同期命令以降の命令の転送用トレースデータ300への追加を再開する。   In FIG. 15, instructions are fetched one by one from the trace data 200 to 203 of the CPUs 0 to 3 in a predetermined order and added to the transfer trace data 300. At this time, if the fetched instruction is a synchronous instruction, the CPU skips without adding the instruction from the trace data of the CPU in which the synchronous instruction appears to the transfer trace data 300, and all the synchronous instructions are transferred to the transfer trace data 300. Are added to the trace data 300 for transfer of instructions after the synchronous instruction from the trace data 200 to 203 in a predetermined order.

図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 CPU 3 until all the synchronization instructions CPU 0-4, CPU 1-4, and CPU 3-6 are added to the transfer trace data 300. Up to −6 is a break based on the first synchronization instruction CPU2-2, and is indicated by a break 7 immediately after the last synchronization instruction CPU3-6 corresponding to the synchronization instruction CPU2-2.

また、最後の同期命令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 trace data 200 to 203 in a predetermined order including the skipped instruction, and added to the transfer trace data 300.

従って、図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 CPU 2 is not included after the first synchronization instruction CPU2-2 until the synchronization instruction appears in all the other CPUs 1, 3, and 4. When the synchronous instruction CPU0-4 appears after the synchronous instruction CPU2-2, the instruction of the CPU0 is not included until the synchronous instruction appears in the CPUs 1 and 3 other than the CPU2 and CPU0.

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 transfer trace data 300 is resumed in a predetermined order. After the last synchronization instruction CPU3-6, instructions from CPU0-5 to CPU2-9 are added to the transfer trace data 300, so that they are executed after the synchronization instruction.

トレース中に同期命令が現われるごとにこのように並べ替えを行うことによって、同期命令で区切られ、性能シミュレーションが停止することなく正常に動作する転送用トレースデータ300を作成することができる。   By performing such rearrangement every time a synchronous command appears in the trace, it is possible to create transfer trace data 300 that is partitioned by the synchronous command and operates normally without stopping the performance simulation.

図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 computer device 100a or 100b. The computer apparatus 100 a or 100 b includes the multi-core compatible ISS unit 35 and the trace combination processing unit 36 as processing units for creating the transfer trace data 300. The multi-core compatible ISS unit 35 and the trace combination processing unit 36 are realized by processing by the CPU 11 executing a corresponding program.

マルチコア対応ISS部35は、記憶部30に格納されているマルチスレッドプログラム34を読み込んで、命令セットレベルのシミュレーションを行う。その結果として、トレースデータTD−1、TD−2、TD−3、・・・、TD−nが記憶部30に出力され格納される。   The multi-core compatible ISS unit 35 reads the multi-thread program 34 stored in the storage unit 30 and performs an instruction set level simulation. As a result, trace data TD-1, TD-2, TD-3,..., TD-n are output and stored in the storage unit 30.

トレース結合処理部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 combination processing unit 36 reads instructions one by one from the trace data TD-1, TD-2, TD-3,..., TD-n stored in the storage unit 30 in a predetermined order. One transfer trace data 300 is created and stored in the storage unit 30 by the trace data creation method described above. In order to simplify the processing, the CPU 30 corresponding to the file name of each trace data TD-1, TD-2, TD-3,..., TD-n may be stored in the storage unit 30.

トレース結合処理部36によるトレース結合処理は、性能シミュレーションの実行の前に行われる。上述したように、トレース結合プログラムをCPU11が実行することによって実現されるように、ソフトウェアで実現してもよいし、ハードウェアで実現してもよい。また、コンピュータ装置100a及び100bとは、別の装置で実現してもよい。   The trace combination processing by the trace combination processing unit 36 is performed before the performance simulation is executed. As described above, the trace coupling program may be realized by software or hardware so as to be realized by the CPU 11 executing it. The computer devices 100a and 100b may be realized by a different device.

図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 combination processing unit 36 reads one instruction 3b in the traced order from the trace data of the CPU number 73 stored in the storage unit 30 according to a predetermined order for selecting trace data (step S11). .

選択の所定順は、命令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 combination processing unit 36 determines whether or not the read instruction 3b is a synchronous instruction (step S12). If the instruction 3b is a synchronization instruction, a synchronization flag is set in the flag table 71 of the CPU number 73 (step S13), and the instruction 3b is output and stored in the transfer trace data 300 (step S14).

フラグテーブル71は、記憶部30に格納され、例えば、コア数分のビット数を少なくとも有するようにすればよい。CPU番号と同期フラグとを対応付ければよい。同期フラグは、設定されることによって「1」を示す。即ち、CPU番号に対応する同期フラグが「1」を示せば、読み出した命令が同期命令であったことを示す。また、CPU番号に対応する同期フラグが「0」を示せば、未だ同期命令が読み出されていないことを示す。   The flag table 71 is stored in the storage unit 30 and may have at least the number of bits corresponding to the number of cores, for example. The CPU number may be associated with the synchronization flag. The synchronization flag indicates “1” by being set. That is, if the synchronization flag corresponding to the CPU number indicates “1”, it indicates that the read instruction is a synchronization instruction. If the synchronization flag corresponding to the CPU number indicates “0”, it indicates that the synchronization command has not been read yet.

一方、ステップ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 combination processing unit 36 refers to the flag table 71 stored in the storage unit 30 and sets the synchronization flag of the CPU number 73. It is determined whether it has been performed (step S13-2). If the synchronization flag is set, the read instruction 3b is stored in the synchronization buffer 72 of the CPU number 73 (step S14-2).

同期用バッファ72は、記憶部30内に用意されたCPU番号毎の作業用のバッファ領域である。読み出された同期命令と同一CPU番号を示す命令3bがトレースデータから読み出された場合、他CPUに対する全ての同期命令が検出されるまで、そのCPU番号の同期用バッファ72に格納される。   The synchronization buffer 72 is a work buffer area for each CPU number prepared in the storage unit 30. When the instruction 3b indicating the same CPU number as the read synchronization instruction is read from the trace data, it is stored in the synchronization buffer 72 for that CPU number until all synchronization instructions for other CPUs are detected.

ステップS13−2にて、同期フラグがセットされていないと判断した場合、トレース結合処理部36は、命令3bを転送用トレースデータ300に出力し格納する(ステップS14−4)。   If it is determined in step S13-2 that the synchronization flag is not set, the trace combination processing unit 36 outputs and stores the instruction 3b in the transfer trace data 300 (step S14-4).

ステップ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 combination processing unit 36 refers to the flag table 71 to determine whether or not the synchronization flag has been set for all the CPUs (step S15). ). When the synchronization flag is set for all the CPUs, the trace combination processing unit 36 clears all the synchronization flags (step S16). All the synchronization flags are set to “0”.

そして、トレース結合処理部36は、図18に説明されるようなバッファ出力処理を実行する。バッファ出力処理の実行後、トレース結合処理部36は、ステップS18へと進む。   Then, the trace combination processing unit 36 executes a buffer output process as illustrated in FIG. After executing the buffer output process, the trace combination processing unit 36 proceeds to step S18.

ステップ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 combination processing unit 36, in a predetermined order, It is determined whether or not the CPU number 73 is the last number (step S18).

CPU番号73が最後の番号であると判断した場合、トレース結合処理部36は、CPU番号73を初期化して(ステップS19)、ステップS20へと進む。記憶部30に格納されているCPU番号73が、「0」に設定される。一方、CPU番号73が最後の番号ではないと判断した場合、トレース結合処理部36は、CPU番号73を1インクリメントして(ステップS19−2)、ステップS20へと進む。   When determining that the CPU number 73 is the last number, the trace combination processing unit 36 initializes the CPU number 73 (step S19), and proceeds to step S20. The CPU number 73 stored in the storage unit 30 is set to “0”. On the other hand, when determining that the CPU number 73 is not the last number, the trace combination processing unit 36 increments the CPU number 73 by 1 (step S19-2), and proceeds to step S20.

そして、トレース結合処理部36は、全てのトレースの読み込みを完了したか否かを判断する(ステップS20)。全てのトレースの読み込みが未完了であると判断した場合、トレース結合処理部36は、ステップS11へ戻り、記憶部30に記憶されているCPU番号73に基づいて、上述した同様の処理を繰り返す。   Then, the trace combination processing unit 36 determines whether or not all the traces have been read (step S20). If it is determined that reading of all the traces is incomplete, the trace combination processing unit 36 returns to step S11 and repeats the same processing described above based on the CPU number 73 stored in the storage unit 30.

一方、ステップS20にて、全てのトレースの読み込みを完了したと判断した場合、トレース結合処理部36は、この処理を終了する。   On the other hand, if it is determined in step S20 that all the traces have been read, the trace combination processing unit 36 ends this process.

図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 combination processing unit 36 initializes the CPU number 73-2 for buffer output processing (step S51), and reads one instruction 3b from the synchronization buffer having the CPU number 73-2 (step S52). .

トレース結合処理部36は、読み込んだ命令を転送用トレースデータ300に出力する(ステップS53)。トレース結合処理部36は、所定順において、CPU番号73−2が最後の番号であるか否かを判断する(ステップS54)。   The trace combination processing unit 36 outputs the read instruction to the transfer trace data 300 (step S53). The trace combination processing unit 36 determines whether or not the CPU number 73-2 is the last number in a predetermined order (step S54).

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 combination processing unit 36 initializes the CPU number 73-2 (step S55), and proceeds to step S20. The CPU number 73-2 stored in the storage unit 30 is set to “0”. On the other hand, when determining that the CPU number 73-2 is not the last number, the trace combination processing unit 36 increments the CPU number 73-2 by 1 (step S55-2), and proceeds to step S56.

そして、トレース結合処理部36は、全ての同期用バッファ72が空か否かを判断する(ステップS56)。全ての同期用バッファ72が空である場合、トレース結合処理部36は、このバッファ出力処理を終了する。全ての同期用バッファ72が空でない場合、トレース結合処理部36は、ステップS52へと戻り、上述した同様の処理を繰り返す。 Then, the trace combination processing unit 36 determines whether or not all the synchronization buffers 72 are empty (step S56). When all the synchronization buffers 72 are empty, the trace combination processing unit 36 ends this buffer output processing . If all the synchronization buffers 72 are not empty, the trace combination processing unit 36 returns to step S52 and repeats the same processing as described above.

上述したトレース結合処理部36によるトレース結合処理によって、作成された転送用トレースデータ300を用いた場合の実行タイミングについて、図19及び図20で説明する。図19及び図20では、図6に示す構成例において、トレースデータ300を用いた場合で説明する。トレースデータ300においても、命令3bのデータ構成は、トレースデータ2bの命令3bと同様である。   The execution timing when the transfer trace data 300 created by the trace combination processing by the trace combination processing unit 36 described above is used will be described with reference to FIGS. 19 and 20, the case where the trace data 300 is used in the configuration example shown in FIG. 6 will be described. Also in the trace data 300, the data structure of the instruction 3b is the same as the instruction 3b of the trace data 2b.

図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 transfer trace data 300 created by the trace combination processing unit 36 is input to the trace receiving unit 6 of the performance simulation apparatus 50b, the instruction 3b is stored in the buffer corresponding to the CPU number of the instruction 3b. The

性能シミュレータ5によってシミュレーションされる各CPU0〜CPU3は、夫々の対応するバッファ0〜バッファ3から命令3bを読み込んで実行する。最初の同期命令CPU2−2をCPU2が実行すると、CPU2は、他CPU0、1及び3による同期命令の実行待ちとなる。   Each of the CPU0 to CPU3 simulated by the performance simulator 5 reads the instruction 3b from the corresponding buffer 0 to buffer 3 and executes it. When the CPU 2 executes the first synchronization instruction CPU2-2, the CPU 2 waits for execution of the synchronization instruction by the other CPUs 0, 1 and 3.

次に、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 other CPUs 1 and 3. Further, when the synchronization instruction CPU1-4 is executed by the CPU1, the CPU1 waits for execution of the synchronization instruction by the other CPU3. Finally, when the synchronous instruction CPU 3-6 is executed by the CPU 3, all the synchronous instructions have been executed, and instruction fetches by the CPUs 0 to 3 are executed without delay. The point in time is indicated by a break 7. After the break 7, the instructions 3b traced by the CPUs 0 to 3 are sequentially executed.

図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 performance simulator 5, FIG. 20A shows a shift in the execution timing of CPU0, FIG. 20B shows a shift in the execution timing of CPU1, and FIG. FIG. 20D shows a deviation in the execution timing of the CPU 3.

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 CPU 0 by the performance simulator 5 is finished with a delay of d20 compared to the actual machine. In FIG. 12 (B), the performance simulation of the CPU 1 by the performance simulator 5 is completed with a delay of d21 compared to the actual machine. In FIG. 12C, the performance simulation of the CPU 2 by the performance simulator 5 is completed with a delay of d22 compared to the actual machine. In FIG. 12 (D), the performance simulation of the CPU 3 by the performance simulator 5 is finished with a delay of d23 compared to the actual machine.

図20(A)から図12(D)の夫々において、実機の実行タイミングにおける区切り7aに対する、性能シミュレータ5による実行タイミングにおける区切り7bの遅延分の差が性能シミュレータ5にはある。しかしながら、トレース結合処理部36によって作成された転送用トレースデータ300を用いることによって、性能シミュレーションが途中で停止することなく実行できている。また、全CPU0〜CPU3の同期による実行タイミングについても、区切り7bに示すように実現できている。   In each of FIG. 20A to FIG. 12D, the performance simulator 5 has a difference of the delay of the break 7b at the execution timing by the performance simulator 5 with respect to the break 7a at the execution timing of the actual machine. However, by using the transfer trace data 300 created by the trace combination processing unit 36, the performance simulation can be executed without stopping midway. Further, the execution timing by the synchronization of all the CPU0 to CPU3 can also be realized as shown in the partition 7b.

上述したように、複数のプロセッサ(CPU)を搭載したシステムの性能評価において、同期命令毎に区切られるように、複数のCPU0〜CPUnでトレースされた命令3bを並べ替えて一つのトレースデータ300を作成することによって、同期命令を含むトレースに対しても、同期命令後の各プロセッサによる命令フェッチが滞りなく行われるため、性能シミュレーションが途中で停止することなく実行される。   As described above, in the performance evaluation of a system equipped with a plurality of processors (CPUs), one trace data 300 is obtained by rearranging the instructions 3b traced by the plurality of CPUs 0 to CPUn so as to be divided for each synchronization instruction. As a result of the creation, the instruction fetch by each processor after the synchronization instruction is performed without delay even for the trace including the synchronization instruction, so that the performance simulation is executed without stopping midway.

本実施例では、複数プロセッサのシステムを評価する性能シミュレーションのための転送用トレースデータを、複数プロセッサへの全同期命令後に次の命令が入力されるように複数のトレースを同期命令毎に区切って結合して作成する。   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 transfer trace data 300 according to the present embodiment can be applied for performance simulation performed by the configurations of FIGS. 2 and 6 to 9. The computer devices 100a and 100b correspond to a trace coupling device described below.

本発明は、具体的に開示された実施例に限定されるものではなく、特許請求の範囲から逸脱することなく、種々の変形や変更が可能である。   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 claim 1, further comprising: a buffer output unit configured to perform the above operation.
(Appendix 3)
3. The trace combining device according to claim 2, wherein when the output to the transfer trace data by the buffer output unit is completed, the processing by the instruction reading unit is resumed.
(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 claim 4, further comprising an unset instruction storage unit that stores the synchronization buffer in the synchronization buffer corresponding to the processor.
(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 instruction 6. The trace combining device according to appendix 4 or 5, further comprising a post-setting instruction storage unit that outputs and stores the data to the transfer trace data.
(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, 2b Trace data 3, 3b Instruction 4 Architecture setting information 5 Performance simulator 6 Trace reception unit 7, 7a, 7b Delimiter 8 Performance information report 9 Actual machine execution timing 11 CPU
12 ROM
13 RAM
14 hard disk drive 15 input device 16 output device 17 communication I / F
18 drive 19 storage medium 20 performance simulation device I / F
30 storage unit 33 transfer processing unit 34 multi-thread program 35 multi-core compatible ISS unit 36 trace combination processing unit 50a performance simulation unit 50b performance simulation device 51b, 52b I / F
71 Flag table 72 Synchronization buffer 73 CPU number 100a, 100b Computer device 200, 201, 202, 203 Trace data 210 Rearranged trace data 300 Transfer trace data

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.
前記バッファ出力部による前記転送用トレースデータへの出力が終了すると、前記命令読込部による処理を再開することを特徴とする請求項2記載のトレース結合装置。   3. The trace coupling apparatus according to claim 2, wherein when the output to the transfer trace data by the buffer output unit is completed, the processing by the instruction reading unit is resumed. 前記トレース結合処理部は、
前記フラグ判断部によって前記同期フラグが設定されていないと判断された場合、前記命令を前記転送用トレースデータへ出力して追加するフラグ未設定追加部と
を有することを特徴とする請求項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.
JP2012034559A 2012-02-20 2012-02-20 Trace coupling device and program Expired - Fee Related JP5874433B2 (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

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