JP2002073345A - Information processing system and storage medium - Google Patents

Information processing system and storage medium

Info

Publication number
JP2002073345A
JP2002073345A JP2000255317A JP2000255317A JP2002073345A JP 2002073345 A JP2002073345 A JP 2002073345A JP 2000255317 A JP2000255317 A JP 2000255317A JP 2000255317 A JP2000255317 A JP 2000255317A JP 2002073345 A JP2002073345 A JP 2002073345A
Authority
JP
Japan
Prior art keywords
virtual machine
instruction code
storage unit
machine instruction
program
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
JP2000255317A
Other languages
Japanese (ja)
Inventor
Takeshi Eto
健 衛藤
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 JP2000255317A priority Critical patent/JP2002073345A/en
Publication of JP2002073345A publication Critical patent/JP2002073345A/en
Pending legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)

Abstract

PROBLEM TO BE SOLVED: To execute a program for a virtual machine faster. SOLUTION: The program loader 16 reads out a byte code from the cluster file 12, decides whether a load location of this byte code and an argument setup byte code is the Java virtual machine 13 or the JIT compiler 15 based on content of a determination information storage unit 17 if the byte code is a subroutine call and iterates a loading process for the byte code to the decided load location. If the byte code is not the subroutine call, the loading location is decided to Java virtual machine 13. The content of determination information storage unit 17 is decided by the static analyzer 18 to analyze the content of the cluster file 16 or a person before the cluster file 12 is executed.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、OSプラットフォ
ーム上で、仮想マシンがその仮想マシン命令コードを解
釈実行しJITコンパイラが仮想マシン命令コードを動
的にコンパイルし実行する情報処理装置及びその処理を
行うプログラムが記録されたコンピュータ読み取り可能
な記録媒体に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an information processing apparatus in which a virtual machine interprets and executes a virtual machine instruction code on an OS platform, and a JIT compiler dynamically compiles and executes the virtual machine instruction code. The present invention relates to a computer-readable recording medium on which a program to be executed is recorded.

【0002】[0002]

【従来の技術】図7は、Java(登録商標)プログラ
ム実行環境を示すソフトウェア概略ブロック図である。
2. Description of the Related Art FIG. 7 is a schematic software block diagram showing a Java (registered trademark) program execution environment.

【0003】プログラムとデータを含むJavaソース
ファイル10は、Javaコンパイラ11により、バイ
トコード列とデータを含むクラスファイル12に変換さ
れる。バイトコードは、JVM(Java Virtual Machin
e)13により解釈され実行される。JVM13は、W
indows(登録商標)14上で動作しており、Wi
ndows14が持っている各種サブルーチンを利用す
ることができる。JVM13を備えることにより、マシ
ンに依存しないバイトコードを実行することができると
いう利点がある反面、オーバヘッドが大きいという問題
がある。
[0003] A Java source file 10 containing a program and data is converted by a Java compiler 11 into a class file 12 containing a bytecode sequence and data. The bytecode is JVM (Java Virtual Machin
e) interpreted and executed by 13; JVM13 is W
running on Windows (R) 14.
Various subroutines of the windows 14 can be used. By providing the JVM 13, there is an advantage that a bytecode independent of a machine can be executed, but there is a problem that overhead is large.

【0004】この問題を解決するために、Window
s14上で動作するJIT(Just-In-Time)コンパイラ
15を備え、クラスファイル12のバイトコードをJI
Tコンパイラ15により実行時にコンパイル、すなわち
動的にコンパイルし、その結果を記憶しておき、2回目
以降このバイトコード(仮想マシンコード)を実行する
場合には、再度コンパイルせずにコンパイルされたネイ
ティブコード(ネイティブマシンコード)を実行すると
いう方法が用いられている。
In order to solve this problem, Windows
It has a JIT (Just-In-Time) compiler 15 operating on s14 and converts the bytecode of the class file 12 into JI
When compiled by the T compiler 15 at the time of execution, that is, dynamically compiled, the result is stored, and when this byte code (virtual machine code) is executed for the second time or later, the native language compiled without compiling again is used. A method of executing code (native machine code) is used.

【0005】[0005]

【発明が解決しようとする課題】しかしながら、クラス
ファイル12の内容によっては、JITコンパイラ15
で処理した方がJVM13で処理するよりも遅くなる場
合がある。この点は、Windows14以外のOS上
のJavaプラットホーム(Javaコンパイラ11、
JVM13及びJITコンパイラ15は、Window
s14上で動作するJavaプラットホームを構成して
いる。)で動作するJavaプログラムについても同様
であり、また、Smalltalkなどの他の仮想マシ
ンプログラムについても同様である。
However, depending on the contents of the class file 12, the JIT compiler 15
There is a case where the processing performed by is slower than the processing performed by the JVM 13. This point is based on the Java platform on OS other than Windows14 (Java compiler 11,
JVM 13 and JIT compiler 15 are Windows
It constitutes a Java platform operating on s14. The same applies to the Java program that operates in ()), and also to other virtual machine programs such as Smalltalk.

【0006】本発明の目的は、このような問題点に鑑
み、仮想マシンのプログラムをより高速に実行すること
が可能な情報処理装置及びその処理を行うプログラムが
記録されたコンピュータ読み取り可能な記録媒体を提供
することにある。
SUMMARY OF THE INVENTION In view of the above problems, an object of the present invention is to provide an information processing apparatus capable of executing a program of a virtual machine at a higher speed and a computer-readable recording medium on which a program for executing the processing is recorded. Is to provide.

【0007】[0007]

【課題を解決するための手段及びその作用効果】本発明
では、OSプラットフォーム上で仮想マシンがその仮想
マシン命令コードを解釈実行する情報処理装置におい
て、仮想マシン命令コード列が格納されるプログラム記
憶部と、判定情報が格納される判定情報記憶部と、ロー
ドされた仮想マシン命令コードをコンパイルして実行す
るJITコンパイラがインストールされた記憶部と、該
プログラム記憶部から仮想マシン命令コードを読み出
し、該判定情報に基づいてこの仮想マシン命令コードの
ロード先を該仮想マシンにするか該JITコンパイラに
するかを決定し、決定されたロード先に該仮想マシン命
令コードをロードするという処理を繰り返し実行するプ
ログラムローダがインストールされた記憶部とを有す
る。
According to the present invention, in an information processing apparatus in which a virtual machine interprets and executes a virtual machine instruction code on an OS platform, a program storage unit in which a virtual machine instruction code string is stored. A judgment information storage unit for storing judgment information, a storage unit in which a JIT compiler for compiling and executing the loaded virtual machine instruction code is installed, and a virtual machine instruction code is read from the program storage unit. Based on the determination information, it is determined whether to load the virtual machine instruction code into the virtual machine or into the JIT compiler, and the process of loading the virtual machine instruction code into the determined load destination is repeatedly executed. A storage unit in which a program loader is installed.

【0008】この情報処理装置によれば、1つ以上の仮
想マシン命令コードが読み出される毎に、判定情報の内
容に応じて仮想マシン又はJITコンパイラで実行され
るので、仮想マシンのみ又はJITコンパイラのみで仮
想マシン命令コードを実行する場合よりも処理時間が短
縮される。
According to this information processing apparatus, every time one or more virtual machine instruction codes are read out, they are executed by the virtual machine or the JIT compiler according to the contents of the judgment information. The processing time is reduced as compared with the case of executing the virtual machine instruction code.

【0009】本発明の他の目的、構成及び効果は以下の
説明から明らかになる。
[0009] Other objects, configurations and effects of the present invention will become apparent from the following description.

【0010】[0010]

【発明の実施の形態】以下、図面を参照して本発明の一
実施形態を説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings.

【0011】図1は、本発明の一実施形態のJavaプ
ログラム実行環境を示すソフトウェア概略ブロック図で
ある。
FIG. 1 is a schematic software block diagram showing a Java program execution environment according to an embodiment of the present invention.

【0012】このソフトウェアは、コンピュータや携帯
電話などの情報処理装置にインストールされている。
This software is installed in an information processing device such as a computer or a mobile phone.

【0013】本実施形態では、クラスファイル12のバ
イトコードを、その内容に応じてJVM13で解釈実行
し又はJITコンパイラ15で動的にコンパイルし実行
するという処理を繰り返し行うことにより、JVM13
のみ又はJITコンパイラ15のみで実行する場合より
も高速化を図っている。
In the present embodiment, the byte code of the class file 12 is interpreted and executed by the JVM 13 or dynamically compiled and executed by the JIT compiler 15 in accordance with the contents thereof, thereby repeatedly executing the JVM 13
It is faster than when only the JIT compiler 15 or the JIT compiler 15 is used.

【0014】バイトコードのロード先をJVM13とす
るかJITコンパイラ15とするかは、プログラムロー
ダ16により、判定情報記憶部17の内容に基づいて判
定される。判定情報記憶部17の内容は、クラスファイ
ル12の実行前に、クラスファイル12の内容を解析す
る静的アナライザ18又は人(プログラム開発者やシス
テム運用者など)により決定される。
Whether to load the bytecode to the JVM 13 or the JIT compiler 15 is determined by the program loader 16 based on the contents of the determination information storage unit 17. Before executing the class file 12, the contents of the determination information storage unit 17 are determined by a static analyzer 18 or a person (a program developer or a system operator) that analyzes the contents of the class file 12.

【0015】図2は、図1のクラスファイル12の実行
手順を示す概略フローチャートである。
FIG. 2 is a schematic flowchart showing the procedure for executing the class file 12 of FIG.

【0016】(S1)プログラムローダ16は、クラス
ファイル12から次のバイトコードを読み出す。
(S1) The program loader 16 reads the next byte code from the class file 12.

【0017】(S2)プログラムローダ16は、このコ
ードが終了コードであれば処理を終了し、そうでなけれ
ば次のステップS3へ進む。
(S2) If this code is an end code, the program loader 16 ends the processing, otherwise proceeds to the next step S3.

【0018】(S3)このバイトコードがサブルーチン
コールでなければステップS4へ進む。このバイトコー
ドがサブルーチンコールであれば、プログラムローダ1
6は、クラスファイル12からこれに関連したバイトコ
ード群(現在のバイトコードで呼び出されるサブルーチ
ン)をクラスファイル12から読み出し、バイトコード
群が、過去にJITコンパイラ15でコンパイル済みで
ありその結果がメモリに格納されていればステップS7
へ進み、そうでなければステップS4へ進む。
(S3) If this byte code is not a subroutine call, the process proceeds to step S4. If this byte code is a subroutine call, the program loader 1
6 reads a byte code group (a subroutine called with the current byte code) related thereto from the class file 12 from the class file 12, and the byte code group has been compiled by the JIT compiler 15 in the past, and the result is stored in the memory. If stored in step S7
Otherwise, the process proceeds to step S4.

【0019】(S4)ステップS1で読み出したバイト
コードがサブルーチンコールでなければステップS5へ
進む。このバイトコードがサブルーチンコールであれ
ば、プログラムローダ16は、判定情報記憶部17の内
容を参照し、バイトコード群をコンパイルするかどうか
を後述のようにして判定する。コンパイルしないと判定
した場合にはステップS5へ進み、すると判定した場合
にはステップS6へ進む。
(S4) If the bytecode read in step S1 is not a subroutine call, the flow advances to step S5. If the bytecode is a subroutine call, the program loader 16 refers to the contents of the determination information storage unit 17 and determines whether to compile the bytecode group as described later. When it is determined not to compile, the process proceeds to step S5, and when it is determined that the compile is not performed, the process proceeds to step S6.

【0020】(S5)プログラムローダ16は、バイト
コードをJVM13にロードする。JVM13は、この
バイトコードを解釈し、得られたネイティブコードをM
PUに供給して実行させる。次にステップS1へ戻る。
(S5) The program loader 16 loads the bytecode into the JVM 13. The JVM 13 interprets this bytecode and converts the obtained native code into M
Supply to PU and execute. Next, the process returns to step S1.

【0021】(S6)プログラムローダ16は、バイト
コード群をJITコンパイラ15にロードする。JIT
コンパイラ15は、このバイトコード群をコンパイル
(ネイティブコードに変換)する。
(S6) The program loader 16 loads the byte code group into the JIT compiler 15. JIT
The compiler 15 compiles (converts the byte code group) into a native code.

【0022】(S7)JITコンパイラ15は、変換さ
れているネイティブコードをMPUに供給して実行させ
る。次に、ステップS1へ戻る。
(S7) The JIT compiler 15 supplies the converted native code to the MPU for execution. Next, the process returns to step S1.

【0023】図1において、JVM13及びJITコン
パイラ15はいずれもWindows14上で動作し、
Windows14が持っているサブルーチンを呼び出
すことによりこれを利用することができる。
In FIG. 1, both the JVM 13 and the JIT compiler 15 operate on Windows 14,
This can be used by calling a subroutine that Windows 14 has.

【0024】図3は、クラスファイル12のバイトコー
ドを実行中にWindows14のグラフィック描画ラ
イブラリが呼び出され、その実行中にさらにデバイスド
ライバが読み出される場合を示している。このような処
理では、グラフィック描画ライブラリ及びデバイスドラ
イバでの処理時間が比較的長いので、グラフィック描画
ライブラリを呼び出すバイトコード群をJVM13で実
行してもJITコンパイラ15で実行してもほぼ同じに
なる。この場合、JITコンパイラ15で実行すると、
コンパイルされたネイティブコード列を記憶しておく必
要があるので、プログラムローダ16はこのバイトコー
ド群をJVM13にロードする。
FIG. 3 shows a case where the graphics drawing library of Windows 14 is called while the bytecode of the class file 12 is being executed, and the device driver is further read during the execution. In such processing, since the processing time in the graphic drawing library and the device driver is relatively long, the byte code group for calling the graphic drawing library is almost the same whether executed by the JVM 13 or the JIT compiler 15. In this case, when executed by the JIT compiler 15,
Since it is necessary to store the compiled native code sequence, the program loader 16 loads this bytecode group into the JVM 13.

【0025】図4の(A)及び(B)はいずれも、ある
バイトコード群がJVM13で繰り返し実行される場合
とJITコンパイラ15で繰り返し実行される場合の処
理時間の比較を示す。
FIGS. 4A and 4B both show a comparison of the processing times when a certain bytecode group is repeatedly executed by the JVM 13 and when it is repeatedly executed by the JIT compiler 15.

【0026】JVM13で実行する場合には、毎回同じ
処理時間t1となるが、JITコンパイラ15で実行す
る場合にはバイトコード群が1回コンパイルされると2
回目以降はコンパイルが省略されるので、2回目以降の
処理時間t3は1回目の処理時間(t2+t3)よりも
コンパイル時間t2だけ短くなる。なお、時間t3にも
オーバヘッドが含まれている。
When executed by the JVM 13, the processing time t 1 is the same every time. However, when executed by the JIT compiler 15, if the bytecode group is compiled once,
Since the compilation is omitted after the first time, the processing time t3 after the second time is shorter than the first processing time (t2 + t3) by the compilation time t2. Note that the time t3 also includes an overhead.

【0027】図4(A)では、あるバイトコード群を1
回のみ実行する場合には、JVM13を用いた方が高速
であるが、このバイトコード群を2回実行する場合には
JVM13とJITコンパイラ15のいずれを用いても
ほぼ同じとなり、このバイトコード群を3回以上実行す
る場合にはJITコンパイラ15を用いた方が処理時間
を短縮することができることを示している。また、図4
(B)は、あるバイトコード群を1回のみ実行する場合
にはJVM13とJITコンパイラ15のいずれを用い
てもほぼ同じ時間となるが、このバイトコード群を2回
以上実行する場合には、JITコンパイラ15を用いた
方が処理時間を短縮できることを示している。
In FIG. 4A, a certain byte code group is set to 1
When the execution is performed only once, the use of the JVM 13 is faster, but when the byte code group is executed twice, the result is almost the same regardless of whether the JVM 13 or the JIT compiler 15 is used. Is executed three or more times, the use of the JIT compiler 15 can reduce the processing time. FIG.
In (B), when a certain bytecode group is executed only once, the time becomes almost the same regardless of whether the JVM 13 or the JIT compiler 15 is used. However, when this bytecode group is executed twice or more, This shows that the processing time can be reduced by using the JIT compiler 15.

【0028】このような解析が、図1の静的アナライザ
18又は人により行われて、判定情報記憶部17に格納
すべき情報が決定される。
Such analysis is performed by the static analyzer 18 of FIG. 1 or a person, and information to be stored in the determination information storage unit 17 is determined.

【0029】図5は、判定情報記憶部17の内容の具体
例と、これに関係した部分とを示す説明図である。
FIG. 5 is an explanatory diagram showing a specific example of the contents of the judgment information storage unit 17 and the parts related thereto.

【0030】判定情報記憶部17には、JITコンパイ
ラ15で実行される可能性のあるサブルーチンコールバ
イトコードBCα〜BCδ(引数を設定するバイトコー
ドは含まれない。)が参照バイトコードとして予め格納
されている。各参照バイトコードには、後述のフラグ
F、比較値N及びカウントkの情報が付加されている。
フラグF及び比較値Nは、参照バイトコードと同様に、
静的アナライザ18又は人により決定される。
The subroutine call bytecodes BCα to BCδ (excluding bytecodes for setting arguments) which may be executed by the JIT compiler 15 are previously stored in the determination information storage unit 17 as reference bytecodes. ing. Information of a flag F, a comparison value N, and a count k described below is added to each reference bytecode.
The flag F and the comparison value N are, like the reference bytecode,
Determined by static analyzer 18 or a person.

【0031】図6は、クラスファイル12から読み出さ
れた1つのサブルーチンコールバイトコードBCiに対
する図5のプログラムローダ16の処理を示すフローチ
ャートである。
FIG. 6 is a flowchart showing the processing of the program loader 16 of FIG. 5 for one subroutine call bytecode BCi read from the class file 12.

【0032】(S9)判定情報記憶部17内の各参照バ
イトコードに対応したカウントkをゼロクリアする。
(S9) The count k corresponding to each reference byte code in the judgment information storage unit 17 is cleared to zero.

【0033】(S10)バイトコードBCiを判定情報
記憶部17の次の参照コードと比較する。最初は、バイ
トコードBCiを参照コードBCαと比較する。
(S10) The byte code BCi is compared with the next reference code in the judgment information storage unit 17. First, the byte code BCi is compared with the reference code BCα.

【0034】(S11)判定情報記憶部17に次の参照
バイトコードがなければステップS12へ進み、そうで
なければステップS13へ進む。
(S11) If there is no next reference bytecode in the judgment information storage unit 17, the process proceeds to step S12, and if not, the process proceeds to step S13.

【0035】(S12)バイトコードBCiをJVM1
3にロードし、処理を終了する。
(S12) Byte code BCi is converted to JVM1
3 and the process ends.

【0036】(S13)比較結果が一致すればステップ
S14へ進み、そうでなければステップS10へ戻る。
(S13) If the comparison results match, the process proceeds to step S14; otherwise, the process returns to step S10.

【0037】(S14)F=‘0’であればステップS
15へ進み、F=‘1’であればステップS18へ進
む。
(S14) If F = '0', step S
The process advances to step S15, and if F = '1', the process advances to step S18.

【0038】(S15)カウントkを1だけインクリメ
ントする。
(S15) The count k is incremented by one.

【0039】(S16)N<kであればステップS10
へ戻り、N=kであれば次のステップS17へ進む。
(S16) If N <k, step S10
The process returns to step S17 if N = k.

【0040】(S17)フラグFを‘1’にする。(S17) The flag F is set to "1".

【0041】(S18)バイトコードBCiに関連した
バイトコードをクラスファイル12から読み出し、これ
とバイトコードBCiとからなるバイトコード群をJI
Tコンパイラ15にロードする。
(S18) A bytecode related to the bytecode BCi is read from the class file 12, and a bytecode group composed of the bytecode BCi and the bytecode BCi is read by the JI.
Load into the T compiler 15.

【0042】このような処理により、バイトコードBC
iとF=‘1’の参照バイトコードとが一致する場合に
はバイトコードBCiを含むバイトコード群がJITコ
ンパイラ15で実行され、バイトコードBCiとF=
‘0’の参照バイトコードとが一致する場合にはこのバ
イトコードBCiがN回以上出現したときにバイトコー
ドBCiを含むバイトコード群がJITコンパイラ15
で実行される。例えば、図4(A)の場合にはF=
‘1’、N=2であり、バイトコードBCiが2回以上
出現したときに、その後3回以上出現すると予測して、
バイトコードBCiを含むバイトコード群をJITコン
パイラ15で実行する。図4(B)の場合にはF=
‘0’であり、バイトコードBCiが出現すればこれを
含むバイトコード群を必ずJITコンパイラ15で実行
する。
By such processing, the byte code BC
When i and the reference bytecode of F = '1' match, the byte code group including the bytecode BCi is executed by the JIT compiler 15, and the bytecodes BCi and F =
If the reference bytecode of “0” matches, when this bytecode BCi appears N times or more, the bytecode group including the bytecode BCi is changed to the JIT compiler 15.
Executed in For example, in the case of FIG.
'1', N = 2, and when the bytecode BCi appears more than once, it is predicted to appear more than three times,
The byte code group including the byte code BCi is executed by the JIT compiler 15. In the case of FIG.
If the bytecode BCi appears, the bytecode group including the bytecode BCi is always executed by the JIT compiler 15.

【0043】本実施形態によれば、バイトコードが上述
のようにその内容に応じてJVM13又はJITコンパ
イラ15で実行されるので、JVM13のみ又はJIT
コンパイラ15のみでバイトコードを実行する場合より
も処理時間が短縮される。
According to the present embodiment, since the bytecode is executed by the JVM 13 or the JIT compiler 15 according to the contents as described above, only the JVM 13 or the JIT
The processing time is shorter than when the bytecode is executed only by the compiler 15.

【0044】なお、本発明には外にも種々の変形例が含
まれる。
The present invention also includes various modifications.

【0045】例えば、バイトコード群をJITコンパイ
ラ15で実行した場合の1回目の時間と2回目の時間t
2及びt3を予め判定情報記憶部17に格納しておき、
クラスファイル12の実行中において、このバイトコー
ド群が最初に出現したときプログラムローダ16はこれ
をJVM13にロードし、その実行時間t1を測定して
これを判定情報記憶部17に格納し、t1〜t3の値に
基づいて比較値Nを決定するようにしてもよい。
For example, the first time and the second time t when the byte code group is executed by the JIT compiler 15
2 and t3 are stored in the determination information storage unit 17 in advance, and
During the execution of the class file 12, when this bytecode group first appears, the program loader 16 loads the bytecode group into the JVM 13, measures its execution time t1, stores it in the determination information storage unit 17, and stores it in t1 to t1. The comparison value N may be determined based on the value of t3.

【0046】図5において、フラグFを用いずに、比較
値Nとカウントkとを用い、kの初期値を0とし、F=
‘1’に対応したNの値を1とし、バイトコードBCi
と参照バイトコードとが一致した場合にkを1だけイン
クリメントし、k=Nのときバイトコード群をJITコ
ンパイラ15にロードするようにしてもよい。また、k
の初期値をNとし、F=‘1’に対応したNの値を1と
し、バイトコードBCiと参照バイトコードとが一致し
た場合にkを1だけデクリメントし、k=0のときバイ
トコード群をJITコンパイラ15にロードするように
してもよい。
In FIG. 5, without using the flag F, the comparison value N and the count k are used, the initial value of k is set to 0, and F =
The value of N corresponding to '1' is set to 1 and the byte code BCi
When k is equal to the reference bytecode, k may be incremented by 1 and the bytecode group may be loaded into the JIT compiler 15 when k = N. Also, k
Is set to N, the value of N corresponding to F = '1' is set to 1, k is decremented by 1 when the byte code BCi matches the reference byte code, and when k = 0, the byte code group May be loaded into the JIT compiler 15.

【0047】本発明はJava言語以外の仮想マシンに
も適用される。仮想マシンは、Windows14以外
のOS上で動作するものであってもよい。
The present invention is also applied to virtual machines other than the Java language. The virtual machine may operate on an OS other than Windows14.

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

【図1】本発明の一実施形態のJavaプログラム実行
環境を示すソフトウェア概略ブロック図である。
FIG. 1 is a schematic software block diagram showing a Java program execution environment according to an embodiment of the present invention.

【図2】図1のクラスファイルの実行手順を示す概略フ
ローチャートである。
FIG. 2 is a schematic flowchart showing an execution procedure of a class file of FIG. 1;

【図3】クラスファイルのバイトコードを実行中にWi
ndowsのグラフィック描画ライブラリが呼び出さ
れ、その実行中にさらにデバイスドライバが読み出され
る場合を示す説明図である。
FIG. 3 shows that Wi is executed while executing bytecode of a class file.
FIG. 11 is an explanatory diagram showing a case where an nwindows graphic drawing library is called and a device driver is further read during execution thereof.

【図4】(A)及び(B)はいずれも、あるバイトコー
ド群がJVMで繰り返し実行される場合とJITコンパ
イラで繰り返し実行される場合の処理時間の比較を示す
線図である。
FIGS. 4A and 4B are diagrams showing a comparison of processing times when a certain bytecode group is repeatedly executed by a JVM and when a bytecode group is repeatedly executed by a JIT compiler.

【図5】図1の判定情報記憶部の内容の具体例と、これ
に関係した部分とを示す説明図である。
FIG. 5 is an explanatory diagram showing a specific example of contents of a determination information storage unit in FIG. 1 and a part related thereto.

【図6】クラスファイルから読み出された1つのサブル
ーチンコールバイトコードBCiに対する図5のプログ
ラムローダの処理を示すフローチャートである。
FIG. 6 is a flowchart showing a process of the program loader of FIG. 5 for one subroutine call bytecode BCi read from a class file.

【図7】従来のJavaプログラム実行環境を示すソフ
トウェア概略ブロック図である。
FIG. 7 is a schematic software block diagram showing a conventional Java program execution environment.

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

10 Javaソースプログラム 11 Javaコンパイラ 12 クラスファイル 13 JVM 14 Windows 15 JITコンパイラ 16 プログラムローダ 17 判定情報 18 静的アナライザ F フラグ N 比較値 k カウント BCi バイトコード Reference Signs List 10 Java source program 11 Java compiler 12 Class file 13 JVM 14 Windows 15 JIT compiler 16 Program loader 17 Judgment information 18 Static analyzer F flag N Comparison value k count BCi byte code

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 OSプラットフォーム上で仮想マシンが
その仮想マシン命令コードを解釈実行する情報処理装置
において、 仮想マシン命令コード列が格納されるプログラム記憶部
と、 判定情報が格納される判定情報記憶部と、 ロードされた仮想マシン命令コードをコンパイルして実
行するJITコンパイラがインストールされた記憶部
と、 該プログラム記憶部から仮想マシン命令コードを読み出
し、該判定情報に基づいてこの仮想マシン命令コードの
ロード先を該仮想マシンにするか該JITコンパイラに
するかを決定し、決定されたロード先に該仮想マシン命
令コードをロードするという処理を繰り返し実行するプ
ログラムローダがインストールされた記憶部と、 を有することを特徴とする情報処理装置。
1. An information processing apparatus in which a virtual machine interprets and executes a virtual machine instruction code on an OS platform, a program storage unit for storing a virtual machine instruction code sequence, and a determination information storage unit for storing determination information. A storage unit in which a JIT compiler that compiles and executes the loaded virtual machine instruction code is installed; reads a virtual machine instruction code from the program storage unit; and loads the virtual machine instruction code based on the determination information. A storage unit in which a program loader that determines whether to use the virtual machine or the JIT compiler and loads the virtual machine instruction code into the determined load destination repeatedly is installed. An information processing apparatus characterized by the above-mentioned.
【請求項2】 上記判定情報は、参照命令コードを有
し、上記プログラムローダが動作する前に上記判定情報
記憶部に格納されており、 上記プログラムローダは、上記プログラム記憶部から読
み出した仮想マシン命令コードが該参照命令コードと一
致すると判定すれば、該仮想マシン命令コードを上記J
ITコンパイラにロードする、ことを特徴とする請求項
1記載の情報処理装置。
2. The method according to claim 1, wherein the determination information has a reference instruction code, and is stored in the determination information storage unit before the program loader operates. The program loader reads the virtual machine from the program storage unit. If it is determined that the instruction code matches the reference instruction code, the virtual machine instruction code
2. The information processing apparatus according to claim 1, wherein the information is loaded into an IT compiler.
【請求項3】 上記判定情報は、比較値とカウントとを
さらに有し、 上記プログラムローダは、上記プログラム記憶部から読
み出した仮想マシン命令コードが該参照命令コードと一
致すると判定すれば、該カウントを変化させ、該カウン
トと該比較値との比較結果に基づいて該仮想マシン命令
コードの上記ロード先を判定する、 ことを特徴とする請求項2記載の情報処理装置。
3. The determination information further includes a comparison value and a count. If the program loader determines that the virtual machine instruction code read from the program storage unit matches the reference instruction code, the program loader counts the count. 3. The information processing apparatus according to claim 2, wherein the load destination of the virtual machine instruction code is determined based on a comparison result between the count and the comparison value.
【請求項4】 上記プログラムローダが動作する前に、
上記仮想マシン命令コード列を解析して上記参照命令コ
ードを決定する静的アナライザがインストールされた記
憶部、 をさらに有することを特徴とする請求項2又は3記載の
情報処理装置。
4. Before the program loader operates,
The information processing apparatus according to claim 2, further comprising: a storage unit in which a static analyzer that analyzes the virtual machine instruction code sequence and determines the reference instruction code is installed.
【請求項5】 仮想マシン命令コードを読み出し、判定
情報に基づいてこの仮想マシン命令コードのロード先
を、仮想マシン命令コードをOSプラットフォーム上で
解釈実行する仮想マシンにするか、仮想マシン命令コー
ドをOSプラットフォーム上で動的にコンパイルし実行
するJITコンパイラにするかを決定し、決定されたロ
ード先に該仮想マシン命令コードをロードする、 という処理を繰り返し実行するプログラムローダが記録
されていることを特徴とするコンピュータ読み取り可能
な記録媒体。
5. A method for reading a virtual machine instruction code and loading the virtual machine instruction code to a virtual machine that interprets and executes the virtual machine instruction code on an OS platform based on the determination information, A program loader that repeatedly determines whether or not to use a JIT compiler that dynamically compiles and executes on the OS platform and loads the virtual machine instruction code to the determined load destination is recorded. Characteristic computer readable recording medium.
JP2000255317A 2000-08-25 2000-08-25 Information processing system and storage medium Pending JP2002073345A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000255317A JP2002073345A (en) 2000-08-25 2000-08-25 Information processing system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000255317A JP2002073345A (en) 2000-08-25 2000-08-25 Information processing system and storage medium

Publications (1)

Publication Number Publication Date
JP2002073345A true JP2002073345A (en) 2002-03-12

Family

ID=18744129

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000255317A Pending JP2002073345A (en) 2000-08-25 2000-08-25 Information processing system and storage medium

Country Status (1)

Country Link
JP (1) JP2002073345A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100349114C (en) * 2004-01-14 2007-11-14 三星电子株式会社 System and method for increasing throughput of java program
JP2010191734A (en) * 2009-02-19 2010-09-02 Hitachi Software Eng Co Ltd Image reproduction apparatus and method of executing intermediate language program
US8056061B2 (en) 2004-10-21 2011-11-08 Samsung Electronics Co., Ltd. Data processing device and method using predesignated register
WO2012045238A1 (en) * 2010-10-09 2012-04-12 中兴通讯股份有限公司 Startup method and device for application program on mobile device
CN111880806A (en) * 2020-07-23 2020-11-03 深圳融卡智能科技有限公司 Application execution method and application execution system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11272476A (en) * 1997-10-06 1999-10-08 Sun Microsyst Inc Method and device for dynamically optimizing byte-coded program
JP2000132408A (en) * 1998-10-21 2000-05-12 Fujitsu Ltd Computer architecture emulation system
JP2000172512A (en) * 1998-12-03 2000-06-23 Internatl Business Mach Corp <Ibm> Method for executing byte code and data processing system
JP2000222220A (en) * 1999-01-28 2000-08-11 Internatl Business Mach Corp <Ibm> Dynamically compiling time setting method, byte code executing mode selecting method and computer
JP2000330792A (en) * 1999-05-18 2000-11-30 Matsushita Electric Ind Co Ltd System for controlling byte code program execution

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11272476A (en) * 1997-10-06 1999-10-08 Sun Microsyst Inc Method and device for dynamically optimizing byte-coded program
JP2000132408A (en) * 1998-10-21 2000-05-12 Fujitsu Ltd Computer architecture emulation system
JP2000172512A (en) * 1998-12-03 2000-06-23 Internatl Business Mach Corp <Ibm> Method for executing byte code and data processing system
JP2000222220A (en) * 1999-01-28 2000-08-11 Internatl Business Mach Corp <Ibm> Dynamically compiling time setting method, byte code executing mode selecting method and computer
JP2000330792A (en) * 1999-05-18 2000-11-30 Matsushita Electric Ind Co Ltd System for controlling byte code program execution

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100349114C (en) * 2004-01-14 2007-11-14 三星电子株式会社 System and method for increasing throughput of java program
US8056061B2 (en) 2004-10-21 2011-11-08 Samsung Electronics Co., Ltd. Data processing device and method using predesignated register
JP2010191734A (en) * 2009-02-19 2010-09-02 Hitachi Software Eng Co Ltd Image reproduction apparatus and method of executing intermediate language program
WO2012045238A1 (en) * 2010-10-09 2012-04-12 中兴通讯股份有限公司 Startup method and device for application program on mobile device
US8726249B2 (en) 2010-10-09 2014-05-13 ZTE Corportaion Bootup method and device for application program in mobile equipment
CN111880806A (en) * 2020-07-23 2020-11-03 深圳融卡智能科技有限公司 Application execution method and application execution system
CN111880806B (en) * 2020-07-23 2023-11-21 无锡融卡科技有限公司 Application execution method and application execution system

Similar Documents

Publication Publication Date Title
EP1145120B1 (en) Generating compiled programs for interpretive runtime environments
JP3894698B2 (en) A hybrid just-in-time compiler that minimizes resource consumption
US6507946B2 (en) Process and system for Java virtual method invocation
US6851109B1 (en) Process and system for dynamically compiling a partially interpreted method
US5983021A (en) Dynamically switching statically bound function calls to dynamically bound function calls without recompilation
US7203941B2 (en) Associating a native resource with an application
US7406684B2 (en) Compiler, dynamic compiler, and replay compiler
US6637025B1 (en) Dynamic selection/definition of which class/methods should or should not be jit&#39;ed using information stored in a jar file
EP1313011B1 (en) Intermediate code execution system, intermediate code execution method, and computer program product for executing intermediate code
US20060026575A1 (en) Method and system of adaptive dynamic compiler resolution
US6886094B1 (en) Apparatus and method for detecting and handling exceptions
US7124407B1 (en) Method and apparatus for caching native code in a virtual machine interpreter
JP2000222220A (en) Dynamically compiling time setting method, byte code executing mode selecting method and computer
US8042103B2 (en) Pre-translated files used in a virtual machine
KR100577366B1 (en) Method and apparatus for executing different forms of java methods
US6931638B2 (en) Method and apparatus to facilitate sharing optimized instruction code in a multitasking virtual machine
US20040243989A1 (en) Method and apparatus for selectively optimizing interpreted language code
US6553426B2 (en) Method apparatus for implementing multiple return sites
US6883165B1 (en) Apparatus and method for avoiding deadlocks in a multithreaded environment
US6779188B1 (en) Apparatus and method for improved devirtualization of method calls
US8099723B2 (en) Referencing a constant pool in a java virtual machine
US5150474A (en) Method for transferring arguments between object programs by switching address modes according to mode identifying flag
JP2002073345A (en) Information processing system and storage medium
EP0790555B1 (en) Compile apparatus and method
US6275985B1 (en) Method and apparatus for developing an application that implements garbage collection efficiently by combining proxy objects with compiler support

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070803

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20080728

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100406

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100921

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20110201