JP2013122740A - Data processing device, conversion device, data processing system, conversion method, and conversion program - Google Patents

Data processing device, conversion device, data processing system, conversion method, and conversion program Download PDF

Info

Publication number
JP2013122740A
JP2013122740A JP2011271782A JP2011271782A JP2013122740A JP 2013122740 A JP2013122740 A JP 2013122740A JP 2011271782 A JP2011271782 A JP 2011271782A JP 2011271782 A JP2011271782 A JP 2011271782A JP 2013122740 A JP2013122740 A JP 2013122740A
Authority
JP
Japan
Prior art keywords
code
instruction
conversion
information
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.)
Granted
Application number
JP2011271782A
Other languages
Japanese (ja)
Other versions
JP5794133B2 (en
Inventor
Toshiki Obara
俊樹 小原
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 JP2011271782A priority Critical patent/JP5794133B2/en
Publication of JP2013122740A publication Critical patent/JP2013122740A/en
Application granted granted Critical
Publication of JP5794133B2 publication Critical patent/JP5794133B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To increase efficiency in debugging.SOLUTION: From a CPU 101, an accelerator 102 accepts a native instruction 112 of the accelerator 102, and information 113 specifying an intermediate instruction 111 associated with the native instruction 112. As a first instruction, the accelerator 102 accepts "NOT R3,1" as a native instruction 112-1, and "ldrp" as information 113-1. Then, as a second instruction, the accelerator 102 accepts "AND R3,R2,R3" as a native instruction 112-2, and "and" as information 113-2. Next, the accelerator 102 executes the native instructions 112 "NOT R3,1" and "AND R3,R2,R3", and records the information 113 "ldrp" and "and" specifying the intermediate instructions.

Description

本発明は、ハードウェア・アクセラレーションに関するデータ処理装置、変換装置、データ処理システム、変換方法、および変換プログラムに関する。   The present invention relates to a data processing device, a conversion device, a data processing system, a conversion method, and a conversion program related to hardware acceleration.

従来から、特定の処理に対して、CPU(Central Processing Unit)の上でソフトウェアを実行する場合より高速に行うために、CPUに対し付加的なハードウェアを用意して、特定の処理を高速に実行することが行われている。このような技術は、ハードウェア・アクセラレーションと呼ばれ、また、付加的なハードウェアは、アクセラレータと呼ばれる。アクセラレータとして、たとえば、画像処理を行うGPU(Graphics Processing Unit)、デジタル信号処理を行うDSP(Digital Signal Processor)等が存在する。   Conventionally, in order to perform specific processing at a higher speed than when executing software on a CPU (Central Processing Unit), additional hardware is prepared for the CPU so that the specific processing can be performed at high speed. To be executed. Such a technique is called hardware acceleration, and the additional hardware is called an accelerator. Examples of accelerators include a GPU (Graphics Processing Unit) that performs image processing, a DSP (Digital Signal Processor) that performs digital signal processing, and the like.

アクセラレータは、アクセラレータが実行可能なネイティブ命令を有している。または、互換性のために抽象化された中間命令も存在し、開発者は、中間命令にてアプリケーションソフトウェアの開発を行ってもよい。以下の説明では、アプリケーションソフトウェアをアプリと称する。中間命令が含まれたアプリの実行時、CPUは、JIT(Just In Time)コンパイラによって、中間命令をネイティブ命令に変換し、アクセラレータに変換後のネイティブ命令を実行させる。   The accelerator has a native instruction that can be executed by the accelerator. Alternatively, there are intermediate instructions abstracted for compatibility, and the developer may develop application software using the intermediate instructions. In the following description, application software is referred to as an application. When an application including an intermediate instruction is executed, the CPU converts the intermediate instruction into a native instruction by a JIT (Just In Time) compiler, and causes the accelerator to execute the converted native instruction.

たとえば、アクセラレータを用いる技術として、Java(登録商標)の中間命令に関して、Javaアクセラレータが実行可能な中間命令についてはネイティブ命令に変換してJavaアクセラレータが実行し、他の中間命令についてはCPUが実行するものがある。また、Javaアクセラレータに関して、Javaスタックマシンをレジスタマシンで再現する場合、冗長となるLoad命令を供給しないことで、Javaプログラムの実行速度を向上させる技術が開示されている(たとえば、下記特許文献1、2を参照。)。   For example, as a technique using an accelerator, regarding an intermediate instruction of Java (registered trademark), an intermediate instruction that can be executed by the Java accelerator is converted into a native instruction and executed by the Java accelerator, and the other intermediate instructions are executed by the CPU. There is something. Further, regarding a Java accelerator, there is disclosed a technique for improving the execution speed of a Java program by not supplying a redundant load instruction when reproducing a Java stack machine with a register machine (for example, Patent Document 1 below) 2).

特開2004−280766号公報Japanese Patent Laid-Open No. 2004-280766 特開2009−176311号公報JP 2009-176411 A

しかしながら、上述した従来技術において、開発者が、アクセラレータの動作のデバッグや、チューニングのために、実行履歴や実行回数を取得したい場合、アクセラレータ側の機構を用いるので、アクセラレータのネイティブ命令の単位で取得することになる。開発者は、中間命令を用いて開発を行っているため、ネイティブ命令の単位による実行履歴、実行回数を取得しても、デバッグ、チューニングが行い難いという問題がある。   However, in the above-mentioned conventional technology, when the developer wants to acquire the execution history and the number of executions for debugging and tuning of the accelerator operation, the accelerator side mechanism is used, so acquisition is performed in units of accelerator native instructions. Will do. Since developers are developing using intermediate instructions, there is a problem that debugging and tuning are difficult even if the execution history and the number of executions are acquired in units of native instructions.

本発明は、上述した従来技術による問題点を解消するため、デバッグを効率化できるデータ処理装置、変換装置、データ処理システム、変換方法、および変換プログラムを提供することを目的とする。   An object of the present invention is to provide a data processing device, a conversion device, a data processing system, a conversion method, and a conversion program capable of improving the efficiency of debugging in order to solve the above-described problems caused by the conventional technology.

上述した課題を解決し、目的を達成するため、本発明の一側面によれば、命令コードと、命令コードに関連付けられた命令コードの変換前のコードを特定する情報と、を受け付け、命令コードの実行により、変換前のコードを特定する情報を記録するデータ処理装置が提案される。   In order to solve the above-described problems and achieve the object, according to one aspect of the present invention, an instruction code and information for identifying a code before conversion of the instruction code associated with the instruction code are received, and the instruction code By executing the above, a data processing apparatus for recording information for specifying the code before conversion is proposed.

また、他の側面によれば、一連の命令コードに対する注釈を示す情報と一連の命令コードの変換前のコードを特定する情報とを含む注釈コードまたは一連の命令コードを受け付け、注釈コードが受け付けられた場合、一連の命令コードの実行前に、一連の命令コードの変換前のコードを特定する情報を記録し、一連の命令コードが受け付けられた場合、一連の命令コードを実行するデータ処理装置が提案される。   According to another aspect, an annotation code or a series of instruction codes including information indicating annotations for a series of instruction codes and information for identifying codes before conversion of the series of instruction codes is accepted, and the annotation codes are accepted. In this case, before the execution of the series of instruction codes, information for identifying the codes before conversion of the series of instruction codes is recorded, and when the series of instruction codes is received, the data processing device that executes the series of instruction codes Proposed.

また、他の側面によれば、命令コードと命令コードの変換前のコードとの組合せを記憶し、変換前のコードが検出された場合、記憶された組合せを参照して、変換前のコードを、命令コードと命令コードに関連付けられた変換前のコードを特定する情報とに変換し、命令コードと命令コードに関連付けられた変換前のコードを特定する情報とを、自装置から他装置に送信する変換装置、変換方法、および変換プログラムが提案される。   According to another aspect, the combination of the instruction code and the code before conversion of the instruction code is stored, and when the code before conversion is detected, the code before conversion is referred to by referring to the stored combination. , Converts the instruction code and information to identify the code before conversion associated with the instruction code, and transmits the instruction code and information to identify the code before conversion associated with the instruction code from the own device to another device. A conversion device, a conversion method, and a conversion program are proposed.

また、他の側面によれば、第1の装置と、特定の処理を実行する第2の装置と、を含むデータ処理システムであって、第2の装置が実行可能な命令コードと命令コードの変換前のコードとの組合せを記憶し、変換前のコードが検出された場合、変換前のコードを、命令コードと命令コードに関連付けられた変換前のコードを特定する情報と、に変換し、命令コードと命令コードに関連付けられた変換前のコードを特定する情報とを、第1の装置から第2の装置に送信し、第2の装置によって、命令コードと命令コードに関連付けられた変換前のコードを特定する情報とを受け付け、第2の装置によって、命令コードの実行により、変換前のコードを特定する情報を記録するデータ処理システムが提案される。   According to another aspect, there is provided a data processing system including a first device and a second device that executes a specific process, wherein an instruction code executable by the second device and an instruction code The combination with the code before conversion is stored, and when the code before conversion is detected, the code before conversion is converted into an instruction code and information identifying the code before conversion associated with the instruction code, An instruction code and information for identifying a code before conversion associated with the instruction code are transmitted from the first apparatus to the second apparatus, and the instruction code and the pre-conversion associated with the instruction code are transmitted by the second apparatus. A data processing system is proposed in which information for identifying the code before the conversion is recorded by the second device by executing the instruction code.

本発明の一側面によれば、デバッグの効率化を図ることができるという効果を奏する。   According to one aspect of the present invention, there is an effect that debugging efficiency can be improved.

図1は、実施の形態1におけるアクセラレータの動作例を示す説明図である。FIG. 1 is an explanatory diagram illustrating an operation example of the accelerator according to the first embodiment. 図2は、実施の形態1にかかるデータ処理システムのハードウェアの一例を示すブロック図である。FIG. 2 is a block diagram of an example of hardware of the data processing system according to the first embodiment. 図3は、実施の形態1にかかるデータ処理システムの機能例を示すブロック図である。FIG. 3 is a block diagram of an example of functions of the data processing system according to the first embodiment. 図4は、ソフトウェアおよび入出力データの一例を示す説明図である。FIG. 4 is an explanatory diagram illustrating an example of software and input / output data. 図5は、データ処理システムの動作例を示すシーケンス図である。FIG. 5 is a sequence diagram illustrating an operation example of the data processing system. 図6は、テンプレート情報の記憶内容の一例を示す説明図である。FIG. 6 is an explanatory diagram showing an example of the stored contents of the template information. 図7は、実施の形態1におけるJITコンパイラによる中間命令の変換例を示す説明図である。FIG. 7 is an explanatory diagram showing an example of intermediate instruction conversion by the JIT compiler in the first embodiment. 図8は、中間命令での実行履歴および実行回数の具体例を示す説明図である。FIG. 8 is an explanatory diagram showing a specific example of the execution history and the number of executions in the intermediate instruction. 図9は、JITコンパイラによる変換処理の一例を示すフローチャートである。FIG. 9 is a flowchart showing an example of conversion processing by the JIT compiler. 図10は、実施の形態1におけるアクセラレータの動作例を示すフローチャートである。FIG. 10 is a flowchart illustrating an operation example of the accelerator according to the first embodiment. 図11は、実施の形態2にかかるデータ処理システムの機能例を示すブロック図である。FIG. 11 is a block diagram of a function example of the data processing system according to the second embodiment. 図12は、実施の形態2におけるJITコンパイラによる中間命令の変換例を示す説明図である。FIG. 12 is an explanatory diagram showing an example of intermediate instruction conversion by the JIT compiler in the second embodiment. 図13は、実施の形態2におけるアクセラレータの動作例を示すフローチャートである。FIG. 13 is a flowchart illustrating an operation example of the accelerator according to the second embodiment. 図14は、実施の形態3にかかるデータ処理システムの機能例を示すフローチャートである。FIG. 14 is a flowchart of a function example of the data processing system according to the third embodiment. 図15は、実施の形態3におけるJITコンパイラによる中間命令の変換例を示す説明図である。FIG. 15 is an explanatory diagram illustrating an example of intermediate instruction conversion by the JIT compiler according to the third embodiment. 図16は、実施の形態3におけるアクセラレータの動作例を示すフローチャートである。FIG. 16 is a flowchart illustrating an operation example of the accelerator according to the third embodiment. 図17は、実施の形態1〜3にかかるコンピュータを用いたシステムの適用例を示す説明図である。FIG. 17 is an explanatory diagram of an application example of a system using a computer according to the first to third embodiments.

以下に添付図面を参照して、開示のデータ処理装置、変換装置、データ処理システム、変換方法、および変換プログラムの実施の形態を詳細に説明する。以下の説明では、データ処理装置をアクセラレータとして、変換装置をCPUとして説明している。   Exemplary embodiments of a disclosed data processing device, conversion device, data processing system, conversion method, and conversion program will be described in detail below with reference to the accompanying drawings. In the following description, the data processing device is described as an accelerator, and the conversion device is described as a CPU.

(実施の形態1の説明)
図1は、実施の形態1におけるアクセラレータの動作例を示す説明図である。データ処理システム100は、CPU101と、GPU、DSPなどのアクセラレータ102と、を含む。CPU101とアクセラレータ102は、バス103で接続されている。
(Description of Embodiment 1)
FIG. 1 is an explanatory diagram illustrating an operation example of the accelerator according to the first embodiment. The data processing system 100 includes a CPU 101 and an accelerator 102 such as a GPU or a DSP. The CPU 101 and the accelerator 102 are connected by a bus 103.

CPU101は、事前に、中間命令111を、アクセラレータ102のネイティブ命令112と中間命令111を特定する情報113とに変換している。また、実施の形態1では、アクセラレータ102は、特定の処理を高速に実行することの他に、中間命令111単位で示された性能情報121を提供することも目的としている。性能情報121は、命令の実行履歴や実行回数が記録された情報である。   The CPU 101 converts the intermediate instruction 111 into the native instruction 112 of the accelerator 102 and information 113 specifying the intermediate instruction 111 in advance. Further, in the first embodiment, the accelerator 102 is intended to provide the performance information 121 shown in units of intermediate instructions 111 in addition to executing specific processing at high speed. The performance information 121 is information in which an instruction execution history and the number of executions are recorded.

アクセラレータ102は、CPU101から、アクセラレータ102のネイティブ命令112と、ネイティブ命令112に関連付けられた中間命令111を特定する情報113と、を受け付ける。   The accelerator 102 receives from the CPU 101 the native instruction 112 of the accelerator 102 and information 113 specifying the intermediate instruction 111 associated with the native instruction 112.

図1の例では、アクセラレータ102は、1命令目として、ネイティブ命令112−1が“NOT R3,1”であり、情報113−1として、“ldrp”を受け付ける。また、アクセラレータ102は、2命令目として、ネイティブ命令112−2が“AND R3,R2,R3”であり、情報113−2として、“and”を受け付ける。   In the example of FIG. 1, the accelerator 102 receives “NOT R3, 1” as the first instruction and “ldrp” as the information 113-1, as the first instruction. Further, as the second instruction, the accelerator 102 receives “and” as the information 113-2 and the native instruction 112-2 is “AND R3, R2, R3”.

次に、アクセラレータ102は、ネイティブ命令112“NOT R3,1”、“AND R3,R2,R3”を実行し、中間命令を特定する情報113“ldrp”、“and”を記録する。これにより、CPU101は、中間命令単位で命令の実行履歴や実行回数を開発者に提供できるため、開発者によるデバッグを効率化できる。以下、図1に示した動作を行うデータ処理システム100の詳細を、図2〜図10を用いて説明する。   Next, the accelerator 102 executes the native instructions 112 “NOT R3, 1” and “AND R3, R2, R3”, and records information 113 “ldrp” and “and” specifying the intermediate instruction. As a result, the CPU 101 can provide the developer with the execution history and the number of executions of instructions in units of intermediate instructions, so that debugging by the developer can be made more efficient. Details of the data processing system 100 that performs the operation shown in FIG. 1 will be described below with reference to FIGS.

(データ処理システム100のハードウェア)
図2は、実施の形態1にかかるデータ処理システムのハードウェアの一例を示すブロック図である。図2において、データ処理システム100は、CPU101と、アクセラレータ102と、ROM(Read‐Only Memory)201と、RAM(Random Access Memory)202と、を含む。また、データ処理システム100は、磁気ディスクドライブ203と、磁気ディスク204と、光ディスクドライブ205と、光ディスク206と、を含む。また、ユーザやその他の機器との入出力装置としてデータ処理システム100は、ディスプレイ207と、I/F(Interface)208と、キーボード209と、マウス210と、を含む。また、各部はバス103によってそれぞれ接続されている。
(Hardware of data processing system 100)
FIG. 2 is a block diagram of an example of hardware of the data processing system according to the first embodiment. In FIG. 2, the data processing system 100 includes a CPU 101, an accelerator 102, a ROM (Read-Only Memory) 201, and a RAM (Random Access Memory) 202. The data processing system 100 also includes a magnetic disk drive 203, a magnetic disk 204, an optical disk drive 205, and an optical disk 206. Further, the data processing system 100 as an input / output device for a user or other devices includes a display 207, an I / F (Interface) 208, a keyboard 209, and a mouse 210. Each unit is connected by a bus 103.

ここで、CPU101は、データ処理システム100の全体の制御を司る。アクセラレータ102は、CPU101からの指示により、特定の処理を実行する。また、アクセラレータ102がGPUである場合、GPUを画像処理以外となる、より一般的な計算処理に使用するGPGPU(General−Purpose computing on GPU)という技術が適用される場合もある。   Here, the CPU 101 controls the entire data processing system 100. The accelerator 102 executes specific processing according to an instruction from the CPU 101. Further, when the accelerator 102 is a GPU, there is a case where a technique called GPGPU (General-Purpose computing on GPU) used for a more general calculation process other than image processing is used.

ROM201は、ブートプログラムなどのプログラムを記憶している。RAM202は、CPU101のワークエリアとして使用される。磁気ディスクドライブ203は、CPU101の制御にしたがって磁気ディスク204に対するデータのリード/ライトを制御する。磁気ディスク204は、磁気ディスクドライブ203の制御で書き込まれたデータを記憶する。   The ROM 201 stores a program such as a boot program. The RAM 202 is used as a work area for the CPU 101. The magnetic disk drive 203 controls data read / write with respect to the magnetic disk 204 according to the control of the CPU 101. The magnetic disk 204 stores data written under the control of the magnetic disk drive 203.

光ディスクドライブ205は、CPU101の制御にしたがって光ディスク206に対するデータのリード/ライトを制御する。光ディスク206は、光ディスクドライブ205の制御で書き込まれたデータを記憶したり、光ディスク206に記憶されたデータをコンピュータに読み取らせたりする。なお、ROM201、磁気ディスク204、光ディスク206のいずれかの記憶装置に、実施の形態1〜3にかかる変換プログラムが格納されていてもよい。   The optical disk drive 205 controls reading / writing of data with respect to the optical disk 206 according to the control of the CPU 101. The optical disk 206 stores data written under the control of the optical disk drive 205, or causes the computer to read data stored on the optical disk 206. Note that the conversion program according to the first to third embodiments may be stored in any one of the ROM 201, the magnetic disk 204, and the optical disk 206.

ディスプレイ207は、カーソル、アイコンあるいはツールボックスをはじめ、文書、画像、機能情報などのデータを表示する。たとえば、ディスプレイ207は、CRT、TFT液晶ディスプレイ、プラズマディスプレイなどを採用することができる。   A display 207 displays data such as a document, an image, and function information as well as a cursor, an icon, or a tool box. For example, the display 207 may be a CRT, a TFT liquid crystal display, a plasma display, or the like.

I/F208は、通信回線を通じてLAN(Local Area Network)、WAN(Wide Area Network)、インターネットなどのネットワーク211に接続され、ネットワーク211を介して他の装置に接続される。そして、I/F208は、ネットワーク211と内部のインターフェースを司り、外部装置からのデータの入出力を制御する。I/F208には、たとえばモデムやLANアダプタなどを採用することができる。   The I / F 208 is connected to a network 211 such as a LAN (Local Area Network), a WAN (Wide Area Network), and the Internet through a communication line, and is connected to another device via the network 211. The I / F 208 controls an internal interface with the network 211 and controls input / output of data from an external device. For example, a modem or a LAN adapter can be adopted as the I / F 208.

キーボード209は、文字、数字、各種指示などの入力のためのキーを有し、データの入力を行う。また、キーボード209は、タッチパネル式の入力パッドやテンキーなどであってもよい。マウス210は、カーソルの移動や範囲選択、あるいはウィンドウの移動やサイズの変更などを行う。また、データ処理システム100は、マウス210の代わりとして、ポインティングデバイスとして同様に機能を有するものであれば、トラックボールやジョイスティックなどであってもよい。   The keyboard 209 has keys for inputting characters, numbers, various instructions, and the like, and inputs data. The keyboard 209 may be a touch panel type input pad or a numeric keypad. The mouse 210 performs cursor movement, range selection, window movement, size change, and the like. The data processing system 100 may be a trackball or a joystick as long as it has the same function as a pointing device instead of the mouse 210.

(データ処理システム100の機能)
次に、データ処理システム100の機能について説明する。図3は、実施の形態1にかかるデータ処理システムの機能例を示すブロック図である。データ処理システム100では、CPU101がJITコンパイラ301と、デバイスドライバ302を実行する。また、実施の形態1にかかるデータ処理システム100は、受付部311と、判断部312と、実行部313と、記録部314と、出力部315と、記憶部321と、検出部322と、変換部323と、送信部324と、取得部325を含む。検出部322〜取得部325は、記憶装置に記憶されたプログラムをCPU101が実行することにより、その機能を実現する。ここで、記憶装置とは、具体的には、たとえば、図2に示したROM201、RAM202、磁気ディスク204、光ディスク206などである。
(Function of data processing system 100)
Next, functions of the data processing system 100 will be described. FIG. 3 is a block diagram of an example of functions of the data processing system according to the first embodiment. In the data processing system 100, the CPU 101 executes a JIT compiler 301 and a device driver 302. In addition, the data processing system 100 according to the first exemplary embodiment includes a reception unit 311, a determination unit 312, an execution unit 313, a recording unit 314, an output unit 315, a storage unit 321, a detection unit 322, and a conversion A unit 323, a transmission unit 324, and an acquisition unit 325 are included. The detection unit 322 to the acquisition unit 325 realize their functions when the CPU 101 executes a program stored in the storage device. Here, specifically, the storage device is, for example, the ROM 201, the RAM 202, the magnetic disk 204, the optical disk 206, etc. shown in FIG.

また、アクセラレータ102は、性能情報121にアクセス可能である。性能情報121は、中間面例単位での命令の実行履歴や実行回数が記録された情報である。性能情報121が、実行履歴と、実行回数と、のうちいずれを記録するのかについては、アクセラレータ102の初期時に、CPU101により設定されてもよいし、アクセラレータ102を用いるアプリの初期設定によって設定されてもよい。   Further, the accelerator 102 can access the performance information 121. The performance information 121 is information in which an instruction execution history and the number of executions are recorded in units of intermediate plane examples. Whether the performance information 121 is recorded as an execution history or the number of executions may be set by the CPU 101 at the initial stage of the accelerator 102 or set by an initial setting of an application using the accelerator 102. Also good.

また、CPU101は、テンプレート情報331にアクセス可能である。テンプレート情報331は、中間命令とネイティブ命令との変換方法を示すテーブルである。テンプレート情報331の詳細は、図6にて後述する。また、テンプレート情報331は、RAM202、磁気ディスク204、光ディスク206などの記憶領域に存在する。   Further, the CPU 101 can access the template information 331. The template information 331 is a table showing a conversion method between intermediate instructions and native instructions. Details of the template information 331 will be described later with reference to FIG. The template information 331 exists in a storage area such as the RAM 202, the magnetic disk 204, and the optical disk 206.

JITコンパイラ301は、中間命令から、中間命令の情報を含んだネイティブ命令に変換する機能を有する。具体的な変換方法については、図6、図7にて後述する。デバイスドライバ302は、アクセラレータ102を制御するソフトウェアである。具体的な動作については、図4にて説明する。なお、受付部311〜出力部315は、アクセラレータ102が有する機能であり、変換部323は、JITコンパイラ301が有する機能であり、送信部324、取得部325は、デバイスドライバ302が有する機能である。   The JIT compiler 301 has a function of converting an intermediate instruction into a native instruction including information on the intermediate instruction. A specific conversion method will be described later with reference to FIGS. The device driver 302 is software that controls the accelerator 102. A specific operation will be described with reference to FIG. The receiving unit 311 to the output unit 315 are functions of the accelerator 102, the conversion unit 323 is a function of the JIT compiler 301, and the transmission unit 324 and the acquisition unit 325 are functions of the device driver 302. .

受付部311は、命令コードと、命令コードに関連付けられた命令コードの変換前のコードを特定する情報と、を受け付ける機能を有する。ここで、命令コードは、アクセラレータ102のネイティブ命令であり、変換前のコードは、中間命令である。関連付けの方法としては、たとえば、命令コードと変換前のコードが1命令内の前後で結合していてもよいし、順序が入れ替わってもよい。また、変換前のコードを特定する情報とは、変換前のコードを一意にする識別情報であり、たとえば、中間命令のオペコード部分である。また、変換前のコードを特定する情報は、変換前のコードそのものであってもよい。   The receiving unit 311 has a function of receiving an instruction code and information for specifying a code before conversion of the instruction code associated with the instruction code. Here, the instruction code is a native instruction of the accelerator 102, and the code before conversion is an intermediate instruction. As an association method, for example, the instruction code and the code before conversion may be combined before and after one instruction, or the order may be changed. Further, the information specifying the code before conversion is identification information that makes the code before conversion unique, and is, for example, an opcode portion of an intermediate instruction. Further, the information specifying the code before conversion may be the code itself before conversion.

たとえば、受付部311は、命令コードである“NOT R3,1”と、変換前のコードである“ldrp”を受け付ける。なお、受け付けた情報は、アクセラレータ102のレジスタ等といった記憶領域に記憶される。   For example, the reception unit 311 receives “NOT R3, 1” that is an instruction code and “ldrp” that is a code before conversion. The received information is stored in a storage area such as a register of the accelerator 102.

判断部312は、受付部311によって受け付けた変換前のコードを特定する情報が、変換前のコードが存在しないことを示す情報であるか否かを判断する機能を有する。変換前のコードが存在しないことを示す情報は、たとえば、全ての中間命令に対応しないビットコードでもよいし、また、全ての中間命令に対応しないビット列がなければ、“nop”を示すビットコードでもよい。なお、判断結果は、アクセラレータ102のレジスタ等といった記憶領域に記憶される。   The determination unit 312 has a function of determining whether or not the information specifying the code before conversion received by the reception unit 311 is information indicating that the code before conversion does not exist. The information indicating that there is no code before conversion may be, for example, a bit code that does not correspond to all intermediate instructions, or a bit code that indicates “nop” if there is no bit string that does not correspond to all intermediate instructions. Good. Note that the determination result is stored in a storage area such as a register of the accelerator 102.

実行部313は、命令コードを実行する機能を有する。たとえば、実行部313は、ネイティブ命令“NOT”、ネイティブ命令“AND”といった命令コードを実行する。なお、実行結果は、アクセラレータ102のレジスタ等といった記憶領域に記憶される。   The execution unit 313 has a function of executing an instruction code. For example, the execution unit 313 executes instruction codes such as a native instruction “NOT” and a native instruction “AND”. The execution result is stored in a storage area such as a register of the accelerator 102.

記録部314は、実行部313による命令コードの実行により、変換前のコードを特定する情報を記録する機能を有する。たとえば、記録部314は、ネイティブ命令“NOT”の実行により、変換前のコードを特定する情報“ldrp”を記録する。また、記録するタイミングは、実行部313による命令コードの実行と同時でもよいし、前でも後でもよい。なお、記録部314は、変換前のコードを特定する情報を性能情報121として、アクセラレータ102のレジスタ等といった記憶領域に記録する。   The recording unit 314 has a function of recording information for specifying the code before conversion by executing the instruction code by the execution unit 313. For example, the recording unit 314 records information “ldrp” that identifies the code before conversion by executing the native instruction “NOT”. The recording timing may be simultaneous with the execution of the instruction code by the execution unit 313, or may be before or after. Note that the recording unit 314 records information specifying the code before conversion as performance information 121 in a storage area such as a register of the accelerator 102.

また、記録部314は、判断部312によって変換前のコードを特定する情報が変換前のコードが存在しないことを示す情報であると判断された場合、命令コードの実行により、変換前のコードを特定する情報を記録しない。   When the determination unit 312 determines that the information for specifying the code before conversion is information indicating that the code before conversion does not exist, the recording unit 314 executes the instruction code to execute the code before conversion. Do not record the information that you identify.

また、記録部314は、命令コードの実行により、命令コードの実行順に変換前のコードを特定する情報を記録してもよい。たとえば、“NOT”、“AND”の順に実行した場合、記録部314は、“ldrp”、“and”の順に記録する。   Further, the recording unit 314 may record information for specifying the code before conversion in the order of execution of the instruction code by executing the instruction code. For example, when executed in the order of “NOT” and “AND”, the recording unit 314 records in the order of “ldrp” and “and”.

また、記録部314は、命令コードの実行により、命令コードの実行回数を変換前のコードを特定する情報と対応づけて記録してもよい。たとえば、“NOT”、“AND”を1回ずつ実行した場合、記録部314は、“ldrp”が1回、“and”が1回というように記録する。   Further, the recording unit 314 may record the number of executions of the instruction code in association with information specifying the code before conversion by executing the instruction code. For example, when “NOT” and “AND” are executed once, the recording unit 314 records “ldrp” once and “and” once.

出力部315は、性能情報121を出力する機能を有する。たとえば、出力部315は、性能情報121となる中間命令単位となる実行履歴、実行回数を、アクセラレータ102内の、CPU101がアクセス可能な記憶領域に出力する。   The output unit 315 has a function of outputting the performance information 121. For example, the output unit 315 outputs the execution history and the number of executions, which are the intermediate instruction unit as the performance information 121, to a storage area in the accelerator 102 accessible by the CPU 101.

記憶部321は、命令コードと命令コードの変換前のコードとの組合せを記憶する機能を有する。なお、各組は、テンプレート情報331の1レコードとして記録されている。なお、記憶部321は、RAM202、磁気ディスク204、光ディスク206などの記憶領域に存在する。   The storage unit 321 has a function of storing a combination of an instruction code and a code before conversion of the instruction code. Each set is recorded as one record of the template information 331. The storage unit 321 exists in a storage area such as the RAM 202, the magnetic disk 204, and the optical disk 206.

検出部322は、変換前のコードを検出する機能を有する。たとえば、検出部322は、画像処理を実行する中間命令を検出する。なお、検出結果は、CPU101のレジスタ、RAM202、磁気ディスク204、光ディスク206などの記憶領域に存在する。   The detection unit 322 has a function of detecting a code before conversion. For example, the detection unit 322 detects an intermediate command for executing image processing. The detection results exist in storage areas such as the register of the CPU 101, the RAM 202, the magnetic disk 204, and the optical disk 206.

変換部323は、記憶部321を参照して、変換前のコードを、命令コードと命令コードに関連付けられた変換前のコードを特定する情報とに変換する機能を有する。具体的な変換方法については、図6、図7にて説明する。なお、変換された情報は、CPU101のレジスタ、RAM202、磁気ディスク204、光ディスク206などの記憶領域に存在する。   The conversion unit 323 has a function of referring to the storage unit 321 and converting the code before conversion into an instruction code and information specifying the code before conversion associated with the instruction code. A specific conversion method will be described with reference to FIGS. Note that the converted information exists in storage areas such as the register of the CPU 101, the RAM 202, the magnetic disk 204, and the optical disk 206.

送信部324は、命令コードと命令コードに関連付けられた変換前のコードを特定する情報とを、他装置に送信する機能を有する。たとえば、送信部324は、命令コード“NOT R3,1”、変換前のコードを特定する情報“ldrp”をアクセラレータ102に送信する。   The transmission unit 324 has a function of transmitting an instruction code and information for specifying a code before conversion associated with the instruction code to another device. For example, the transmission unit 324 transmits the instruction code “NOT R3, 1” and information “ldrp” that identifies the code before conversion to the accelerator 102.

取得部325は、アクセラレータ102から性能情報121を取得する。たとえば、取得部325は、所定の周期で、アクセラレータ102から性能情報121を取得する。取得した性能情報121は、RAM202、磁気ディスク204、光ディスク206などの記憶領域に存在する。次に、図4にて、データ処理システム100で使用されるソフトウェアおよび入出力データについて説明する。   The acquisition unit 325 acquires the performance information 121 from the accelerator 102. For example, the acquisition unit 325 acquires the performance information 121 from the accelerator 102 at a predetermined cycle. The acquired performance information 121 exists in storage areas such as the RAM 202, the magnetic disk 204, and the optical disk 206. Next, software and input / output data used in the data processing system 100 will be described with reference to FIG.

図4は、ソフトウェアおよび入出力データの一例を示す説明図である。データ処理システム100にて実行されるソフトウェア、またはアクセラレータ102に対して入力、または出力されるデータとして、性能情報121、ソースコード401、ネイティブ命令402、入力データ403、出力データ404がある。データ処理システム100にて実行されるソフトウェアとして、JITコンパイラ301、コンパイラ411、アプリ412、デバイスドライバ302がある。   FIG. 4 is an explanatory diagram illustrating an example of software and input / output data. Software executed in the data processing system 100 or data input to or output from the accelerator 102 includes performance information 121, source code 401, native instructions 402, input data 403, and output data 404. As software executed in the data processing system 100, there are a JIT compiler 301, a compiler 411, an application 412, and a device driver 302.

ソースコード401は、プログラミング言語にしたがって記述されたコンピュータプログラムである。ソースコード401の中には、CPU101にて実行される部分と、アクセラレータ102によって実行される部分が存在する。   The source code 401 is a computer program written according to a programming language. The source code 401 includes a part executed by the CPU 101 and a part executed by the accelerator 102.

ネイティブ命令402は、アクセラレータ102が直接実行可能な命令で記載された実行コードである。入力データ403は、アクセラレータ102に対して入力されるデータである。出力データ404は、アクセラレータ102から出力されるデータである。   The native instruction 402 is an execution code written as an instruction that can be directly executed by the accelerator 102. Input data 403 is data input to the accelerator 102. Output data 404 is data output from the accelerator 102.

コンパイラ411は、ソースコード401から、CPU101が実行可能なソフトウェアを生成する機能を有する。図4の例では、コンパイラ411は、ソースコード401からアプリ412を生成する。   The compiler 411 has a function of generating software executable by the CPU 101 from the source code 401. In the example of FIG. 4, the compiler 411 generates an application 412 from the source code 401.

アプリ412は、データ処理システム100にて実行可能なソフトウェアである。アプリ412は、CPU101にて実行される実行コードと、アクセラレータ102によって実行される中間命令が含まれている。   The application 412 is software that can be executed by the data processing system 100. The application 412 includes an execution code executed by the CPU 101 and an intermediate instruction executed by the accelerator 102.

デバイスドライバ302は、アクセラレータ102を制御するソフトウェアである。具体的に、デバイスドライバ302は、API(Application Programming Interface)を有し、アプリ412とアクセラレータ102のデータの入出力を行う。たとえば、デバイスドライバ302は、入力データ403を受け付け、アクセラレータ102がアクセス可能なバッファに、入力データ403を書き込む。   The device driver 302 is software that controls the accelerator 102. Specifically, the device driver 302 has an API (Application Programming Interface), and inputs / outputs data between the application 412 and the accelerator 102. For example, the device driver 302 receives the input data 403 and writes the input data 403 into a buffer accessible by the accelerator 102.

また、デバイスドライバ302は、アクセラレータ102のレジスタを参照し、出力データ404が読込可能である場合、出力データ404を読み込み、CPU101がアクセス可能な記憶領域に退避する。同様に、デバイスドライバ302は、性能情報121を取得し、CPU101がアクセス可能な記憶領域に退避する。続けて、図5にて、図4で説明したソフトウェア、アクセラレータ102の動作をシーケンス図にて示す。   Further, the device driver 302 refers to the register of the accelerator 102, and when the output data 404 can be read, reads the output data 404 and saves it in a storage area accessible by the CPU 101. Similarly, the device driver 302 acquires the performance information 121 and saves it in a storage area accessible by the CPU 101. FIG. 5 is a sequence diagram showing the operation of the software and accelerator 102 described in FIG.

図5は、データ処理システムの動作例を示すシーケンス図である。アプリ412は、中間命令の実行要求をJITコンパイラ301に送信する(ステップS501)。中間命令を受け付けたJITコンパイラ301は、中間命令をネイティブ命令402に変換する(ステップS502)。次に、JITコンパイラ301は、デバイスドライバ302にネイティブ命令を送信する(ステップS503)。ネイティブ命令を受け付けたデバイスドライバ302は、アクセラレータ102にネイティブ命令を送信する(ステップS504)。   FIG. 5 is a sequence diagram illustrating an operation example of the data processing system. The application 412 transmits an intermediate instruction execution request to the JIT compiler 301 (step S501). The JIT compiler 301 that has received the intermediate instruction converts the intermediate instruction into a native instruction 402 (step S502). Next, the JIT compiler 301 transmits a native instruction to the device driver 302 (step S503). The device driver 302 that has received the native command transmits the native command to the accelerator 102 (step S504).

ネイティブ命令を受け付けたアクセラレータ102は、ネイティブ命令402を実行し(ステップS505)、さらに、性能情報121となる、中間命令を特定する情報を記録する(ステップS506)。次に、アクセラレータ102は、デバイスドライバ302に出力データ404を送信する(ステップS507)。出力データ404を受け付けたデバイスドライバ302は、アプリ412に出力データ404を送信する(ステップS508)。また、アクセラレータ102は、所定の周期で、デバイスドライバ302に性能情報121を出力する(ステップS509)。   The accelerator 102 that has received the native instruction executes the native instruction 402 (step S505), and further records information for specifying the intermediate instruction that becomes the performance information 121 (step S506). Next, the accelerator 102 transmits the output data 404 to the device driver 302 (step S507). The device driver 302 that has received the output data 404 transmits the output data 404 to the application 412 (step S508). Further, the accelerator 102 outputs the performance information 121 to the device driver 302 at a predetermined cycle (step S509).

図6は、テンプレート情報の記憶内容の一例を示す説明図である。テンプレート情報331は、レコード331−1〜レコード331−7までを登録している。テンプレート情報331は、パターン、パターン適合条件、テンプレートコードという3つのフィールドを含む。パターンフィールドには、変換元の中間命令が格納される。パターン適合条件フィールドには、パターンフィールドに格納された中間命令の適合条件が格納される。テンプレートコードフィールドには、変換後のネイティブ命令の元となる情報が格納される。また、図6で示す<addr>はアドレスを示しており、<reg>はレジスタ名を示しており、<imm>は即値を示している。   FIG. 6 is an explanatory diagram showing an example of the stored contents of the template information. The template information 331 registers records 331-1 to 331-7. The template information 331 includes three fields: a pattern, a pattern matching condition, and a template code. The pattern field stores the intermediate instruction of the conversion source. The pattern matching condition field stores the matching condition of the intermediate instruction stored in the pattern field. The template code field stores information that is the source of the converted native instruction. Further, <addr> shown in FIG. 6 indicates an address, <reg> indicates a register name, and <imm> indicates an immediate value.

たとえば、レコード331−1は、中間命令branch(分岐命令)が条件によらず、ネイティブ命令BRA(分岐命令)に変換されることを示している。また、変換後のネイティブ命令内に、中間命令に関する情報として、テンプレートコードフィールドの最後の引数であるbranchを示すビットコードが格納される。具体的な格納箇所については、図7にて説明する。   For example, the record 331-1 indicates that the intermediate instruction branch (branch instruction) is converted into the native instruction BRA (branch instruction) regardless of the condition. Also, a bit code indicating branch, which is the last argument of the template code field, is stored as information on the intermediate instruction in the converted native instruction. Specific storage locations will be described with reference to FIG.

また、レコード331−2は、中間命令ldrp(即値ロード命令)に関して、即値が0から0xffffまでであれば、ネイティブ命令MOV(レジスタ転送命令)に変換されることを示している。また、変換後のネイティブ命令内に、ldrpのビットコードが格納される。   The record 331-2 indicates that the intermediate instruction ldrp (immediate load instruction) is converted into a native instruction MOV (register transfer instruction) if the immediate value is from 0 to 0xffff. Further, the ldrp bit code is stored in the converted native instruction.

また、レコード331−3は、中間命令ldrp(即値ロード命令)に関して、即値が0xffff0000から0xffffffffまでであれば、ネイティブ命令NOT(ビット反転命令)に変換されることを示している。また、変換後のネイティブ命令内に、ldrpを示すビットコードが格納される。   The record 331-3 indicates that the intermediate instruction ldrp (immediate load instruction) is converted into a native instruction NOT (bit inversion instruction) if the immediate value is from 0xffff0000 to 0xffffffff. In addition, a bit code indicating ldrp is stored in the converted native instruction.

また、レコード331−4は、中間命令ldrp(即値ロード命令)に関して、即値が0x10000から0xfffeffffまでであり、かつ、即値の下4ビットが全て0であれば、ネイティブ命令SHL(左シフト命令)に変換されることを示している。また、変換後のネイティブ命令内に、ldrpを示すビットコードが格納される。   Further, the record 331-4 is the native instruction SHL (left shift instruction) if the immediate value is from 0x10000 to 0xffffeffff and all the lower 4 bits of the immediate value are all 0 regarding the intermediate instruction ldrp (immediate load instruction). Indicates that it will be converted. In addition, a bit code indicating ldrp is stored in the converted native instruction.

また、レコード331−5は、中間命令ldrp(即値ロード命令)に関して、即値が0x10000から0xfffeffffまでであり、かつ、即値の下4ビットが0でないビットがあれば、ネイティブ命令SHLと、ネイティブ命令ADDI(即値加算命令)に変換されることを示している。また、変換後のネイティブ命令の1命令目に、ldrpを示すビットコードが格納され、2命令目に対応する中間命令がないことを示す“”を示すビットコードが格納される。レコード331−6、レコード331−7も同様に、中間命令からネイティブ命令に変換する内容を示している。   Also, the record 331-5 indicates that the intermediate instruction ldrp (immediate load instruction) has an immediate value from 0x10000 to 0xffffffff, and if there are non-zero bits in the lower 4 bits of the immediate value, the native instruction SHL and the native instruction ADDI It is converted to (immediate value addition instruction). In addition, a bit code indicating ldrp is stored in the first instruction of the converted native instruction, and a bit code indicating “” indicating that there is no corresponding intermediate instruction is stored in the second instruction. Similarly, records 331-6 and 331-7 indicate the contents to be converted from the intermediate instruction to the native instruction.

図7は、実施の形態1におけるJITコンパイラによる中間命令の変換例を示す説明図である。図7中の(a)は、変換後のネイティブ命令のフォーマットを示しており、図7中の(b)は、中間命令の具体的な変換例を示している。   FIG. 7 is an explanatory diagram showing an example of intermediate instruction conversion by the JIT compiler in the first embodiment. (A) in FIG. 7 shows the format of the native instruction after conversion, and (b) in FIG. 7 shows a specific conversion example of the intermediate instruction.

変換後のネイティブ命令701は、中間命令、ネイティブ命令という2つのフィールドを有する。中間命令フィールドは、ネイティブ命令に対応する中間命令を特定する情報が格納される。たとえば、中間命令フィールドは、中間命令の全ビットが格納されてもよいし、中間命令のオペコード部分のビットが格納されてもよい。また、性能情報121が、命令ごとの実行回数を提供する場合、中間命令フィールドは、中間命令を識別可能な最小限のビットが格納されてもよい。ネイティブ命令は、アクセラレータ102が実行可能な実行コードである。なお、実行履歴、または実行回数のいずれかを提供するか否かは、たとえば、アクセラレータ102の初期時に、CPUによって設定される。   The converted native instruction 701 has two fields, an intermediate instruction and a native instruction. The intermediate instruction field stores information for specifying an intermediate instruction corresponding to the native instruction. For example, the intermediate instruction field may store all bits of the intermediate instruction, or may store bits of the opcode portion of the intermediate instruction. Further, when the performance information 121 provides the execution count for each instruction, the intermediate instruction field may store a minimum number of bits that can identify the intermediate instruction. The native instruction is an execution code that can be executed by the accelerator 102. Whether or not to provide either the execution history or the number of executions is set by the CPU at the initial stage of the accelerator 102, for example.

たとえば、中間命令702_Mとして、“setzero r3”を変換する場合を示す。このとき、JITコンパイラ301は、テンプレート情報331のレコード331−6から、中間命令702_Mをネイティブ命令702_Nに変換する。以下、接尾記号“_M”は中間命令を示し、接尾記号“_N”はネイティブ命令を示す。ネイティブ命令702_Nの中間命令フィールドには、setzeroを示すビットが格納されており、ネイティブ命令フィールドには、“MOV R3,R0”を示すビットが格納されている。   For example, the case where “setzero r3” is converted as the intermediate instruction 702_M is shown. At this time, the JIT compiler 301 converts the intermediate instruction 702_M into the native instruction 702_N from the record 331-6 of the template information 331. Hereinafter, the suffix “_M” indicates an intermediate instruction, and the suffix “_N” indicates a native instruction. A bit indicating “setzero” is stored in the intermediate instruction field of the native instruction 702_N, and a bit indicating “MOV R3, R0” is stored in the native instruction field.

また、中間命令703_Mとして、“ldrp r3,0x10001”を変換する場合を示す。このとき、JITコンパイラ301は、テンプレート情報331のレコード331−5から、中間命令703_Mをネイティブ命令703_Nに変換する。ネイティブ命令703_Nの1命令目の中間命令フィールドには、“ldrp”を示すビットが格納されており、1列目のネイティブ命令フィールドには、“SHL R3,1,16”を示すビットが格納されている。また、2命令目の中間命令フィールドには、何も処理を行わない“nop”を示すビットが格納されており、2列目のネイティブ命令フィールドには、“ADDI R3, R3, 1”を示すビットが格納されている。   Further, the case where “ldrp r3, 0x10001” is converted as the intermediate instruction 703_M is shown. At this time, the JIT compiler 301 converts the intermediate instruction 703_M into the native instruction 703_N from the record 331-5 of the template information 331. A bit indicating “ldrp” is stored in the intermediate instruction field of the first instruction of the native instruction 703_N, and bits indicating “SHL R3, 1, 16” are stored in the native instruction field of the first column. ing. A bit indicating “nop” for performing no processing is stored in the intermediate instruction field of the second instruction, and “ADDI R3, R3, 1” is indicated in the second column of the native instruction field. A bit is stored.

このように、中間命令1に対してネイティブ命令が2以上となる場合、テンプレート情報331の対応するレコードの2命令目以降には対応する中間命令が存在しないことを示す“”を示すビットコードが格納されている。これに基づいて、JITコンパイラ301は、2命令目以降の中間命令フィールドに、“nop”を示すビットを格納する。または、JITコンパイラ301は、全ての中間命令に対応しないビットを格納してもよい。この理由として、“nop”命令がコンパイラ411にて使用されている場合、nop命令が実行されたとカウントされるためである。したがって、JITコンパイラ301は、全ての中間命令に対応しないビットがあれば、該当のビットを格納し、なければ、“nop”を示すビットを格納してもよい。   Thus, when the number of native instructions is 2 or more with respect to the intermediate instruction 1, the bit code indicating “” indicating that the corresponding intermediate instruction does not exist after the second instruction of the corresponding record of the template information 331 is Stored. Based on this, the JIT compiler 301 stores a bit indicating “nop” in the intermediate instruction field after the second instruction. Alternatively, the JIT compiler 301 may store bits that do not correspond to all intermediate instructions. This is because, when the “nop” instruction is used in the compiler 411, it is counted that the nop instruction has been executed. Therefore, if there is a bit that does not correspond to all intermediate instructions, the JIT compiler 301 may store the corresponding bit, and if not, may store a bit indicating “nop”.

また、図7では図示していないが、中間命令2以上に対してネイティブ命令が1となる場合、JITコンパイラ301は、2命令以降のネイティブ命令フィールドに、“nop”を示すビットを格納する。または、アクセラレータ102が、コードを読み飛ばす命令が存在すれば、該当の命令を示すビットを格納してもよい。   Although not illustrated in FIG. 7, when the native instruction is 1 for the intermediate instruction 2 or more, the JIT compiler 301 stores a bit indicating “nop” in the native instruction field after the second instruction. Alternatively, if there is an instruction for skipping the code, the accelerator 102 may store a bit indicating the corresponding instruction.

このように、整数m、nが1以上の整数であって、中間命令mに対してネイティブ命令nであり、mとnが異なる場合、JITコンパイラ301は、多い命令に対応するフィールドに“nop”を格納する。または、JITコンパイラ301は、mよりnが大きい場合、中間命令フィールドに全ての中間命令に対応しないビットを格納し、nよりmが大きい場合、ネイティブ命令フィールドにコードを読み飛ばす命令を格納してもよい。   As described above, when the integers m and n are integers of 1 or more, are native instructions n with respect to the intermediate instruction m, and m and n are different, the JIT compiler 301 displays “nop” in a field corresponding to many instructions. "Is stored. Or, when n is larger than m, the JIT compiler 301 stores bits not corresponding to all intermediate instructions in the intermediate instruction field, and when m is larger than n, the JIT compiler 301 stores an instruction to skip code in the native instruction field. Also good.

図8は、中間命令での実行履歴および実行回数の具体例を示す説明図である。図8では、ネイティブ命令801_Nが実行された場合の実行履歴および実行回数を示している。また、表802がネイティブ命令の実行履歴を示し、表803が中間命令の実行履歴を示し、表804が中間命令の実行回数を示している。   FIG. 8 is an explanatory diagram showing a specific example of the execution history and the number of executions in the intermediate instruction. FIG. 8 shows an execution history and the number of executions when the native instruction 801_N is executed. Table 802 shows the execution history of native instructions, table 803 shows the execution history of intermediate instructions, and table 804 shows the number of executions of intermediate instructions.

たとえば、レジスタR1が1である場合、アクセラレータ102は、4命令目の“BEQ L2”を実行し、ラベルL2へ遷移する。次に、アクセラレータ102は、ラベルL2から3命令目の“BRA L4”を実行し、ラベルL4へ遷移する。したがって、ネイティブ命令での実行履歴は、表802となる。   For example, when the register R1 is 1, the accelerator 102 executes “BEQ L2” of the fourth instruction and makes a transition to the label L2. Next, the accelerator 102 executes “BRA L4” of the third instruction from the label L2, and transitions to the label L4. Therefore, the execution history with native instructions is shown in Table 802.

中間命令の実行履歴を出力する場合、アクセラレータ102は、ネイティブ命令801_Nの1命令目である“CMP R1,0”の実行により、中間命令フィールドに格納された“switch2d”を取得し、性能情報121として記録する。また、アクセラレータ102は、ネイティブ命令801_NのラベルL2から1命令目の“SHL R3,1,16”の実行を契機として、中間命令フィールドに格納された“ldrp”を取得し、性能情報121として格納する。また、アクセラレータ102は、ネイティブ命令801_NのラベルL2から3命令目の“BRA L4”の実行を契機として、中間命令フィールドに格納されたbranchを取得し、性能情報121として格納する。最終的に、性能情報121は、表803で示すような値となる。   When outputting the execution history of the intermediate instruction, the accelerator 102 acquires “switch2d” stored in the intermediate instruction field by executing “CMP R1, 0” which is the first instruction of the native instruction 801_N, and performs performance information 121. Record as. Further, the accelerator 102 obtains “ldrp” stored in the intermediate instruction field when the first instruction “SHL R3, 1, 16” from the label L2 of the native instruction 801_N is executed, and stores it as performance information 121. To do. Further, the accelerator 102 acquires the branch stored in the intermediate instruction field when the third instruction “BRA L4” from the label L2 of the native instruction 801_N is executed, and stores it as performance information 121. Finally, the performance information 121 has values as shown in Table 803.

また、中間命令の実行回数を出力する場合、アクセラレータ102は、“switch2d”を取得して、“switch2d”の実行回数を1インクリメントする。同様に、アクセラレータ102は、“ldrp”を取得して、“ldrp”の実行回数を1インクリメントし、“branch”を取得して、“branch”の実行回数を1インクリメントする。   When outputting the execution count of the intermediate instruction, the accelerator 102 acquires “switch2d” and increments the execution count of “switch2d” by one. Similarly, the accelerator 102 acquires “ldrp”, increments the execution count of “ldrp” by 1, acquires “branch”, and increments the execution count of “branch” by 1.

図9は、JITコンパイラによる変換処理の一例を示すフローチャートである。初めに、JITコンパイラ301は、中間命令を受け付ける(ステップS901)。次に、JITコンパイラ301は、テンプレート情報331から、中間命令に一致するパターンが存在するか否かを判断する(ステップS902)。パターンが存在する場合(ステップS902:Yes)、JITコンパイラ301は、一致した中間命令を、テンプレートコードを用いて変換し(ステップS903)、ステップS902の処理に移行する。パターンが存在しない場合(ステップS902:No)、全て変換し終えたことを示しているため、JITコンパイラ301は、中間命令を特定する情報を含んだ、ネイティブ命令をアクセラレータ102に送信し(ステップS904)、変換処理を終了する。   FIG. 9 is a flowchart showing an example of conversion processing by the JIT compiler. First, the JIT compiler 301 accepts an intermediate instruction (step S901). Next, the JIT compiler 301 determines from the template information 331 whether there is a pattern that matches the intermediate instruction (step S902). When the pattern exists (step S902: Yes), the JIT compiler 301 converts the matched intermediate instruction using the template code (step S903), and proceeds to the process of step S902. If the pattern does not exist (step S902: No), it indicates that all the conversion has been completed, so the JIT compiler 301 transmits a native instruction including information for specifying the intermediate instruction to the accelerator 102 (step S904). ), And finishes the conversion process.

図10は、実施の形態1におけるアクセラレータの動作例を示すフローチャートである。アクセラレータ102は、ネイティブ命令を受け付ける(ステップS1001)。次に、アクセラレータ102は、中間命令フィールドに中間命令が存在しないことを示す情報が格納されているか否かを判断する(ステップS1002)。中間命令を特定する情報である場合(ステップS1002:No)、アクセラレータ102は、ネイティブ命令フィールドの命令を実行する(ステップS1003)。続けて、アクセラレータ102は、中間命令フィールドに格納された中間命令を特定する情報を記録する(ステップS1004)。なお、ステップS1003とステップS1004は、同一クロックサイクル内で実行されることが望ましいが、別のクロックサイクルで実行する形態でもかまわない。その場合、ステップS1003とステップS1004はどちらか先に実行されてもかまわない。   FIG. 10 is a flowchart illustrating an operation example of the accelerator according to the first embodiment. The accelerator 102 receives a native command (step S1001). Next, the accelerator 102 determines whether or not information indicating that no intermediate instruction exists is stored in the intermediate instruction field (step S1002). When the information is information specifying an intermediate instruction (step S1002: No), the accelerator 102 executes the instruction in the native instruction field (step S1003). Subsequently, the accelerator 102 records information for specifying the intermediate instruction stored in the intermediate instruction field (step S1004). Note that step S1003 and step S1004 are desirably executed within the same clock cycle, but may be executed in different clock cycles. In that case, step S1003 and step S1004 may be executed first.

また、中間命令が存在しないことを示す情報である場合(ステップS1002:Yes)、アクセラレータ102は、ネイティブ命令フィールドの命令を実行する(ステップS1005)。ステップS1003とステップS1004の両方、またはステップS1005の実行後、アクセラレータ102は、アクセラレータ102の実行が終了したか否かを判断する(ステップS1006)。実行が終了していない場合(ステップS1006:No)、アクセラレータ102は、ステップS1002の処理に移行する。実行が終了した場合(ステップS1006:Yes)、アクセラレータ102は、性能情報121を出力し(ステップS1007)、動作を終了する。   If the information indicates that no intermediate instruction exists (step S1002: Yes), the accelerator 102 executes the instruction in the native instruction field (step S1005). After execution of both step S1003 and step S1004 or step S1005, accelerator 102 determines whether or not execution of accelerator 102 has been completed (step S1006). If the execution has not ended (step S1006: No), the accelerator 102 proceeds to the process of step S1002. When the execution is finished (step S1006: Yes), the accelerator 102 outputs the performance information 121 (step S1007), and the operation is finished.

以上説明したように、データ処理装置によれば、ネイティブ命令と中間命令を特定する情報とを受け付けて、ネイティブ命令の実行により、中間命令を実行したことを記録する。これにより、データ処理装置は、中間命令単位で命令の実行履歴や実行回数を提供できるため、開発者によるデバッグを効率化できる。また、ネイティブ命令と中間命令を特定する情報が1命令であれば、中間命令を特定する情報が入っていない場合と、命令数が変わらないため、実行タイミングを従来例にかかるデータ処理装置と同一にすることができる。   As described above, according to the data processing apparatus, the native instruction and the information specifying the intermediate instruction are received, and the execution of the intermediate instruction is recorded by executing the native instruction. As a result, the data processing apparatus can provide an instruction execution history and the number of executions in units of intermediate instructions, so that debugging by the developer can be made more efficient. If the information specifying the native instruction and the intermediate instruction is one instruction, the number of instructions is the same as when the information specifying the intermediate instruction is not included, so the execution timing is the same as that of the data processing apparatus according to the conventional example. Can be.

また、データ処理装置は、中間命令を特定する情報が、中間命令が存在しないことを示す情報である場合、中間命令を実行したことを記録しなくてよい。これにより、データ処理装置は、中間命令が2つ以上のネイティブ命令に変換された場合も、変換前の中間命令1つを記録することができる。   Further, when the information specifying the intermediate instruction is information indicating that the intermediate instruction does not exist, the data processing apparatus does not need to record that the intermediate instruction has been executed. Thereby, the data processing apparatus can record one intermediate instruction before conversion even when the intermediate instruction is converted into two or more native instructions.

また、データ処理装置は、ネイティブ命令の実行により、ネイティブ命令の実行順に中間命令を特定する情報を記録してもよい。これにより、データ処理システムは、中間命令単位での命令の実行履歴を提供することができる。従来例におけるデータ処理システムにて、中間命令単位での実行履歴を開発者に提供する場合、CPUがネイティブ命令の実行履歴から中間命令のいずれに当たるかを推定することになる。この方法の場合、アクセラレータの実行後に、複雑なパターンマッチを行うことになるという問題がある。また、引数等を含めてまったく同一のネイティブ命令に変換される中間命令が複数存在する場合、従来例におけるデータ処理システムは、正しい情報を提供することが困難となる。   In addition, the data processing apparatus may record information for specifying the intermediate instruction in the execution order of the native instruction by executing the native instruction. Thus, the data processing system can provide an instruction execution history in units of intermediate instructions. In the data processing system in the conventional example, when the execution history for each intermediate instruction is provided to the developer, it is estimated which CPU corresponds to the intermediate instruction from the execution history of the native instruction. In the case of this method, there is a problem that complicated pattern matching is performed after execution of the accelerator. In addition, when there are a plurality of intermediate instructions that are converted into exactly the same native instructions including arguments, it is difficult for the data processing system in the conventional example to provide correct information.

また、データ処理装置は、ネイティブ命令コードの実行回数を、中間命令を特定する情報と対応づけて記録してもよい。これにより、データ処理システムは、中間命令単位での命令の実行回数を提供することができる。従来例におけるデータ処理システムにて、中間命令単位での実行回数を開発者に提供しようとする場合、CPUが実行回数の変換処理を行うことになる。この変換処理は、命令の種類数が多いほど大量の計算を行うことになるという問題がある。また、同一のネイティブ命令に変換される中間命令が複数存在する場合、この変換処理方法では元の中間命令に変換することができなくなってしまう。また、ネイティブ命令の実行履歴から、中間命令の実行履歴を得て、中間命令の実行回数を取得する方法もあるが、実行回数を得たいがために、実行履歴を蓄えるメモリが要求されるため、オーバヘッドが大きくなってしまう。   Further, the data processing device may record the number of executions of the native instruction code in association with the information specifying the intermediate instruction. As a result, the data processing system can provide the number of execution times of instructions in units of intermediate instructions. In the data processing system in the conventional example, when it is intended to provide the developer with the number of executions in units of intermediate instructions, the CPU performs a conversion process of the number of executions. This conversion process has a problem that a larger amount of calculation is performed as the number of types of instructions is larger. Also, when there are a plurality of intermediate instructions that are converted into the same native instruction, this conversion processing method cannot be converted into the original intermediate instruction. There is also a method of obtaining the execution history of the intermediate instruction from the execution history of the native instruction and obtaining the execution count of the intermediate instruction. However, in order to obtain the execution count, a memory for storing the execution history is required. The overhead becomes large.

(実施の形態2の説明)
実施の形態1では、全てのネイティブ命令に対して中間命令を特定する情報が付与されている。実施の形態2では、実施の形態1より使用するメモリ量を削減する方法を提案する。なお、実施の形態2にかかるデータ処理システム100のハードウェアは、実施の形態1にかかるデータ処理システム100のハードウェアと同一であるため、説明を省略する。
(Description of Embodiment 2)
In the first embodiment, information specifying intermediate instructions is assigned to all native instructions. In the second embodiment, a method for reducing the amount of memory used in the first embodiment is proposed. Note that the hardware of the data processing system 100 according to the second embodiment is the same as the hardware of the data processing system 100 according to the first embodiment, and a description thereof will be omitted.

図11は、実施の形態2にかかるデータ処理システムの機能例を示すブロック図である。実施の形態2にかかるデータ処理システム100は、受付部1101と、判断部1102と、実行部1103と、記録部1104と、出力部315と、記憶部321と、検出部322と、変換部1111と、送信部1112と、取得部325を含む。検出部322、取得部325、変換部1111、送信部1112は、記憶装置に記憶されたプログラムをCPU101が実行することにより、その機能を実現する。ここで、記憶装置とは、具体的には、たとえば、図2に示したROM201、RAM202、磁気ディスク204、光ディスク206などである。なお、実施の形態1と同一の符号の機能部については、実施の形態1と同一の機能を有するため、説明を省略する。   FIG. 11 is a block diagram of a function example of the data processing system according to the second embodiment. The data processing system 100 according to the second exemplary embodiment includes a reception unit 1101, a determination unit 1102, an execution unit 1103, a recording unit 1104, an output unit 315, a storage unit 321, a detection unit 322, and a conversion unit 1111. And a transmission unit 1112 and an acquisition unit 325. The detection unit 322, the acquisition unit 325, the conversion unit 1111, and the transmission unit 1112 realize their functions when the CPU 101 executes a program stored in the storage device. Here, specifically, the storage device is, for example, the ROM 201, the RAM 202, the magnetic disk 204, the optical disk 206, etc. shown in FIG. In addition, about the function part of the code | symbol same as Embodiment 1, since it has the same function as Embodiment 1, description is abbreviate | omitted.

受付部1101は、一連の命令コードに対する注釈を示す情報と一連の命令コードの変換前のコードを特定する情報とを含む注釈コードまたは一連の命令コードを受け付ける機能を有する。注釈を示す情報は、たとえば、アクセラレータのネイティブ命令のオペコードのうち、未使用であるビットコードを採用する。注釈コードは、ネイティブ命令の一つとなる。   The accepting unit 1101 has a function of accepting an annotation code or a series of instruction codes including information indicating an annotation for the series of instruction codes and information for specifying a code before conversion of the series of instruction codes. As the information indicating the annotation, for example, an unused bit code among the operation codes of the accelerator native instruction is adopted. The annotation code is one of native instructions.

たとえば、受付部1101は、注釈を示す情報と中間命令を特定する情報“switch2d”を含む注釈コード、または一連の命令コード“CMP R1,0”、“BEQ L1”、“CMP R1,1”、“BEQ L2”、“BRA L3”を受け付ける。なお、受け付けた注釈コードまたは一連の命令コードは、アクセラレータ102のレジスタ等といった記憶領域に記憶される。   For example, the reception unit 1101 may include an annotation code including information indicating an annotation and information “switch2d” specifying an intermediate instruction, or a series of instruction codes “CMP R1, 0”, “BEQ L1”, “CMP R1, 1”, “BEQ L2” and “BRA L3” are accepted. The received annotation code or series of instruction codes is stored in a storage area such as a register of the accelerator 102.

判断部1102は、受付部1101によって一連の命令コードが受け付けられたか、または注釈コードが受け付けられたかを判断する機能を有する。判断結果は、アクセラレータ102のレジスタ等といった記憶領域に記憶される。   The determination unit 1102 has a function of determining whether a series of instruction codes or an annotation code is received by the reception unit 1101. The determination result is stored in a storage area such as a register of the accelerator 102.

実行部1103は、受付部1101によって一連の命令コードが受け付けられた場合、一連の命令コードを実行する機能を有する。たとえば、実行部1103は、一連の命令コード“CMP R1,0”、“BEQ L1”、“CMP R1,1”、“BEQ L2”、“BRA L3”を順次実行する。   The execution unit 1103 has a function of executing a series of instruction codes when a series of instruction codes is received by the reception unit 1101. For example, the execution unit 1103 sequentially executes a series of instruction codes “CMP R1, 0”, “BEQ L1”, “CMP R1, 1”, “BEQ L2”, and “BRA L3”.

記録部1104は、受付部1101によって注釈コードが受け付けられた場合、一連の命令コードの実行前に、一連の命令コードの変換前のコードを特定する情報を記録する機能を有する。たとえば、記録部1104は、注釈コードが受け付けられた場合、“switch2d”を記録する。また、記録部1104は、命令コードの実行順に変換前のコードを特定する情報を記録してもよいし、命令コードの実行回数を変換前のコードを特定する情報と対応づけて記録してもよい。   The recording unit 1104 has a function of recording information for identifying a code before conversion of a series of instruction codes before execution of the series of instruction codes when an annotation code is received by the reception unit 1101. For example, when the annotation code is accepted, the recording unit 1104 records “switch2d”. Further, the recording unit 1104 may record information for specifying the code before conversion in the order of execution of the instruction codes, or may record the number of executions of the instruction code in association with the information for specifying the code before conversion. Good.

変換部1111は、記憶部321を参照して、変換前のコードを、一連の命令コードに対する注釈を示す情報と一連の命令コードの変換前のコードを特定する情報とを含む注釈コードと、一連の命令コードと、に変換する機能を有する。なお、具体的な変換方法については、図12にて後述する。送信部1112は、注釈コードと、一連のネイティブ命令とを、他装置に送信する機能を有する。   The conversion unit 1111 refers to the storage unit 321, the code before conversion, an annotation code including information indicating an annotation for the series of instruction codes, and information specifying the code before conversion of the series of instruction codes, and a series of And a function of converting into an instruction code. A specific conversion method will be described later with reference to FIG. The transmission unit 1112 has a function of transmitting the annotation code and a series of native instructions to another device.

図12は、実施の形態2におけるJITコンパイラによる中間命令の変換例を示す説明図である。図12中の(a)は、実施の形態2で用いる注釈コード1201のフォーマットを示しており、図12中の(b)は、中間命令の具体的な変換例を示している。   FIG. 12 is an explanatory diagram showing an example of intermediate instruction conversion by the JIT compiler in the second embodiment. (A) in FIG. 12 shows the format of the annotation code 1201 used in the second embodiment, and (b) in FIG. 12 shows a specific conversion example of the intermediate instruction.

注釈コード1201は、オペコード、中間命令という2つのフィールドを有する。オペコードフィールドには、注釈を示す情報が格納されている。注釈を示す情報は、たとえば、図12で示すような“111”である。以下、オペコードフィールドに“111”が格納されている場合、注釈コード(ANON)と表記する。中間命令フィールドは、注釈コード1201の後続のネイティブ命令に対応する中間命令を特定する情報が格納される。たとえば、中間命令フィールドは、中間命令の全ビットが格納されてもよいし、中間命令のオペコード部分のビットが格納されてもよい。   The annotation code 1201 has two fields of an operation code and an intermediate instruction. The opcode field stores information indicating an annotation. The information indicating the annotation is, for example, “111” as shown in FIG. Hereinafter, when “111” is stored in the operation code field, it is expressed as an annotation code (ANON). In the intermediate instruction field, information for specifying an intermediate instruction corresponding to the native instruction subsequent to the annotation code 1201 is stored. For example, the intermediate instruction field may store all bits of the intermediate instruction, or may store bits of the opcode portion of the intermediate instruction.

JITコンパイラ301は、中間命令1202_Mからネイティブ命令1202_Nに変換する。より詳細な例として、中間命令1202_Mに含まれる、中間命令1202−1_M“switch2d r1,0,L1,1,L2,L3”を変換する場合について説明する。このとき、JITコンパイラ301は、中間命令1202−1_Mを、注釈を示す情報と中間命令を特定する情報“switch2d”を含むネイティブ命令とレコード331−7による変換とネイティブ命令とを含むネイティブ命令1202−1_Nに変換する。   The JIT compiler 301 converts the intermediate instruction 1202_M into the native instruction 1202_N. As a more detailed example, a case where the intermediate instruction 1202-1_M “switch2d r1, 0, L1, 1, L2, L3” included in the intermediate instruction 1202_M is converted will be described. At this time, the JIT compiler 301 converts the intermediate instruction 1202-1_M into the native instruction 1202-M that includes the information indicating the annotation, the native instruction including the information “switch2d” specifying the intermediate instruction, the conversion by the record 331-7, and the native instruction. Convert to 1_N.

このように、ネイティブ命令の1命令あたりの消費ビット数が、実施の形態1にかかる変換例に比べて削減されることになる。具体的に、実施の形態2にかかる変換例では、中間命令とネイティブ命令の対応と特定する情報を埋め込むことができる。一方、実施の形態1にかかる変換例では、対応する中間命令とネイティブ命令でいずれか一方が多い場合は無効である旨を示す情報をフィールドに埋め込むこととなるため、総ビット数は実施の形態2より等しいか多くなる。したがって、実施の形態2にかかる変換例は、同一の命令メモリサイズで、実施の形態1以上の命令数を実行することができる。   As described above, the number of bits consumed per instruction of the native instruction is reduced as compared with the conversion example according to the first embodiment. Specifically, in the conversion example according to the second embodiment, information specifying the correspondence between the intermediate instruction and the native instruction can be embedded. On the other hand, in the conversion example according to the first embodiment, when either one of the corresponding intermediate instructions and native instructions is large, information indicating that it is invalid is embedded in the field. Equal to or greater than 2. Therefore, the conversion example according to the second embodiment can execute the number of instructions equal to or greater than that of the first embodiment with the same instruction memory size.

図13は、実施の形態2におけるアクセラレータの動作例を示すフローチャートである。なお、図13で示すステップS1301、ステップS1305、ステップS1306は、ステップS1001、ステップS1006、ステップS1007と同一の処理であるため、説明を省略する。   FIG. 13 is a flowchart illustrating an operation example of the accelerator according to the second embodiment. Note that step S1301, step S1305, and step S1306 shown in FIG. 13 are the same processing as step S1001, step S1006, and step S1007, and thus description thereof is omitted.

ステップS1301の処理後、アクセラレータ102は、オペコードフィールドに注釈を示す情報が格納されているか否かを判断する(ステップS1302)。注釈を示す情報が格納されている場合(ステップS1302:Yes)、アクセラレータ102は、中間命令フィールドに格納された中間命令を特定する情報を記録し(ステップS1303)、ステップS1305の処理に移行する。注釈を示す情報が格納されていない場合(ステップS1302:No)、アクセラレータ102は、ネイティブ命令を実行し(ステップS1304)、ステップS1305の処理に移行する。   After the process of step S1301, the accelerator 102 determines whether or not information indicating an annotation is stored in the opcode field (step S1302). When the information indicating the annotation is stored (step S1302: Yes), the accelerator 102 records the information specifying the intermediate instruction stored in the intermediate instruction field (step S1303), and proceeds to the process of step S1305. When the information indicating the annotation is not stored (step S1302: No), the accelerator 102 executes the native instruction (step S1304), and proceeds to the process of step S1305.

以上説明したように、データ処理装置によれば、注釈コードを受け付けた場合、注釈コード内の中間命令を特定する情報を記録する。これにより、データ処理システムは、ネイティブ命令1つあたりの使用メモリ量を、実施の形態1に比べて削減することができる。   As described above, according to the data processing device, when an annotation code is received, information specifying an intermediate instruction in the annotation code is recorded. Thereby, the data processing system can reduce the amount of memory used per native instruction as compared to the first embodiment.

(実施の形態3の説明)
実施の形態2にかかるデータ処理システム100は、ネイティブ命令1つあたりの使用メモリ量を実施の形態1より削減していた。実施の形態3にかかるデータ処理システム100は、実施の形態2にかかるデータ処理システム100よりさらに使用メモリ量を削減できる方法を提供する。なお、実施の形態3にかかるデータ処理システム100のハードウェアは、実施の形態1にかかるデータ処理システム100のハードウェアと同一であるため、説明を省略する。
(Description of Embodiment 3)
The data processing system 100 according to the second embodiment reduces the amount of memory used per native instruction from that of the first embodiment. The data processing system 100 according to the third embodiment provides a method that can further reduce the amount of used memory than the data processing system 100 according to the second embodiment. Note that the hardware of the data processing system 100 according to the third embodiment is the same as the hardware of the data processing system 100 according to the first embodiment, and a description thereof will be omitted.

図14は、実施の形態3にかかるデータ処理システムの機能例を示すブロック図である。実施の形態3にかかるデータ処理システム100は、記憶部1401と、受付部1101と、判断部1402と、実行部1403と、記録部1404と、出力部315と、記憶部321と、検出部322と、変換部1411と、送信部1112と、取得部325を含む。検出部322、取得部325、変換部1411、送信部1112は、記憶装置に記憶されたプログラムをCPU101が実行することにより、その機能を実現する。ここで、記憶装置とは、具体的には、たとえば、図2に示したROM201、RAM202、磁気ディスク204、光ディスク206などである。なお、実施の形態1、または実施の形態2と同一の符号の機能部については、実施の形態1、または実施の形態2と同一の機能を有するため、説明を省略する。   FIG. 14 is a block diagram of an example of functions of the data processing system according to the third embodiment. The data processing system 100 according to the third exemplary embodiment includes a storage unit 1401, a reception unit 1101, a determination unit 1402, an execution unit 1403, a recording unit 1404, an output unit 315, a storage unit 321, and a detection unit 322. A conversion unit 1411, a transmission unit 1112, and an acquisition unit 325. The detection unit 322, the acquisition unit 325, the conversion unit 1411, and the transmission unit 1112 realize their functions when the CPU 101 executes a program stored in the storage device. Here, specifically, the storage device is, for example, the ROM 201, the RAM 202, the magnetic disk 204, the optical disk 206, etc. shown in FIG. Note that the functional units having the same reference numerals as those in the first or second embodiment have the same functions as those in the first or second embodiment, and thus the description thereof is omitted.

記憶部1401は、変換前のコードと1対1対応する命令コードと、変換前のコードを特定する情報との組合せを記憶する機能を有する。ここで、変換前のコードと1対1対応する命令コードとは、変換前のコードに対応する命令コードが、他の変換前コードに対応する命令コードに含まれないものである。たとえば、記憶部1401は、変換前のコードとなる“and”と、“and”と1対1対応するネイティブ命令“AND”と、を記憶する。   The storage unit 1401 has a function of storing a combination of an instruction code that has a one-to-one correspondence with a code before conversion and information that identifies the code before conversion. Here, the instruction code corresponding one-to-one with the code before conversion is an instruction code corresponding to the code before conversion not included in the instruction code corresponding to the other code before conversion. For example, the storage unit 1401 stores “and” as a code before conversion and a native instruction “AND” corresponding to “and” one-to-one.

判断部1402は、注釈コードの後続コードが、一連の命令コードの中のいずれかの命令コードであるか、一連の命令コードの変換前のコードとは異なる他の変換前のコードと1対1対応する命令コードであるか否かを判断する機能を有する。たとえば、判断部1402は、後続コードが1対1対応する命令コードである“AND”か否かを判断する。なお、判断結果は、アクセラレータ102のレジスタ等といった記憶領域に記憶される。   The determination unit 1402 has a one-to-one correspondence with the code before conversion that is different from the code before conversion of the series of instruction codes, whether the subsequent code of the annotation code is any one of the series of instruction codes. It has a function of determining whether or not the corresponding instruction code. For example, the determination unit 1402 determines whether or not the subsequent code is “AND” which is an instruction code corresponding to one to one. Note that the determination result is stored in a storage area such as a register of the accelerator 102.

実行部1403は、判断部1402によって他の変換前のコードと1対1対応する命令コードであると判断された場合、他の変換前のコードと1対1対応する命令コードを実行する機能を有する。たとえば、実行部1403は、ネイティブ命令“AND”を実行する。   The execution unit 1403 has a function of executing an instruction code having a one-to-one correspondence with another code before conversion when the determination unit 1402 determines that the instruction code has a one-to-one correspondence with another code before conversion. Have. For example, the execution unit 1403 executes the native instruction “AND”.

記録部1404は、他の変換前のコードと1対1対応する命令コードを記録する。たとえば、記録部1404は、“AND”を記録する。また、記録部1404は、記憶部1401を参照して、他の変換前のコードを特定する情報を記憶してもよい。   The recording unit 1404 records instruction codes that have a one-to-one correspondence with other codes before conversion. For example, the recording unit 1404 records “AND”. In addition, the recording unit 1404 may store information that identifies another code before conversion with reference to the storage unit 1401.

変換部1411は、記憶部321を参照して、変換前のコードを、変換前のコードが命令コードと1対1対応する場合、命令コードに変換し、対応しない場合、注釈コードと一連の命令コードとに変換する機能を有する。なお、変換前のコードが命令コードと1対1対応するか否かの判断方法については、たとえば、テンプレート情報331に1対1対応するか否かを示す識別子を格納する新たなフィールドを設定しておき、新たなフィールドを参照して判断してもよい。また、設定される内容は、記録部1404と同一の情報となる。   The conversion unit 1411 refers to the storage unit 321 and converts the code before conversion into an instruction code when the code before conversion has a one-to-one correspondence with the instruction code. It has a function to convert to code. As for the method for determining whether or not the code before conversion has a one-to-one correspondence with the instruction code, for example, a new field for storing an identifier indicating whether or not the template information 331 has a one-to-one correspondence is set. The determination may be made with reference to a new field. Further, the set content is the same information as the recording unit 1404.

図15は、実施の形態3におけるJITコンパイラによる中間命令の変換例を示す説明図である。図15では、中間命令の具体的な変換例を示している。JITコンパイラ301は、中間命令1501_Mからネイティブ命令1501_Nに変換する。より詳細な例として、中間命令1501_Mに含まれる、中間命令1501−1_M“and r3,r2,r3”を変換する場合について説明する。   FIG. 15 is an explanatory diagram illustrating an example of intermediate instruction conversion by the JIT compiler according to the third embodiment. FIG. 15 shows a specific conversion example of the intermediate instruction. The JIT compiler 301 converts the intermediate instruction 1501_M into a native instruction 1501_N. As a more detailed example, a case will be described in which the intermediate instruction 1501-1_M “and r3, r2, r3” included in the intermediate instruction 1501_M is converted.

JITコンパイラ301は、中間命令1501−1_Mのオペコード部分より、ネイティブ命令と1対1対応する中間命令であることを判断し、注釈コードを付与せずに、ネイティブ命令1501−1_Nに変換する。また、他の中間命令に関しては、1対1対応ではないため、JITコンパイラ301は、注釈コードを付与している。   The JIT compiler 301 determines from the opcode portion of the intermediate instruction 1501-1_M that the intermediate instruction has a one-to-one correspondence with the native instruction, and converts it to the native instruction 1501-1_N without adding an annotation code. Since other intermediate instructions are not one-to-one correspondence, the JIT compiler 301 assigns an annotation code.

このように、中間命令と1対1対応するネイティブ命令には、注釈コードを付与しないことで、実施の形態3におけるデータ処理システム100は、使用メモリ量を実施の形態2におけるデータ処理システム100より削減することができる。   As described above, the annotation code is not assigned to the native instruction that corresponds to the intermediate instruction on a one-to-one basis, so that the data processing system 100 according to the third embodiment uses a memory amount that is larger than that of the data processing system 100 according to the second embodiment. Can be reduced.

図16は、実施の形態3におけるアクセラレータの動作例を示すフローチャートである。なお、図16で示すステップS1601〜ステップS1603、ステップS1608、ステップS1609は、ステップS1301〜ステップS1303、ステップS1305、ステップS1306と同一の処理であるため、説明を省略する。   FIG. 16 is a flowchart illustrating an operation example of the accelerator according to the third embodiment. Note that step S1601 to step S1603, step S1608, and step S1609 shown in FIG. 16 are the same processing as step S1301 to step S1303, step S1305, and step S1306, and thus description thereof is omitted.

注釈を示す情報が格納されていない場合(ステップS1602:No)、アクセラレータ102は、中間命令と1対1対応するネイティブ命令か否かを判断する(ステップS1604)。1対1対応するネイティブ命令である場合(ステップS1604:Yes)、アクセラレータ102は、ネイティブ命令を実行する(ステップS1605)。続けて、アクセラレータ102は、ネイティブ命令に対応する中間命令を特定する情報を記録し(ステップS1606)、ステップS1608の処理に移行する。なお、ステップS1605とステップS1606は、同一クロックサイクル内で実行しても、ステップS1606、ステップS1605の順に実行してもかまわない。1対1対応するネイティブ命令でない場合(ステップS1604:No)、アクセラレータ102は、ネイティブ命令を実行し(ステップS1607)、ステップS1608の処理に移行する。   When the information indicating the annotation is not stored (step S1602: No), the accelerator 102 determines whether the instruction is a native instruction that has a one-to-one correspondence with the intermediate instruction (step S1604). If the native instruction has a one-to-one correspondence (step S1604: YES), the accelerator 102 executes the native instruction (step S1605). Subsequently, the accelerator 102 records information for specifying an intermediate instruction corresponding to the native instruction (step S1606), and proceeds to the process of step S1608. Note that step S1605 and step S1606 may be executed within the same clock cycle, or may be executed in the order of step S1606 and step S1605. If it is not a one-to-one corresponding native instruction (step S1604: No), the accelerator 102 executes the native instruction (step S1607), and proceeds to the process of step S1608.

図17は、実施の形態1〜3にかかるコンピュータを用いたシステムの適用例を示す説明図である。図17において、ネットワークNWは、サーバ1701とクライアント1711〜クライアント1714とが通信可能なネットワークであり、たとえば、LAN、WAN、インターネット、携帯電話網などを含む。   FIG. 17 is an explanatory diagram of an application example of a system using a computer according to the first to third embodiments. In FIG. 17, a network NW is a network in which a server 1701 and clients 1711 to 1714 can communicate, and includes, for example, a LAN, a WAN, the Internet, a mobile phone network, and the like.

クライアント1711はノート型PC(Personal Computer)である。クライアント1712はデスクトップ型PC、クライアント1713は携帯電話機である。携帯電話機として、クライアント1713は、スマートフォンであってもよいし、PHS(Personal Handyphone System)であってもよい。クライアント1714はタブレット型端末である。図17のサーバ1701、クライアント1711〜クライアント1714は、それぞれCPUとアクセラレータを有し、本実施の形態1〜3のいずれかにかかる動作を実行する。   The client 1711 is a notebook PC (Personal Computer). A client 1712 is a desktop PC, and a client 1713 is a mobile phone. As a mobile phone, the client 1713 may be a smartphone or a PHS (Personal Handyphone System). The client 1714 is a tablet terminal. The server 1701 and the clients 1711 to 1714 in FIG. 17 each have a CPU and an accelerator, and execute the operation according to any one of the first to third embodiments.

以上説明したように、データ処理装置によれば、中間命令と1対1対応するネイティブ命令を受け付けた場合、ネイティブ命令を記録する。これにより、データ処理システムは、ネイティブ命令1つあたりの使用メモリ量を、実施の形態2に比べて削減することができる。したがって、データ処理システムは、同一の命令メモリサイズで、実施の形態2以上の命令数を実行することができる。   As described above, according to the data processing apparatus, when a native instruction corresponding to the intermediate instruction is received, the native instruction is recorded. Thereby, the data processing system can reduce the amount of memory used per native instruction as compared to the second embodiment. Therefore, the data processing system can execute the number of instructions equal to or greater than that of the second embodiment with the same instruction memory size.

また、データ処理装置は、変換前のコードと1対1対応する命令コードと、変換前のコードを特定する情報との組合せを記憶し、1対1対応するネイティブ命令を受け付けた場合、対応する変換前のコードを特定する情報を記録してもよい。これにより、データ処理システムは、開発者に対して提供する性能情報を、全て中間命令単位にすることができる。また、データ処理装置は、1対1対応する命令コードと、変換前のコードを特定する情報との組合せを記憶してなくてもよい。この場合、性能情報にネイティブ命令が含まれることになるが、1対1対応しているため、CPUがネイティブ命令から中間命令に変換することは容易である。   In addition, the data processing apparatus stores a combination of an instruction code that corresponds to the code before conversion and the information that specifies the code before conversion, and responds when a native instruction that corresponds to the code is received. Information identifying the code before conversion may be recorded. Thereby, the data processing system can make all the performance information provided to the developer in units of intermediate instructions. Further, the data processing apparatus may not store a combination of an instruction code corresponding to one-to-one and information specifying the code before conversion. In this case, the native information is included in the performance information, but since it has a one-to-one correspondence, it is easy for the CPU to convert from the native instruction to the intermediate instruction.

なお、本実施の形態で説明した変換方法は、予め用意されたプログラムをパーソナル・コンピュータやワークステーション等のコンピュータで実行することにより実現することができる。本変換プログラムは、ハードディスク、フレキシブルディスク、CD−ROM、MO、DVD等のコンピュータで読み取り可能な記録媒体に記録され、コンピュータによって記録媒体から読み出されることによって実行される。また変換プログラムは、インターネット等のネットワークを介して配布してもよい。   The conversion method described in this embodiment can be realized by executing a program prepared in advance on a computer such as a personal computer or a workstation. The conversion program is recorded on a computer-readable recording medium such as a hard disk, a flexible disk, a CD-ROM, an MO, and a DVD, and is executed by being read from the recording medium by the computer. The conversion program may be distributed through a network such as the Internet.

また、本実施の形態で説明したアクセラレータ102は、スタンダードセルやストラクチャードASIC(Application Specific Integrated Circuit)などの特定用途向けIC(以下、単に「ASIC」と称す。)やFPGAなどのPLD(Programmable Logic Device)によっても実現することができる。具体的には、上述したアクセラレータ102の機能(受付部311〜出力部315、受付部1101〜記録部1104、記憶部1401〜記録部1404)をHDL記述によって機能定義し、そのHDL記述を論理合成してASICやPLDに与えることにより、アクセラレータ102を製造することができる。   Further, the accelerator 102 described in the present embodiment is an application-specific IC (hereinafter simply referred to as “ASIC”) such as a standard cell or a structured ASIC (Application Specific Integrated Circuit), or a PLD (Programmable Logic Device) such as an FPGA. ) Can also be realized. Specifically, the functions of the accelerator 102 described above (reception unit 311 to output unit 315, reception unit 1101 to recording unit 1104, storage unit 1401 to recording unit 1404) are defined by HDL description, and the HDL description is logically synthesized. Then, the accelerator 102 can be manufactured by giving it to the ASIC or PLD.

上述した実施の形態1〜3に関し、さらに以下の付記を開示する。   The following additional notes are disclosed with respect to the above-described first to third embodiments.

(付記1)命令コードと、前記命令コードに関連付けられた前記命令コードの変換前のコードを特定する情報と、を受け付ける受付部と、
前記命令コードの実行により、前記変換前のコードを特定する情報を記録する記録部と、
を備えることを特徴とするデータ処理装置。
(Additional remark 1) The reception part which receives instruction code and the information which specifies the code before the conversion of the said instruction code linked | related with the said instruction code,
A recording unit that records information for specifying the code before the conversion by executing the instruction code;
A data processing apparatus comprising:

(付記2)前記受付部によって受け付けた前記変換前のコードを特定する情報が、前記変換前のコードが存在しないことを示す情報であるか否かを判断する判断部をさらに備え、
前記記録部は、
前記判断部によって前記変換前のコードを特定する情報が前記変換前のコードが存在しないことを示す情報であると判断された場合、前記命令コードの実行により、前記変換前のコードを特定する情報を記録しない、
ことを特徴とする付記1に記載のデータ処理装置。
(Additional remark 2) It further has the judgment part which judges whether the information which specifies the code before the conversion received by the reception part is the information which shows that the code before the conversion does not exist,
The recording unit is
When the determination unit determines that the information for specifying the code before conversion is information indicating that the code before conversion does not exist, information for specifying the code before conversion by executing the instruction code Do not record,
The data processing apparatus according to appendix 1, characterized by the above.

(付記3)一連の命令コードに対する注釈を示す情報と前記一連の命令コードの変換前のコードを特定する情報とを含む注釈コードまたは前記一連の命令コードを受け付ける受付部と、
前記受付部によって前記注釈コードが受け付けられた場合、前記一連の命令コードの実行前に、前記一連の命令コードの変換前のコードを特定する情報を記録する記録部と、
前記受付部によって前記一連の命令コードが受け付けられた場合、前記一連の命令コードを実行する実行部と、
を備えることを特徴とするデータ処理装置。
(Additional remark 3) The reception part which receives the comment code | symbol containing the information which shows the comment with respect to a series of instruction codes, and the information which identifies the code before conversion of the said series of instruction codes, or the said series of instruction codes,
When the annotation code is received by the receiving unit, before executing the series of instruction codes, a recording unit for recording information that identifies the code before conversion of the series of instruction codes;
When the series of instruction codes is received by the reception unit, an execution unit that executes the series of instruction codes;
A data processing apparatus comprising:

(付記4)前記記録部は、
前記命令コードの実行により、前記命令コードの実行順に前記変換前のコードを特定する情報を記録する、
ことを特徴とする付記1または3に記載のデータ処理装置。
(Appendix 4) The recording unit
By executing the instruction code, record information for identifying the code before the conversion in the execution order of the instruction code;
The data processing apparatus according to appendix 1 or 3, characterized by the above.

(付記5)前記記録部は、
前記命令コードの実行により、前記命令コードの実行回数を前記変換前のコードを特定する情報と対応づけて記録する、
ことを特徴とする付記1または3に記載のデータ処理装置。
(Appendix 5) The recording unit
By executing the instruction code, the number of executions of the instruction code is recorded in association with information for specifying the code before the conversion.
The data processing apparatus according to appendix 1 or 3, characterized by the above.

(付記6)前記注釈コードの後続コードが、前記一連の命令コードの中のいずれかの命令コードであるか、前記一連の命令コードの変換前のコードとは異なる他の変換前のコードと1対1対応する命令コードであるか否かを判断する判断部を備え、
前記実行部は、
前記他の変換前のコードと1対1対応する命令コードであると判断された場合、前記他の変換前のコードと1対1対応する命令コードを実行し、
前記記録部は、
前記他の変換前のコードと1対1対応する命令コードを記録する、
ことを特徴とする付記3に記載のデータ処理装置。
(Supplementary Note 6) The subsequent code of the annotation code is one of the instruction codes in the series of instruction codes, or another code before conversion that is different from the code before conversion of the series of instruction codes and 1 A determination unit for determining whether the instruction code corresponds to one-to-one,
The execution unit is
If it is determined that the instruction code has a one-to-one correspondence with the other code before conversion, the instruction code has a one-to-one correspondence with the other code before conversion;
The recording unit is
Record an instruction code that has a one-to-one correspondence with the other code before conversion;
The data processing device according to attachment 3, wherein

(付記7)前記他の変換前のコードと1対1対応する命令コードと前記他の変換前のコードを特定する情報との組合せを記憶する記憶部を備え、
前記記録部は、
前記記憶部を参照して、前記他の変換前のコードを特定する情報を記録する、
ことを特徴とする付記6に記載のデータ処理装置。
(Supplementary Note 7) A storage unit that stores a combination of an instruction code that has a one-to-one correspondence with the other code before conversion and information that specifies the other code before conversion,
The recording unit is
Referring to the storage unit, and recording information identifying the other code before conversion,
The data processing apparatus according to appendix 6, wherein:

(付記8)前記記録部は、
前記命令コードと、前記他の変換前のコードと1対1対応する命令コードと、の実行順に、前記変換前のコードを特定する情報と、前記他の変換前のコードを特定する情報と、を記録する、
ことを特徴とする付記7に記載のデータ処理装置。
(Appendix 8) The recording unit
Information for specifying the pre-conversion code, information for specifying the other pre-conversion code, in order of execution of the instruction code and the one-to-one correspondence with the other pre-conversion code; Record,
The data processing apparatus according to appendix 7, characterized by the above.

(付記9)前記記録部は、
前記他の変換前のコードと1対1対応する命令コードの実行回数を前記他の変換前のコードを特定する情報と対応づけて記録する、
ことを特徴とする付記7に記載のデータ処理装置。
(Appendix 9) The recording unit
Recording the number of executions of the instruction code corresponding one-to-one with the other code before conversion in association with the information specifying the other code before conversion;
The data processing apparatus according to appendix 7, characterized by the above.

(付記10)命令コードと前記命令コードの変換前のコードとの組合せを記憶する記憶部と、
前記変換前のコードが検出された場合、前記記憶部を参照して、前記変換前のコードを、前記命令コードと前記命令コードに関連付けられた前記変換前のコードを特定する情報とに変換する変換部と、
前記命令コードと前記命令コードに関連付けられた前記変換前のコードを特定する情報とを、自装置から他装置に送信する送信部と、
を備えることを特徴とする変換装置。
(Supplementary Note 10) A storage unit that stores a combination of an instruction code and a code before conversion of the instruction code;
When the pre-conversion code is detected, the pre-conversion code is converted into information specifying the instruction code and the pre-conversion code associated with the instruction code with reference to the storage unit. A conversion unit;
A transmission unit that transmits the instruction code and information identifying the pre-conversion code associated with the instruction code from the own device to another device;
A conversion device comprising:

(付記11)第1の装置と、特定の処理を実行する第2の装置と、を含むデータ処理システムであって、
前記第2の装置が実行可能な命令コードと前記命令コードの変換前のコードとの組合せを記憶する記憶部と、
前記変換前のコードが検出された場合、前記変換前のコードを、前記命令コードと前記命令コードに関連付けられた前記変換前のコードを特定する情報と、に変換する変換部と、
前記命令コードと前記命令コードに関連付けられた前記変換前のコードを特定する情報とを、前記第1の装置から前記第2の装置に送信する送信部と、
前記第2の装置によって、前記命令コードと前記命令コードに関連付けられた前記変換前のコードを特定する情報とを受け付ける受付部と、
前記第2の装置によって、前記命令コードの実行により、前記変換前のコードを特定する情報を記録する記録部と、
を備えることを特徴とするデータ処理システム。
(Supplementary note 11) A data processing system including a first device and a second device that executes a specific process,
A storage unit for storing a combination of an instruction code executable by the second device and a code before conversion of the instruction code;
When the pre-conversion code is detected, a conversion unit that converts the pre-conversion code into the instruction code and information identifying the pre-conversion code associated with the instruction code;
A transmission unit that transmits the instruction code and information identifying the pre-conversion code associated with the instruction code from the first device to the second device;
A receiving unit that receives, by the second device, the instruction code and information that identifies the code before conversion associated with the instruction code;
A recording unit configured to record information for identifying the code before conversion by the execution of the instruction code by the second device;
A data processing system comprising:

(付記12)命令コードと前記命令コードの変換前のコードとの組合せを記憶する記憶部にアクセス可能なコンピュータが、
前記変換前のコードが検出された場合、前記記憶部を参照して、前記変換前のコードを、前記命令コードと前記命令コードに関連付けられた前記変換前のコードを特定する情報とに変換し、
前記命令コードと前記命令コードに関連付けられた前記変換前のコードを特定する情報とを、他装置へ送信する、
処理を実行することを特徴とする変換方法。
(Additional remark 12) The computer which can access the memory | storage part which memorize | stores the combination of the instruction code and the code before conversion of the said instruction code,
When the pre-conversion code is detected, the pre-conversion code is converted into information specifying the instruction code and the pre-conversion code associated with the instruction code by referring to the storage unit. ,
Transmitting the instruction code and information identifying the pre-conversion code associated with the instruction code to another device;
The conversion method characterized by performing a process.

(付記13)命令コードと前記命令コードの変換前のコードとの組合せを記憶する記憶部にアクセス可能なコンピュータに、
前記変換前のコードが検出された場合、前記組合せを参照して、前記変換前のコードを、前記命令コードと前記命令コードに関連付けられた前記変換前のコードを特定する情報とに変換する、
処理を実行させることを特徴とする変換プログラム。
(Supplementary note 13) To a computer accessible to a storage unit storing a combination of an instruction code and a code before conversion of the instruction code,
When the pre-conversion code is detected, referring to the combination, the pre-conversion code is converted into the instruction code and information identifying the pre-conversion code associated with the instruction code.
A conversion program characterized by causing processing to be executed.

100 データ処理システム
101 CPU
102 アクセラレータ
301 JITコンパイラ
302 デバイスドライバ
311、1101 受付部
312、1102、1402 判断部
313、1103、1403 実行部
314、1104、1404 記録部
315 出力部
321 記憶部
322 検出部
323、1111、1411 変換部
324、1112、1412 送信部
325 取得部
331 テンプレート情報
1401 記憶部
100 Data processing system 101 CPU
DESCRIPTION OF SYMBOLS 102 Accelerator 301 JIT compiler 302 Device driver 311, 1101 Reception part 312, 1102, 1402 Judgment part 313, 1103, 1403 Execution part 314, 1104, 1404 Recording part 315 Output part 321 Storage part 322 Detection part 323, 1111, 1411 Conversion part 324, 1112, 1412 Transmission unit 325 Acquisition unit 331 Template information 1401 Storage unit

Claims (9)

命令コードと、前記命令コードに関連付けられた前記命令コードの変換前のコードを特定する情報と、を受け付ける受付部と、
前記命令コードの実行により、前記変換前のコードを特定する情報を記録する記録部と、
を備えることを特徴とするデータ処理装置。
An accepting unit that accepts an instruction code and information that identifies a code before conversion of the instruction code associated with the instruction code;
A recording unit that records information for specifying the code before the conversion by executing the instruction code;
A data processing apparatus comprising:
前記受付部によって受け付けた前記変換前のコードを特定する情報が、前記変換前のコードが存在しないことを示す情報であるか否かを判断する判断部をさらに備え、
前記記録部は、
前記判断部によって前記変換前のコードを特定する情報が前記変換前のコードが存在しないことを示す情報であると判断された場合、前記命令コードの実行により、前記変換前のコードを特定する情報を記録しない、
ことを特徴とする請求項1に記載のデータ処理装置。
A determination unit that determines whether or not the information specifying the code before conversion received by the reception unit is information indicating that the code before conversion does not exist;
The recording unit is
When the determination unit determines that the information for specifying the code before conversion is information indicating that the code before conversion does not exist, information for specifying the code before conversion by executing the instruction code Do not record,
The data processing apparatus according to claim 1.
一連の命令コードに対する注釈を示す情報と前記一連の命令コードの変換前のコードを特定する情報とを含む注釈コードまたは前記一連の命令コードを受け付ける受付部と、
前記受付部によって前記注釈コードが受け付けられた場合、前記一連の命令コードの実行前に、前記一連の命令コードの変換前のコードを特定する情報を記録する記録部と、
前記受付部によって前記一連の命令コードが受け付けられた場合、前記一連の命令コードを実行する実行部と、
を備えることを特徴とするデータ処理装置。
A reception unit for receiving an annotation code including information indicating an annotation for a series of instruction codes and information specifying a code before conversion of the series of instruction codes, or the series of instruction codes;
When the annotation code is received by the receiving unit, before executing the series of instruction codes, a recording unit for recording information that identifies the code before conversion of the series of instruction codes;
When the series of instruction codes is received by the reception unit, an execution unit that executes the series of instruction codes;
A data processing apparatus comprising:
前記注釈コードの後続コードが、前記一連の命令コードの中のいずれかの命令コードであるか、前記一連の命令コードの変換前のコードとは異なる他の変換前のコードと1対1対応する命令コードであるか否かを判断する判断部を備え、
前記実行部は、
前記他の変換前のコードと1対1対応する命令コードであると判断された場合、前記他の変換前のコードと1対1対応する命令コードを実行し、
前記記録部は、
前記他の変換前のコードと1対1対応する命令コードを記録する、
ことを特徴とする請求項3に記載のデータ処理装置。
The subsequent code of the annotation code is one of the instruction codes in the series of instruction codes, or has a one-to-one correspondence with another code before conversion different from the code before conversion of the series of instruction codes. A determination unit for determining whether or not the instruction code;
The execution unit is
If it is determined that the instruction code has a one-to-one correspondence with the other code before conversion, the instruction code has a one-to-one correspondence with the other code before conversion;
The recording unit is
Record an instruction code that has a one-to-one correspondence with the other code before conversion;
The data processing apparatus according to claim 3.
前記他の変換前のコードと1対1対応する命令コードと前記他の変換前のコードを特定する情報との組合せを記憶する記憶部を備え、
前記記録部は、
前記記憶部を参照して、前記他の変換前のコードを特定する情報を記録する、
ことを特徴とする請求項4に記載のデータ処理装置。
A storage unit that stores a combination of an instruction code that has a one-to-one correspondence with the other code before conversion and information that identifies the other code before conversion;
The recording unit is
Referring to the storage unit, and recording information identifying the other code before conversion,
The data processing apparatus according to claim 4, wherein:
命令コードと前記命令コードの変換前のコードとの組合せを記憶する記憶部と、
前記変換前のコードが検出された場合、前記記憶部を参照して、前記変換前のコードを、前記命令コードと前記命令コードに関連付けられた前記変換前のコードを特定する情報とに変換する変換部と、
前記命令コードと前記命令コードに関連付けられた前記変換前のコードを特定する情報とを、自装置から他装置に送信する送信部と、
を備えることを特徴とする変換装置。
A storage unit for storing a combination of an instruction code and a code before conversion of the instruction code;
When the pre-conversion code is detected, the pre-conversion code is converted into information specifying the instruction code and the pre-conversion code associated with the instruction code with reference to the storage unit. A conversion unit;
A transmission unit that transmits the instruction code and information identifying the pre-conversion code associated with the instruction code from the own device to another device;
A conversion device comprising:
第1の装置と、特定の処理を実行する第2の装置と、を含むデータ処理システムであって、
前記第2の装置が実行可能な命令コードと前記命令コードの変換前のコードとの組合せを記憶する記憶部と、
前記変換前のコードが検出された場合、前記変換前のコードを、前記命令コードと前記命令コードに関連付けられた前記変換前のコードを特定する情報と、に変換する変換部と、
前記命令コードと前記命令コードに関連付けられた前記変換前のコードを特定する情報とを、前記第1の装置から前記第2の装置に送信する送信部と、
前記第2の装置によって、前記命令コードと前記命令コードに関連付けられた前記変換前のコードを特定する情報とを受け付ける受付部と、
前記第2の装置によって、前記命令コードの実行により、前記変換前のコードを特定する情報を記録する記録部と、
を備えることを特徴とするデータ処理システム。
A data processing system including a first device and a second device that executes a specific process,
A storage unit for storing a combination of an instruction code executable by the second device and a code before conversion of the instruction code;
When the pre-conversion code is detected, a conversion unit that converts the pre-conversion code into the instruction code and information identifying the pre-conversion code associated with the instruction code;
A transmission unit that transmits the instruction code and information identifying the pre-conversion code associated with the instruction code from the first device to the second device;
A receiving unit that receives, by the second device, the instruction code and information that identifies the code before conversion associated with the instruction code;
A recording unit configured to record information for identifying the code before conversion by the execution of the instruction code by the second device;
A data processing system comprising:
命令コードと前記命令コードの変換前のコードとの組合せを記憶する記憶部にアクセス可能なコンピュータが、
前記変換前のコードが検出された場合、前記記憶部を参照して、前記変換前のコードを、前記命令コードと前記命令コードに関連付けられた前記変換前のコードを特定する情報とに変換し、
前記命令コードと前記命令コードに関連付けられた前記変換前のコードを特定する情報とを、他装置へ送信する、
処理を実行することを特徴とする変換方法。
A computer capable of accessing a storage unit that stores a combination of an instruction code and a code before conversion of the instruction code,
When the pre-conversion code is detected, the pre-conversion code is converted into information specifying the instruction code and the pre-conversion code associated with the instruction code by referring to the storage unit. ,
Transmitting the instruction code and information identifying the pre-conversion code associated with the instruction code to another device;
The conversion method characterized by performing a process.
命令コードと前記命令コードの変換前のコードとの組合せを記憶する記憶部にアクセス可能なコンピュータに、
前記変換前のコードが検出された場合、前記組合せを参照して、前記変換前のコードを、前記命令コードと前記命令コードに関連付けられた前記変換前のコードを特定する情報とに変換する、
処理を実行させることを特徴とする変換プログラム。
To a computer accessible to a storage unit storing a combination of an instruction code and a code before conversion of the instruction code,
When the pre-conversion code is detected, referring to the combination, the pre-conversion code is converted into the instruction code and information identifying the pre-conversion code associated with the instruction code.
A conversion program characterized by causing processing to be executed.
JP2011271782A 2011-12-12 2011-12-12 Data processing apparatus, conversion apparatus, data processing system, conversion method, and conversion program Expired - Fee Related JP5794133B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011271782A JP5794133B2 (en) 2011-12-12 2011-12-12 Data processing apparatus, conversion apparatus, data processing system, conversion method, and conversion program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011271782A JP5794133B2 (en) 2011-12-12 2011-12-12 Data processing apparatus, conversion apparatus, data processing system, conversion method, and conversion program

Publications (2)

Publication Number Publication Date
JP2013122740A true JP2013122740A (en) 2013-06-20
JP5794133B2 JP5794133B2 (en) 2015-10-14

Family

ID=48774653

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011271782A Expired - Fee Related JP5794133B2 (en) 2011-12-12 2011-12-12 Data processing apparatus, conversion apparatus, data processing system, conversion method, and conversion program

Country Status (1)

Country Link
JP (1) JP5794133B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020166351A (en) * 2019-03-28 2020-10-08 株式会社エヌエスアイテクス Profiling method

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109885487A (en) * 2019-01-29 2019-06-14 深圳市极致汇仪科技有限公司 A kind of method and system improving the test program speed of service

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6244844A (en) * 1985-08-23 1987-02-26 Fujitsu Ltd Collecting device execution locus information
JPH06236294A (en) * 1993-02-10 1994-08-23 Fuji Electric Co Ltd System for debugging monitor control at source program level
JP2002278803A (en) * 2001-03-22 2002-09-27 Yaskawa Electric Corp Error reporting method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6244844A (en) * 1985-08-23 1987-02-26 Fujitsu Ltd Collecting device execution locus information
JPH06236294A (en) * 1993-02-10 1994-08-23 Fuji Electric Co Ltd System for debugging monitor control at source program level
JP2002278803A (en) * 2001-03-22 2002-09-27 Yaskawa Electric Corp Error reporting method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020166351A (en) * 2019-03-28 2020-10-08 株式会社エヌエスアイテクス Profiling method
JP7324027B2 (en) 2019-03-28 2023-08-09 株式会社エヌエスアイテクス Profiling method

Also Published As

Publication number Publication date
JP5794133B2 (en) 2015-10-14

Similar Documents

Publication Publication Date Title
US9021428B2 (en) Troubleshooting visuals and transient expressions in executing applications
JP5488697B2 (en) Multi-core processor system, synchronization control method, and synchronization control program
US20200264866A1 (en) Caching build graphs
EP3123316B1 (en) Supporting dynamic behavior in statically compiled programs
JP2022519169A (en) Reduced synchronization dependency in garbage collection marking
US8922579B2 (en) Deterministic visual indication of user data context
WO2014008216A2 (en) Generating localized user interfaces
KR20080041211A (en) Method and computer-readable medium for commanding
EP2885700A1 (en) User interface control framework for stamping out controls using a declarative template
JP2018508083A (en) Binary conversion at the shared object level
US20090049431A1 (en) Method and compiler of compiling a program
JP2007183900A (en) Automatic conversion method of high-level language into hardware description language
US11640300B2 (en) Byte comparison method for string processing and instruction processing apparatus
JP5794133B2 (en) Data processing apparatus, conversion apparatus, data processing system, conversion method, and conversion program
US20120011490A1 (en) Development system
TWI813001B (en) Accelerating method of executing comparison functions and accelerating system of executing comparison functions
US10198784B2 (en) Capturing commands in a multi-engine graphics processing unit
CN111971655B (en) Native runtime techniques for hypertext markup language graphics content
US9135027B1 (en) Code generation and execution for dynamic programming languages
JP2007213556A (en) Circuit analysis apparatus
JP2012252475A (en) Processor, compression program, compression device, and compression method
CN111782196A (en) MVP architecture-based development method and device
JPWO2020158347A1 (en) Information processing equipment, methods and programs
JP5702265B2 (en) Program automatic generation apparatus and program automatic generation method
JP6168894B2 (en) System, emulator, debug system and method in debug system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140805

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150319

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150428

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150629

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: 20150714

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20150727

R150 Certificate of patent or registration of utility model

Ref document number: 5794133

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees