JP2000330792A - System for controlling byte code program execution - Google Patents

System for controlling byte code program execution

Info

Publication number
JP2000330792A
JP2000330792A JP11137761A JP13776199A JP2000330792A JP 2000330792 A JP2000330792 A JP 2000330792A JP 11137761 A JP11137761 A JP 11137761A JP 13776199 A JP13776199 A JP 13776199A JP 2000330792 A JP2000330792 A JP 2000330792A
Authority
JP
Japan
Prior art keywords
bytecode
program
execution
information
cpu
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP11137761A
Other languages
Japanese (ja)
Inventor
Hideo Ishida
英雄 石田
Keimei Iwamoto
啓明 岩本
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP11137761A priority Critical patent/JP2000330792A/en
Publication of JP2000330792A publication Critical patent/JP2000330792A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a byte code program execution control system capable of improving the execution speed of a byte code program just after execution start. SOLUTION: A program supply computer 1100 executes a byte code, measures the number of execution times and execution time in each method in a byte code program by a profiler 1140, acquires profile information and transmits the byte code and the profile information to a program execution computer 1200. The computer 1200 decides which method of the byte code program should be converted into a native code by referring to the profile information, makes it a native code by a native code compiler 1250, makes the method made the native code to be directly carried out by a CPU and the other methods to be sequentially interpreted and executed by a byte code interpreter 1240.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、ソースプログラム
の翻訳により生成された中間コードであるバイトコード
を実行するためのバイトコード実行制御技術に関し、特
にバイトコードを高速に実行するための技術に関する。
[0001] 1. Field of the Invention [0002] The present invention relates to a bytecode execution control technique for executing a bytecode which is an intermediate code generated by translating a source program, and more particularly to a technique for executing a bytecode at a high speed.

【0002】[0002]

【従来の技術】近年、インターネットの利用拡大等を背
景とし、あるコンピュータ上で開発したプログラムを通
信回線等を通じて配送し他のコンピュータ上で実行させ
るための技術として、コンピュータ間のアーキテクチャ
等の相違を吸収するための仮想マシンなる技術が開発さ
れている。
2. Description of the Related Art In recent years, against the background of expanding use of the Internet and the like, as a technique for distributing a program developed on one computer through a communication line or the like and executing the program on another computer, a difference in architecture between computers has been proposed. The technology of absorbing virtual machines has been developed.

【0003】仮想マシンは、プラットフォーム非依存で
流通に適したバイトコードを、解釈して各コンピュータ
上で実行するための制御を行うソフトウェアである。こ
の仮想マシンで実行されるためのバイトコードは、例え
ば、SUN Microsystems社が開発したJ
ava言語で記述されたソースプログラムをコンパイル
することにより生成されるJavaバイトコードであ
り、この場合の仮想マシンは、Java仮想マシン、即
ちJavaバイトコードを逐次解釈して実行するバイト
コードインタプリタである。
[0003] A virtual machine is software that interprets bytecodes that are platform-independent and suitable for distribution, and controls them to be executed on each computer. The bytecode to be executed by the virtual machine is, for example, J code developed by SUN Microsystems.
This is a Java bytecode generated by compiling a source program described in the Java language. The virtual machine in this case is a Java virtual machine, that is, a bytecode interpreter that sequentially interprets and executes the Java bytecode.

【0004】なお、上述のJava言語は、取り扱う様
々な対象を共通の性質に着目してひとまとめにして取り
扱うことに適したオブジェクト指向言語であり、この言
語で記述するソースプログラムにおいては、様々な対象
物それぞれを示すオブジェクトを、クラスとして定義す
る。クラスはオブジェクトを抽象化した概念であり、実
体であるオブジェクトのテンプレートとなるものであ
る。クラスの定義は、各種データの定義と、各種処理内
容を定めるメソッドの定義とを含む。
The Java language described above is an object-oriented language suitable for handling various objects to be handled collectively while paying attention to common properties. In a source program described in this language, various objects are handled. An object indicating each object is defined as a class. A class is a concept that abstracts an object, and serves as a template for a real object. The definition of the class includes the definition of various data and the definition of a method that determines the content of various processing.

【0005】通信回線等を通じて配送されるJavaバ
イトコードを受信して実行するコンピュータは、Int
el社のx86、Motorola社のPowerP
C、SUN Microsystems社のSPARC
等のどのアーキテクチャに基づくものであってもよく、
それぞれは、異なるバイトコードインタプリタによっ
て、Javaバイトコードを逐次解釈しそのプラットフ
ォームで実行可能な機械語等であるネイティブコードに
逐次変換して実行する。
[0005] A computer that receives and executes Java bytecode delivered via a communication line or the like is based on Int.
x86 from El, PowerP from Motorola
C, SPARC of SUN Microsystems
May be based on any architecture such as
Each uses a different bytecode interpreter to sequentially interpret Java bytecodes, sequentially convert them to native codes, which are machine language or the like, executable on the platform, and execute them.

【0006】しかし、このバイトコードインタプリタが
Javaバイトコードを逐一解釈して実行するインタプ
リタ方式では、バイトコードの実行速度が上がらない。
そこで、バイトコードをより高速に実行するために、バ
イトコードをロード時や実行直前にコンパイルしてネイ
ティブコードに変換し、このネイティブコードをCPU
が実行するというJust In Timeコンパイル
方式が考えられた。
However, in the interpreter system in which the bytecode interpreter interprets and executes Java bytecodes one by one, the execution speed of bytecodes does not increase.
Therefore, in order to execute the bytecode at a higher speed, the bytecode is compiled at the time of loading or immediately before execution, converted to native code, and this native code is converted into a CPU.
Just In Time compilation method was considered.

【0007】このJust In Timeコンパイル
方式は、繰り返し実行されるような処理部分に適する
が、あらゆる処理部分に有効とはいえない。即ち、バイ
トコードのプログラム(以下、「バイトコードプログラ
ム」という。)すべてをネイティブコードにすることが
有用であるとは限らない。プログラムには1度しか実行
されない或いは特定の場合においてしか実行されない部
分等もあるため、ネイティブコード化するためのCPU
時間の消費や記憶容量の圧迫等の不都合を考慮すると、
バイトコードプログラム中のネイティブコード化の必要
部分を特定して部分的にネイティブコードに変換するこ
とが必要となる。
The Just In Time compilation method is suitable for processing portions that are repeatedly executed, but is not effective for all processing portions. That is, it is not always useful to convert all bytecode programs (hereinafter referred to as “bytecode programs”) into native codes. Since some programs are executed only once or executed only in a specific case, the CPU for native coding is used.
Considering inconveniences such as time consumption and pressure on storage capacity,
It is necessary to specify a part of the bytecode program that needs to be converted into native code and partially convert it to native code.

【0008】なお、上述のバイトコードインタプリタ等
の仮想マシンの技術は、コンピュータの分野ばかりでな
く、TV、デジタルビデオ、DVDプレーヤー等の家電
機器の分野においても利用可能なものである。一般に家
電機器では、コスト面等の諸事情からCPU性能やメモ
リ等の記憶容量についての制約が大きいので、Just
In Timeコンパイル方式を用いる場合には、特
に適切に、ネイティブコード化する部分を特定する必要
がある。
[0008] The technology of the virtual machine such as the bytecode interpreter described above can be used not only in the field of computers but also in the field of home electric appliances such as TVs, digital videos, and DVD players. In general, in the case of home electric appliances, there are great restrictions on the CPU performance and the storage capacity of the memory and the like due to various factors such as cost, so Just
When using the In Time compilation method, it is necessary to particularly appropriately specify a part to be natively coded.

【0009】ネイティブコード化をすべき部分を特定す
るための技術としては、SUN Microsyste
ms社のHotSpotと呼ばれる技術が開発されてい
る。これは、バイトコードインタプリタに、バイトコー
ドを実行しながら、各クラス又はメソッドの実行回数や
実行時間等の実行時情報であるプロファイル情報を取得
させ、このプロファイル情報を参照してバイトコードプ
ログラム中のネイティブコード化の必要部分を特定させ
る技術である。これにより、バイトコードの逐次解釈実
行がなされてプロファイル情報が取得され、プロファイ
ル情報に基づいてネイティブコード化すべき部分と判断
された部分的なバイトコードについては、以後、Jus
t In Timeコンパイル方式を用いてまとめてネ
イティブコードに変換した後にCPUに直接実行させる
ことができる。従って、実行回数又は実行時間が大きい
クラス又はメソッドを特定して、Just In Ti
meコンパイル方式を用いてそのメソッド等のバイトコ
ードをネイティブコードに変換することができ、適切に
バイトコードプログラムの実行速度を向上させることが
可能となる。
As a technique for specifying a part to be natively coded, SUN Microsystems is used.
A technology called HotSpot by ms has been developed. This causes the bytecode interpreter to acquire profile information, which is runtime information such as the number of times and execution time of each class or method, while executing the bytecode, and refer to this profile information to read the profile information in the bytecode program. This is a technology that specifies the necessary parts of native coding. As a result, the bytecode is sequentially interpreted and the profile information is obtained, and the partial bytecode determined to be a part to be natively coded based on the profile information is hereinafter referred to as Jus.
It can be directly executed by the CPU after being converted into native code by using the t In Time compilation method. Therefore, a class or a method having a large number of executions or a long execution time is specified, and Just In Ti
The byte code of the method or the like can be converted to native code using the me compilation method, and the execution speed of the byte code program can be appropriately improved.

【0010】[0010]

【発明が解決しようとする課題】しかしながら、上述の
HotSpotという技術では、バイトコードを実行し
てプロファイル情報を取得した後に初めてネイティブコ
ード化が有効となる部分の特定が可能となるため、バイ
トコードプログラムの実行速度は、その実行開始後しば
らくの間は向上しない。
However, in the technique called HotSpot, it is possible to specify a portion where native coding is valid only after executing bytecode and acquiring profile information. Does not improve for some time after the execution starts.

【0011】そこで、本発明はこの問題に鑑みてなされ
たものであり、実行開始直後からバイトコードプログラ
ムの実行速度を向上させることを可能にするバイトコー
ドプログラム実行制御システムを提供することを目的と
する。
SUMMARY OF THE INVENTION The present invention has been made in view of the above problems, and has as its object to provide a bytecode program execution control system capable of improving the execution speed of a bytecode program immediately after the start of execution. I do.

【0012】[0012]

【課題を解決するための手段】上記目的を達成するため
に、本発明に係るバイトコードプログラム実行制御シス
テムは、バイトコードを送信するプログラム供給装置
と、バイトコードを受信して実行するプログラム実行装
置とを備えるバイトコードプログラム実行制御システム
であって、前記プログラム供給装置は、バイトコードに
加えて、当該バイトコード中のネイティブコードに変換
すべき部分を特定するために有用な特定用情報を記憶す
る記憶手段と、前記記憶手段に格納されている前記特定
用情報をバイトコードと共にプログラム実行装置に送信
する送信手段とを有し、前記プログラム実行装置は、C
PUと、バイトコードを逐次解釈して前記CPUに実行
させるバイトコードインタプリタと、前記プログラム供
給装置から送信された前記バイトコード及び前記特定用
情報を受信する受信手段と、受信した前記特定用情報を
参照して、当該特定用情報と共に受信した前記バイトコ
ード中のネイティブコードに変換すべき部分を特定する
特定手段と、前記特定手段により特定された部分を前記
CPUのネイティブコードに変換するネイティブコード
化手段と、前記バイトコード中の、前記受信ネイティブ
コード化手段によりネイティブコードに変換された部分
を前記バイトコードインタプリタを介することなく前記
CPUに直接実行させ、他の部分を、バイトコードイン
タプリタを介して前記CPUに実行させる実行制御手段
とを有することを特徴とする。
To achieve the above object, a bytecode program execution control system according to the present invention comprises a program supply device for transmitting a bytecode, and a program execution device for receiving and executing a bytecode. Wherein the program supply device stores, in addition to the bytecode, identification information useful for identifying a portion of the bytecode to be converted to a native code. Storage means, and transmission means for transmitting the identification information stored in the storage means together with a bytecode to a program execution device, wherein the program execution device has a C
PU, a bytecode interpreter that sequentially interprets bytecodes and causes the CPU to execute the bytecodes, a receiving unit that receives the bytecodes and the specifying information transmitted from the program supply device, and the received specifying information. Specifying means for specifying a portion to be converted to a native code in the byte code received together with the specifying information; and native code conversion for converting the portion specified by the specifying means to a native code of the CPU. Means, and causing the CPU to directly execute a portion of the bytecode converted to the native code by the reception native coding means without passing through the bytecode interpreter, and execute another portion through the bytecode interpreter. Having execution control means for causing the CPU to execute. And butterflies.

【0013】上記構成により、プログラム実行装置は、
プログラム供給装置の送信手段により送信された特定用
情報を用いて、バイトコード中のネイティブコード化す
べき部分を特定することができるため、実行開始直後か
らバイトコードプログラムの実行速度を向上させること
ができる。
With the above configuration, the program execution device includes:
Since the part to be native-coded in the bytecode can be specified by using the specifying information transmitted by the transmission unit of the program supply device, the execution speed of the bytecode program can be improved immediately after the start of the execution. .

【0014】[0014]

【発明の実施の形態】<実施の形態1>以下、本発明に
係るバイトコードプログラム実行制御システムの実施の
形態1について、図1〜図5を用いて説明する。 <構成>図1は、本発明の実施の形態1に係るバイトコ
ードプログラム実行制御システム1000の構成図であ
る。
DESCRIPTION OF THE PREFERRED EMBODIMENTS <First Embodiment> A first embodiment of a bytecode program execution control system according to the present invention will be described below with reference to FIGS. <Configuration> FIG. 1 is a configuration diagram of a bytecode program execution control system 1000 according to the first embodiment of the present invention.

【0015】バイトコードプログラム実行制御システム
1000は、1台のプログラム供給用のコンピュータが
バイトコードプログラムを複数台のプログラム実行用の
コンピュータに供給し、プログラム実行用のコンピュー
タそれぞれが受け取ったバイトコードプログラムを実行
するシステムである。なお、図1は、1台のプログラム
供給用のコンピュータであるプログラム供給コンピュー
タ1100と、複数台のプログラム実行用のコンピュー
タのうちの1台であるプログラム実行コンピュータ12
00に着目して、各コンピュータ内部の機能的な構成を
示している。
In the bytecode program execution control system 1000, one program supply computer supplies a bytecode program to a plurality of program execution computers, and each of the program execution computers receives the received bytecode program. The system to execute. FIG. 1 shows a program supply computer 1100 which is one computer for supplying a program, and a program execution computer 12 which is one of a plurality of computers for executing a program.
Focusing on 00, the functional configuration inside each computer is shown.

【0016】プログラム供給コンピュータ1100は、
CPU、メモリ、ハードディスク装置、通信制御装置、
入出力装置等を備えるコンピュータで構成され、機能的
には、記憶部1110と、バイトコードコンパイラ11
20と、バイトコードインタプリタ1130とプロファ
イラ1140と、送受信部1150とを有する。ここ
で、記憶部1110は、Java言語で記述されたソー
スプログラムを記憶している領域と、バイトコードを格
納するための領域と、バイトコードプログラムの実行回
数や実行時間等の実行時情報を示すプロファイル情報を
格納するための領域とを有するメモリ及びハードディス
クである。
The program supply computer 1100 includes:
CPU, memory, hard disk device, communication control device,
It is composed of a computer having an input / output device and the like, and functionally includes a storage unit 1110 and a bytecode compiler 11.
20, a bytecode interpreter 1130, a profiler 1140, and a transmission / reception unit 1150. Here, the storage unit 1110 indicates an area for storing a source program described in Java language, an area for storing a bytecode, and execution time information such as the number of times and execution time of the bytecode program. And a hard disk having an area for storing profile information.

【0017】バイトコードコンパイラ1120は、記憶
部1110に記憶されているソースプログラムを読み出
してバイトコードに変換して記憶部1110に格納する
コンパイラである。バイトコードインタプリタ1130
は、バイトコードコンパイラ1120により記憶部11
10に格納されたバイトコードを逐次解釈して実行する
ものであり、プロファイラ1140を制御してバイトコ
ードプログラムの実行時にプロファイル情報を取得させ
るものである。
The bytecode compiler 1120 is a compiler that reads a source program stored in the storage unit 1110, converts the source program into bytecode, and stores the converted bytecode in the storage unit 1110. Bytecode interpreter 1130
Is stored in the storage unit 11 by the bytecode compiler 1120.
10 sequentially interprets and executes the bytecodes stored in the memory 10, and controls the profiler 1140 to acquire profile information when executing the bytecode program.

【0018】プロファイラ1140は、バイトコードプ
ログラムの実行時に、各メソッドの実行回数及び実行時
間を測定してプロファイル情報として記憶部1110に
格納するものである。送受信部1150は、記憶部11
10に格納されたバイトコード及びプロファイル情報
を、通信回線等を通じてプログラム実行コンピュータ1
200等のプログラム実行用のコンピュータに送信する
ものである。
The profiler 1140 measures the number of executions and the execution time of each method when the bytecode program is executed, and stores it in the storage unit 1110 as profile information. The transmission / reception unit 1150 includes the storage unit 11
10 is transferred to the program execution computer 1 via a communication line or the like.
200 and the like.

【0019】また、プログラム実行コンピュータ120
0は、CPU、メモリ、ハードディスク装置等を備える
コンピュータで構成され、機能的には、記憶部1210
と、送受信部1220と、プログラム実行制御部123
0と、バイトコードインタプリタ1240と、ネイティ
ブコードコンパイラ1250とを有する。ここで、記憶
部1210は、バイトコードを格納するための領域、プ
ロファイル情報を格納するための領域、ネイティブコー
ドを格納するための領域、後述するネイティブコード化
情報を格納するための領域等を有するメモリ及びハード
ディスクである。
The program execution computer 120
Reference numeral 0 denotes a computer including a CPU, a memory, a hard disk device, and the like.
, Transmission / reception unit 1220, program execution control unit 123
0, a bytecode interpreter 1240, and a native code compiler 1250. Here, the storage unit 1210 has an area for storing bytecode, an area for storing profile information, an area for storing native code, an area for storing native coded information described later, and the like. A memory and a hard disk.

【0020】送受信部1220は、プログラム供給コン
ピュータ1100により通信回線等を通じて送信された
バイトコード及びプロファイル情報を受信して記憶部1
210に格納するものである。バイトコードインタプリ
タ1240は、記憶部1210に格納されているバイト
コードを逐次解釈して実行するものであり、プログラム
実行制御部1230と協調して動作、即ちプログラム実
行制御部1230の制御下で動作する。
The transmission / reception unit 1220 receives the bytecode and profile information transmitted from the program supply computer 1100 via a communication line or the like, and
210. The byte code interpreter 1240 sequentially interprets and executes byte codes stored in the storage unit 1210, and operates in cooperation with the program execution control unit 1230, that is, operates under the control of the program execution control unit 1230. .

【0021】ネイティブコードコンパイラ1250は、
記憶部1210に格納されているバイトコードのうち、
プログラム実行制御部1230によりネイティブコード
化の指示がなされた部分についてネイティブコード化、
即ちネイティブコードの生成を行うものである。また、
プログラム実行制御部1230は、記憶部1210に格
納されたプロファイル情報を参照して、バイトコードプ
ログラム中のどの部分をネイティブコード化するべきか
を判断して、ネイティブコード化すべき部分を示すネイ
ティブコード化情報を作成して記憶部1210に格納
し、ネイティブコード化すべき部分についてネイティブ
コードコンパイラ1250にネイティブコードを生成さ
せ、ネイティブコード化していない部分についてはバイ
トコードインタプリタ1240に逐次解釈実行を行わ
せ、ネイティブコード化している部分についてはCPU
に直接的に実行させるという実行制御を行うものであ
る。
The native code compiler 1250
Of the bytecodes stored in the storage unit 1210,
Native code conversion is performed for a part where native code conversion is instructed by the program execution control unit 1230,
That is, a native code is generated. Also,
The program execution control unit 1230 refers to the profile information stored in the storage unit 1210, determines which part in the bytecode program is to be natively coded, and performs native coding indicating the part to be natively coded. Information is created and stored in the storage unit 1210, a native code compiler 1250 generates a native code for a part to be natively coded, and a bytecode interpreter 1240 performs sequential interpretation execution for a part that is not natively coded. CPU for the coded part
Is executed directly.

【0022】なお、バイトコードコンパイラ1120、
バイトコードインタプリタ1130、プロファイラ11
40、送受信部1150、送受信部1220、プログラ
ム実行制御部1230、バイトコードインタプリタ12
40及びネイティブコードコンパイラ1250は、メモ
リに格納された制御用プログラムがCPUにより実行さ
れることにより実現される機能部分である。
The bytecode compiler 1120,
Bytecode interpreter 1130, profiler 11
40, transmission / reception unit 1150, transmission / reception unit 1220, program execution control unit 1230, bytecode interpreter 12
The 40 and the native code compiler 1250 are functional parts realized by the CPU executing the control program stored in the memory.

【0023】<データ>図2は、記憶部1110に記憶
されているソースプログラムのクラス定義の内容例を示
す図である。同図に示すJava言語で記述されたソー
スプログラムにおいて、sampleクラスのオブジェ
クトが生成された段階でまず起動されるinitメソッ
ドは、forループ中においてm1メソッドを1000
回実行した後、m2メソッドを1回実行し、その後m3
メソッドを500回実行するものである。なお、本発明
の説明上必要がないためm1メソッド、m2メソッド及
びm3メソッドの内容については記載を省略している。
<Data> FIG. 2 is a diagram showing an example of the contents of the class definition of the source program stored in the storage unit 1110. In the source program described in the Java language shown in the figure, the init method that is first activated at the stage when the sample class object is generated changes the m1 method to 1000 in the for loop.
After executing m times, execute the m2 method once and then m3
The method is executed 500 times. Note that the description of the contents of the m1, m2, and m3 methods is omitted because it is not necessary for the description of the present invention.

【0024】図3は、上述したプロファイル情報の構成
及び内容例を示す図である。プロファイル情報は、バイ
トコードプログラムの実行中にプロファイラにより実際
に測定された情報であり、メソッド毎に、そのメソッド
の実行回数と累積実行時間とを対応させたものである。
メソッド名301はメソッドの名称であり、実行回数3
02はメソッドが実際に実行された回数であり、累積実
行時間303はメソッドがバイトコードインタプリタ及
びCPUにより実際に実行されるのに要した時間の累積
値である。
FIG. 3 is a diagram showing a configuration and an example of contents of the above-mentioned profile information. The profile information is information actually measured by the profiler during execution of the bytecode program, and is obtained by associating, for each method, the number of times the method has been executed with the accumulated execution time.
The method name 301 is the name of the method, and the number of executions is 3
02 is the number of times the method was actually executed, and the accumulated execution time 303 is the accumulated value of the time required for the method to be actually executed by the bytecode interpreter and the CPU.

【0025】なお、同図には、図2に示したsampl
eクラスの各メソッドについての実行回数と累積実行時
間とを例示している。図4は、ネイティブコード化情報
の構成及び内容例を示す図である。ネイティブコード化
情報は、プログラム実行制御部1230により生成され
る情報であり、その情報として、ネイティブコード化す
べきと判断されたメソッド名であるネイティブコード化
メソッド名401が登録され、そのメソッドについてネ
イティブコードが生成された後にそのネイティブコード
のメモリアドレスであるネイティブコードアドレス40
2が登録されるものである。また、このネイティブコー
ド化情報は、プログラム実行制御部1230による各メ
ソッドの実行段階において、各メソッドをバイトコード
インタプリタで逐次解釈して実行させるか、そのメソッ
ドについてのネイティブコードを直接CPUに実行させ
るかという判断等に利用される。
FIG. 2 shows the sampl shown in FIG.
It illustrates the number of executions and the accumulated execution time for each method of the e-class. FIG. 4 is a diagram showing a configuration and an example of the content of native coded information. The native encoding information is information generated by the program execution control unit 1230. As the information, a native encoding method name 401, which is a method name determined to be native encoded, is registered. Is generated, the native code address 40 which is the memory address of the native code
2 is to be registered. Also, this native coded information indicates whether each method should be interpreted and executed sequentially by a bytecode interpreter at the execution stage of each method by the program execution control unit 1230, or whether the native code for the method should be directly executed by the CPU. It is used for such a judgment.

【0026】同図の例では、ネイティブコード化すべき
と判断されたメソッドがm1、m3であり、それぞれの
ネイティブコードがメモリ中の0x48000、0x4
a000というアドレスに記憶されていることを示して
いる。 <動作>以下、上述した構成を備えるバイトコードプロ
グラム実行制御システム1000の動作を具体例を用い
て説明する。
In the example shown in the figure, the methods determined to be native-coded are m1 and m3, and the respective native codes are 0x48000 and 0x4 in the memory.
It is stored at the address a000. <Operation> The operation of the bytecode program execution control system 1000 having the above-described configuration will be described below using a specific example.

【0027】ここで、具体例として、図2に示したソー
スプログラムからコンパイルにより生成されたバイトコ
ードがプログラム供給コンピュータ1100からプログ
ラム実行コンピュータ1200に送信され、これを受け
たプログラム実行コンピュータ1200はそのバイトコ
ードを実行するという例を想定する。図5は、バイトコ
ードプログラム実行制御システム1000の動作フロー
を示す図である。
Here, as a specific example, a bytecode generated by compiling from the source program shown in FIG. 2 is transmitted from the program supply computer 1100 to the program execution computer 1200, and the program execution computer 1200 receives the bytecode. Consider the example of executing code. FIG. 5 is a diagram showing an operation flow of the bytecode program execution control system 1000.

【0028】まず、プログラム供給コンピュータ110
0において、バイトコードコンパイラ1120は、記憶
部1110に記憶されているソースプログラム(図2参
照)をコンパイルしてバイトコードを生成し記憶部11
10に格納する(ステップS501)。なお、このとき
生成されたバイトコードには、sampleというクラ
ス名、init、m1、m2及びm3というメソッド名
を示す情報も含まれ、各メソッドについてのバイトコー
ドの範囲を示す情報も含まれている。
First, the program supply computer 110
0, the bytecode compiler 1120 compiles the source program (see FIG. 2) stored in the storage unit 1110 to generate bytecode, and
10 (step S501). The bytecode generated at this time includes information indicating a class name of sample, method names of init, m1, m2, and m3, and also includes information indicating a range of bytecode for each method. .

【0029】バイトコードが生成された後、バイトコー
ドインタプリタ1130は、記憶部1110からバイト
コードを逐次読み出し解釈し実行するとともに、プロフ
ァイラ1140にプロファイル情報を取得させる(ステ
ップS502)。このとき取得された、即ち生成された
プロファイル情報は記憶部1110に格納され、このプ
ロファイル情報の内容は、図3に例示したものになる。
つまり、プログラム供給コンピュータ1100が備える
CPU上でバイトコードインタプリタ1130の制御に
よって、initメソッドは1回、3ミリ秒間実行さ
れ、m1メソッドは1000回、4000ミリ秒間実行
され、m2メソッドは1回、4ミリ秒間実行され、m3
メソッドは500回、3000ミリ秒間実行されたこと
になる。
After the bytecode is generated, the bytecode interpreter 1130 sequentially reads and interprets the bytecode from the storage unit 1110, executes the bytecode, and causes the profiler 1140 to acquire profile information (step S502). At this time, the acquired profile information, that is, the generated profile information is stored in the storage unit 1110, and the content of the profile information is as illustrated in FIG.
That is, under the control of the bytecode interpreter 1130 on the CPU provided in the program supply computer 1100, the init method is executed once for 3 milliseconds, the m1 method is executed 1000 times and 4000 milliseconds, and the m2 method is executed once and 4 times. Run for milliseconds, m3
The method has been executed 500 times for 3000 milliseconds.

【0030】プロファイル情報が取得された後、送受信
部1150は、記憶部1110に格納されているバイト
コード及びプロファイル情報をプログラム実行コンピュ
ータ1200に送信する(ステップS503)。これに
対応して、プログラム実行コンピュータ1200におけ
る送受信部1220は、プログラム供給コンピュータ1
100から送信されたバイトコード及びプロファイル情
報を受信して記憶部1210に格納する(ステップS5
04)。
After the profile information is obtained, the transmission / reception unit 1150 transmits the bytecode and the profile information stored in the storage unit 1110 to the program execution computer 1200 (step S503). Correspondingly, the transmitting and receiving unit 1220 in the program execution computer 1200
100 receives the bytecode and the profile information transmitted from the storage unit 1210 (step S5).
04).

【0031】バイトコード及びプロファイル情報が記憶
部1210に格納された後、プログラム実行制御部12
30は、プロファイル情報を参照して、累積実行時間が
大きくかつ実行回数が2回以上のメソッドを検出して、
検出したメソッドをネイティブコード化するものと決定
してこれをネイティブコード化メソッドとしてネイティ
ブコード化情報に登録する(ステップS505)。ここ
で累積実行時間が大きいメソッドとは、すべてのメソッ
ドについての累積実行時間の平均値よりもその累積実行
時間が大きいメソッドをいう。従って、m1メソッド及
びm3メソッドがネイティブコード化する部分として決
定される。
After the bytecode and the profile information are stored in the storage unit 1210, the program execution control unit 12
30 detects a method whose cumulative execution time is long and the number of times of execution is 2 or more with reference to the profile information,
It is determined that the detected method is to be natively coded, and registered in the natively coded information as a natively coded method (step S505). Here, the method whose cumulative execution time is long refers to a method whose cumulative execution time is longer than the average value of the cumulative execution times of all the methods. Therefore, the m1 method and the m3 method are determined as parts to be natively coded.

【0032】ネイティブコード化する部分を決定した
後、プログラム実行制御部1230は、ネイティブコー
ドコンパイラ1250を制御して、その部分、即ちm1
メソッド及びm3メソッドのバイトコードをネイティブ
コードに変換させる(ステップS506)。このとき、
ネイティブコードコンパイラ1250による変換結果と
して生成されたネイティブコードは記憶部1210に格
納され、また、格納されたアドレスがネイティブコード
化情報に登録される。
After determining the part to be natively coded, the program execution control unit 1230 controls the native code compiler 1250 to execute the part, ie, m1
The bytecodes of the method and the m3 method are converted to native codes (step S506). At this time,
The native code generated as a result of the conversion by the native code compiler 1250 is stored in the storage unit 1210, and the stored address is registered in the native coding information.

【0033】ネイティブコードが生成された後、プログ
ラム実行制御部1230は、バイトコードインタプリタ
1240を制御して、ネイティブコード化していない部
分については逐次解釈実行させ、ネイティブコード化し
ている部分、即ちネイティブコード化情報に登録されて
いるメソッドについてはCPUにより直接的にネイティ
ブコードを実行させる(ステップS507)。従って、
プログラム実行制御部1230による制御によって、i
nitメソッドについてはバイトコードが逐次解釈実行
され、iniメソッドからm1メソッドが呼び出される
時点から、0x48000というアドレスに位置するネ
イティブコードが繰り返し実行され、その後、m2メソ
ッドのバイトコードが逐次解釈実行され、さらにその
後、m3メソッドについての0x4a000というアド
レスに位置するネイティブコードが繰り返し実行される
ことになる。
After the native code is generated, the program execution control unit 1230 controls the bytecode interpreter 1240 to sequentially interpret and execute the non-native-coded part, ie, the native-coded part, that is, the native code The native code is directly executed by the CPU for the method registered in the conversion information (step S507). Therefore,
Under the control of the program execution control unit 1230, i
For the nit method, the bytecode is sequentially interpreted and executed, and from the time when the m1 method is called from the ini method, the native code located at the address of 0x48000 is repeatedly executed. Thereafter, the bytecode of the m2 method is sequentially interpreted and executed. After that, the native code located at the address 0x4a000 for the m3 method is repeatedly executed.

【0034】このように、バイトコードプログラム実行
制御システム1000では、バイトコードの供給を受け
てこれを実行するコンピュータであるプログラム実行コ
ンピュータ1200は、バイトコードとともに供給され
るプロファイル情報を参照することにより、効果的にネ
イティブコード化を行うことができ、これにより、バイ
トコードプログラムの実行開始時点からバイトコードプ
ログラムの実行速度を向上させることが可能になる。 <実施の形態2>以下、本発明に係るバイトコードプロ
グラム実行制御システムの実施の形態2について、図6
〜図11を用いて説明する。
As described above, in the bytecode program execution control system 1000, the program execution computer 1200, which is a computer that receives and executes a bytecode, refers to the profile information supplied together with the bytecode, thereby Native coding can be performed effectively, thereby improving the execution speed of the bytecode program from the start of execution of the bytecode program. <Second Embodiment> Hereinafter, a second embodiment of the bytecode program execution control system according to the present invention will be described with reference to FIG.
This will be described with reference to FIG.

【0035】<構成>図6は、本発明の実施の形態2に
係るバイトコードプログラム実行制御システム2000
の構成図である。バイトコードプログラム実行制御シス
テム2000は、実施の形態1のバイトコードプログラ
ム実行制御システム1000の機能を拡張したものであ
る。実施の形態1で示したものと同一機能の構成要素に
ついては、同図において図1と同一の符号を用いて示し
ており、これらについては詳細な説明を省略する。
<Structure> FIG. 6 shows a bytecode program execution control system 2000 according to the second embodiment of the present invention.
FIG. The bytecode program execution control system 2000 is an extension of the functions of the bytecode program execution control system 1000 of the first embodiment. Components having the same functions as those described in the first embodiment are denoted by the same reference numerals as those in FIG. 1 in the same figure, and detailed description thereof will be omitted.

【0036】プログラム供給コンピュータ2100は、
CPU、メモリ、ハードディスク装置、通信制御装置、
入出力装置等を備えるコンピュータで構成され、機能的
には、記憶部1110と、バイトコードコンパイラ11
20と、バイトコードインタプリタ1130とプロファ
イラ1140と、送受信部2150と、プロファイル情
報更新部2160とを有する。
The program supply computer 2100 includes:
CPU, memory, hard disk device, communication control device,
It is composed of a computer having an input / output device and the like, and functionally includes a storage unit 1110 and a bytecode compiler 11.
20, a bytecode interpreter 1130, a profiler 1140, a transmission / reception unit 2150, and a profile information update unit 2160.

【0037】送受信部2150は、記憶部1110に格
納されたバイトコード及びプロファイル情報を、通信回
線等を通じてプログラム実行コンピュータ2200等の
プログラム実行用のコンピュータに送信することに加え
て、プログラム実行コンピュータ2200等からプロフ
ァイル情報を受信するものである。プロファイル情報更
新部2160は、プログラム実行コンピュータ2200
等から受信したプロファイル情報を、送受信部2150
から受け取るとこれに基づいて、記憶部1110に既に
格納されているプロファイル情報を更新するものであ
る。
The transmission / reception unit 2150 transmits the bytecode and the profile information stored in the storage unit 1110 to a program execution computer such as the program execution computer 2200 via a communication line or the like. This is to receive profile information from. The profile information update unit 2160 is a program execution computer 2200
The profile information received from the transmission / reception unit 2150
And updates the profile information already stored in the storage unit 1110 based on the received profile information.

【0038】また、プログラム実行コンピュータ220
0は、CPU、メモリ、ハードディスク装置等を備える
コンピュータで構成され、機能的には、記憶部2210
と、送受信部2220と、プログラム実行制御部223
0と、バイトコードインタプリタ1240と、ネイティ
ブコードコンパイラ1250と、プロファイラ2260
とを有する。
The program execution computer 220
Reference numeral 0 denotes a computer including a CPU, a memory, a hard disk device, and the like.
, Transmission / reception unit 2220, program execution control unit 223
0, a bytecode interpreter 1240, a native code compiler 1250, and a profiler 2260.
And

【0039】ここで、記憶部2210は、バイトコード
を格納するための領域、プロファイル情報を格納するた
めの領域、ネイティブコードを格納するための領域、ネ
イティブコード化情報を格納するための領域等を有する
メモリ及びハードディスクである。プロファイル情報を
格納するための領域には、プログラム供給コンピュータ
2100から供給されたプロファイル情報に加えてプロ
グラム実行コンピュータ2200におけるプロファイラ
2260により取得されたプロファイル情報(以下、
「新プロファイル情報」という。)も格納される。
Here, the storage unit 2210 has an area for storing bytecode, an area for storing profile information, an area for storing native code, an area for storing native coded information, and the like. And a hard disk. In the area for storing profile information, in addition to the profile information supplied from the program supply computer 2100, the profile information acquired by the profiler 2260 in the program execution computer 2200 (hereinafter, referred to as the profile information).
It is called "new profile information." ) Is also stored.

【0040】送受信部2220は、プログラム供給コン
ピュータ2100により通信回線等を通じて送信された
バイトコード及びプロファイル情報を受信して記憶部2
210に格納することに加えて、記憶部2210に格納
されている新プロファイル情報を通信回線等を介してプ
ログラム供給コンピュータ2100に送信するものであ
る。
The transmission / reception unit 2220 receives the bytecode and profile information transmitted from the program supply computer 2100 via a communication line or the like, and
In addition to storing the new profile information in the program 210, the new profile information stored in the storage unit 2210 is transmitted to the program supply computer 2100 via a communication line or the like.

【0041】プログラム実行制御部2230は、実施の
形態1で示したプログラム実行制御部1230の機能に
加えて、バイトコードの逐次解釈実行又はネイティブコ
ードの実行を行うときに、プロファイラ2260を制御
することにより、そのバイトコードプログラムの実行時
情報、即ち、各メソッドが実際に実行された回数と実行
に要した時間とを示す新プロファイル情報を取得させる
ものである。
The program execution control unit 2230 controls the profiler 2260 when performing sequential interpretation of bytecode or execution of native code, in addition to the function of the program execution control unit 1230 shown in the first embodiment. Thus, the execution time information of the bytecode program, that is, the new profile information indicating the number of times each method is actually executed and the time required for the execution are acquired.

【0042】また、プロファイラ2260は、プログラ
ム実行制御部2230の制御を受けて新プロファイル情
報を取得し、取得した新プロファイル情報を記憶部22
10に格納するものである。なお、実施の形態1と同様
に、送受信部2150、プロファイル情報更新部216
0、送受信部2220、プログラム実行制御部223
0、プロファイラ2260は、メモリに格納された制御
用プログラムがCPUにより実行されることにより実現
される機能部分である。
The profiler 2260 acquires new profile information under the control of the program execution control unit 2230, and stores the acquired new profile information in the storage unit 22.
10 is stored. Note that, similarly to Embodiment 1, the transmission / reception unit 2150, the profile information update unit 216
0, transmission / reception unit 2220, program execution control unit 223
0, the profiler 2260 is a functional part realized by the CPU executing the control program stored in the memory.

【0043】<動作>以下、上述した構成を備えるバイ
トコードプログラム実行制御システム2000の動作を
具体例を用いて説明する。ここでは、プログラム供給コ
ンピュータ2100は、例えばディジタル放送を無線又
は通信回線等を通じて各家庭等に対して送信するディジ
タル放送送信装置の一部として構成されているとし、デ
ィジタル放送の番組内容に応じたバイトコードプログラ
ムを放送番組データに付随して送信するものであること
とし、また、プログラム実行コンピュータ2200は、
各家庭等に設置されたディジタル放送受信装置に内蔵さ
れており、受信したバイトコードプログラムの実行によ
りディジタル放送受信装置のユーザインタフェース制御
その他の各種機能制御を行うものであることとする。さ
らに、プログラム供給コンピュータ2100が含まれて
いるディジタル放送送信装置は、同一の放送番組を時差
を設けて多数のディジタル放送受信装置に順次放送送信
するものであることとする。
<Operation> The operation of the bytecode program execution control system 2000 having the above-described configuration will be described below using a specific example. Here, it is assumed that the program supply computer 2100 is configured as a part of a digital broadcast transmitting apparatus that transmits digital broadcast to each home or the like via a wireless or communication line or the like. The code program is to be transmitted together with the broadcast program data, and the program execution computer 2200
It is built in a digital broadcast receiving apparatus installed in each home or the like, and controls the user interface and other various functions of the digital broadcast receiving apparatus by executing the received bytecode program. Further, it is assumed that the digital broadcast transmitting apparatus including the program supply computer 2100 sequentially transmits the same broadcast program to a large number of digital broadcast receiving apparatuses with a time difference.

【0044】図7は、プログラム供給コンピュータ21
00における記憶部1110に記憶されているソースプ
ログラムのクラス定義の内容例を示す図である。同図に
示すJava言語で記述されたソースプログラムにおけ
るminputメソッドは、ディジタル放送受信装置の
ユーザに対してグラフィカルユーザインタフェース等に
より選択肢を示して、その選択に応じて1又は0の値を
返却する処理を行うものであることとする。
FIG. 7 shows a program supply computer 21.
FIG. 14 is a diagram showing an example of the contents of a class definition of a source program stored in a storage unit 11 at 00. A minput method in a source program described in the Java language shown in FIG. 3 is a process of presenting a choice to a user of a digital broadcast receiving apparatus through a graphical user interface or the like and returning a value of 1 or 0 according to the selection. Shall be performed.

【0045】sample2クラスのオブジェクトが生
成された段階でまず起動されるinitメソッドは、m
inputメソッドを呼び出し、その戻り値が1であれ
ば100回m4メソッドを実行し、戻り値が0であれば
m4メソッドの実行をスキップし、また、100回m5
メソッドを実行するものである。なお、minputメ
ソッド、m4メソッド及びm5メソッドの具体的内容に
ついては本発明の説明上特に必要がないため記載を省略
している。
The init method first activated when the sample2 class object is generated is m
The input method is called, and if the return value is 1, the m4 method is executed 100 times. If the return value is 0, the execution of the m4 method is skipped.
Execute the method. Note that the specific contents of the minput method, the m4 method, and the m5 method are omitted because they are not particularly necessary for the description of the present invention.

【0046】図8は、バイトコードプログラム実行制御
システム2000の動作フローを示す図である。同図に
示すように、バイトコードプログラム実行制御システム
2000は、実施の形態1で示したバイトコードプログ
ラム実行制御システム1000の動作(ステップS50
1〜S506)に加えて、プログラム実行コンピュータ
2200上でのバイトコードプログラム実行中の新プロ
ファイル情報の取得に関連した動作(ステップS601
〜S604)を行う。
FIG. 8 is a diagram showing an operation flow of the bytecode program execution control system 2000. As shown in the figure, the bytecode program execution control system 2000 performs the operation (step S50) of the bytecode program execution control system 1000 shown in the first embodiment.
In addition to the operations related to the acquisition of new profile information during execution of the bytecode program on the program execution computer 2200 (step S601).
To S604).

【0047】以下、具体例に即して順に説明する。プロ
グラム供給コンピュータ2100は、バイトコードコン
パイラ1120により記憶部1110に記憶されている
ソースプログラム(図7参照)をコンパイルしてバイト
コードを生成し記憶部1110に格納し(ステップS5
01)、バイトコードインタプリタ1130により、バ
イトコードを逐次解釈実行し、プロファイラ1140に
よりプロファイル情報を取得する(ステップS50
2)。ここでは、バイトコードの実行時にminput
の戻り値が0であるように入力が与えられたものとす
る。このときプログラム供給コンピュータ2100が備
えるCPU上でバイトコードインタプリタ1130の制
御によって、initメソッドは1回、3ミリ秒間実行
され、minputメソッドは1回、2000ミリ秒間
実行され、m4メソッドは実行されず、m5メソッドは
100回、4000ミリ秒間実行されたものとする。こ
の場合、プロファイラ1140により記憶部1110に
格納されたプロファイル情報は、図9に示す内容にな
る。
Hereinafter, description will be made in order according to a specific example. The program supply computer 2100 compiles the source program (see FIG. 7) stored in the storage unit 1110 by the bytecode compiler 1120 to generate bytecode and stores it in the storage unit 1110 (step S5).
01), the bytecode interpreter 1130 sequentially interprets and executes the bytecode, and the profiler 1140 acquires profile information (step S50).
2). Here, minput is executed when the bytecode is executed.
It is assumed that the input is given such that the return value of is 0. At this time, under the control of the bytecode interpreter 1130 on the CPU of the program supply computer 2100, the init method is executed once for 3 milliseconds, the minput method is executed once for 2000 milliseconds, and the m4 method is not executed. It is assumed that the m5 method has been executed 100 times for 4000 milliseconds. In this case, the profile information stored in the storage unit 1110 by the profiler 1140 has the contents shown in FIG.

【0048】プロファイル情報が取得された後、送受信
部2150は、記憶部1110に格納されているバイト
コード及びプロファイル情報をプログラム実行コンピュ
ータ2200に送信する(ステップS503)。これに
対応して、プログラム実行コンピュータ2200におけ
る送受信部2220は、プログラム供給コンピュータ2
100から送信されたバイトコード及びプロファイル情
報を受信して記憶部2210に格納する(ステップS5
04)。続いてプログラム実行制御部2230は、プロ
ファイル情報を参照して、累積実行時間が大きくかつ実
行回数が2回以上のメソッドを検出して、検出したメソ
ッドをネイティブコード化するものと決定してこれをネ
イティブコード化メソッドとしてネイティブコード化情
報に登録し(ステップS505)、ネイティブコードコ
ンパイラ1250を制御して、決定した部分、即ちm5
メソッドのバイトコードを、ネイティブコードに変換さ
せる(ステップS506)。
After the profile information is obtained, the transmission / reception unit 2150 transmits the bytecode and the profile information stored in the storage unit 1110 to the program execution computer 2200 (step S503). Correspondingly, the transmitting / receiving unit 2220 in the program execution computer 2200
100 receives the bytecode and the profile information transmitted from the storage unit 2210 (step S5).
04). Subsequently, the program execution control unit 2230 refers to the profile information, detects a method in which the accumulated execution time is long and the number of times of execution is two or more, determines that the detected method is to be natively coded, and It is registered in the native encoding information as a native encoding method (step S505), and controls the native code compiler 1250 to determine the determined part, ie, m5
The bytecode of the method is converted to a native code (step S506).

【0049】ネイティブコードが生成された後、プログ
ラム実行制御部2230は、バイトコードインタプリタ
2240を制御して、ネイティブコード化していない部
分については逐次解釈実行させ、ネイティブコード化し
ている部分、即ちネイティブコード化情報に登録されて
いるメソッドについてはCPUにより直接的にネイティ
ブコードを実行させ、実行中においてプロファイラ22
60に新プロファイル情報を取得させる(ステップS6
01)。
After the native code is generated, the program execution control unit 2230 controls the bytecode interpreter 2240 to sequentially interpret and execute the non-native-coded part, ie, the native-coded part, that is, the native code For the method registered in the conversion information, the CPU causes the CPU to directly execute the native code.
60 to obtain new profile information (step S6).
01).

【0050】このとき、プログラム実行コンピュータ2
200が内蔵されたディジタル放送受信装置のユーザは
グラフィカルユーザインタフェースを介して選択肢に対
する入力を行い、この結果としてminputは1を返
却したとする。従って、プログラム実行制御部2230
による制御によって、initメソッド及びminpu
tメソッドのバイトコードが逐次解釈実行された後に、
m4メソッドのバイトコードが繰り返し逐次解釈実行さ
れ、その後、m5メソッドのネイティブコードが繰り返
し実行されることになる。
At this time, the program execution computer 2
It is assumed that the user of the digital broadcast receiving apparatus having the built-in 200 inputs an option through the graphical user interface, and as a result, minput returns 1. Therefore, the program execution control unit 2230
Control by init method and minpu
After the bytecode of the t method is sequentially interpreted and executed,
The bytecode of the m4 method is repeatedly interpreted and executed, and then the native code of the m5 method is repeatedly executed.

【0051】この結果として取得された新プロファイル
情報は、図10に示す内容になる。新プロファイル情報
が取得された後、プログラム実行コンピュータ2200
は、送受信部2220によりプログラム供給コンピュー
タ2100に新プロファイル情報を送信する(ステップ
S602)。これに対応してプログラム供給コンピュー
タ2100の送受信部2150は、新プロファイル情報
を受信し(ステップS603)、この新プロファイル情
報(図10参照)に基づいてプロファイル情報更新部2
160は記憶部2210に記憶されているプロファイル
情報(図9参照)を更新する(ステップS604)。こ
こで、プロファイル情報の更新は、もとのプロファイル
情報と新プロファイル情報との値の平均値を、更新後の
プロファイル情報の値とするようになされるものとす
る。従って、更新後のプロファイル情報は、図11に示
す内容になる。
The new profile information obtained as a result has the contents shown in FIG. After the new profile information is obtained, the program execution computer 2200
Transmits the new profile information to the program supply computer 2100 by the transmission / reception unit 2220 (step S602). In response, the transmission / reception unit 2150 of the program supply computer 2100 receives the new profile information (step S603), and based on the new profile information (see FIG. 10), updates the profile information.
160 updates the profile information (see FIG. 9) stored in the storage unit 2210 (step S604). Here, it is assumed that the update of the profile information is performed such that the average value of the values of the original profile information and the new profile information is used as the value of the updated profile information. Therefore, the updated profile information has the contents shown in FIG.

【0052】プロファイル情報更新部2160によりプ
ロファイル情報が更新された後において、プログラム供
給コンピュータ2100は、その更新後のプロファイル
情報とバイトコードとを上述したプログラム実行コンピ
ュータ2200以外のプログラム実行コンピュータに送
信する。このように、バイトコードプログラム実行制御
システム2000では、プログラム実行コンピュータ2
200におけるバイトコードプログラムの実行結果を反
映してプロファイル情報が更新されるため、同一のバイ
トコードプログラムとともに更新後のプロファイル情報
の供給を受ける他のプログラム実行コンピュータにおい
ては、実際の利用環境における利用結果が反映されたプ
ロファイル情報を参照することにより、一層効果的にネ
イティブコード化をすることが可能となるため、バイト
コードプログラムの実行開始時点からバイトコードプロ
グラムの実行速度を向上させることが可能になる。 <補足>以上、本発明に係るバイトコードプログラム実
行制御システムについて、実施の形態1、2を用いて説
明したが、本発明はこのような実施の形態に限られない
ことは勿論である。即ち、 (1)両実施の形態では、プロファイル情報中の累積実
行時間は、バイトコードインタプリタ及びCPUにより
実際に実行されるのに要した時間の累積値であることと
したが、この他、異なるアーキテクチャの複数のプラッ
トフォームそれぞれの上でバイトコードを実行させて実
行時間の累積値を求め、これらの平均をとった値である
こととしてもよい。
After the profile information is updated by profile information update section 2160, program supply computer 2100 transmits the updated profile information and bytecode to a program execution computer other than program execution computer 2200 described above. Thus, in the bytecode program execution control system 2000, the program execution computer 2
Since the profile information is updated by reflecting the execution result of the bytecode program in 200, in another program execution computer receiving the supply of the updated profile information together with the same bytecode program, the usage result in the actual usage environment By referring to the profile information in which the bytecode program is reflected, it is possible to more effectively perform the native coding, so that it is possible to improve the execution speed of the bytecode program from the start of execution of the bytecode program . <Supplement> Although the bytecode program execution control system according to the present invention has been described with reference to the first and second embodiments, it is needless to say that the present invention is not limited to such an embodiment. That is, (1) In both embodiments, the cumulative execution time in the profile information is the cumulative value of the time actually required to be executed by the bytecode interpreter and the CPU. The bytecode may be executed on each of a plurality of platforms of the architecture to obtain a cumulative value of the execution time, and the average value of these may be obtained.

【0053】また、本発明において、プロファイル情報
の内容は、各メソッドの実行回数及び累積実行時間であ
ることに限定されることはなく、メソッド毎の平均実行
時間等であってもよい。また、メソッド毎に限らず、例
えばクラス単位毎や関数単位毎に実行回数その他の情報
が取得されることとしてもよく、これに対応して、プロ
グラム実行コンピュータにおいてネイティブコード化す
る対象となるバイトコードの範囲はクラス単位や関数単
位等であることとしてもよい。
In the present invention, the content of the profile information is not limited to the number of times of execution of each method and the accumulated execution time, but may be an average execution time for each method. The number of executions and other information may be obtained not only for each method but also for each class or each function. For example, bytecodes to be natively encoded in a program execution computer may be obtained. May be a class unit, a function unit, or the like.

【0054】さらに、プロファイル情報の取得について
は、例えば、図2に示したプログラムのように入力がな
い等により実行経路が不変であるものは、実際にCPU
上で実行せずに理論的計算によってプロファイル情報の
値を算出することとしてもよく、また、入力に応じて実
行経路が変化し得るプログラムについては複数の入力を
与えてそれぞれにおいて実測した実行回数及び累積実行
時間の平均値をプロファイル情報の値とすることとして
もよい。
For obtaining profile information, for example, a program whose execution path is invariable due to no input or the like as in the program shown in FIG.
It is also possible to calculate the value of the profile information by theoretical calculation without executing the above, and for a program whose execution path can be changed according to the input, a plurality of inputs are given, and the number of executions and the number of times actually measured are given. The average value of the cumulative execution time may be used as the value of the profile information.

【0055】また、高い頻度で実行されることが想定さ
れているメソッドを特定するためのメソッド名等の情報
を、プログラムの設計者等がプログラム供給コンピュー
タに入力することとして、この情報がバイトコードプロ
グラム実行制御システムにおいて上述したプロファイル
情報の代用として、即ち、ネイティブコード化すべきメ
ソッドを特定するために参照されるべきものとして扱わ
れることとしてもよい。この場合、そのメソッド名等の
情報はプログラム供給コンピュータからプログラム実行
コンピュータに送信され、プログラム実行コンピュータ
においてはそのメソッド名等により特定されるメソッド
がネイティブコード化されることになる。
Further, when information such as a method name for specifying a method which is assumed to be executed at a high frequency is input to a program supply computer by a program designer or the like, this information is stored in a byte code. It may be handled as a substitute for the above-described profile information in the program execution control system, that is, as a reference to specify a method to be natively coded. In this case, information such as the method name is transmitted from the program supply computer to the program execution computer, and the method specified by the method name or the like is natively coded in the program execution computer.

【0056】また、プログラム供給コンピュータは、バ
イトコードをCPUの異なる各種コンピュータ上で実行
した結果としてのCPU種別毎に対応するプロファイル
情報を取得して、CPU種別毎におけるプロファイル情
報をバイトコードとともにプログラム実行コンピュータ
に送信することとしてもよい。これに対してプログラム
実行コンピュータは、当該コンピュータの有するCPU
に応じたプロファイル情報を選択的に参照して、ネイテ
ィブコード化すべき部分を特定することができる。 (2)両実施の形態では、プログラム実行制御部がネイ
ティブコード化すべきメソッドを検出する際の条件は、
「累積実行時間が大きくかつ実行回数が2回以上」であ
ることとしたが、条件がこれに限定されることはない。
例えば、条件が「累積実行時間が予め定めている閾値を
超えている」であることとしてもよく、また、実行され
ない部分が無駄にネイティブコード化されるのを防止す
るために条件を「実行回数が1回以上」であることとし
てもよい。なお、条件を「実行回数が2回以上」とする
ことは、繰り返し実行される部分に限りネイティブコー
ド化するために、ネイティブコード化が速度的に有効と
なる可能性を高めるという意義をもつ。
The program supply computer obtains profile information corresponding to each CPU type as a result of executing the bytecode on various computers having different CPUs, and executes the program information together with the bytecode with the profile information for each CPU type. It may be transmitted to a computer. On the other hand, the program execution computer has a CPU
The part to be natively coded can be specified by selectively referring to the profile information according to. (2) In both embodiments, the conditions when the program execution control unit detects a method to be natively coded are:
Although "accumulated execution time is long and the number of times of execution is two or more", the condition is not limited to this.
For example, the condition may be that “the cumulative execution time exceeds a predetermined threshold”, and the condition is set to “the number of times of execution Is one or more times ". Note that setting the condition to “the number of times of execution is two or more” has the significance of increasing the possibility that native coding is effective in terms of speed because only the part that is repeatedly executed is natively coded.

【0057】また、実行回数が高いものから順に、ネイ
ティブコードのサイズの合計が、記憶装置の記憶容量と
の関係における所定の閾値内に収まる限りにおいて、ネ
イティブコード化すべき部分として特定することとして
もよい。 (3)両実施の形態では、ネイティブコードコンパイラ
1250により生成されたネイティブコードはメモリに
格納され、ネイティブコード化情報にそのメモリアドレ
スが登録されることとしたが、ネイティブコードはメモ
リでなく、ハードディスク等の補助記憶装置に格納され
るとしてもよい。この場合、例えば、ファイル名とファ
イル内アドレスでその所在が特定されることとしてもよ
く、また、プログラム実行制御部が実行直前にネイティ
ブコードをメモリにロードして、その時にメモリアドレ
スを登録して、これを利用することとしてもよい。 (4)プログラム実行制御部によるプログラム実行コン
ピュータ上でのバイトコードの実行は、ユーザによる指
示を待ってなされることとしてもよく、特定の時刻にな
ったときになされることとしてもよく、また、プログラ
ム供給コンピュータからのバイトコードの受信後速やか
になされることとしてもよい。 (5)実施の形態2で示したプログラム実行コンピュー
タは、新プロファイル情報を取得した後、これをプログ
ラム供給コンピュータに送信することとしたが、送信の
みならず、取得した新プロファイル情報をもって、既に
受信しているプロファイル情報を置き換え、次回にバイ
トコードの実行が必要となった際に、新プロファイル情
報に基づいて、ネイティブコード化すべき部分の特定及
びネイティブコード化を行うこととしてもよい。 (6)実施の形態2で示したプロファイル情報更新部2
160による更新の方法については、もとのプロファイ
ル情報と新プロファイル情報の値を平均して行うことに
限定されることはなく、例えば、新プロファイル情報の
内容で上書きすることとしてもよく、また、もとのプロ
ファイル情報と新プロファイル情報の値を加算すること
としてもよい。 (7)両実施の形態では、プログラム実行コンピュータ
中にネイティブコードコンパイラが存在することとした
が、ネイティブコードコンパイラは他のネイティブ化用
コンピュータ内に存在することとしてもよく、この場
合、プログラム実行コンピュータは、ネイティブコード
化すべきバイトコードと、例えば自らのCPU種別、O
S種別、OSのバージョン情報等のプラットフォーム特
定用情報とをネイティブ化用コンピュータに送信して、
ネイティブ化用コンピュータにプラットフォーム特定用
情報に基づいてのバイトコードのネイティブコード化を
実行させて、その結果として生成されたネイティブコー
ドを受信して、その後実行のために用いることとしても
よい。
Further, as long as the total size of the native code falls within a predetermined threshold value in relation to the storage capacity of the storage device, the part to be native-coded may be specified in descending order of execution number. Good. (3) In both embodiments, the native code generated by the native code compiler 1250 is stored in the memory, and the memory address is registered in the native encoding information. However, the native code is not a memory but a hard disk. Etc. may be stored in an auxiliary storage device. In this case, for example, the location may be specified by the file name and the address in the file, and the program execution control unit loads the native code into the memory immediately before execution, and registers the memory address at that time. This may be used. (4) The execution of the bytecode by the program execution control unit on the program execution computer may be performed in response to an instruction from the user, or may be performed at a specific time. It may be performed immediately after receiving the bytecode from the program supply computer. (5) The program execution computer described in the second embodiment obtains the new profile information and then transmits it to the program supply computer. It is also possible to replace the existing profile information and specify the part to be natively coded and perform the native encoding based on the new profile information when the bytecode needs to be executed next time. (6) Profile information update unit 2 described in the second embodiment
The updating method by 160 is not limited to the method of averaging the values of the original profile information and the new profile information, and may be, for example, overwriting with the contents of the new profile information. The values of the original profile information and the new profile information may be added. (7) In both embodiments, the native code compiler is provided in the program execution computer. However, the native code compiler may be provided in another computer for nativeization. In this case, the program execution computer Is the bytecode to be natively coded and, for example, its own CPU type, O
By transmitting platform identification information such as S type and OS version information to the computer for nativeization,
The computer for nativeization may be configured to execute native encoding of the bytecode based on the platform identifying information, receive the resulting native code, and then use it for execution.

【0058】また、プログラム供給コンピュータの機能
構成とプログラム実行コンピュータの機能構成とを1台
のコンピュータに含ませることとしてもよい。 (8)本明細書で用いた「バイトコード」は、基本的な
命令語長が1バイトであることに限定されず、基本的な
命令語長が2バイト以上の中間コードも「バイトコー
ド」の意味に含むものとする。 (9)両実施の形態で示したバイトコードプログラム実
施制御システムにおけるプログラム供給コンピュータ及
びプログラム実行コンピュータの処理手順(図5、図8
に示した手順等)を、汎用のコンピュータ又はプログラ
ム実行機能を有する家電機器に実行させるためのコンピ
ュータプログラムを、記録媒体に記録し又は各種通信路
等を介して、流通させ頒布することもできる。かかる記
録媒体には、ICカード、光ディスク、フレキシブルデ
ィスク、ROM等がある。流通、頒布されたコンピュー
タプログラムは、プログラム実行機能を有する家電機器
やパーソナルコンピュータ等にインストール等されるこ
とにより利用に供され、家電機器やパーソナルコンピュ
ータは、当該コンピュータプログラムを実行して、両実
施の形態で示したようなバイトコードプログラム実行制
御システムの機能を実現する。
Further, the functional configuration of the program supply computer and the functional configuration of the program execution computer may be included in one computer. (8) The “byte code” used in this specification is not limited to a basic instruction word length of 1 byte, and an intermediate code having a basic instruction word length of 2 bytes or more is also referred to as a “byte code”. Shall be included in the meaning of (9) Processing procedure of the program supply computer and the program execution computer in the bytecode program execution control system shown in both embodiments (FIGS. 5 and 8)
Can be executed by a general-purpose computer or a household electrical appliance having a program execution function, by recording the program on a recording medium or distributing and distributing the program via various communication paths. Such recording media include an IC card, an optical disk, a flexible disk, and a ROM. The distributed and distributed computer program is provided for use by being installed in a home electric appliance or a personal computer having a program execution function, and the home electric appliance or the personal computer executes the computer program and executes the computer program. The functions of the bytecode program execution control system as shown in the embodiment are realized.

【0059】[0059]

【発明の効果】以上の説明から明らかなように、本発明
に係るバイトコードプログラム実行制御システムは、バ
イトコードを送信するプログラム供給装置と、バイトコ
ードを受信して実行するプログラム実行装置とを備える
バイトコードプログラム実行制御システムであって、前
記プログラム供給装置は、バイトコードに加えて、当該
バイトコード中のネイティブコードに変換すべき部分を
特定するために有用な特定用情報を記憶する記憶手段
と、前記記憶手段に格納されている前記特定用情報をバ
イトコードと共にプログラム実行装置に送信する送信手
段とを有し、前記プログラム実行装置は、CPUと、バ
イトコードを逐次解釈して前記CPUに実行させるバイ
トコードインタプリタと、前記プログラム供給装置から
送信された前記バイトコード及び前記特定用情報を受信
する受信手段と、受信した前記特定用情報を参照して、
当該特定用情報と共に受信した前記バイトコード中のネ
イティブコードに変換すべき部分を特定する特定手段
と、前記特定手段により特定された部分を前記CPUの
ネイティブコードに変換するネイティブコード化手段
と、前記バイトコード中の、前記受信ネイティブコード
化手段によりネイティブコードに変換された部分を前記
バイトコードインタプリタを介することなく前記CPU
に直接実行させ、他の部分を、バイトコードインタプリ
タを介して前記CPUに実行させる実行制御手段とを有
することを特徴とする。
As apparent from the above description, the bytecode program execution control system according to the present invention includes a program supply device for transmitting a bytecode and a program execution device for receiving and executing the bytecode. A bytecode program execution control system, wherein the program supply device stores, in addition to the bytecode, identification information useful for identifying a part of the bytecode to be converted to a native code. Transmitting means for transmitting the specifying information stored in the storage means together with the bytecode to a program execution device, wherein the program execution device sequentially interprets the bytecode and executes the bytecode on the CPU. The bytecode interpreter to be transmitted and the bytecode interpreter transmitted from the program supply device. Referring receiving means for receiving the code and the specific information, the specific information received,
Specifying means for specifying a part to be converted to a native code in the byte code received together with the specifying information; native coding means for converting the part specified by the specifying means to a native code of the CPU; The part of the bytecode converted into the native code by the receiving native coding means is transmitted to the CPU without passing through the bytecode interpreter.
And execution control means for causing the CPU to execute the other part via a bytecode interpreter.

【0060】これにより、プログラム実行装置は、プロ
グラム供給装置の送信手段により送信された特定用情報
を用いて、バイトコード中のネイティブコード化すべき
部分を特定することができるため、実行開始直後からバ
イトコードプログラムの実行速度を向上させることがで
きる。また、これにより、プログラム実行装置側には、
バイトコードの実行時にプロファイル情報を取得するプ
ロファイラ等の機能が不要となるため、プログラム実行
装置の小型低価格化等にも有効といえる。
Thus, the program execution device can specify the part to be converted into the native code in the byte code using the specifying information transmitted by the transmission means of the program supply device. The execution speed of the code program can be improved. This also allows the program execution device to:
Since a function such as a profiler for acquiring profile information at the time of executing the bytecode is not required, it can be said that the present invention is also effective for reducing the size and cost of a program execution device.

【0061】ここで、前記特定用情報は、送信に先立っ
てなされるバイトコードの実行時に測定された、当該バ
イトコード中の各部分の実行に関連する情報であり、前
記プログラム供給装置はさらに、バイトコードを実行し
て、前記特定用情報を測定して前記記憶手段に格納する
プロファイル情報取得手段を備えることとすることもで
きる。
Here, the specifying information is information related to the execution of each part in the bytecode measured at the time of execution of the bytecode performed prior to transmission, and the program supply device further includes: The information processing apparatus may further include a profile information acquisition unit that executes the bytecode, measures the identification information, and stores the information in the storage unit.

【0062】これにより、例えば、実行回数や実行時間
等のバイトコードの実行に関連して取得された情報に基
づいて、プログラム実行装置はバイトコード中のネイテ
ィブコード化すべき部分を特定することができるため、
例えば実行時にプロファイル情報を取得してCPUに負
荷をかける処理を行う等を要さずに、有効なネイティブ
コード化が実現でき、実行開始直後からバイトコードプ
ログラムの実行速度を向上させることができる。
Thus, for example, the program execution device can specify a part to be converted into a native code in the bytecode based on information acquired in connection with the execution of the bytecode, such as the number of executions and the execution time. For,
For example, effective native coding can be realized without the need to acquire profile information at the time of execution and perform processing to put a load on the CPU, and the execution speed of the bytecode program can be improved immediately after the start of execution.

【0063】また、前記実行制御手段はさらに、バイト
コードのCPUによる実行中に新たに特定用情報を測定
し、前記プログラム実行装置はさらに、前記実行制御手
段により新たに測定された特定用情報を前記プログラム
供給装置に送信する特定用情報送信手段を有し、前記プ
ログラム供給装置はさらに、前記記憶手段により記憶さ
れている特定用情報を、前記特定用情報送信手段により
送信された特定用情報に基づいて更新する更新手段を有
し、前記送信手段はさらに、前記更新手段により特定用
情報が更新された後に、前記記憶手段に格納されている
前記バイトコード及び前記特定用情報を、前記プログラ
ム実行装置以外の、バイトコードを受信して実行する装
置に送信することとすることもできる。
Further, the execution control means further measures the specifying information while the bytecode is being executed by the CPU, and the program execution device further measures the specifying information newly measured by the execution control means. The program supply device further includes a specifying information transmitting unit that transmits the specifying information to the specifying information transmitted by the specifying information transmitting unit. Updating means for updating the bytecode and the identifying information stored in the storage means after the updating of the identifying information by the updating means. The bytecode may be transmitted to a device other than the device that receives and executes the bytecode.

【0064】これにより、プログラム実行装置がバイト
コードの実行中に新たに特定用情報を取得してプログラ
ム供給装置に送信し、これを受けたプログラム供給装置
は既に記憶している特定用情報を更新した後に、特定用
情報とバイトコードとを他の装置に送信するので、プロ
グラム実行装置におけるバイトコードの実行結果を反映
した特定用情報を参照できる当該他の装置において一層
有効なネイティブコード化が実現できる可能性が高まる
ことになる。例えば、バイトコードの内容が、ユーザ操
作に応じて実行経路が変化するようなものであり、プロ
グラム供給装置が、複数のプログラム実行装置にバイト
コード及び特定用情報を順次供給するような利用形態を
想定するならば、バイトコードを後に供給されるプログ
ラム実行装置においては、他のプログラム実行装置にお
けるユーザの利用実績を踏まえた有効なネイティブコー
ド化が可能となるため、バイトコードの実行速度の向上
が実現される。
As a result, the program execution device newly acquires the specifying information during the execution of the bytecode and transmits it to the program supply device, and the program supply device having received this newly updates the already stored specification information. After that, the identification information and the bytecode are transmitted to another device, so that more effective native coding can be realized in the other device, which can refer to the identification information reflecting the execution result of the bytecode in the program execution device. The possibility of doing it will increase. For example, a usage mode in which the content of the bytecode is such that the execution path changes in response to a user operation, and the program supply device sequentially supplies the bytecode and the specifying information to a plurality of program execution devices. Assuming that, in a program execution device to which bytecode is supplied later, effective native coding can be performed based on a user's use record in other program execution devices, and the execution speed of bytecode can be improved. Is achieved.

【0065】また、前記特定用情報は、バイトコード中
のメソッド毎の実行回数を示す実行回数情報を含み、前
記特定手段は、前記実行回数情報が示す実行回数が、所
定回数以上であるところのメソッドを、ネイティブコー
ドに変換すべき前記部分として特定することとすること
もできる。これにより、バイトコード中の、特定用情報
取得時においては実行されなかった部分を、ネイティブ
コード化する無駄を回避することができる。
Further, the specifying information includes execution number information indicating the number of executions for each method in the bytecode, and the specifying means determines that the execution number indicated by the execution number information is equal to or more than a predetermined number. A method may be specified as the part to be converted to native code. As a result, it is possible to avoid the waste of converting the part of the bytecode that has not been executed at the time of acquiring the specifying information into the native code.

【0066】また、前記特定用情報は、複数の種別のC
PUそれぞれの上で送信に先立ってバイトコードを実行
することにより測定された、当該CPU種別毎に対応づ
けられた、前記バイトコード中の各部分の実行に関連す
る情報であり、前記プログラム供給装置はさらに、前記
特定用情報を取得して前記記憶手段に格納するCPU別
プロファイル情報取得手段を備えることとすることもで
きる。
The specifying information includes a plurality of types of C
Information relating to the execution of each part in the bytecode, which is measured by executing the bytecode on each of the PUs prior to transmission and associated with each CPU type; May further include CPU-specific profile information acquisition means for acquiring the identification information and storing the information in the storage means.

【0067】これにより、プログラム実行装置は、自装
置のCPUにおいてのバイトコードの実行に関連する情
報を選択して参照することができるため、プログラム供
給装置が、CPUの異なる複数のプログラム実行装置に
対してバイトコードを供給する場合においても、各プロ
グラム実行装置においては、適切なネイティブコード化
が実現できる。
Thus, the program execution device can select and refer to the information related to the execution of the bytecode in the CPU of the own device, so that the program supply device can transmit the information to a plurality of program execution devices having different CPUs. Even when bytecode is supplied to the program execution device, appropriate native coding can be realized in each program execution device.

【0068】また、前記バイトコードプログラム実行制
御システムは、バイトコードと、当該バイトコードをい
かなるCPU種別に対応するネイティブコードに変換す
べきかを示すCPU種別情報とを受信すると、当該CP
U種別情報に応じて当該バイトコードをネイティブコー
ド化して返信するネイティブコード化装置を備え、前記
ネイティブコード化手段は、前記特定手段により特定さ
れた前記部分に係るバイトコードと、前記プログラム実
行装置が有する前記CPUの種別を示す情報とを、前記
ネイティブコード化装置に送信し、当該ネイティブコー
ド化装置からネイティブコードを受信することをもって
前記変換を行うこととすることもできる。
When the bytecode program execution control system receives the bytecode and the CPU type information indicating which CPU type is to be converted to a native code corresponding to the CPU type, the bytecode program execution control system receives the bytecode and the CPU type information.
A native coding device that converts the bytecode into a native code according to the U type information and returns the native code. The native coding device includes a bytecode related to the portion specified by the specifying device, and the program execution device. The information indicating the type of the CPU may be transmitted to the native coding device, and the conversion may be performed by receiving the native code from the native coding device.

【0069】これにより、プログラム実行装置は、バイ
トコードの一部のネイティブコード化を他の装置のネイ
ティブコードコンパイラを用いて実現することができる
ので、例えば、コスト面等の諸事情からCPU性能やメ
モリ等の記憶容量についての制約が大きい家電機器の一
部等としての実装に適するものとなる。また、本発明に
係るプログラム実行装置は、プログラム供給装置から、
バイトコードと共に、当該バイトコード中のネイティブ
コードに変換すべき部分を特定するために有用な特定用
情報を受信して実行するプログラム実行装置であって、
CPUと、バイトコードを逐次解釈して前記CPUに実
行させるバイトコードインタプリタと、前記プログラム
供給装置から送信された前記バイトコード及び前記特定
用情報を受信する受信手段と、受信した前記特定用情報
を参照して、当該特定用情報と共に受信した前記バイト
コード中のネイティブコードに変換すべき部分を特定す
る特定手段と、前記特定手段により特定された部分を前
記CPUのネイティブコードに変換するネイティブコー
ド化手段と、前記バイトコード中の、前記受信ネイティ
ブコード化手段によりネイティブコードに変換された部
分を前記バイトコードインタプリタを介することなく前
記CPUに直接実行させ、他の部分を、バイトコードイ
ンタプリタを介して前記CPUに実行させる実行制御手
段とを有することを特徴とする。
Thus, the program execution device can realize a part of the bytecode native coding by using a native code compiler of another device. This is suitable for mounting as a part of a home electric appliance or the like where the storage capacity of a memory or the like is large. In addition, the program execution device according to the present invention, from the program supply device,
A program execution device that receives and executes identification information useful for identifying a part to be converted to a native code in the bytecode, together with the bytecode,
A CPU, a bytecode interpreter that sequentially interprets bytecodes and causes the CPU to execute the bytecodes, a receiving unit that receives the bytecodes and the identification information transmitted from the program supply device, and the received identification information. Specifying means for specifying a portion to be converted to a native code in the byte code received together with the specifying information; and native code conversion for converting the portion specified by the specifying means to a native code of the CPU. Means, and causing the CPU to directly execute a portion of the bytecode converted to the native code by the reception native coding means without passing through the bytecode interpreter, and execute another portion through the bytecode interpreter. Having execution control means for causing the CPU to execute. And it features.

【0070】これにより、プログラム実行装置は、プロ
グラム供給装置から受信した特定用情報を用いて、受信
したバイトコード中のネイティブコード化すべき部分を
特定することができるため、実行開始直後からバイトコ
ードプログラムの実行速度を向上させることができる。
また、本発明に係るプログラム供給装置は、バイトコー
ドを受信して実行するプログラム実行装置に対して、バ
イトコードを送信するプログラム供給装置であって、バ
イトコードに加えて、当該バイトコード中のネイティブ
コードに変換すべき部分を特定するために有用な特定用
情報を記憶する記憶手段と、前記記憶手段に格納されて
いる前記特定用情報をバイトコードと共にプログラム実
行装置に送信する送信手段とを備えることを特徴とす
る。
Thus, the program execution device can use the specifying information received from the program supply device to specify the portion of the received bytecode to be converted into the native code. Execution speed can be improved.
Further, a program supply device according to the present invention is a program supply device that transmits a bytecode to a program execution device that receives and executes a bytecode, and includes, in addition to the bytecode, a native code in the bytecode. Storage means for storing identification information useful for identifying a part to be converted into a code; and transmission means for transmitting the identification information stored in the storage means together with a bytecode to a program execution device. It is characterized by the following.

【0071】これにより、プログラム実行装置に対して
最初からのネイティブコード化部分の決定を可能にする
ためのプログラム供給装置が実現されるため、プログラ
ム実行装置側でのバイトコードの実行速度が実行開始直
後から高速であることが期待できる。
As a result, a program supply device for enabling the program execution device to determine a natively coded portion from the beginning is realized, and the execution speed of bytecode on the program execution device is reduced. Immediately after, you can expect high speed.

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

【図1】本発明の実施の形態1に係るバイトコードプロ
グラム実行制御システム1000の構成図である。
FIG. 1 is a configuration diagram of a bytecode program execution control system 1000 according to a first embodiment of the present invention.

【図2】記憶部1110に記憶されているソースプログ
ラムのクラス定義の内容例を示す図である。
FIG. 2 is a diagram showing an example of the contents of a class definition of a source program stored in a storage unit 1110.

【図3】プロファイル情報の構成及び内容例を示す図で
ある。
FIG. 3 is a diagram showing a configuration and an example of contents of profile information.

【図4】ネイティブコード化情報の構成及び内容例を示
す図である。
FIG. 4 is a diagram showing a configuration and content example of native coded information.

【図5】バイトコードプログラム実行制御システム10
00の動作フローを示す図である。
FIG. 5 is a bytecode program execution control system 10.
It is a figure showing the operation flow of 00.

【図6】本発明の実施の形態2に係るバイトコードプロ
グラム実行制御システム2000の構成図である。
FIG. 6 is a configuration diagram of a bytecode program execution control system 2000 according to Embodiment 2 of the present invention.

【図7】プログラム供給コンピュータ2100における
記憶部1110に記憶されているソースプログラムのク
ラス定義の内容例を示す図である。
FIG. 7 is a diagram showing an example of the contents of a class definition of a source program stored in a storage unit 1110 in a program supply computer 2100.

【図8】バイトコードプログラム実行制御システム20
00の動作フローを示す図である。
FIG. 8 shows a bytecode program execution control system 20.
It is a figure showing the operation flow of 00.

【図9】プロファイル情報の内容例を示す図である。FIG. 9 is a diagram showing a content example of profile information.

【図10】プログラム実行コンピュータ2200におい
て取得された新プロファイル情報の内容例を示す図であ
る。
FIG. 10 is a diagram showing an example of contents of new profile information acquired by a program execution computer 2200.

【図11】更新後のプロファイル情報の内容例を示す図
である。
FIG. 11 is a diagram showing an example of the content of profile information after updating.

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

1000、2000 バイトコードプログラム実行制
御システム 1100、2100 プログラム供給コンピュータ 1110 記憶部 1120 バイトコードコンパイラ 1130 バイトコードインタプリタ 1140 プロファイラ 1150、2150 送受信部 1200、2200 プログラム実行コンピュータ 1210、2210 記憶部 1220、2220 送受信部 1230、2230 プログラム実行制御部 1240、2240 バイトコードインタプリタ 1250 ネイティブコードコンパイラ 2160 プロファイル情報更新部 2260 プロファイラ
1000, 2000 Bytecode program execution control system 1100, 2100 Program supply computer 1110 Storage unit 1120 Bytecode compiler 1130 Bytecode interpreter 1140 Profiler 1150, 2150 Transmission / reception unit 1200, 2200 Program execution computer 1210, 2210 Storage unit 1220, 2220 Transmission / reception unit 1230 , 2302 program execution control unit 1240, 2240 bytecode interpreter 1250 native code compiler 2160 profile information update unit 2260 profiler

Claims (9)

【特許請求の範囲】[Claims] 【請求項1】 バイトコードを送信するプログラム供給
装置と、バイトコードを受信して実行するプログラム実
行装置とを備えるバイトコードプログラム実行制御シス
テムであって、 前記プログラム供給装置は、 バイトコードに加えて、当該バイトコード中のネイティ
ブコードに変換すべき部分を特定するために有用な特定
用情報を記憶する記憶手段と、 前記記憶手段に格納されている前記特定用情報をバイト
コードと共にプログラム実行装置に送信する送信手段と
を有し、 前記プログラム実行装置は、 CPUと、 バイトコードを逐次解釈して前記CPUに実行させるバ
イトコードインタプリタと、 前記プログラム供給装置から送信された前記バイトコー
ド及び前記特定用情報を受信する受信手段と、 受信した前記特定用情報を参照して、当該特定用情報と
共に受信した前記バイトコード中のネイティブコードに
変換すべき部分を特定する特定手段と、 前記特定手段により特定された部分を前記CPUのネイ
ティブコードに変換するネイティブコード化手段と、 前記バイトコード中の、前記受信ネイティブコード化手
段によりネイティブコードに変換された部分を前記バイ
トコードインタプリタを介することなく前記CPUに直
接実行させ、他の部分を、バイトコードインタプリタを
介して前記CPUに実行させる実行制御手段とを有する
ことを特徴とするバイトコードプログラム実行制御シス
テム。
1. A bytecode program execution control system comprising: a program supply device for transmitting a bytecode; and a program execution device for receiving and executing the bytecode, wherein the program supply device includes, in addition to the bytecode, Storage means for storing identification information useful for identifying a portion of the bytecode to be converted to native code, and the identification information stored in the storage means together with the bytecode to a program execution device. Transmitting means for transmitting, wherein the program execution device comprises: a CPU; a bytecode interpreter for sequentially interpreting bytecode and causing the CPU to execute the bytecode; and the bytecode transmitted from the program supply device and the identification code. Receiving means for receiving information; and Specifying means for specifying a part to be converted to a native code in the byte code received together with the specifying information; native coding means for converting the part specified by the specifying means to a native code of the CPU; The CPU directly executes the part of the bytecode converted into the native code by the receiving native coding means without passing through the bytecode interpreter, and executes the other part to the CPU via the bytecode interpreter. A bytecode program execution control system comprising:
【請求項2】 前記特定用情報は、送信に先立ってなさ
れるバイトコードの実行時に測定された、当該バイトコ
ード中の各部分の実行に関連する情報であり、 前記プログラム供給装置はさらに、バイトコードを実行
して、前記特定用情報を測定して前記記憶手段に格納す
るプロファイル情報取得手段を備えることを特徴とする
請求項1記載のバイトコードプログラム実行制御システ
ム。
2. The identification information is information related to the execution of each part in the bytecode measured at the time of execution of the bytecode performed prior to transmission, and the program supply device further includes: 2. The bytecode program execution control system according to claim 1, further comprising a profile information acquisition unit that executes a code, measures the identification information, and stores the information in the storage unit.
【請求項3】 前記実行制御手段はさらに、バイトコー
ドのCPUによる実行中に新たに特定用情報を測定し、 前記プログラム実行装置はさらに、前記実行制御手段に
より新たに測定された特定用情報を前記プログラム供給
装置に送信する特定用情報送信手段を有し、 前記プログラム供給装置はさらに、前記記憶手段により
記憶されている特定用情報を、前記特定用情報送信手段
により送信された特定用情報に基づいて更新する更新手
段を有し、 前記送信手段はさらに、前記更新手段により特定用情報
が更新された後に、前記記憶手段に格納されている前記
バイトコード及び前記特定用情報を、前記プログラム実
行装置以外の、バイトコードを受信して実行する装置に
送信することを特徴とする請求項2記載のバイトコード
プログラム実行制御システム。
3. The execution control unit further measures the specifying information while the bytecode is being executed by the CPU, and the program execution device further measures the specifying information newly measured by the execution control unit. The program supply device further includes a specifying information transmitting unit that transmits the specifying information to the specifying information transmitted by the specifying information transmitting unit. Updating means for updating the bytecode and the identifying information stored in the storage means after the updating of the identifying information by the updating means. 3. The bytecode program execution system according to claim 2, wherein the bytecode program is transmitted to a device other than the device that receives and executes the bytecode. Your system.
【請求項4】 前記特定用情報は、バイトコード中のメ
ソッド毎の実行回数を示す実行回数情報を含み、 前記特定手段は、前記実行回数情報が示す実行回数が、
所定回数以上であるところのメソッドを、ネイティブコ
ードに変換すべき前記部分として特定することを特徴と
する請求項2記載のバイトコードプログラム実行制御シ
ステム。
4. The identification information includes execution number information indicating the number of executions for each method in the bytecode, and the identification unit determines that the execution number indicated by the execution number information is:
3. The bytecode program execution control system according to claim 2, wherein a method having a predetermined number of times or more is specified as the part to be converted into native code.
【請求項5】 前記特定用情報は、複数の種別のCPU
それぞれの上で送信に先立ってバイトコードを実行する
ことにより測定された、当該CPU種別毎に対応づけら
れた、前記バイトコード中の各部分の実行に関連する情
報であり、 前記プログラム供給装置はさらに、前記特定用情報を取
得して前記記憶手段に格納するCPU別プロファイル情
報取得手段を備えることを特徴とする請求項1記載のバ
イトコードプログラム実行制御システム。
5. The identification information includes a plurality of types of CPUs.
The information related to the execution of each part in the bytecode, which is measured by executing the bytecode on each of them before transmission and is associated with each CPU type, and the program supply device is 2. The bytecode program execution control system according to claim 1, further comprising CPU-specific profile information acquisition means for acquiring the identification information and storing the identification information in the storage means.
【請求項6】 前記バイトコードプログラム実行制御シ
ステムは、バイトコードと、当該バイトコードをいかな
るCPU種別に対応するネイティブコードに変換すべき
かを示すCPU種別情報とを受信すると、当該CPU種
別情報に応じて当該バイトコードをネイティブコード化
して返信するネイティブコード化装置を備え、 前記ネイティブコード化手段は、前記特定手段により特
定された前記部分に係るバイトコードと、前記プログラ
ム実行装置が有する前記CPUの種別を示す情報とを、
前記ネイティブコード化装置に送信し、当該ネイティブ
コード化装置からネイティブコードを受信することをも
って前記変換を行うことを特徴とする請求項1記載のバ
イトコードプログラム実行制御システム。
6. When the bytecode program execution control system receives a bytecode and CPU type information indicating which CPU type the native code should be converted to, the bytecode program execution control system responds to the received CPU type information. A native encoding device that sends the bytecode as a native code and returns the native code. The native encoding device includes a bytecode related to the portion specified by the specifying device, and a type of the CPU included in the program execution device. And information indicating
The bytecode program execution control system according to claim 1, wherein the conversion is performed by transmitting the native code to the native encoding device and receiving the native code from the native encoding device.
【請求項7】 プログラム供給装置から、バイトコード
と共に、当該バイトコード中のネイティブコードに変換
すべき部分を特定するために有用な特定用情報を受信し
て実行するプログラム実行装置であって、 CPUと、 バイトコードを逐次解釈して前記CPUに実行させるバ
イトコードインタプリタと、 前記プログラム供給装置から送信された前記バイトコー
ド及び前記特定用情報を受信する受信手段と、 受信した前記特定用情報を参照して、当該特定用情報と
共に受信した前記バイトコード中のネイティブコードに
変換すべき部分を特定する特定手段と、 前記特定手段により特定された部分を前記CPUのネイ
ティブコードに変換するネイティブコード化手段と、 前記バイトコード中の、前記受信ネイティブコード化手
段によりネイティブコードに変換された部分を前記バイ
トコードインタプリタを介することなく前記CPUに直
接実行させ、他の部分を、バイトコードインタプリタを
介して前記CPUに実行させる実行制御手段とを有する
ことを特徴とするプログラム実行装置。
7. A program execution device for receiving and executing, from a program supply device, identification information useful for identifying a part to be converted to a native code in the bytecode, together with the bytecode, the program execution device comprising: A bytecode interpreter that sequentially interprets a bytecode and causes the CPU to execute the bytecode; a receiving unit that receives the bytecode and the identification information transmitted from the program supply device; and a reference to the received identification information. Means for specifying a part to be converted to a native code in the byte code received together with the specifying information; and native code conversion means for converting the part specified by the specifying means to a native code of the CPU. And the receiving native encoding means in the bytecode Execution control means for causing the CPU to directly execute the portion converted into the live code without passing through the bytecode interpreter and causing the CPU to execute the other portion via the bytecode interpreter. Execution device.
【請求項8】 バイトコードを受信して実行するプログ
ラム実行装置に対して、バイトコードを送信するプログ
ラム供給装置であって、 バイトコードに加えて、当該バイトコード中のネイティ
ブコードに変換すべき部分を特定するために有用な特定
用情報を記憶する記憶手段と、 前記記憶手段に格納されている前記特定用情報をバイト
コードと共にプログラム実行装置に送信する送信手段と
を備えることを特徴とするプログラム供給装置。
8. A program supply device for transmitting a bytecode to a program execution device for receiving and executing a bytecode, wherein a part to be converted to a native code in the bytecode in addition to the bytecode A storage unit for storing identification information useful for identifying the information, and a transmission unit for transmitting the identification information stored in the storage unit together with a bytecode to a program execution device. Feeding device.
【請求項9】 プログラム供給装置から、バイトコード
と共に、当該バイトコード中のネイティブコードに変換
すべき部分を特定するために有用な特定用情報を受信し
て実行するバイトコード実行処理をコンピュータに行わ
せるための制御プログラムを記録した記録媒体であっ
て、 前記バイトコード実行処理は、 バイトコードを逐次解釈して前記コンピュータが有する
CPUに実行させるバイトコード逐次解釈実行ステップ
と、 前記プログラム供給装置から送信された前記バイトコー
ド及び前記特定用情報を受信する受信ステップと、 前記受信ステップにより受信した前記特定用情報を参照
して、当該特定用情報と共に受信した前記バイトコード
中のネイティブコードに変換すべき部分を特定する特定
ステップと、 前記特定ステップにより特定された部分を前記CPUの
ネイティブコードに変換するネイティブコード化ステッ
プと、 前記バイトコード中の、前記受信ネイティブコード化ス
テップによりネイティブコードに変換された部分を前記
CPUに直接実行させ、他の部分をバイトコード逐次解
釈実行ステップにより実行する実行制御ステップとを含
むことを特徴とする記録媒体。
9. A computer executes bytecode execution processing for receiving and executing, from a program supply device, identification information useful for identifying a part to be converted to a native code in the bytecode, together with the bytecode. A bytecode execution process, wherein the bytecode execution process includes a step of sequentially interpreting the bytecode and causing a CPU of the computer to execute the bytecode, and a step of transmitting from the program supply device. Receiving the specified bytecode and the specifying information, and referencing the specifying information received in the receiving step to convert to a native code in the bytecode received together with the specifying information. A specifying step of specifying a portion; A native coding step of converting the specified portion into the native code of the CPU; and causing the CPU to directly execute the portion of the bytecode converted to the native code by the receiving native coding step, And an execution control step of executing the execution by a bytecode sequential interpretation execution step.
JP11137761A 1999-05-18 1999-05-18 System for controlling byte code program execution Pending JP2000330792A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11137761A JP2000330792A (en) 1999-05-18 1999-05-18 System for controlling byte code program execution

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11137761A JP2000330792A (en) 1999-05-18 1999-05-18 System for controlling byte code program execution

Publications (1)

Publication Number Publication Date
JP2000330792A true JP2000330792A (en) 2000-11-30

Family

ID=15206227

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11137761A Pending JP2000330792A (en) 1999-05-18 1999-05-18 System for controlling byte code program execution

Country Status (1)

Country Link
JP (1) JP2000330792A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002073345A (en) * 2000-08-25 2002-03-12 Fujitsu Ltd Information processing system and storage medium
JP2007213490A (en) * 2006-02-13 2007-08-23 Fujitsu Ltd Application server system and virtual machine program
JP2007529063A (en) * 2003-07-15 2007-10-18 トランジティブ リミテッド Method and apparatus for performing native binding
JP2013105464A (en) * 2011-11-16 2013-05-30 Fujitsu Ltd Application server
JP2014191493A (en) * 2013-03-26 2014-10-06 Fujitsu Ltd Program execution control program and program execution control method
JP7293929B2 (en) 2019-07-16 2023-06-20 マツダ株式会社 Engine test method and test equipment

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002073345A (en) * 2000-08-25 2002-03-12 Fujitsu Ltd Information processing system and storage medium
JP2007529063A (en) * 2003-07-15 2007-10-18 トランジティブ リミテッド Method and apparatus for performing native binding
JP2011123917A (en) * 2003-07-15 2011-06-23 Internatl Business Mach Corp <Ibm> Method for converting subject program code into target program code, computer program, and computer
US8091076B2 (en) 2003-07-15 2012-01-03 International Business Machines Corporation Dynamic native binding
US8108842B2 (en) 2003-07-15 2012-01-31 International Business Machines Corporation Method and apparatus for performing native binding
JP4931583B2 (en) * 2003-07-15 2012-05-16 インターナショナル・ビジネス・マシーンズ・コーポレーション Method and apparatus for performing native binding
JP2007213490A (en) * 2006-02-13 2007-08-23 Fujitsu Ltd Application server system and virtual machine program
US8332845B2 (en) 2006-02-13 2012-12-11 Fujitsu Limited Compile timing based on execution frequency of a procedure
JP2013105464A (en) * 2011-11-16 2013-05-30 Fujitsu Ltd Application server
JP2014191493A (en) * 2013-03-26 2014-10-06 Fujitsu Ltd Program execution control program and program execution control method
JP7293929B2 (en) 2019-07-16 2023-06-20 マツダ株式会社 Engine test method and test equipment

Similar Documents

Publication Publication Date Title
JP3894698B2 (en) A hybrid just-in-time compiler that minimizes resource consumption
US7543285B2 (en) Method and system of adaptive dynamic compiler resolution
EP3314422B1 (en) Extending a virtual machine instruction set architecture
Desoli et al. Deli: A new run-time control point
US6035120A (en) Method and apparatus for converting executable computer programs in a heterogeneous computing environment
US8799693B2 (en) Dynamic power optimization for computing devices
EP1451682B1 (en) Platform-independent selective ahead-of-time compilation
JP4018158B2 (en) Variable instruction set computer
EP1316882A2 (en) System and method for emulating code
US7246346B2 (en) System and method for persisting dynamically generated code in a directly addressable and executable storage medium
US10216497B2 (en) Selective compiling method, device, and corresponding computer program product
US20120272223A1 (en) Technique for Run-Time Provision of Executable Code using Off-Device Services
EP1728155A2 (en) Method and system for performing link-time code optimization without additional code analysis
US9038039B2 (en) Apparatus and method for accelerating java translation
US7617490B2 (en) Methods and apparatus for dynamic best fit compilation of mixed mode instructions
JP2007304840A (en) Compilation method, debugging method, compilation program, and debugging program
KR100725386B1 (en) Method for executing virtual machine application, and the digital broadcast receiver thereof
KR100654428B1 (en) System for improving transaction rate of java program and method thereof
US7739672B2 (en) Information processor, information processing method, and programs therefor
JP2000330792A (en) System for controlling byte code program execution
JP4799016B2 (en) Method and device for calling functions
KR101083271B1 (en) System and method for converting active x control
US8468511B2 (en) Use of name mangling techniques to encode cross procedure register assignment
JP2004192038A (en) Information processor, information processing system, information processing program, and storage medium recording program
CN116661844A (en) Configuration file processing method, application program updating method, device and server