JP2011085985A - Memory management method, memory management program, and information processor - Google Patents

Memory management method, memory management program, and information processor Download PDF

Info

Publication number
JP2011085985A
JP2011085985A JP2009236257A JP2009236257A JP2011085985A JP 2011085985 A JP2011085985 A JP 2011085985A JP 2009236257 A JP2009236257 A JP 2009236257A JP 2009236257 A JP2009236257 A JP 2009236257A JP 2011085985 A JP2011085985 A JP 2011085985A
Authority
JP
Japan
Prior art keywords
memory area
generation
area
profiling
equal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2009236257A
Other languages
Japanese (ja)
Other versions
JP5199975B2 (en
JP2011085985A5 (en
Inventor
Masanobu Yamada
雅信 山田
Koichi Okada
浩一 岡田
Takuma Nagase
卓真 長瀬
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2009236257A priority Critical patent/JP5199975B2/en
Priority to PCT/JP2010/053520 priority patent/WO2011045949A1/en
Publication of JP2011085985A publication Critical patent/JP2011085985A/en
Publication of JP2011085985A5 publication Critical patent/JP2011085985A5/ja
Application granted granted Critical
Publication of JP5199975B2 publication Critical patent/JP5199975B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0253Garbage collection, i.e. reclamation of unreferenced memory
    • G06F12/0261Garbage collection, i.e. reclamation of unreferenced memory using reference counting

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Devices For Executing Special Programs (AREA)
  • Stored Programmes (AREA)
  • Debugging And Monitoring (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To dynamically detect most of long-lived objects stored in an external heap region, and to suppress the occurrence of FullGC by storing these objects in the external heap region. <P>SOLUTION: First, an origin object is detected by analyzing a reference relation of a long-lived object released in an Old region by FullGC. Then, an object generation instruction is detected to generate a long-lived origin object by profiling a rate by which the origin object generated based on each object generation instruction is released in the Old region by the FullGC. When the object is long-lived, the object generation destination is changed to an external heap, and the origin object is generated in the external heap region. Furthermore, a member object referenced from the origin object is set to a movement object from a New region to the Old region by CopyGC, and when a rate at which the object is released together with the origin object is high, the object moves to the same external heap as that of the origin object. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、メモリ管理方法、メモリ管理プログラム、及び、情報処理装置に関するものである。   The present invention relates to a memory management method, a memory management program, and an information processing apparatus.

Java(登録商標)言語の処理系であるJava仮想マシン(以下、「JavaVM」という。「VM」は「Virtual Machine」の略。)は、ガベージコレクタを実装している。ガベージコレクタは、JavaVMがオブジェクトを格納するために確保するメモリ領域(以下、「Javaヒープ領域」という。)を管理し、プログラム実行中に動的に生成したオブジェクト(が割当てられたメモリ領域)のうち、不要になったオブジェクト(が割当てられたメモリ領域)をガベージコレクション(以下、「GC」という。「GC」は、「garbage collection」の略。)によって動的に解放する(自動解放機能)。説明の便宜上、メモリ領域の解放を、そのメモリ領域に格納されているオブジェクトの解放として説明する場合がある。   A Java virtual machine (hereinafter referred to as “JavaVM”; “VM” is an abbreviation of “Virtual Machine”), which is a processing system of the Java (registered trademark) language, implements a garbage collector. The garbage collector manages the memory area (hereinafter referred to as “Java heap area”) that JavaVM reserves for storing objects, and dynamically creates objects (memory areas to which objects are allocated) during program execution. Among them, objects that are no longer needed (the memory area to which they are allocated) are dynamically released by garbage collection (hereinafter referred to as “GC”; “GC” is an abbreviation for “garbage collection”) (automatic release function) . For convenience of explanation, the release of the memory area may be described as the release of the object stored in the memory area.

このGCの方式の1つに、世代別GCがある。GCの方式として世代別GCを採用しているJavaVMでは、Javaヒープ領域をNew領域とOld領域のように世代別に分けている。さらに、New領域をEden領域とSurvivor領域に、Survivor領域をFrom領域とTo領域のように分けている。   One of the GC methods is generational GC. In JavaVM that uses generational GC as the GC method, the Java heap area is divided into generations, such as the New area and Old area. Furthermore, the New area is divided into an Eden area and a Survivor area, and the Survivor area is divided into a From area and a To area.

プログラム実行中に動的に生成されたオブジェクトは、最初、Eden領域に格納される。Eden領域が枯渇した場合には、ガベージコレクタが、アプリケーションプログラムの実行停止時間が短時間で済む、New領域のみを対象としたCopyGCを実行する。このCopyGCでは、レジスタ、実行時スタック、グローバル変数といったルートセットからオブジェクト参照を順次辿ることによって到達可能なオブジェクトのうち、Eden領域に格納されたオブジェクト、及び、From領域に格納されたオブジェクトをコピー先の領域にコピーする。ここで、コピー先の領域は、コピー対象のオブジェクトが一定回数以上のCopyGCを経たオブジェクト、即ち、長命なオブジェクトの場合にはOld領域である。また、一定回数以上のCopyGCを経ていないオブジェクト、即ち、まだ長命であるか否かわからないオブジェクトの場合にはTo領域である。そして、コピーされることのなかったオブジェクトを不要なオブジェクトとして解放する。なお、CopyGCの終了後には、次回のCopyGCに備え、From領域とTo領域の役割を交代する。   Objects created dynamically during program execution are initially stored in the Eden area. When the Eden area is depleted, the garbage collector executes CopyGC for the New area only, which requires only a short time to stop executing the application program. In this copy garbage collection, the objects stored in the Eden area and the objects stored in the From area among the objects that can be reached by sequentially tracing object references from the root set such as registers, runtime stacks, and global variables are copied to Copy to the area. Here, the copy destination area is an Old area when the object to be copied has undergone CopyGC more than a certain number of times, that is, a long-lived object. In addition, the To region is used for an object that has not passed CopyGC more than a certain number of times, that is, an object that is not yet long-lived. Then, an object that has not been copied is released as an unnecessary object. Note that after the end of CopyGC, the roles of the From area and To area are changed in preparation for the next CopyGC.

他方、Old領域が枯渇した場合には、ガベージコレクタが、アプリケーションプログラムの実行停止時間が長時間に及ぶ、New領域とOld領域の両方を含む全領域を対象としたFullGCを実行する。このFullGCでは、ルートセットからオブジェクト参照を順次辿ることによって到達可能なオブジェクトに対して、プログラムの実行に必要なオブジェクトであることを示す印をつけていく。そして、ルートセットから到達可能なオブジェクトを全て辿った後で、印のついていないオブジェクトを不要なオブジェクトとして解放する。   On the other hand, when the Old area is depleted, the garbage collector executes FullGC for the entire area including both the New area and the Old area where the execution stop time of the application program is long. In this FullGC, objects that can be reached by sequentially tracing object references from the root set are marked as being necessary for program execution. Then, after all the reachable objects are traced from the root set, the objects not marked are released as unnecessary objects.

近年、先に説明したJava を基盤としたシステム(以下、「Javaシステム」という。)は、金融系や基幹系といった24時間、365日、正常に機能し続けなければならない等のミッションクリティカルな分野でも利用されることが多くなっている。また、Javaシステムは大規模化、複雑化の傾向にあり、扱うデータ量も増加している。しかし、Javaヒープ領域を大きくすると、ガベージコレクタが処理しなければならないデータ量も多くなるため、GCの発生による業務プログラムの実行停止時間が長時間化する傾向にある。そのため、JavaシステムにおけるGCの発生、特に、FullGCの発生が大きな問題の1つになっている。   In recent years, the Java-based system described above (hereinafter referred to as “Java system”) is a mission-critical field that must continue to function normally for 24 hours, 365 days, such as the financial and mission critical systems. But it is increasingly used. Java systems are also becoming larger and more complex, and the amount of data handled is also increasing. However, if the Java heap area is increased, the amount of data that the garbage collector must process increases, so the business program execution stop time tends to increase due to the occurrence of GC. Therefore, the occurrence of GC in the Java system, especially the occurrence of FullGC, is one of the major problems.

この問題を解決する方法として、特許文献1に開示されている方法が知られている。特許文献1に開示されている方法では、JavaVMは、GCによるオブジェクト解放の対象となるJavaヒープ領域の他に、GCによらないオブジェクト解放の対象となるヒープ領域(以下、「外部ヒープ領域」という。)を有する。外部ヒープ領域は、プログラム開発者によるメモリ管理が可能な領域であり、外部ヒープ領域に対するオブジェクトの生成、及び、解放は、プログラム開発者によるプログラムソースコード記述に従うようになっている。即ち、ガベージコレクタによる自動メモリ管理に対して、プログラムソースコード記述による明示的なメモリ管理(以下、「明示メモリ管理」という。)を行うことができる。   As a method for solving this problem, a method disclosed in Patent Document 1 is known. In the method disclosed in Patent Document 1, JavaVM, in addition to a Java heap area that is a target for object release by GC, a heap area that is a target for object release not by GC (hereinafter referred to as “external heap area”). .) The external heap area is an area that can be managed by a program developer, and the creation and release of an object for the external heap area follows the program source code description by the program developer. That is, it is possible to perform explicit memory management (hereinafter referred to as “explicit memory management”) by program source code description for automatic memory management by the garbage collector.

プログラム開発者は、外部ヒープ領域内の外部ヒープにオブジェクトを生成するようプログラムソースコードを記述することによって、プログラム実行中、必要に応じて外部ヒープが確保され、その外部ヒープにオブジェクトが生成される。また、外部ヒープに格納されたオブジェクトを解放するため、その外部ヒープを解放するようプログラムソースコードを記述することによって、外部ヒープの解放が実行される。外部ヒープの解放では、解放対象の外部ヒープに以降のプログラム実行において必要なオブジェクトが存在するか否かをチェックする。チェックの結果、必要なオブジェクトが存在しない場合には、その外部ヒープを解放する。また、必要なオブジェクトが存在する場合には、解放対象の外部ヒープとは別のヒープ領域にそのオブジェクトを移動した上で、その外部ヒープを解放する。そして、外部ヒープを解放することによって、その外部ヒープに格納されたオブジェクトをGCによらず解放する。長命なオブジェクトを外部ヒープに確保、及び、外部ヒープで解放することによって、Old領域の使用量が抑えられ、Old領域の枯渇によるFullGCの発生を抑止することができる。   The program developer writes the program source code to generate an object in the external heap in the external heap area, so that the external heap is secured as needed during program execution, and the object is generated in the external heap. . Moreover, in order to release the object stored in the external heap, the external heap is released by writing the program source code so as to release the external heap. In releasing the external heap, it is checked whether or not an object necessary for subsequent program execution exists in the external heap to be released. If the required object does not exist as a result of the check, the external heap is released. If a necessary object exists, the object is moved to a heap area different from the external heap to be released, and then the external heap is released. Then, by releasing the external heap, the objects stored in the external heap are released regardless of the GC. By securing a long-lived object in the external heap and releasing it in the external heap, the usage amount of the Old area can be suppressed, and the occurrence of FullGC due to the exhaustion of the Old area can be suppressed.

特開2009−37547号公報JP 2009-37547 A

Old領域の枯渇によるFullGCの発生を抑止するために外部ヒープ領域を利用する場合、プログラム開発者は、プログラム実行時のオブジェクトの寿命を推定し、外部ヒープ領域に格納すべき長命なオブジェクトが外部ヒープ領域に格納されるように、プログラムソースコードを記述する必要がある。しかし、オジェクトの寿命を推定するためには、プログラム実行時のオブジェクトの参照関係に基づくオブジェクトのライフサイクルを考慮する必要があり、高度な知識と経験が必要である。
また、Javaシステムの大規模化や複雑化、複数人分担によるプログラム開発、及び、プログラムソースコードに記述されていない暗黙的なオブジェクト生成とオブジェクト参照の存在といった様々な理由によって、プログラム開発者が、プログラム実行時に動的に変化するオブジェクトの参照関係を予め把握することは極めて困難である。そのため、外部ヒープ領域に格納すべき長命なオブジェクトであっても、実際は外部ヒープ領域に格納できていないオブジェクトが存在する可能性がある。逆に、このようなオブジェクトを動的に検出し外部ヒープ領域に格納できれば、FullGCの発生をさらに抑止できる。
When using an external heap area to prevent the occurrence of FullGC due to the depletion of the Old area, the program developer estimates the lifetime of the object when the program is executed, and the long-lived object to be stored in the external heap area is the external heap. It is necessary to write program source code to be stored in the area. However, in order to estimate the life of an object, it is necessary to consider the life cycle of the object based on the reference relationship of the object at the time of program execution, and advanced knowledge and experience are required.
In addition, for various reasons such as the large scale and complexity of Java systems, program development by sharing of multiple people, and the existence of implicit object generation and object references not described in the program source code, the program developer It is extremely difficult to grasp in advance the reference relationship of objects that dynamically change during program execution. Therefore, even a long-lived object that should be stored in the external heap area may actually be an object that cannot be stored in the external heap area. Conversely, if such an object can be detected dynamically and stored in the external heap area, the occurrence of FullGC can be further suppressed.

本発明の目的は、外部ヒープ領域に格納すべき長命なオブジェクトの多くを動的に検出できるようにすること、それらオブジェクトを外部ヒープ領域に格納できるようにすることである。   An object of the present invention is to make it possible to dynamically detect many long-lived objects to be stored in the external heap area and to store these objects in the external heap area.

上記目的を達成するために、本発明は、Javaシステムのような、メモリ管理機構を備える言語処理実行システムにおいて、まず、FullGCによってOld領域で解放される長命なオブジェクトの参照関係を解析することで、参照関係のルートに当たるオブジェクト(以下、「起点オブジェクト」という。)を動的に検出する。次に、オブジェクト生成命令ごとに、そのオブジェクト生成命令によって生成した起点オブジェクトがFullGCによってOld領域で解放される割合をプロファイリングすることで、長命な起点オブジェクトを生成しているオブジェクト生成命令を検出する。そして、長命な起点オブジェクトを生成しているオブジェクト生成命令については、そのオブジェクト生成先を外部ヒープに変更し、起点オブジェクトを外部ヒープ領域に生成するようにする。さらに、起点オブジェクトから参照されているオブジェクト(以下、「メンバオブジェクト」という。)について、メンバオブジェクトがCopyGCによるNew領域からOld領域への移動対象となった場合には、起点オブジェクトが解放されることによって一緒に解放される割合の高いメンバオブジェクトを起点オブジェクトと同じ外部ヒープに移動させる。
このようにして、外部ヒープ領域に格納すべき長命なオブジェクトを外部ヒープ領域に格納することができるので、GCの発生、特に、FullGCの発生を抑止することができる。
詳細は後記する。
In order to achieve the above object, the present invention, in a language processing execution system having a memory management mechanism such as a Java system, first analyzes the reference relationship of a long-lived object released in the Old area by FullGC. The object corresponding to the root of the reference relationship (hereinafter referred to as “starting object”) is dynamically detected. Next, for each object generation instruction, profiling the rate at which the starting object generated by the object generation instruction is released in the Old area by FullGC, thereby detecting the object generation instruction generating the long-lived starting object. Then, for an object generation instruction that generates a long-lived starting point object, the object generation destination is changed to the external heap, and the starting point object is generated in the external heap area. Furthermore, for an object referenced from the origin object (hereinafter referred to as “member object”), the origin object is released when the member object is moved from the New area to the Old area by CopyGC. Move the member objects that are released at a high rate to the same external heap as the origin object.
In this way, since a long-lived object to be stored in the external heap area can be stored in the external heap area, the occurrence of GC, in particular, the occurrence of FullGC can be suppressed.
Details will be described later.

本発明によれば、外部ヒープ領域に格納すべき長命のオブジェクトの多くを動的に検出し、実際に外部ヒープ領域に格納することができる。   According to the present invention, many long-lived objects to be stored in the external heap area can be dynamically detected and actually stored in the external heap area.

本発明の実施の形態のJavaVMが動作する計算機システム101の構成、及び、入出力データを示す図である。It is a figure which shows the structure of the computer system 101 with which JavaVM of embodiment of this invention operate | moves, and input-output data. Java言語により記述されたJavaソースファイル104の例を示す図である。It is a figure which shows the example of the Java source file 104 described by the Java language. 本発明の実施の形態のオブジェクト解析情報126の一例を示す図である。It is a figure which shows an example of the object analysis information 126 of embodiment of this invention. 本発明の実施の形態のオブジェクト生成情報テーブル301の一例を示す図である。It is a figure which shows an example of the object generation information table 301 of embodiment of this invention. 本発明の実施の形態のオブジェクトプロファイリング情報テーブル302の一例を示す図である。It is a figure which shows an example of the object profiling information table 302 of embodiment of this invention. 本発明の実施の形態のメンバオブジェクト情報303の一例を示す図である。It is a figure which shows an example of the member object information 303 of embodiment of this invention. 本発明の実施の形態のオブジェクトプロファイリング用オブジェクトのデータ構造の一例を示す図であるIt is a figure which shows an example of the data structure of the object for object profiling of embodiment of this invention. 本発明の実施の形態のオブジェクト種別ビットの一例を示す図である。It is a figure which shows an example of the object classification bit of embodiment of this invention. 本発明の実施の形態の外部ヒープ117のデータ構造の一例を示す図である。It is a figure which shows an example of the data structure of the external heap 117 of embodiment of this invention. 本発明の実施の形態のFullGC処理1703のステップ1801の処理の終了時点におけるJavaヒープ領域115のOld領域に格納されたオブジェクトの状態を示す図である。It is a figure which shows the state of the object stored in the Old area | region of the Java heap area | region 115 in the time of completion | finish of the process of step 1801 of the FullGC process 1703 of embodiment of this invention. 本発明の実施の形態のオブジェクトプロファイリング処理1803のステップ1901からステップ1904までの処理を実行することによって、起点オブジェクトを特定する具体的な手順を示す図である。It is a figure which shows the specific procedure which specifies an origin object by performing the process from step 1901 of step 1901 of the object profiling process 1803 of embodiment of this invention. 本発明の実施の形態のCopyGC処理におけるメンバオブジェクトの移動の手順を説明するための図である。It is a figure for demonstrating the procedure of the movement of the member object in the CopyGC process of embodiment of this invention. 本発明の実施の形態のバイトコード読み込み処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the bytecode reading process of embodiment of this invention. 本発明の実施の形態のオブジェクト生成先変更処理1303の手順を示すフローチャートである。It is a flowchart which shows the procedure of the object production | generation destination change process 1303 of embodiment of this invention. 本発明の実施の形態のメソッド実行処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the method execution process of embodiment of this invention. 本発明の実施の形態のオブジェクト生成処理1502の手順を示すフローチャートである。It is a flowchart which shows the procedure of the object production | generation process 1502 of embodiment of this invention. 本発明の実施の形態のGC処理1602の手順を示すフローチャートである。It is a flowchart which shows the procedure of GC process 1602 of embodiment of this invention. 本発明の実施の形態のFullGC処理1703の手順を示すフローチャートである。It is a flowchart which shows the procedure of the FullGC process 1703 of embodiment of this invention. 本発明の実施の形態のオブジェクトプロファイリング処理1803の手順を示すフローチャートである。It is a flowchart which shows the procedure of the object profiling process 1803 of embodiment of this invention. 本発明の実施の形態のメンバオブジェクト処理1904の手順を示すフローチャートである。It is a flowchart which shows the procedure of the member object process 1904 of embodiment of this invention. 本発明の実施の形態のCopyGC処理1702の手順を示すフローチャートである。It is a flowchart which shows the procedure of CopyGC process 1702 of embodiment of this invention. 本発明の実施の形態のメンバオブジェクト移動処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the member object movement process of embodiment of this invention. 本発明の実施の形態のネットワーク構成を示す図である。It is a figure which shows the network structure of embodiment of this invention.

以下、本発明を実施するための形態として、JavaVMを例に、適宜図面を参照して詳細に説明する。
図1は、本発明の実施の形態のJavaVMが動作する計算機システム101の構成、及び、入出力データを示す図である。
Hereinafter, as a mode for carrying out the present invention, a Java VM will be described as an example in detail with reference to the drawings as appropriate.
FIG. 1 is a diagram showing a configuration of a computer system 101 on which Java VM according to the embodiment of this invention operates, and input / output data.

計算機システム(情報処理装置)101では、Java言語によって記述されたJavaソースファイル104がJavaコンパイラ109によってコンパイルされることによって、JavaVM110がインタプリタ実行により解釈、及び、実行可能な形式であるバイトコードで記述されたJavaクラスファイル103が生成される。さらに、Javaクラスファイル103がJavaVM110によって実行されることで、所定の業務処理が実行される。従って、Javaクラスファイル103は、前記所定の業務処理を実行するためのプログラムといえる。   In the computer system (information processing apparatus) 101, the Java source file 104 described in the Java language is compiled by the Java compiler 109, so that the Java VM 110 is interpreted by interpreter execution and is described in byte code which is an executable format. A Java class file 103 is generated. Furthermore, a predetermined business process is executed by executing the Java class file 103 by the Java VM 110. Therefore, the Java class file 103 can be said to be a program for executing the predetermined business process.

計算機システム101は、プロセッサ(制御部)129、主記憶(記憶部)107、補助記憶(記憶部)102、入力装置130、及び、出力装置131といったハードウェア資源を含む。プロセッサ129、主記憶107、補助記憶102、入力装置130、及び、出力装置131は、バス128を介して互いに接続される。   The computer system 101 includes hardware resources such as a processor (control unit) 129, a main storage (storage unit) 107, an auxiliary storage (storage unit) 102, an input device 130, and an output device 131. The processor 129, the main memory 107, the auxiliary memory 102, the input device 130, and the output device 131 are connected to each other via a bus 128.

プロセッサ129は、主記憶107に記憶された各種プログラムを実行することによって各種処理を実行する。
主記憶107は、プログラム、プログラムの実行に必要な情報、及び、プログラムの処理結果を記憶する。主記憶107は、揮発性メモリであってもよいし、不揮発性メモリであってもよい。主記憶107は、Javaコンパイラ109、JavaVM110、データ領域108、及び、オペレーティングシステム127を記憶する。
The processor 129 executes various processes by executing various programs stored in the main memory 107.
The main memory 107 stores programs, information necessary for program execution, and program processing results. The main memory 107 may be a volatile memory or a non-volatile memory. The main memory 107 stores a Java compiler 109, a Java VM 110, a data area 108, and an operating system 127.

補助記憶102は、業務処理の実行に使用されるJavaクラスファイル103、このJavaクラスファイル103を生成するためのJavaソースファイル104、オブジェクト解析情報126の保存に使用されるオブジェクト解析情報ファイル105、及び、JavaVM110の動作を制御するフラグやパラメータの閾値を記録する設定ファイル106を含む。   The auxiliary storage 102 includes a Java class file 103 used for executing business processing, a Java source file 104 for generating the Java class file 103, an object analysis information file 105 used for storing object analysis information 126, and And a setting file 106 for recording a flag for controlling the operation of the Java VM 110 and a threshold value of the parameter.

入力装置130は、計算機システム101に必要な情報を入力するためのインタフェースである。入力装置130は、例えば、キーボード、又は、マウスなどである。
出力装置131は、処理結果などの情報を外部に出力する装置である。出力装置131は、例えば、ディスプレイなどである。
The input device 130 is an interface for inputting necessary information to the computer system 101. The input device 130 is, for example, a keyboard or a mouse.
The output device 131 is a device that outputs information such as processing results to the outside. The output device 131 is, for example, a display.

データ領域108は、プログラムの実行に必要な情報、及び、プログラムの処理結果が記憶される領域である。データ領域108は、メソッドのバイトコードであるバイトコード情報112、GC対象のオブジェクト格納領域であるJavaヒープ領域(第1のメモリ領域)115、GC対象外のオブジェクト格納領域である外部ヒープ領域(第2のメモリ領域)116、及び、オブジェクトの生成に係る情報やオブジェクトのプロファイリングに係る情報などであるオブジェクト解析情報126を含む。外部ヒープ領域116は、さらに、外部ヒープ1(117)、外部ヒープ2(118)、外部ヒープ3(119)、・・・といったように、外部ヒープ領域116内で必要に応じて確保と解放が可能な領域を含む。   The data area 108 is an area for storing information necessary for program execution and the processing result of the program. The data area 108 includes byte code information 112 that is a byte code of a method, a Java heap area (first memory area) 115 that is an object storage area for GC, and an external heap area (first memory area that is an object storage area that is not GC target). 2 memory area) 116, and object analysis information 126 such as information related to object generation and object profiling. The external heap area 116 is further secured and released as needed in the external heap area 116, such as the external heap 1 (117), the external heap 2 (118), the external heap 3 (119), and so on. Includes possible areas.

ここで、主記憶107に記憶されるJavaVM110について説明する。JavaVM110は、不要になったメモリ領域を動的に解放するメモリ管理機構を備える言語処理実行システムである。   Here, the Java VM 110 stored in the main memory 107 will be described. The JavaVM 110 is a language processing execution system including a memory management mechanism that dynamically releases a memory area that is no longer needed.

JavaVM110は、バイトコード読み込み部111、オブジェクト生成先変更部113、メソッド実行部114、メモリ管理部120、及び、オブジェクト解析部125を含む。バイトコード読み込み部111、オブジェクト生成先変更部113、メソッド実行部114、メモリ管理部120、及び、オブジェクト解析部125は、プロセッサ129によって実行されるプログラムである。   The Java VM 110 includes a bytecode reading unit 111, an object generation destination changing unit 113, a method executing unit 114, a memory managing unit 120, and an object analyzing unit 125. The bytecode reading unit 111, the object generation destination changing unit 113, the method execution unit 114, the memory management unit 120, and the object analysis unit 125 are programs executed by the processor 129.

バイトコード読み込み部111は、JavaVM110が受け付けたJavaクラスファイル103からメソッドのバイトコードを読み込み、データ領域108に当該メソッドに係るバイトコード情報112を生成する。その際、オブジェクト生成先変更部113を実行することによってバイトコード情報112に存在するオブジェクト生成命令のオブジェクト生成先を変更する場合や、バイトコード情報112に係るオブジェクト解析情報126を生成、更新する場合がある。バイトコード読み込み部111の処理の詳細は、図13で説明する。   The bytecode reading unit 111 reads the bytecode of the method from the Java class file 103 received by the JavaVM 110 and generates bytecode information 112 related to the method in the data area 108. At that time, when the object generation destination of the object generation instruction existing in the bytecode information 112 is changed by executing the object generation destination changing unit 113, or when the object analysis information 126 related to the bytecode information 112 is generated and updated. There is. Details of the processing of the bytecode reading unit 111 will be described with reference to FIG.

オブジェクト生成先変更部113は、オブジェクト生成情報テーブル301(図4参照)を参照して、オブジェクト生成命令に係るオブジェクト生成先を、適宜、Javaヒープ領域115から外部ヒープ領域116に変更する。オブジェクト生成先変更部113の処理の詳細は、図14で説明する。   The object generation destination changing unit 113 refers to the object generation information table 301 (see FIG. 4) and appropriately changes the object generation destination related to the object generation instruction from the Java heap area 115 to the external heap area 116. Details of the processing of the object generation destination changing unit 113 will be described with reference to FIG.

メソッド実行部114は、バイトコード情報112の各命令に従い、メソッドを実行する。そして、次に実行する命令がオブジェクト生成命令の場合には、オブジェクト生成部121にオブジェクト生成処理を要求する(オブジェクト生成処理要求)。メソッド実行部114は、最初、メソッドをインタプリタ実行する。一方、インタプリタ実行において実行頻度が高いメソッドについては、バイトコード情報112の命令列を動的にコンパイルし、メソッドをコンパイルコード実行する。なお、メソッド実行部114は、最初から最後までメソッドをインタプリタ実行してもよいし、最初からコンパイルコード実行してもよい。また、メソッド実行部114が、メソッドをコンパイルコード実行している途中で、バイトコード情報112が書き換えられた場合、メソッド実行部114は、メソッドをコンパイルコード実行するのを止め、インタプリタ実行に一旦戻り処理を継続する場合もある。メソッド実行部114の処理の詳細は、図15で説明する。   The method execution unit 114 executes the method according to each instruction of the bytecode information 112. When the next instruction to be executed is an object generation instruction, the object generation unit 121 is requested to perform object generation processing (object generation processing request). The method execution unit 114 first executes the method as an interpreter. On the other hand, for methods that are frequently executed in interpreter execution, the instruction sequence of the bytecode information 112 is dynamically compiled, and the method is compiled code execution. Note that the method execution unit 114 may interpret the method from the beginning to the end, or may execute the compiled code from the beginning. Also, when the method execution unit 114 is executing the compile code of the method and the bytecode information 112 is rewritten, the method execution unit 114 stops executing the compile code of the method and temporarily returns to interpreter execution. Processing may continue. Details of the process of the method execution unit 114 will be described with reference to FIG.

メモリ管理部120は、JavaVM110で使用するメモリ領域を管理する。メモリ管理部120は、オブジェクト生成部121、及び、GC部122を含む。   The memory management unit 120 manages a memory area used by the Java VM 110. The memory management unit 120 includes an object generation unit 121 and a GC unit 122.

オブジェクト生成部121は、メソッド実行部114からのオブジェクト生成処理要求を受け付けると、オブジェクト生成処理要求の内容に従い、Javaヒープ領域115、又は、外部ヒープ領域116へのオブジェクト生成を試みる。ここで、オブジェクトを生成する領域に空きがあり、オブジェクト生成に成功した場合には、生成したオブジェクトを呼び元に返却する。
一方、Javaヒープ領域115に空きがなく、Javaヒープ領域115へのオブジェクト生成に失敗した場合には、GC部122にGC処理を要求し(GC処理要求)、GC部122がGC処理を実行し、Javaヒープ領域115で不要になったメモリ領域を解放する。そして、再びオブジェクト生成を試み、さらに失敗した場合にはメモリ不足エラーを発生させる。
また、外部ヒープ領域116に空きがなく、外部ヒープ領域116へのオブジェクト生成に失敗した場合には、Javaヒープ領域115へのオブジェクト生成を試みる。さらにJavaヒープ領域115へのオブジェクト生成にも失敗した場合には、GC部122にGC処理を要求し、GC部122がGC処理を実行し、Javaヒープ領域115で不要になったメモリ領域を解放する。そして、再びオブジェクト生成を試み、さらに失敗した場合にはメモリ不足エラーを発生させる。
When the object generation unit 121 receives the object generation processing request from the method execution unit 114, the object generation unit 121 attempts to generate an object in the Java heap area 115 or the external heap area 116 in accordance with the content of the object generation processing request. Here, when the area for generating the object is empty and the object generation is successful, the generated object is returned to the caller.
On the other hand, when there is no free space in the Java heap area 115 and object generation to the Java heap area 115 fails, the GC unit 122 is requested to perform a GC process (GC process request), and the GC unit 122 executes the GC process. The memory area that is no longer necessary in the Java heap area 115 is released. Then, the object generation is attempted again, and if it further fails, an error of insufficient memory is generated.
If there is no free space in the external heap area 116 and the object generation in the external heap area 116 fails, the object generation in the Java heap area 115 is attempted. Furthermore, when the object generation to the Java heap area 115 also fails, the GC section 122 is requested to perform the GC process, and the GC section 122 executes the GC process to release the memory area that is no longer needed in the Java heap area 115. To do. Then, the object generation is attempted again, and if it further fails, an error of insufficient memory is generated.

なお、オブジェクト生成部121は、生成したオブジェクトに対し、当該オブジェクト生成命令によって生成されたオブジェクトであることを識別するためのオブジェクトIDを生成したオブジェクトに記録し、当該オブジェクト生成命令によってオブジェクトを生成したことをオブジェクトプロファイリング情報テーブル302(図5参照)に記録する場合がある。オブジェクト生成部121の処理の詳細は、図16で説明する。   The object generation unit 121 records an object ID for identifying the generated object as an object generated by the object generation instruction in the generated object, and generates the object by the object generation instruction. This may be recorded in the object profiling information table 302 (see FIG. 5). Details of the processing of the object generation unit 121 will be described with reference to FIG.

GC部122は、CopyGC部124、及び、FullGC部123を含む。GC部122は、オブジェクト生成部121からのGC処理要求を受け付けると、New領域が枯渇している場合にはCopyGC部124、Old領域が枯渇している場合にはFullGC部123に対して、実際のGC処理を要求する。GC部122の処理の詳細は、図16で説明する。   The GC unit 122 includes a CopyGC unit 124 and a FullGC unit 123. When the GC unit 122 receives the GC processing request from the object generation unit 121, the GC unit 122 actually sends the copy GC unit 124 when the New region is exhausted and the FullGC unit 123 when the Old region is exhausted. Request GC processing. Details of the processing of the GC unit 122 will be described with reference to FIG.

CopyGC部124は、GC部122からのGC処理要求を受け付けると、Javaヒープ領域115内のNew領域のみを対象としたCopyGCを実行する。その際、CopyGCによってJavaヒープ領域115のNew領域からOld領域の移動対象となったオブジェクトをNew領域から外部ヒープ117(外部ヒープ領域116内に確保した外部ヒープの一つであり、「外部ヒープ1」と称する場合もある。)に移動させる場合や、不要な外部ヒープ117を解放する場合、及び、オブジェクト生成先変更部113を実行することによってバイトコード情報112に存在するオブジェクト生成命令のオブジェクト生成先を変更する場合がある。CopyGC部124の処理の詳細は、図21で説明する。   When the copy GC unit 124 receives a GC processing request from the GC unit 122, the copy GC unit 124 executes a copy GC for only the New area in the Java heap area 115. At this time, the object that has been moved from the New area to the Old area of the Java heap area 115 by CopyGC is an external heap 117 (one of the external heaps secured in the external heap area 116 from the New area. ), When unnecessary external heap 117 is released, and by executing the object generation destination changing unit 113, the object generation instruction of the object generation instruction existing in the bytecode information 112 is generated. The destination may be changed. Details of the processing of the CopyGC unit 124 will be described with reference to FIG.

FullGC部123は、GC部122からのGC処理要求を受け付けると、Javaヒープ領域115内のNew領域とOld領域を含む、GC対象の全領域を対象としたFullGCを実行する。その際、オブジェクト解析部125を実行し、オブジェクトプロファイリング処理を実行する場合がある。FullGC部123の処理の詳細は、図18で説明する。   When receiving the GC processing request from the GC unit 122, the Full GC unit 123 executes Full GC for all the GC target areas including the New area and the Old area in the Java heap area 115. At this time, the object analysis unit 125 may be executed to execute object profiling processing. Details of the processing of the FullGC unit 123 will be described with reference to FIG.

オブジェクト解析部125は、FullGCによってOld領域で解放される長命なオブジェクトの参照関係を解析することで、参照関係のルートに当たる起点オブジェクトを動的に検出する。そして、オブジェクト生成命令ごとに、そのオブジェクト生成命令によって生成した起点オブジェクトがFullGCによってOld領域で解放された回数をプロファイリングする。また、起点オブジェクトから参照されているメンバオブジェクトについて、起点オブジェクトが解放されたことによってメンバオブジェクトも一緒に解放された回数をプロファイリングする。オブジェクト解析部125の処理の詳細は、図19で説明する。   The object analysis unit 125 dynamically detects the starting object corresponding to the root of the reference relationship by analyzing the reference relationship of the long-lived object released in the Old area by FullGC. Then, for each object generation instruction, the number of times the starting object generated by the object generation instruction is released in the Old area by FullGC is profiled. For the member object referenced from the starting point object, the number of times that the member object is released together with the starting point object being released is profiled. Details of the processing of the object analysis unit 125 will be described with reference to FIG.

なお、JavaVM110は、動作を制御するためのフラグ(以下、「設定フラグ」という。)やパラメータの閾値(以下、「設定閾値」という。)をもつ。そして、設定フラグや設定閾値のデフォルト値は、設定ファイル106や入力装置130で指定することによって変更することができる。   The Java VM 110 has a flag for controlling the operation (hereinafter referred to as “setting flag”) and a parameter threshold value (hereinafter referred to as “setting threshold value”). The default values of the setting flag and the setting threshold value can be changed by specifying them in the setting file 106 or the input device 130.

JavaVM110は、FullGCによってOld領域で解放される長命なオブジェクトの参照関係を解析することで、外部ヒープ領域116に格納すべきオブジェクトを検出し、それらオブジェクトを外部ヒープ領域116に格納していくことで、FullGCを抑止していく。一方、FullGCによってOld領域で解放される長命なオブジェクトの参照関係の解析結果を記録したオブジェクト解析情報ファイル105を使用し、設定フラグによるJavaVM110の動作変更によって、外部ヒープ領域116に格納すべきオブジェクトを検出するためのオブジェクトプロファイリングを行わないようにし、JavaVM110の起動時からFullGCを抑止した状態で実行してもよい。   The JavaVM 110 detects the objects to be stored in the external heap area 116 by analyzing the reference relationship of the long-lived objects released in the Old area by FullGC, and stores these objects in the external heap area 116. , FullGC will be suppressed. On the other hand, by using the object analysis information file 105 in which the analysis result of the reference relation of a long-lived object released in the Old area by FullGC is used, the object to be stored in the external heap area 116 is changed by the operation change of the Java VM 110 by the setting flag. The object profiling for detection may not be performed, and the execution may be performed in a state in which FullGC is suppressed from the time when the Java VM 110 is activated.

図2は、Java言語により記述されたJavaソースファイル104の例を示す図である。
1行目から17行目は、Sampleクラスの内容を示している。
3行目から9行目、及び、11行目から15行目は、それぞれ、methodA()メソッド、及び、methodB()メソッドの処理の内容を示している。
5行目、及び、13行目は、クラスの型がClassAであるオブジェクトをJavaヒープ領域115に生成することをnew演算子により指示している。また、6行目は、クラスの型がClassZであるオブジェクトをJavaヒープ領域115に生成することをnew演算子により指示している。これにより、例えばmethodA()を5回実行すると、クラスの型がClassAであるオブジェクトが5個、クラスの型がClassZであるオブジェクトが5個、それぞれ生成される。さらにmethodB()を10回実行すると、クラスの型がClassAであるオブジェクトがもう10個生成される。
FIG. 2 is a diagram illustrating an example of the Java source file 104 described in the Java language.
Lines 1 to 17 show the contents of the Sample class.
The third to ninth lines and the eleventh to fifteenth lines indicate the contents of the processing of the methodA () method and the methodB () method, respectively.
Lines 5 and 13 use the new operator to instruct the Java heap area 115 to generate an object whose class type is ClassA. The 6th line instructs the new operator to generate an object whose class type is ClassZ in the Java heap area 115. Thus, for example, when methodA () is executed five times, five objects whose class type is ClassA and five objects whose class type is ClassZ are generated. If methodB () is executed 10 more times, another 10 objects whose class type is ClassA are generated.

ここで、methodA()とmethodB()の実行により、クラスの型が同じClassAであるオブジェクトが生成されるが、methodA()の5行目で生成を指示されたオブジェクトと、methodB()の13行目で生成を指示されたオブジェクトとでは、クラスの型が同じClassAであっても同じようなオブジェクトの寿命になるとは限らない。一方、methodA()の実行により、methodA()の5行目で生成を指示された5個のオブジェクトについては、methodA()の同じ処理により生成されたオブジェクトであるため、同じようなオブジェクトの寿命になる可能性が高いと言える。   Here, by executing methodA () and methodB (), an object having the same class type, ClassA, is generated, but the object instructed for generation in the fifth line of methodA () and 13 of methodB () For an object that is instructed to generate on the line, even if the class type is the same ClassA, the lifetime of the same object is not necessarily the same. On the other hand, the five objects that are instructed to be generated in the fifth line of methodA () by the execution of methodA () are objects generated by the same process of methodA (), and therefore, the lifetime of similar objects. It can be said that there is a high possibility of becoming.

オブジェクトプロファイリングでは、クラスの型が同じであっても、オブジェクトの生成を指示された場所が異なるオブジェクトは区別することで、より詳細にオブジェクトをプロファイリングすることができる。   In object profiling, even if the class type is the same, it is possible to profile objects in more detail by distinguishing objects that differ in the location where the generation of the object is directed.

図3は、本発明の実施の形態のオブジェクト解析情報126の一例を示す図である。
オブジェクト解析情報126は、バイトコード情報112に係るオブジェクト解析の情報を格納しており、オブジェクト生成情報テーブル301、オブジェクトプロファイリング情報テーブル302、及び、メンバオブジェクト情報303を含む。メンバオブジェクト生成情報テーブル301、オブジェクトプロファイリング情報テーブル302、及び、メンバオブジェクト情報303の詳細は、それぞれ、図4、図5、及び、図6で説明する。
FIG. 3 is a diagram illustrating an example of the object analysis information 126 according to the embodiment of this invention.
The object analysis information 126 stores object analysis information related to the bytecode information 112, and includes an object generation information table 301, an object profiling information table 302, and member object information 303. Details of the member object generation information table 301, the object profiling information table 302, and the member object information 303 will be described with reference to FIGS. 4, 5, and 6, respectively.

図4は、本発明の実施の形態のオブジェクト生成情報テーブル301の一例を示す図である。
オブジェクト生成情報テーブル301の各行は、オブジェクト生成命令に係る情報を格納しており、オブジェクト生成命令アドレス401、オブジェクトID(Identifier)402、クラス名403、及び、オブジェクト生成先404を含む。
FIG. 4 is a diagram illustrating an example of the object generation information table 301 according to the embodiment of this invention.
Each row of the object generation information table 301 stores information related to an object generation command, and includes an object generation command address 401, an object ID (Identifier) 402, a class name 403, and an object generation destination 404.

オブジェクト生成命令アドレス401は、オブジェクト生成命令の位置を格納する。オブジェクト生成命令の位置は、例えば、図2に示すJavaソースファイル104の例におけるnew演算子のようなオブジェクト生成指示に対応するバイトコード情報112内のオブジェクト生成命令が存在するアドレスである。なお、オブジェクト解析情報126をオブジェクト解析情報ファイル105に保存する場合など、オブジェクト生成命令の位置は、バイトコード情報112の先頭からオブジェクト生成命令が存在する位置までのオフセットで示される場合もある。   The object generation instruction address 401 stores the position of the object generation instruction. The position of the object generation instruction is, for example, an address where the object generation instruction exists in the bytecode information 112 corresponding to the object generation instruction such as the new operator in the example of the Java source file 104 shown in FIG. Note that, for example, when the object analysis information 126 is stored in the object analysis information file 105, the position of the object generation instruction may be indicated by an offset from the beginning of the bytecode information 112 to the position where the object generation instruction exists.

オブジェクトID402は、オブジェクト生成命令ごとに割当てられる一意の値を格納する。そして、オブジェクトプロファイリング処理の対象であるオブジェクトのオブジェクトIDフィールド702(図7参照)に、当該オブジェクトを生成したオブジェクト生成命令に係るオブジェクトID402が格納される。これにより、オブジェクトがどのオブジェクト生成命令によって生成されたかを判別できる。例えば、図2に示すJavaソースファイル104の例において、5行目で生成を指示されたクラスの型がClassAであるオブジェクトと13行目で生成を指示されたクラスの型がClassAであるオブジェクトでは、オブジェクトヘッダ701に格納されたオブジェクトIDが#0、#4といったように異なる。一方、5行目で生成を指示されたクラスの型がClassAであるオブジェクトが複数存在しても、オブジェクトの生成を指示された位置が同じであるオブジェクトでは、オブジェクトIDが#0といったように同じになる。   The object ID 402 stores a unique value assigned for each object generation instruction. The object ID field 702 (see FIG. 7) of the object that is the object of the object profiling process stores the object ID 402 related to the object generation command that generated the object. Thereby, it can be determined by which object generation instruction the object is generated. For example, in the example of the Java source file 104 shown in FIG. 2, an object whose generation type is ClassA in line 5 and an object whose generation type is classA in line 13 are class A. The object IDs stored in the object header 701 are different such as # 0 and # 4. On the other hand, even if there are multiple objects whose class type is ClassA in the fifth line, the same object ID is # 0 for objects with the same position where the object is generated become.

クラス名403は、オブジェクト生成命令によって生成されるオブジェクトのクラスの型の名前を格納する。   The class name 403 stores the name of the class type of the object generated by the object generation command.

オブジェクト生成先404は、オブジェクト生成命令によって生成されるオブジェクトの生成先を格納する。オブジェクトの生成先は、初期状態では“Javaヒープ領域”となっているが、オブジェクト生成先変更部113によって、オブジェクトプロファイリング処理の結果に応じて“外部ヒープ1”などに変更される。また、オブジェクトの生成先は、“Javaヒープ固定”にすることで、オブジェクト生成先変更部113によって変更されないようにしたり、“指定外部ヒープ”にしたりすることで、明示メモリ管理API(明示メモリ管理を実行するAPIをいう。「API」は、「application programming interface」の略。)によって指定された外部ヒープにしたりすることも可能である。なお、明示メモリ管理APIによって指定された外部ヒープに生成されたオブジェクトは、明示メモリ管理APIによって解放され、不要な外部ヒープ117ごと自動的に解放されることはない。オブジェクトプロファイリング処理の詳細は、図19で説明する。   The object generation destination 404 stores the generation destination of the object generated by the object generation instruction. The object generation destination is “Java heap area” in the initial state, but is changed to “external heap 1” by the object generation destination changing unit 113 according to the result of the object profiling process. In addition, the object generation destination is set to “Java heap fixed” so that the object generation destination changing unit 113 does not change it, or “designated external heap” is set, so that the explicit memory management API (explicit memory management) API is an abbreviation for “application programming interface”.) It can also be an external heap specified by An object generated in the external heap designated by the explicit memory management API is released by the explicit memory management API, and is not automatically released for each unnecessary external heap 117. Details of the object profiling process will be described with reference to FIG.

図5は、本発明の実施の形態のオブジェクトプロファイリング情報テーブル302の一例を示す図である。
オブジェクトプロファイリング情報テーブル302は、オブジェクトID402に係るオブジェクトについてのオブジェクトプロファイリング処理の結果を格納しており、オブジェクトID501、オブジェクト生成回数502、オブジェクトプロファイリング回数503、及び、メンバオブジェクト情報アドレス504を含む。
FIG. 5 is a diagram illustrating an example of the object profiling information table 302 according to the embodiment of this invention.
The object profiling information table 302 stores the result of the object profiling process for the object associated with the object ID 402, and includes an object ID 501, an object generation count 502, an object profiling count 503, and a member object information address 504.

オブジェクトID501は、オブジェクト生成情報テーブル301の行データとオブジェクトプロファイリング情報テーブル302の行データを結びつけるためのオブジェクトIDを格納する。このオブジェクトIDをキーとした検索により、このオブジェクトIDによって識別されるオブジェクトについてのオブジェクト生成情報テーブル301の行データとオブジェクトプロファイリング情報テーブル302の行データが参照可能である。ここで、例えば、オブジェクト生成情報テーブル301の行データに対するオブジェクトプロファイリング情報テーブル302の行データを予め用意する場合、オブジェクト生成情報テーブル301の行データとオブジェクトプロファイリング情報テーブル302の行データは1対1に対応するため、オブジェクト生成情報テーブル301とオブジェクトプロファイリング情報テーブル302を1つのテーブルにまとめてしまってもよい。また、オブジェクトプロファイリング情報テーブル302のために確保するメモリ領域を節約するために、オブジェクトID402で識別されるオブジェクトが初めて生成されたとき、オブジェクト生成情報テーブル301の行データに対するオブジェクトプロファイリング情報テーブル302の行データを登録するようにしてもよい。なお、本発明の実施の形態の一例では、オブジェクト生成情報テーブル301の行データに対するオブジェクトプロファイリング情報テーブル302の行データを予め用意するが、便宜上、オブジェクト生成情報テーブル301とオブジェクトプロファイリング情報テーブル302を別々のテーブルとして示す。   The object ID 501 stores an object ID for linking the row data of the object generation information table 301 and the row data of the object profiling information table 302. By searching using this object ID as a key, the row data of the object generation information table 301 and the row data of the object profiling information table 302 for the object identified by this object ID can be referred to. Here, for example, when the row data of the object profiling information table 302 is prepared in advance for the row data of the object generation information table 301, the row data of the object generation information table 301 and the row data of the object profiling information table 302 are in a one-to-one relationship. In order to cope with this, the object generation information table 301 and the object profiling information table 302 may be combined into one table. Further, when the object identified by the object ID 402 is generated for the first time in order to save the memory area reserved for the object profiling information table 302, the row of the object profiling information table 302 with respect to the row data of the object generation information table 301 is stored. Data may be registered. In the example of the embodiment of the present invention, the row data of the object profiling information table 302 is prepared in advance for the row data of the object generation information table 301. For convenience, the object generation information table 301 and the object profiling information table 302 are separately provided. It is shown as a table.

オブジェクト生成回数502は、オブジェクトID501で識別されるオブジェクトをオブジェクトID501に係るオブジェクト生成命令によって実際に生成した回数を格納する。   The object generation number 502 stores the number of times the object identified by the object ID 501 is actually generated by the object generation command related to the object ID 501.

オブジェクトプロファイリング回数503は、オブジェクトID501で識別されるOld領域に格納してあるオブジェクトがFullGCによって解放された回数、つまり、オブジェクトID501で識別されるオブジェクトに対して、オブジェクトプロファイリング処理を実行した回数を格納する。オブジェクトプロファイリング処理の詳細は、図19で説明する。   The object profiling count 503 stores the number of times the object stored in the Old area identified by the object ID 501 has been released by FullGC, that is, the number of times the object profiling processing has been performed on the object identified by the object ID 501. To do. Details of the object profiling process will be described with reference to FIG.

メンバオブジェクト情報アドレス504は、オブジェクトID501で識別されるオブジェクトに係るメンバオブジェクト情報303のアドレスを格納する。メンバオブジェクト情報303の詳細は、図6で説明する。   The member object information address 504 stores the address of the member object information 303 related to the object identified by the object ID 501. Details of the member object information 303 will be described with reference to FIG.

図6は、本発明の実施の形態のメンバオブジェクト情報303の一例を示す図である。
メンバオブジェクト情報303は、オブジェクトプロファイリング処理によってプロファイリングされたオブジェクトの参照関係の状況についての情報を格納しており、起点オブジェクトについての情報を格納するデータ構造(以下、「起点オブジェクトデータ構造」という。)、及び、メンバオブジェクトについての情報を格納するデータ構造(以下、「メンバオブジェクトデータ構造」という。)を含む。起点オブジェクトは、オブジェクトプロファイリング処理の起点となるOld領域に格納してあるオブジェクトであり、前回のFullGCの終了後から今回のFullGCの開始前までの間に、ルートセットや必要オブジェクトから参照されなくなったオブジェクト、又は、ルートセットや必要オブジェクトから参照されなくなった可能性の高いオブジェクトである。また、メンバオブジェクトは、起点オブジェクトからオブジェクト参照を順次辿ることによって到達可能なオブジェクトのうち、起点オブジェクトがFullGCによって解放されることによって一緒に解放されるオブジェクト、又は、一緒に解放される可能性の高いオブジェクトである。オブジェクトプロファイリング処理の詳細は、図19で説明する。
FIG. 6 is a diagram showing an example of member object information 303 according to the embodiment of this invention.
The member object information 303 stores information about the state of reference relations of objects profiled by the object profiling process, and a data structure for storing information about the starting object (hereinafter referred to as “starting object data structure”). And a data structure for storing information about member objects (hereinafter referred to as “member object data structure”). The starting object is an object stored in the Old area that is the starting point of the object profiling process, and is no longer referenced from the root set or the required object after the end of the previous FullGC and before the start of the current FullGC. An object or an object that is highly likely not to be referenced from a root set or a necessary object. In addition, among the objects that can be reached by sequentially following the object reference from the starting object, member objects are objects that are released together when the starting object is released by FullGC, or may be released together. It is a high object. Details of the object profiling process will be described with reference to FIG.

本発明の実施の形態の一例では、メンバオブジェクト情報303は、起点オブジェクトデータ構造601、及び、メンバオブジェクトデータ構造602〜607がポインタによって接続された木構造として示す。また、図6において、起点オブジェクトデータ構造は二重線の長方形で示し、メンバオブジェクトデータ構造は一重線の長方形で示す。   In an example of the embodiment of the present invention, the member object information 303 is shown as a tree structure in which the starting object data structure 601 and the member object data structures 602 to 607 are connected by pointers. In FIG. 6, the starting object data structure is indicated by a double-line rectangle, and the member object data structure is indicated by a single-line rectangle.

起点オブジェクトデータ構造601は、起点オブジェクトから参照先メンバオブジェクトへの参照関係の状況を記録するために、メンバオブジェクトに対応するメンバオブジェクトデータ構造へのポインタをオブジェクト参照フィールドごとに格納する。例えば、本発明の実施の形態の一例は、起点オブジェクトデータ構造601が、メンバオブジェクトデータ構造602、及び、メンバオブジェクトデータ構造603をポインタによって接続していることを示す。   The origin object data structure 601 stores a pointer to the member object data structure corresponding to the member object for each object reference field in order to record the status of the reference relationship from the origin object to the reference member object. For example, an example of the embodiment of the present invention indicates that the starting object data structure 601 connects the member object data structure 602 and the member object data structure 603 by pointers.

メンバオブジェクトデータ構造602〜607は、メンバオブジェクトから参照先メンバオブジェクトの参照関係の状況を記録するために、参照先メンバオブジェクトに対応するメンバオブジェクトデータ構造へのポインタをオブジェクト参照フィールドごとに格納する。例えば、本発明の実施の形態の一例は、メンバオブジェクトデータ構造603が、メンバオブジェクトデータ構造605とメンバオブジェクトデータ構造606をポインタによって接続していることを示す。なお、ポインタ608は、クラスの型がClassFであるオブジェクトにオブジェクト参照フィールドは存在するが、そのオブジェクト参照フィールドによって参照しているオブジェクトは記録されていないことを示す(NULL)。   The member object data structures 602 to 607 store, for each object reference field, a pointer to the member object data structure corresponding to the reference destination member object in order to record the status of the reference relationship from the member object to the reference destination member object. For example, an example of the embodiment of the present invention indicates that the member object data structure 603 connects the member object data structure 605 and the member object data structure 606 with a pointer. The pointer 608 indicates that an object whose class type is ClassF has an object reference field, but an object referred to by the object reference field is not recorded (NULL).

また、メンバオブジェクトデータ構造602〜607は、メンバオブジェクトのクラスの型の名前と、起点オブジェクトがFullGCによって解放されたことによってメンバオブジェクトも一緒に解放された回数、つまり、起点オブジェクトに対してオブジェクトプロファイリング処理を実行したときに、メンバオブジェクトに対してもオブジェクトプロファイリング処理を実行した回数(以下、「メンバオブジェクトプロファイリング回数」という。)を格納する。例えば、本発明の実施の形態の一例は、起点オブジェクトデータ構造601によって示される起点オブジェクトがFullGCによって解放されたことによってメンバオブジェクトデータ構造605によって示されるClassEのメンバオブジェクトも一緒に解放された回数が2回であることを示す。
ここで、ポインタに付された数字は、便宜上のメンバオブジェクト適合率を示す。メンバオブジェクト適合率は、起点オブジェクトがFullGCによって解放されたことによってメンバオブジェクトも一緒に解放された割合である。例えば、メンバオブジェクトデータ構造606によって示されるClassFのメンバオブジェクト適合率は、メンバオブジェクトデータ構造601によって示されるClassAの起点オブジェクトが4回解放されたうちClassFのメンバオブジェクトは3回解放されたので、0.75になる。また、メンバオブジェクトデータ構造607によって示されるClassGのメンバオブジェクト適合率は、メンバオブジェクトデータ構造601によって示されるClassAの起点オブジェクトが4回解放されたうちClassGのメンバオブジェクトは1回解放されたので、0.25になる。
また、破線の囲み線はメンバオブジェクト適合率が0.6である便宜上の境界を示しており、破線で囲まれた内側は、メンバオブジェクト適合率が0.6以上であることを示している。
The member object data structures 602 to 607 also include the name of the class type of the member object and the number of times the member object is released together with the start object being released by FullGC, that is, object profiling for the start object. When the process is executed, the number of times the object profiling process is executed for the member object (hereinafter referred to as “member object profiling count”) is stored. For example, according to an example of the embodiment of the present invention, the number of times that the member object of ClassE indicated by the member object data structure 605 is also released together with the release of the origin object indicated by the origin object data structure 601 by FullGC. Indicates twice.
Here, the number attached to the pointer indicates the member object relevance ratio for convenience. The member object conformance rate is a rate at which the member object is released together with the origin object being released by FullGC. For example, the membership rate of the ClassF member object indicated by the member object data structure 606 is 0.75 because the starting object of ClassA indicated by the member object data structure 601 is released four times and the member object of ClassF is released three times. become. Also, the ClassG member object relevance ratio indicated by the member object data structure 607 is 0.25 because the ClassG member object is released once out of the ClassA starting object indicated by the member object data structure 601 being released four times. become.
Further, a broken line indicates a convenient boundary where the member object matching rate is 0.6, and an inner side surrounded by the broken line indicates that the member object matching rate is 0.6 or more.

なお、メンバオブジェクト情報アドレス504には、メンバオブジェクト情報303のアドレスとして、起点オブジェクトデータ構造のアドレスが格納される。例えば、本発明の実施の形態の一例は、オブジェクトID501に格納されているオブジェクトIDが#4であるオブジェクトに対するメンバオブジェクト情報アドレス504に、起点オブジェクトデータ構造601のアドレスである0x81b2e23cが格納されていることを示す。また、本発明の実施の形態では一例として、起点オブジェクトデータ構造601がオブジェクトID(下付き数字の「4」)、オブジェクトのクラスの型の名前(ClassA)、プロファイリングの実行回数(括弧内の数字の「4」)を格納するように便宜上記載してある。   The member object information address 504 stores the address of the starting object data structure as the address of the member object information 303. For example, in the embodiment of the present invention, 0x81b2e23c which is the address of the starting object data structure 601 is stored in the member object information address 504 for the object whose object ID is # 4 stored in the object ID 501. It shows that. In the embodiment of the present invention, as an example, the starting object data structure 601 includes an object ID (subscript number “4”), an object class type name (Class A), and the number of profiling executions (number in parentheses). "4") is stored for convenience.

図7は、本発明の実施の形態のオブジェクトプロファイリング用オブジェクトのデータ構造の一例を示す図である。オブジェクトプロファイリング用オブジェクトは、オブジェクトヘッダ701、オブジェクトIDフィールド702、及び、オブジェクトデータ703から構成される。オブジェクトプロファイリング用オブジェクトとは、オブジェクトプロファイリング処理の対象となるオブジェクトである。   FIG. 7 is a diagram illustrating an example of the data structure of the object profiling object according to the embodiment of this invention. The object profiling object includes an object header 701, an object ID field 702, and object data 703. The object profiling object is an object to be subjected to object profiling processing.

オブジェクトヘッダ701は、オブジェクトの管理情報である。
オブジェクトIDフィールド702は、オブジェクトを識別するためのオブジェクトIDを格納する。このオブジェクトIDは、当該オブジェクトを生成したオブジェクト生成命令に係るオブジェクトID402である。なお、オブジェクトプロファイリング処理の対象ではない通常オブジェクトのデータ構造は、オブジェクトヘッダ701とオブジェクトデータ703で構成される。また、オブジェクトプロファイリング処理の対象であっても、オブジェクトヘッダ701の空き領域やオブジェクトデータ703、及び、オブジェクトのデータ構造以外の領域にオブジェクトIDを格納するなどしてオブジェクトを識別できれば、オブジェクトIDフィールドのための領域を別途確保する必要はない。
オブジェクトデータ703は、オブジェクトのデータ本体である。
The object header 701 is object management information.
The object ID field 702 stores an object ID for identifying the object. This object ID is the object ID 402 related to the object generation command that generated the object. Note that the data structure of a normal object that is not the object of object profiling processing includes an object header 701 and object data 703. Even if the object is to be subjected to object profiling processing, if the object ID can be identified by storing the object ID in an empty area of the object header 701, the object data 703, and an area other than the data structure of the object, the object ID field There is no need to secure a separate area.
The object data 703 is the data body of the object.

なお、オブジェクトへのポインタの下位数ビットは、オブジェクトヘッダ701のサイズに応じて0とすることができるため、ビットフラグとして使用可能である。例えば、オブジェクトヘッダ701のサイズが8バイトである場合、オブジェクトへのポインタの下位3ビットは0になる。本発明の実施の形態では、オブジェクトへのポインタの下位数ビットをビットフラグとして使用する場合がある。   Note that the lower-order bits of the pointer to the object can be set to 0 according to the size of the object header 701, and can be used as a bit flag. For example, when the size of the object header 701 is 8 bytes, the lower 3 bits of the pointer to the object are 0. In the embodiment of the present invention, the lower-order bits of the pointer to the object may be used as a bit flag.

図8は、本発明の実施の形態のオブジェクト種別ビットの一例を示す図である。
オブジェクト種別ビット802の値は、オブジェクト種別801に対応する。本発明の実施の形態では、オブジェクトヘッダ701に含まれる2ビットをオブジェクト種別ビットとして使用する。
FIG. 8 is a diagram illustrating an example of the object type bit according to the embodiment of this invention.
The value of the object type bit 802 corresponds to the object type 801. In the embodiment of the present invention, 2 bits included in the object header 701 are used as object type bits.

具体的には、オブジェクト種別ビット802が“00”の場合には、GC処理やオブジェクトプロファイリング処理において未解析なオブジェクトである“未解析”オブジェクトであることを示す。
また、オブジェクト種別ビット802が“01”の場合には、FullGC処理においてプログラムの実行に必要なオブジェクトであると判定済みの“必要”オブジェクトであることを示す。
同様に、オブジェクト種別ビット802が“10”の場合には、オブジェクトプロファイリング処理の起点となるオブジェクトであり、前回のFullGCから今回のFullGCまでの間に、必要オブジェクトから参照されなくなったオブジェクト、又は、必要オブジェクトから参照されなくなった可能性の高いオブジェクトである“起点”オブジェクトであることを示す。
さらに、オブジェクト種別ビット802が“11”の場合には、起点オブジェクトからオブジェクト参照を順次辿ることによって到達可能なオブジェクトのうち、起点オブジェクトがFullGCによって解放されることによって一緒に解放されるオブジェクト、又は、一緒に解放される可能性の高いオブジェクトである“メンバ”オブジェクトであることを示す。
Specifically, when the object type bit 802 is “00”, it indicates that the object is an “unanalyzed” object that is an unanalyzed object in the GC process or the object profiling process.
Further, when the object type bit 802 is “01”, it indicates that the object is a “necessary” object that has been determined to be an object necessary for program execution in the FullGC process.
Similarly, when the object type bit 802 is “10”, the object is a starting point of the object profiling process, and an object that is not referred to by a necessary object between the previous FullGC and the current FullGC, or This indicates that the object is a “starting point” object that is highly likely not to be referenced from the necessary object.
Further, when the object type bit 802 is “11”, among objects that can be reached by sequentially following the object reference from the starting object, objects that are released together when the starting object is released by FullGC, or , Indicating that the object is a “member” object that is likely to be released together.

図9は、本発明の実施の形態の外部ヒープ117のデータ構造の一例を示す図である。外部ヒープ117は、外部ヒープヘッダ901、オブジェクト格納領域902から構成される。
外部ヒープヘッダ901は、オブジェクトの管理情報であり、外部ヒープ117に格納された起点オブジェクトを生成したオブジェクト生成命令に係るメンバオブジェクト参照情報アドレス504に格納されたメンバオブジェクト情報303のアドレスを格納する。
オブジェクト格納領域902は、オブジェクトを格納するための領域である。
FIG. 9 is a diagram illustrating an example of a data structure of the external heap 117 according to the embodiment of this invention. The external heap 117 includes an external heap header 901 and an object storage area 902.
The external heap header 901 is object management information, and stores the address of the member object information 303 stored in the member object reference information address 504 relating to the object generation instruction that generated the starting object stored in the external heap 117.
The object storage area 902 is an area for storing an object.

図13は、本発明の実施の形態のバイトコード読み込み処理の手順を示すフローチャートである。本処理は、プロセッサ129がバイトコード読み込み部111を処理することによって、実行される。なお、図10〜図12に関する説明は後記する。   FIG. 13 is a flowchart showing a procedure of byte code reading processing according to the embodiment of the present invention. This process is executed when the processor 129 processes the byte code reading unit 111. 10 to 12 will be described later.

プロセッサ129がバイトコード読み込み部111を実行すると、バイトコード読み込み部111は、まず、JavaVM110が受け付けたJavaクラスファイル103からメソッドのバイトコードを読み込み、データ領域108に当該メソッドに係るバイトコード情報112を生成する(ステップ1301)。   When the processor 129 executes the bytecode reading unit 111, the bytecode reading unit 111 first reads the bytecode of the method from the Java class file 103 received by the JavaVM 110, and stores the bytecode information 112 related to the method in the data area 108. Generate (step 1301).

ステップ1301の処理の終了後には、JavaVM110の設定フラグを参照し、バイトコード読み込み処理時に、当該メソッドに係るバイトコード情報112に存在するオブジェクト生成命令のオブジェクト生成先を変更するか否かを判定する(ステップ1302)。   After the processing of step 1301, the JavaVM 110 setting flag is referenced to determine whether or not to change the object generation destination of the object generation instruction existing in the bytecode information 112 related to the method at the time of bytecode reading processing. (Step 1302).

オブジェクト生成先を変更する場合には(ステップ1302の結果が「YES」)、JavaVM110が受け付けたオブジェクト解析情報ファイル105に保存してある当該メソッドに係るオブジェクト解析情報の実行結果をオブジェクト解析情報126に読み込み、当該メソッドに係るオブジェクトプロファイリング情報テーブル302に登録された行データで示されるオブジェクトに対して、オブジェクト生成先変更部113を実行し、オブジェクト生成先変更処理を実行する(ステップ1303)。   When the object generation destination is changed (the result of step 1302 is “YES”), the execution result of the object analysis information related to the method stored in the object analysis information file 105 accepted by the Java VM 110 is stored in the object analysis information 126. The object generation destination changing unit 113 is executed on the object indicated by the row data that is read and registered in the object profiling information table 302 related to the method, and the object generation destination changing process is executed (step 1303).

オブジェクト生成先を変更しない場合(ステップ1302の結果が「NO」)、又は、ステップ1303の処理が終了した場合には、JavaVM110の設定フラグを参照し、オブジェクトプロファイリングを行うか否かを判定する(ステップ1304)。   When the object generation destination is not changed (the result of step 1302 is “NO”), or when the processing of step 1303 ends, it is determined whether or not object profiling is performed with reference to the setting flag of JavaVM 110 ( Step 1304).

オブジェクトプロファイリングを行う場合には(ステップ1304の結果が「YES」)、ステップ1301の処理で生成したバイトコード情報112に係るオブジェクト解析情報126を生成し、バイトコード情報112に存在する全てのオブジェクト生成命令について、オブジェクト生成命令のアドレス、オブジェクト生成命令に割り当てられる一意のオブジェクトID、及び、オブジェクト生成命令で生成されるオブジェクトのクラス名を、それぞれ、オブジェクト生成命令アドレス401、オブジェクトID402、及び、クラス名403に登録する(更新も含む)。さらに、オブジェクト生成先404を“Javaヒープ領域”で登録する(ステップ1305)。ただし、ステップ1303の処理で、JavaVM110が受け付けたオブジェクト解析情報ファイル105に保存してある当該メソッドに係るオブジェクト解析情報の実行結果をオブジェクト解析情報126に反映しているオブジェクト生成命令については、ステップ1305の処理を行わない。   When performing object profiling (the result of step 1304 is “YES”), the object analysis information 126 related to the bytecode information 112 generated in the processing of step 1301 is generated, and all objects existing in the bytecode information 112 are generated. For the instruction, the object generation instruction address, the unique object ID assigned to the object generation instruction, and the class name of the object generated by the object generation instruction are respectively an object generation instruction address 401, an object ID 402, and a class name. Registered in 403 (including update). Further, the object generation destination 404 is registered in the “Java heap area” (step 1305). However, in the processing of step 1303, for an object generation instruction that reflects the execution result of the object analysis information related to the method stored in the object analysis information file 105 received by the JavaVM 110 in the object analysis information 126, step 1305 Do not perform the process.

オブジェクトプロファイリングを行わない場合(ステップ1304の結果が「NO」)、又は、ステップ1305の処理の終了後には、本処理を終了する。   When object profiling is not performed (the result of step 1304 is “NO”), or after the process of step 1305 is completed, the present process is terminated.

図14は、本発明の実施の形態のオブジェクト生成先変更処理1303の手順を示すフローチャートである。本処理は、プロセッサ129がオブジェクト生成先変更部113を処理することによって、実行される。   FIG. 14 is a flowchart illustrating a procedure of object generation destination change processing 1303 according to the embodiment of this invention. This processing is executed when the processor 129 processes the object generation destination changing unit 113.

プロセッサ129がオブジェクト生成先変更部113を実行すると、オブジェクト生成先変更部113は、まず、処理対象のオブジェクトプロファイリングテーブル302について、オブジェクトID501に未処理のオブジェクトIDが存在するか否かを判定する(ステップ1401)。   When the processor 129 executes the object generation destination changing unit 113, the object generation destination changing unit 113 first determines whether or not an unprocessed object ID exists in the object ID 501 in the object profiling table 302 to be processed ( Step 1401).

オブジェクトID501に未処理のオブジェクトIDが存在する場合には(ステップ1401の結果が「YES」)、当該オブジェクトIDで識別されるオブジェクトのオブジェクト生成回数502が、JavaVM110の設定閾値(第1の閾値)以上であるか否かを判定する(ステップ1402)。このステップ1402では、オブジェクト生成先を変更するか否かを判定するのに十分な回数のオブジェクト生成が実施済みか否かを判定する。例えば、オブジェクト生成回数の設定閾値が1000回の場合、オブジェクトID501が#0であるオブジェクト生成命令は、オブジェクト生成回数502が5872回であることから(図5参照)、オブジェクト生成先を変更するか否かを判定するのに十分な回数のオブジェクト生成を実施済みと判定できる。一方、オブジェクトID501が#104であるオブジェクト生成命令は、オブジェクト生成回数502が950回であることから(図5参照)、オブジェクト生成先を変更するか否かを判定するのに十分な回数のオブジェクト生成を実施済みでないと判定できる。   When there is an unprocessed object ID in the object ID 501 (the result of step 1401 is “YES”), the object generation count 502 of the object identified by the object ID is the set threshold value (first threshold value) of the Java VM 110. It is determined whether or not this is the case (step 1402). In this step 1402, it is determined whether or not object generation has been performed a sufficient number of times to determine whether or not to change the object generation destination. For example, if the setting threshold for the number of object generations is 1000, an object generation command whose object ID 501 is # 0 has an object generation number 502 of 5872 (see FIG. 5). It can be determined that the object generation has been performed a sufficient number of times to determine whether or not. On the other hand, since the object generation command with the object ID 501 of # 104 has the object generation count 502 of 950 (see FIG. 5), the number of objects sufficient to determine whether or not to change the object generation destination It can be determined that the generation has not been performed.

オブジェクト生成回数502が設定閾値以上である場合には(ステップ1402の結果が「YES」)、当該オブジェクトIDに係るオブジェクト生成回数502に対するオブジェクトプロファイリング回数503が、JavaVM110の設定閾値(第2の閾値)以上であるか否かを判定する(ステップ1403)。このステップ1403では、当該オブジェクトIDに係るオブジェクト生成命令によって生成されたオブジェクトが、FullGCによって解放された割合の高さ、つまり、当該オブジェクト生成命令によって生成されたオブジェクトが、外部ヒープ領域に格納すべき長命なオブジェクトになる割合の高さに基づき、当該オブジェクト生成命令のオブジェクト生成先を外部ヒープ領域に変更するべきか否かを判定する。例えば、オブジェクト生成回数に対するオブジェクトプロファイリング回数の設定閾値(割合)が0.50の場合、オブジェクトID501が#0であるオブジェクト生成命令によって生成されたオブジェクトは5872個であり(図5参照)、そのうち、5830個がFullGCによって解放されたので、FullGCによって解放された割合は0.99であり、設定閾値より大きいので、当該オブジェクト生成命令のオブジェクト生成先を外部ヒープ領域に変更するべきと判定できる。一方、オブジェクトID501が#103であるオブジェクト生成命令によって生成されたオブジェクトは10281個であり、そのうち、237個がFullGCによって解放されたので、FullGCによって解放された割合は0.02であり、設定閾値0.50より小さいので、当該オブジェクト生成命令のオブジェクト生成先を外部ヒープ領域に変更するべきではないと判定できる。   If the object generation count 502 is greater than or equal to the set threshold (the result of step 1402 is “YES”), the object profiling count 503 for the object generation count 502 associated with the object ID is the JavaVM 110 set threshold (second threshold). It is determined whether or not this is the case (step 1403). In this step 1403, the height of the rate at which the object generated by the object generation command related to the object ID is released by FullGC, that is, the object generated by the object generation command should be stored in the external heap area. It is determined whether or not the object generation destination of the object generation instruction should be changed to the external heap area based on the high ratio of becoming a long-lived object. For example, when the setting threshold value (ratio) of the object profiling count with respect to the object generation count is 0.50, there are 5872 objects generated by the object generation command whose object ID 501 is # 0 (see FIG. 5), of which 5830 Is released by FullGC, the ratio released by FullGC is 0.99, which is larger than the set threshold value. Therefore, it can be determined that the object generation destination of the object generation instruction should be changed to the external heap area. On the other hand, there are 10281 objects generated by the object generation command with the object ID 501 of # 103, of which 237 were released by FullGC, so the percentage released by FullGC is 0.02, from the setting threshold of 0.50 Since it is small, it can be determined that the object generation destination of the object generation instruction should not be changed to the external heap area.

オブジェクト生成回数502に対するオブジェクトプロファイリング回数503が設定閾値以上である場合には(ステップ1403の結果が「YES」)、オブジェクト生成情報テーブル301を参照して、当該オブジェクトIDに係るオブジェクト生成先404を“Javaヒープ領域”以外の、例えば、“外部ヒープ領域1”に変更する(ステップ1404)。   If the object profiling count 503 with respect to the object generation count 502 is greater than or equal to the set threshold (the result of step 1403 is “YES”), the object generation destination 404 associated with the object ID is set to “ For example, it is changed to “external heap area 1” other than “Java heap area” (step 1404).

オブジェクト生成回数502が設定閾値以上でない場合(ステップ1402の結果が「NO」)、オブジェクト生成回数502に対するオブジェクトプロファイリング回数503が設定閾値以上でない場合(ステップ1403の結果が「NO」)、又は、ステップ1404の処理の終了後には、ステップ1401の処理に戻る。そして、未処理のオブジェクトIDに対して、本処理の実行を継続する。   If the object generation count 502 is not greater than or equal to the set threshold (the result of step 1402 is “NO”), the object profiling count 503 for the object generation count 502 is not greater than or equal to the set threshold (the result of step 1403 is “NO”), or After the processing of 1404 is completed, the processing returns to step 1401. Then, the execution of this process is continued for the unprocessed object ID.

オブジェクトID501に未処理のオブジェクトIDが存在しない場合には(ステップ1401の結果が「NO」)、本処理を終了する。なお、ステップ1402やステップ1403の判定では、当該オブジェクトIDに係るオブジェクトのクラスサイズなどに応じて、比較対象値に重み付けを行ってもよい。   If there is no unprocessed object ID in the object ID 501 (the result of step 1401 is “NO”), this process is terminated. In the determinations in step 1402 and step 1403, the comparison target value may be weighted according to the class size of the object related to the object ID.

図15は、本発明の実施の形態のメソッド実行処理の手順を示すフローチャートである。本処理は、プロセッサ129がメソッド実行部114を処理することによって、実行される。
バイトコード読み込み部111が生成した実行対象メソッドに係るバイトコード情報112は、一つ以上の命令を含み、各命令には、命令種別が付与されている。
FIG. 15 is a flowchart illustrating a procedure of method execution processing according to the embodiment of this invention. This process is executed when the processor 129 processes the method execution unit 114.
The bytecode information 112 related to the execution target method generated by the bytecode reading unit 111 includes one or more instructions, and an instruction type is assigned to each instruction.

プロセッサ129がメソッド実行部114を実行すると、メソッド実行部114は、まず、実行対象のメソッドの命令種別がオブジェクト生成命令であるか否かを判定する(ステップ1501)。   When the processor 129 executes the method execution unit 114, the method execution unit 114 first determines whether or not the instruction type of the method to be executed is an object generation instruction (step 1501).

命令種別がオブジェクト生成命令でない場合には(ステップ1501の結果が「NO」)、当該命令を実行する(ステップ1504)。
命令種別がオブジェクト生成命令である場合には(ステップ1501の結果が「YES」)、オブジェクト生成部121を実行し、オブジェクト生成処理を実行する(ステップ1502)。
If the instruction type is not an object generation instruction (the result of step 1501 is “NO”), the instruction is executed (step 1504).
If the instruction type is an object generation instruction (the result of step 1501 is “YES”), the object generation unit 121 is executed to execute object generation processing (step 1502).

ステップ1502の処理の終了後には、オブジェクトの生成に成功したか否かを判定する(ステップ1503)。
オブジェクトの生成に失敗した場合には(ステップ1503の結果が「NO」)、メソッドの実行を中断し、メモリ不足エラーを発生させる(ステップ1505)。
After the processing in step 1502 is completed, it is determined whether or not the object has been successfully generated (step 1503).
If the object generation has failed (the result of step 1503 is “NO”), the execution of the method is interrupted and a memory shortage error is generated (step 1505).

オブジェクトの生成に成功した場合(ステップ1503の結果が「YES」)、又は、ステップ1504の処理の終了後には、次に実行すべき命令があるか否かを判定する(ステップ1506)。
次に実行すべき命令がある場合には(ステップ1506の結果が「YES」)、ステップ1501の処理を実行し、メソッド実行処理を継続する。
If the object has been successfully generated (the result of step 1503 is “YES”), or after the processing of step 1504 is completed, it is determined whether there is an instruction to be executed next (step 1506).
If there is an instruction to be executed next (the result of step 1506 is “YES”), the process of step 1501 is executed and the method execution process is continued.

次に実行すべき命令がない、つまり、すべての命令の処理が終了した場合には(ステップ1506の結果が「NO」)、又は、ステップ1505の処理の終了後には、本処理を終了する。   If there is no instruction to be executed next, that is, if all the instructions have been processed (the result of step 1506 is “NO”), or after the process of step 1505 is completed, this process ends.

図16は、本発明の実施の形態のオブジェクト生成処理1502の手順を示すフローチャートである。本処理は、プロセッサ129がオブジェクト生成部121を処理することによって、実行される。   FIG. 16 is a flowchart showing a procedure of object generation processing 1502 according to the embodiment of this invention. This processing is executed when the processor 129 processes the object generation unit 121.

プロセッサ129がオブジェクト生成部121を実行すると、オブジェクト生成部121は、まず、生成を要求されたオブジェクトを生成するのに必要な量のメモリを当該オブジェクト生成命令に係るオブジェクト生成先404(図4参照)に格納されたオブジェクト生成先に確保可能であるか否かを判定する。オブジェクト生成先が外部ヒープ領域116であり、生成を要求されたオブジェクトを生成するのに必要な量のメモリを外部ヒープ領域116に確保可能でない場合には、さらに、生成を要求されたオブジェクトを生成するのに必要な量のメモリをJavaヒープ領域115に確保可能であるか否かを判定する。(ステップ1601)。   When the processor 129 executes the object generation unit 121, the object generation unit 121 first obtains an amount of memory necessary for generating the object requested to be generated from the object generation destination 404 related to the object generation instruction (see FIG. 4). It is determined whether or not the object generation destination stored in (1) can be secured. If the object generation destination is the external heap area 116 and the amount of memory necessary for generating the object requested to be generated cannot be secured in the external heap area 116, the object requested to be generated is further generated. It is determined whether or not a sufficient amount of memory can be secured in the Java heap area 115. (Step 1601).

生成を要求されたオブジェクトを生成するのに必要な量のメモリをオブジェクト生成先に確保できない場合には(ステップ1601の結果が「NO」)、Javaヒープ領域115の不要なメモリ領域を解放するために、GC部122を実行し、GC処理を実行する(ステップ1602)。   When an amount of memory necessary for generating the object requested to be generated cannot be secured in the object generation destination (the result of step 1601 is “NO”), an unnecessary memory area in the Java heap area 115 is released. Then, the GC unit 122 is executed to execute the GC process (step 1602).

ステップ1602の処理の実行後、生成を要求されたオブジェクトを生成するのに必要な量のメモリをJavaヒープ領域115に確保可能であるか否かを再び判定する(ステップ1603)。   After the execution of the processing in step 1602, it is determined again whether or not the memory required for generating the object requested to be generated can be secured in the Java heap area 115 (step 1603).

生成を要求されたオブジェクトを生成するのに必要な量のメモリをJavaヒープ領域115に確保できない場合には(ステップ1603の結果が「NO」)、オブジェクト生成処理の実行元にオブジェクト生成に失敗した旨を通知する(ステップ1611)。   If the amount of memory required to generate the object requested to be generated cannot be secured in the Java heap area 115 (the result of step 1603 is “NO”), the object generation has failed in the object generation process execution source. This is notified (step 1611).

生成を要求されたオブジェクトを生成するのに必要な量のメモリをオブジェクト生成先に確保可能な場合には(ステップ1601、又は、ステップ1603の結果が「YES」)、今回のオブジェクト生成先がどこであるかを判定する(ステップ1604)。   When the amount of memory necessary for generating the object requested to be generated can be secured in the object generation destination (the result of Step 1601 or Step 1603 is “YES”), where is the current object generation destination? It is determined whether or not there is (step 1604).

今回のオブジェクト生成先がJavaヒープ領域115である場合には(ステップ1604の結果が「Javaヒープ領域」)、JavaVM110の設定フラグを参照し、オブジェクトプロファイリングを行うか否かを判定する(ステップ1606)。   If the current object generation destination is the Java heap area 115 (the result of step 1604 is “Java heap area”), the setting flag of the Java VM 110 is referenced to determine whether or not to perform object profiling (step 1606). .

オブジェクトプロファイリングを行う場合には(ステップ1606の結果が「YES」)、オブジェクトプロファイリング用オブジェクトをJavaヒープ領域115に生成し、当該オブジェクト生成命令によって生成されたオブジェクトであることを識別するための当該オブジェクト生成命令に係るオブジェクトID402を当該オブジェクトのオブジェクトIDフィールド702に記録する(ステップ1607)。   When object profiling is performed (the result of step 1606 is “YES”), an object profiling object is generated in the Java heap area 115, and the object for identifying the object generated by the object generation instruction The object ID 402 related to the generation command is recorded in the object ID field 702 of the object (step 1607).

ステップ1607の処理の終了後には、当該オブジェクト生成命令によってオブジェクトを生成したことを記録するために、当該オブジェクト生成命令に係るオブジェクト生成回数502の値に1を加算して、オブジェクトプロファイリング情報テーブル302を更新する(ステップ1609)。   After the process of step 1607 is completed, in order to record that the object has been generated by the object generation instruction, 1 is added to the value of the object generation count 502 related to the object generation instruction, and the object profiling information table 302 is stored. Update (step 1609).

今回のオブジェクト生成先が外部ヒープ領域116である場合には(ステップ1604の結果が「外部ヒープ領域」)、オブジェクト生成先となる外部ヒープ117を生成する。そして、外部ヒープ117の外部ヒープヘッダ901に、当該生成命令に係るメンバオブジェクト情報アドレス504を記録する(ステップ1605)。なお、外部ヒープを生成する際の初期サイズは、当該生成命令に係る起点オブジェクトのクラスサイズ、及び、当該生成命令に係り、メンバオブジェクト適合率が設定閾値以上であるメンバオブジェクトのクラスサイズの合計に基づき設定される。   If the current object generation destination is the external heap area 116 (the result of step 1604 is “external heap area”), the external heap 117 that is the object generation destination is generated. Then, the member object information address 504 related to the generation instruction is recorded in the external heap header 901 of the external heap 117 (step 1605). The initial size when the external heap is generated is the sum of the class size of the starting object related to the generation instruction and the class size of the member object whose member object conformance rate is equal to or greater than the set threshold according to the generation instruction. Set based on.

オブジェクトプロファイリングを行わない場合(ステップ1606の結果が「NO」)、又は、ステップ1605の処理の終了後には、オブジェクトIDフィールド702を含まない、通常オブジェクトをオブジェクト生成先に生成する(ステップ1608)。   When object profiling is not performed (the result of step 1606 is “NO”), or after the processing of step 1605 ends, a normal object that does not include the object ID field 702 is generated at the object generation destination (step 1608).

ステップ1608の処理の終了後、又は、ステップ1609の処理の終了後には、オブジェクト生成処理の実行元に生成したオブジェクトを通知する(ステップ1610)。
ステップ1610の処理の終了後、又は、ステップ1611の処理の終了後には、本処理を終了する。
After the process of step 1608 is completed or after the process of step 1609 is completed, the generated object is notified to the execution source of the object generation process (step 1610).
After the process of step 1610 is finished or after the process of step 1611 is finished, this process is finished.

なお、オブジェクト生成先やオブジェクトプロファイリングを行うか否かに応じた専用のオブジェクト生成命令と、それに対するオブジェクト生成処理を用意し、バイトコード情報112のオブジェクト生成命令を適宜書き換えることで、所定のオブジェクト生成処理を実行するようにしてもよい。その場合、例えば、ステップ1604やステップ1607の判定が不要になることもある。   It should be noted that a dedicated object generation instruction according to whether the object generation destination or object profiling is performed and an object generation process corresponding thereto are prepared, and a predetermined object generation is performed by appropriately rewriting the object generation instruction of the bytecode information 112 Processing may be executed. In that case, for example, the determination in step 1604 and step 1607 may be unnecessary.

図17は、本発明の実施の形態のGC処理1602の手順を示すフローチャートである。本処理は、プロセッサ129がGC部122を処理することによって、実行される。
プロセッサ129がGC部122を実行すると、GC部122は、まず、オブジェクト生成処理1502で枯渇している領域がJavaヒープ領域115のNew領域とOld領域のどちらかを判定する(ステップ1701)。
FIG. 17 is a flowchart showing a procedure of the GC processing 1602 according to the embodiment of this invention. This process is executed when the processor 129 processes the GC unit 122.
When the processor 129 executes the GC unit 122, the GC unit 122 first determines whether the area depleted in the object generation processing 1502 is the New area or the Old area of the Java heap area 115 (step 1701).

オブジェクト生成処理1502で枯渇している領域がJavaヒープ領域115のNew領域である場合には(ステップ1701の結果が「New領域」)、CopyGC部124を実行し、CopyGC処理を実行する(ステップ1702)。   If the area depleted in the object generation process 1502 is the New area of the Java heap area 115 (the result of Step 1701 is “New area”), the CopyGC unit 124 is executed and the CopyGC process is executed (Step 1702). ).

オブジェクト生成処理1502で枯渇している領域がJavaヒープ領域115のOld領域である場合には(ステップ1701の結果が「Old領域」)、FullGC部123を実行し、FullGC処理を実行する(ステップ1703)。
ステップ1702の処理の終了後、又は、ステップ1703の処理の終了後には、本処理を終了する。
When the area depleted in the object generation process 1502 is the Old area of the Java heap area 115 (the result of Step 1701 is “Old area”), the FullGC unit 123 is executed and the FullGC process is executed (Step 1703). ).
After the process of step 1702 is completed or after the process of step 1703 is completed, this process is terminated.

図18は、本発明の実施の形態のFullGC処理1703の手順を示すフローチャートである。本処理は、プロセッサ129がFullGC部123を処理することによって、実行される。   FIG. 18 is a flowchart showing a procedure of the full GC processing 1703 according to the embodiment of this invention. This processing is executed when the processor 129 processes the FullGC unit 123.

プロセッサ129がFullGC部123を実行すると、FullGC部123は、まず、FullGC対象の全オブジェクトに対して、オブジェクトヘッダ701にオブジェクト種別“未解析”を設定する。また、以降のプログラムの実行に必要なオブジェクトであることを示すために、レジスタ、実行時スタック、グローバル変数といったルートセットからオブジェクト参照を順次辿ることによって到達可能なオブジェクトに対して、オブジェクトヘッダ701にオブジェクト種別“必要”を設定する。そして、ルートセットから到達可能なオブジェクトを全て辿った後で、オブジェクトヘッダ701のオブジェクト種別が“必要”であるオブジェクトを以降のプログラムの実行に必要なオブジェクト、オブジェクトヘッダ701のオブジェクト種別が“未解析”であるオブジェクトを以降のプログラムの実行に不要なオブジェクトとして、オブジェクトの必要・不要を判定する(ステップ1801)。   When the processor 129 executes the FullGC unit 123, the FullGC unit 123 first sets the object type “unanalyzed” in the object header 701 for all the objects to be subjected to FullGC. In addition, in order to indicate that the object is necessary for the execution of the subsequent program, an object that can be reached by sequentially tracing the object reference from the root set such as a register, a stack at the time of execution, and a global variable is displayed in the object header 701. Set the object type “Necessary”. Then, after tracing all the objects that can be reached from the root set, an object whose object type is “necessary” in the object header 701 is an object necessary for execution of the subsequent program, and the object type of the object header 701 is “unanalyzed”. Is determined as an object unnecessary for the subsequent program execution (step 1801).

図10は、本発明の実施の形態のFullGC処理1703のステップ1801の処理の終了時点におけるJavaヒープ領域115のOld領域に格納されたオブジェクトの状態を示す図である。   FIG. 10 is a diagram illustrating a state of an object stored in the Old area of the Java heap area 115 at the end of the process of Step 1801 of the FullGC process 1703 according to the embodiment of this invention.

各ノードはオブジェクトを示している。二重丸で示すオブジェクトは、FullGC処理1703のステップ1801の処理によってオブジェクトヘッダ701にオブジェクト種別“必要”が設定されたオブジェクトである。なお、ノード内の記号はクラス名、クラス名の右下の数字はオブジェクトIDフィールド702に格納されたオブジェクトIDを示している。   Each node represents an object. An object indicated by a double circle is an object in which the object type “necessary” is set in the object header 701 by the processing of Step 1801 of the FullGC processing 1703. The symbol in the node indicates the class name, and the number on the lower right of the class name indicates the object ID stored in the object ID field 702.

また、オブジェクトを連結する矢印は、オブジェクトの参照関係を示している。実線の矢印は、FullGC処理1703のステップ1801の処理によって辿られたオブジェクト参照であり、破線の矢印は、オブジェクト参照は存在するが、FullGC処理1703のステップ1801の処理によって辿られることのなかったオブジェクト参照を示している。   An arrow connecting the objects indicates the reference relationship of the objects. A solid line arrow is an object reference traced by the process of step 1801 of the FullGC process 1703, and a broken line arrow is an object that has an object reference but has not been traced by the process of step 1801 of the FullGC process 1703 Indicates a reference.

ルートセット1001は、レジスタ、実行時スタック、グローバル変数などである。ルートセット1001に保持されるオブジェクト参照を起点としてFullGC処理1703のステップ1801の処理が実行されると、ルートセット1001からオブジェクト参照を順次辿ることによって到達可能なオブジェクトは全て必要オブジェクトと判定される。したがって、図10に示すように、オブジェクト1002、オブジェクト1003、オブジェクト1004、オブジェクト1005などの二重丸で示すオブジェクトは必要オブジェクトである。一方、ルートセット1001からオブジェクト参照を順次辿ることによって到達することのできなかったオブジェクトは全て未解析オブジェクト(不要オブジェクト)と判定される。したがって、図10に示すように、オブジェクト1006、オブジェクト1007、オブジェクト1008などの一重丸で示すオブジェクトは未解析オブジェクトである。これら未解析オブジェクトは、FullGC処理1703によって実際に解放されるオブジェクトであるが、Javaヒープ115のOld領域の使用量を抑え、FullGC処理1703の発生を抑止するためには、外部ヒープ領域116に格納し、GCによらず解放することが望ましい。   The route set 1001 is a register, a runtime stack, a global variable, and the like. When the processing of Step 1801 of the FullGC processing 1703 is executed starting from the object reference held in the route set 1001, all objects reachable by sequentially tracing the object reference from the route set 1001 are determined as necessary objects. Therefore, as shown in FIG. 10, objects indicated by double circles such as an object 1002, an object 1003, an object 1004, and an object 1005 are necessary objects. On the other hand, all objects that could not be reached by sequentially tracing object references from the root set 1001 are determined as unanalyzed objects (unnecessary objects). Therefore, as shown in FIG. 10, objects indicated by single circles such as an object 1006, an object 1007, and an object 1008 are unanalyzed objects. These unanalyzed objects are objects that are actually released by the FullGC process 1703, but are stored in the external heap area 116 in order to suppress the usage of the Old area of the Java heap 115 and to suppress the occurrence of the FullGC process 1703. However, it is desirable to release it regardless of GC.

また、未解析オブジェクトの参照関係において参照関係のルートに当たるオブジェクト1006、オブジェクト1007、オブジェクト1008などの起点オブジェクトは、これらオブジェクトがルートセット1001や必要オブジェクトから参照されなくなったことによって、起点オブジェクトからオブジェクトを順次辿ることによってのみ到達可能なオブジェクトも一緒に解放される。そのため、起点オブジェクトを含め、起点オブジェクトからオブジェクトを順次辿ることによって到達可能なオブジェクトを外部ヒープ領域116に格納するようにすれば、Javaヒープ115のOld使用量をより多く抑えることができる。そのためには、起点オブジェクトを特定し、それら起点オブジェクトを外部ヒープ領域116に生成するようにする必要がある。この起点オブジェクトの特定方法については、図11で説明する。   In addition, starting objects such as the object 1006, the object 1007, and the object 1008 corresponding to the root of the reference relation in the reference relation of the unanalyzed object are not referred to from the root set 1001 or the necessary object, so that the object is changed from the starting object. Objects that can only be reached by tracing sequentially are also released. Therefore, if the reachable objects are stored in the external heap area 116 by sequentially tracing the objects from the starting object including the starting object, the Old usage of the Java heap 115 can be further suppressed. For this purpose, it is necessary to identify starting objects and generate these starting objects in the external heap area 116. A method of specifying the starting object object will be described with reference to FIG.

ここで、図18のFullGC処理1703のフローチャートの説明に戻る。
ステップ1801の処理の終了後には、JavaVM110の設定フラグを参照し、オブジェクトプロファイリングを行うか否かを判定する(ステップ1802)。
Here, the description returns to the flowchart of the FullGC processing 1703 in FIG.
After the processing in step 1801 is completed, it is determined whether or not object profiling is performed with reference to the setting flag of JavaVM 110 (step 1802).

オブジェクトプロファイリングを行う場合には(ステップ1802の結果が「YES」)、オブジェクト解析部125を実行し、オブジェクトプロファイリング処理を実行する(ステップ1803)。   When performing object profiling (the result of step 1802 is “YES”), the object analysis unit 125 is executed to execute object profiling processing (step 1803).

オブジェクトプロファイリングを行わない場合(ステップ1802の結果が「NO」)、又は、ステップ1803の処理の終了後には、オブジェクトヘッダ701のオブジェクト種別が“必要”でないオブジェクトを不要なオブジェクトとして解放する(ステップ1804)。
ステップ1804の処理の終了後には、本処理を終了する。
When object profiling is not performed (the result of step 1802 is “NO”), or after the processing of step 1803 ends, an object whose object type is not “necessary” in the object header 701 is released as an unnecessary object (step 1804). ).
After the process of step 1804 is completed, this process is terminated.

図19は、本発明の実施の形態のオブジェクトプロファイリング処理1803の手順を示すフローチャートである。本処理は、プロセッサ129がオブジェクト解析部125を処理することによって、実行される。
本処理のステップ1901からステップ1904までの処理を実行することによって、起点オブジェクトを特定することができる。
FIG. 19 is a flowchart showing a procedure of object profiling processing 1803 according to the embodiment of this invention. This processing is executed when the processor 129 processes the object analysis unit 125.
By executing the processing from step 1901 to step 1904 of this processing, the starting object can be specified.

本処理を実行すると、まず、ステップ1801で不要なオブジェクトと判定された全オブジェクトについて、未処理の不要オブジェクトが存在するか否かを判定する(ステップ1901)。   When this process is executed, first, it is determined whether or not there is an unprocessed unnecessary object for all the objects determined to be unnecessary in step 1801 (step 1901).

未処理の不要オブジェクトが存在する場合には(ステップ1901の結果が「YES」)、当該オブジェクトのオブジェクトヘッダ701のオブジェクト種別を参照し、オブジェクト種別が“未解析”であるか否かを判定する(ステップ1902)。   If an unprocessed unnecessary object exists (the result of step 1901 is “YES”), the object type of the object header 701 of the object is referred to and it is determined whether the object type is “unanalyzed”. (Step 1902).

オブジェクト種別が“未解析”である場合には(ステップ1902の結果が「YES」)、当該オブジェクトのオブジェクトヘッダ701のオブジェクト種別を“起点”に設定する(ステップ1903)。   If the object type is “unanalyzed” (the result of step 1902 is “YES”), the object type of the object header 701 of the object is set to “starting point” (step 1903).

ステップ1903の処理の終了後には、ステップ1903の起点オブジェクトに対して、メンバオブジェクト処理を呼び出し、メンバオブジェクト処理を実行する(ステップ1904)。   After the process of step 1903 is completed, the member object process is called for the starting object of step 1903, and the member object process is executed (step 1904).

オブジェクト種別が“未解析”でない場合(ステップ1902の結果が「NO」)、又は、ステップ1904の処理の終了後には、ステップ1901の処理に戻る。そして、未処理の不要オブジェクトに対して、本処理の実行を継続する。   If the object type is not “unanalyzed” (the result of step 1902 is “NO”), or after the process of step 1904 is completed, the process returns to step 1901. Then, the execution of this process is continued for the unprocessed unnecessary object.

未処理の不要オブジェクトが存在しない場合には(ステップ1901の結果が「NO」)、オブジェクトヘッダ701のオブジェクト種別が“起点”である起点オブジェクトについて、当該起点オブジェクトのオブジェクトIDフィールド702を参照し、当該起点オブジェクトのオブジェクトIDを取得する。そして、当該オブジェクトIDに係るオブジェクトプロファイリング回数503の値に1を加算して、オブジェクトプロファイリング情報テーブル302を更新する。また、当該オブジェクトIDに係るメンバオブジェクト情報アドレス504に格納してあるポインタにより当該起点オブジェクトに係るメンバオブジェクト情報303を参照する。なお、当該起点オブジェクトに係るメンバオブジェクト情報303が存在しない場合には、当該起点オブジェクトに係るメンバオブジェクト情報303を生成する。そして、当該起点オブジェクトと当該起点オブジェクトからオブジェクト参照を順次辿ることによって到達可能なメンバオブジェクトの参照関係に応じて、メンバオブジェクトデータ構造を当該メンバオブジェクト情報303に適宜追加し、該当するメンバオブジェクトデータ構造に格納されている、メンバオブジェクトプロファイリング回数に1を加算して、メンバオブジェクト情報303を更新する(ステップ1905)。
ステップ1905の処理の終了後には、本処理を終了する。
If there is no unprocessed unnecessary object (the result of step 1901 is “NO”), the object ID field 702 of the starting object is referred to for the starting object whose object type is “starting” in the object header 701, and Get the object ID of the origin object. Then, 1 is added to the value of the object profiling count 503 related to the object ID, and the object profiling information table 302 is updated. Further, the member object information 303 related to the origin object is referred to by the pointer stored in the member object information address 504 related to the object ID. If member object information 303 relating to the starting object does not exist, member object information 303 relating to the starting object is generated. Then, according to the reference relationship between the starting object and the member object that can be reached by sequentially tracing the object reference from the starting object, the member object data structure is appropriately added to the member object information 303, and the corresponding member object data structure The member object information 303 is updated by adding 1 to the member object profiling count stored in (step 1905).
After the process of step 1905 ends, this process ends.

図20は、本発明の実施の形態のメンバオブジェクト処理1904の手順を示すフローチャートである。本処理は、オブジェクトプロファイリング処理1803から呼び出されることやメンバオブジェクト処理1904から再帰的に呼び出されることによって、実行される。   FIG. 20 is a flowchart showing a procedure of member object processing 1904 according to the embodiment of this invention. This process is executed by being called from the object profiling process 1803 or recursively called from the member object process 1904.

本処理を実行すると、まず、本処理の処理対象となったオブジェクトについて、未処理の参照先オブジェクトが存在するか否かを判定する(ステップ2001)。
未処理の参照先オブジェクトが存在する場合には(ステップ2001の結果が「YES」)、参照先オブジェクトのオブジェクトヘッダ701のオブジェクト種別を参照し、オブジェクト種別を判定する(ステップ2002)。
When this processing is executed, it is first determined whether or not there is an unprocessed reference destination object for the object that is the processing target of this processing (step 2001).
If there is an unprocessed reference destination object (the result of step 2001 is “YES”), the object type is determined by referring to the object type of the object header 701 of the reference destination object (step 2002).

オブジェクト種別が“起点”である場合には(ステップ2002の結果が「起点」)、参照先オブジェクトがメンバオブジェクト処理1803の呼び出し元の起点オブジェクトと同じであるか否かを判定する(ステップ2003)。
参照先オブジェクトがメンバオブジェクト処理1803の呼び出し元の起点オブジェクトと同じでない場合には(ステップ2003の結果が「NO」)、参照先オブジェクトのオブジェクトヘッダ701のオブジェクト種別を“メンバ”に設定する(ステップ2005)。
When the object type is “starting point” (the result of step 2002 is “starting point”), it is determined whether or not the reference destination object is the same as the calling source starting object of the member object processing 1803 (step 2003). .
If the reference destination object is not the same as the calling source object of the member object processing 1803 (the result of step 2003 is “NO”), the object type of the object header 701 of the reference destination object is set to “member” (step) 2005).

オブジェクト種別が“未解析”である場合には(ステップ2002の結果が「未解析」)、参照先オブジェクトのオブジェクトヘッダ701のオブジェクト種別を“メンバ”に設定する(ステップ2004)。
ステップ2004の処理の終了後には、当該参照先オブジェクトに対して、メンバオブジェクト処理1904を実行する(ステップ1904)。
When the object type is “unanalyzed” (the result of step 2002 is “unanalyzed”), the object type of the object header 701 of the reference destination object is set to “member” (step 2004).
After the processing of step 2004 is completed, member object processing 1904 is executed for the referenced object (step 1904).

オブジェクト種別が“メンバ”である場合(ステップ2002の結果が「メンバ」)、参照先オブジェクトがメンバオブジェクト処理1803の呼び出し元の起点オブジェクトと同じである場合(ステップ2003の結果が「YES」)、ステップ2005の処理の終了後、又は、ステップ2004の後に実行するステップ1904の処理の終了後には、ステップ2001の処理に戻る。そして、未処理の参照先オブジェクトに対して(ステップ2001の結果が「YES」)、本処理の実行を継続する。
未処理の参照先オブジェクトが存在しない場合には(ステップ2001の結果が「NO」)、本処理を終了する。
When the object type is “member” (the result of step 2002 is “member”), when the reference destination object is the same as the calling source object of the member object processing 1803 (the result of step 2003 is “YES”). After the process of step 2005 is completed or after the process of step 1904 executed after step 2004 is completed, the process returns to step 2001. Then, the execution of this process is continued for an unprocessed reference destination object (the result of step 2001 is “YES”).
If there is no unprocessed reference destination object (the result of step 2001 is “NO”), this process ends.

図11は、本発明の実施の形態のオブジェクトプロファイリング処理1803のステップ1901からステップ1904までの処理を実行することによって、起点オブジェクトを特定する具体的な手順を示す図である。   FIG. 11 is a diagram showing a specific procedure for identifying the starting object by executing the processing from step 1901 to step 1904 of the object profiling processing 1803 according to the embodiment of this invention.

各ノードはオブジェクトを示している。細線の一重丸で示すオブジェクトは、FullGC処理1703のステップ1801の処理によってオブジェクトヘッダ701にオブジェクト種別“未解析”が設定されたままの不要オブジェクトである。なお、ノード内の記号はクラス名、クラス名の右下の数字はオブジェクトIDフィールド702に格納されたオブジェクトIDを示している。   Each node represents an object. An object indicated by a single circle of a thin line is an unnecessary object in which the object type “unanalyzed” is still set in the object header 701 by the processing of step 1801 of the full GC processing 1703. The symbol in the node indicates the class name, and the number on the lower right of the class name indicates the object ID stored in the object ID field 702.

また、オブジェクトを連結する矢印は、オブジェクトの参照関係を示している。実線の矢印は、オブジェクトプロファイリング処理1803のステップ1901からステップ1904までの処理を実行することによって辿られたオブジェクト参照であり、破線の矢印は、オブジェクト参照は存在するが、オブジェクトプロファイリング処理1803のステップ1901からステップ1904までの処理を実行することによってまだ辿られていないオブジェクト参照を示している。   An arrow connecting the objects indicates the reference relationship of the objects. A solid line arrow is an object reference traced by executing the processing from step 1901 to step 1904 of the object profiling process 1803, and a broken line arrow is a step 1901 of the object profiling process 1803 although an object reference exists. The object reference which has not been traced yet by executing the processing from step 1904 to step 1904 is shown.

図11(a)は、FullGC処理1703のステップ1801の処理の終了時点の状態を示している。なお、オブジェクトの参照関係が判明していない状態から、オブジェクト1009、オブジェクト1011、オブジェクト1008、オブジェクト1010、オブジェクト1012の順にオブジェクトを処理していくものとする。   FIG. 11A shows the state at the end of the processing of step 1801 of the full GC processing 1703. It is assumed that the objects are processed in the order of the object 1009, the object 1011, the object 1008, the object 1010, and the object 1012 from a state in which the object reference relationship is not known.

図11(b)は、オブジェクト1009を処理し、オブジェクトプロファイリング処理1803のステップ1902の判定においてオブジェクト種別が“未解析”であるため、オブジェクト1009のオブジェクトヘッダ701のオブジェクト種別を“起点”に設定した状態を示している。その結果、起点オブジェクトであるオブジェクト1009は太線の一重丸で示す。   FIG. 11B processes the object 1009 and sets the object type of the object header 701 of the object 1009 to “starting point” because the object type is “unanalyzed” in the determination in step 1902 of the object profiling process 1803. Indicates the state. As a result, the starting object 1009 is indicated by a single circle with a bold line.

図11(c)は、オブジェクト1009の参照先であるオブジェクト1011を処理し、メンバオブジェクト処理1904のステップ2002の判定においてオブジェクト種別が“未解析”であるため、オブジェクト1011のオブジェクトヘッダ701のオブジェクト種別を“メンバ”に設定した状態を示す。その結果、メンバオブジェクトであるオブジェクト1011は×を付した一重丸で示す。オブジェクト1011の参照先オブジェクトは存在しないため、オブジェクト1009の処理はここで終了となる。
また、オブジェクト1011を処理し、オブジェクトプロファイリング処理1803のステップ1902の判定においてオブジェクト種別が“未解析”でないため、オブジェクト1011の処理はここで終了となる。
FIG. 11C processes the object 1011 that is the reference destination of the object 1009, and the object type is “unanalyzed” in step 2002 of the member object processing 1904. Therefore, the object type of the object header 701 of the object 1011 Indicates that “Member” is set. As a result, the object 1011 which is a member object is indicated by a single circle with a cross. Since the reference destination object of the object 1011 does not exist, the processing of the object 1009 ends here.
Further, since the object 1011 is processed and the object type is not “unanalyzed” in the determination in step 1902 of the object profiling process 1803, the process of the object 1011 is ended here.

図11(d)は、オブジェクト1008を処理し、オブジェクトプロファイリング処理1803のステップ1902の判定においてオブジェクト種別が“未解析”であるため、オブジェクト1008のオブジェクトヘッダ701のオブジェクト種別を“起点”に設定した状態を示している。   FIG. 11D processes the object 1008 and sets the object type of the object header 701 of the object 1008 to “starting point” because the object type is “unanalyzed” in the determination in step 1902 of the object profiling process 1803. Indicates the state.

図11(e)は、オブジェクト1008の参照先であるオブジェクト1009を処理し、メンバオブジェクト処理1904のステップ2002の判定においてオブジェクト種別が“起点”であり、メンバオブジェクト処理1904のステップ2003の判定において、参照先であるオブジェクト1009と呼び出し元のオブジェクト1008は同じでないため、参照先であるオブジェクト1009のオブジェクトヘッダ701のオブジェクト種別を“メンバ”に設定した状態を示している。
また、オブジェクト1008の参照先であるオブジェクト1010を処理し、メンバオブジェクト処理1904のステップ2002の判定においてオブジェクト種別が“未解析”であるため、参照先であるオブジェクト1010のオブジェクトヘッダ701のオブジェクト種別を“メンバ”に設定した状態を示している。さらに、オブジェクト1010の参照先であるオブジェクト1012を処理し、メンバオブジェクト処理1904のステップ2002の判定においてオブジェクト種別が“未解析”であるため、参照先であるオブジェクト1012のオブジェクトヘッダ701にオブジェクト種別“メンバ”を設定した状態を示している。なお、オブジェクト1012の参照先であるオブジェクト1008は、メンバオブジェクト処理1904のステップ2002の判定においてオブジェクト種別が“起点”であり、メンバオブジェクト処理1904のステップ2003の判定において、呼び出し元のオブジェクト1008と同じであるため、オブジェクト1008の処理はここで終了となる。
さらに、オブジェクト1010を処理し、オブジェクトプロファイリング処理1803のステップ1902の判定においてオブジェクト種別が“未解析”でないため、オブジェクト1010の処理はここで終了となる。オブジェクト1012についても同様である。
FIG. 11 (e) processes the object 1009 that is the reference destination of the object 1008, the object type is “starting point” in the determination in step 2002 of the member object processing 1904, and in the determination in step 2003 of the member object processing 1904, Since the reference destination object 1009 and the call source object 1008 are not the same, the object type of the object header 701 of the reference destination object 1009 is set to “member”.
In addition, since the object 1010 that is the reference destination of the object 1008 is processed and the object type is “unanalyzed” in the determination of step 2002 of the member object processing 1904, the object type of the object header 701 of the object 1010 that is the reference destination is changed. The state set to “Member” is shown. Further, the object 1012 that is the reference destination of the object 1010 is processed, and the object type is “unanalyzed” in the determination in step 2002 of the member object processing 1904. Therefore, the object type “in the object header 701 of the object 1012 that is the reference destination” This shows a state in which “Member” is set. Note that the object 1008 that is the reference destination of the object 1012 has the object type “starting point” in the determination in step 2002 of the member object processing 1904, and is the same as the calling object 1008 in the determination in step 2003 of the member object processing 1904. Therefore, the processing of the object 1008 ends here.
Furthermore, since the object 1010 is processed and the object type is not “unanalyzed” in the determination in step 1902 of the object profiling processing 1803, the processing of the object 1010 ends here. The same applies to the object 1012.

図11(f)は、オブジェクト1009、オブジェクト1011、オブジェクト1008、オブジェクト1010、オブジェクト1012の処理が全て終了した状態を示しており、このオブジェクトの参照関係の解析により、オブジェクト1008が起点オブジェクトであると特定することができる。また、オブジェクト1009、オブジェクト1011、オブジェクト1010、及び、オブジェクト1012はメンバオブジェクトであり、メンバオブジェクトから起点オブジェクトへのオブジェクト参照1013は、存在しないものとして処理する。   FIG. 11 (f) shows a state in which all the processing of the object 1009, the object 1011, the object 1008, the object 1010, and the object 1012 has been completed, and it is determined that the object 1008 is the starting object by analyzing the reference relationship of this object. Can be identified. Further, the object 1009, the object 1011, the object 1010, and the object 1012 are member objects, and the object reference 1013 from the member object to the starting object is processed as not existing.

図21は、本発明の実施の形態のCopyGC処理1702の手順を示すフローチャートである。本処理は、プロセッサ129がCopyGC部124を処理することによって、実行される。   FIG. 21 is a flowchart showing a procedure of the copy garbage collection process 1702 according to the embodiment of this invention. This process is executed when the processor 129 processes the CopyGC unit 124.

プロセッサ129がCopyGC部124を実行すると、CopyGC部124は、まず、New領域に格納してある以降のプログラム実行に必要なオブジェクトをNew領域内の別の領域に順次移動させ、移動されることのなかったオブジェクトを不要なオブジェクトとして解放する(ステップ2101)。なお、ステップ2101の処理において、外部ヒープ領域116に格納されている起点オブジェクトからオブジェクト参照を順次辿ることによって到達可能なオブジェクトについては、起点オブジェクトに対して、メンバオブジェクト移動処理を呼び出し、メンバオブジェクト移動処理を実行することで、適切な移動先に移動させる。メンバオブジェクト移動処理の詳細は、図22で説明する。   When the processor 129 executes the CopyGC unit 124, the CopyGC unit 124 first moves the objects necessary for the subsequent program execution stored in the New area to another area in the New area and moves them. The object that did not exist is released as an unnecessary object (step 2101). In the process of step 2101, for an object that can be reached by sequentially tracing object references from the starting object stored in the external heap area 116, the member object moving process is called for the starting object to move the member object. By executing the process, it is moved to an appropriate destination. Details of the member object movement processing will be described with reference to FIG.

ステップ2101の処理の終了後には、例えば、外部ヒープ117へのオブジェクト参照を検査し、どこからも参照されていない不要な外部ヒープ117が存在するか否かを判定する(ステップ2102)。
不要な外部ヒープ117が存在する場合には(ステップ2102の結果が「YES」)、不要な外部ヒープ領域116、例えば、外部ヒープ1や外部ヒープ3を解放することで、外部ヒープ1や外部ヒープ3に格納してある不要なオブジェクトを解放する(ステップ2103)。
After the processing of step 2101 is completed, for example, an object reference to the external heap 117 is inspected, and it is determined whether or not there is an unnecessary external heap 117 that is not referenced from anywhere (step 2102).
If there is an unnecessary external heap 117 (the result of step 2102 is “YES”), by releasing the unnecessary external heap area 116, for example, the external heap 1 or the external heap 3, the external heap 1 or the external heap The unnecessary object stored in 3 is released (step 2103).

不要な外部ヒープ117が存在しない場合(ステップ2102の結果が「NO」)、又は、ステップ2103の処理の終了後には、JavaVM110の設定フラグを参照し、CopyGC処理時にオブジェクト生成命令のオブジェクト生成先を変更するか否かを判定する(ステップ2104)。
オブジェクト生成先を変更する場合には(ステップ2104の結果が「YES」)、オブジェクト生成情報テーブル301に対して、オブジェクト生成先変更部113を実行し、オブジェクト生成先変更処理を実行する(ステップ1303)。
オブジェクト生成先を変更しない場合(ステップ2104の結果が「NO」)、又は、ステップ1303の処理の終了後には、本処理を終了する。
If there is no unnecessary external heap 117 (the result of step 2102 is “NO”), or after the processing of step 2103 is completed, the setting flag of JavaVM 110 is referred to, and the object generation destination of the object generation instruction is specified during CopyGC processing. It is determined whether or not to change (step 2104).
When changing the object generation destination (the result of step 2104 is “YES”), the object generation destination changing unit 113 is executed on the object generation information table 301 to execute the object generation destination changing process (step 1303). ).
When the object generation destination is not changed (the result of step 2104 is “NO”), or after the processing of step 1303 is ended, this processing is ended.

なお、本発明の実施の形態では、CopyGC処理時に不要な外部ヒープの解放とオブジェクト生成命令のオブジェクト生成先の変更を実施しているが、CopyGC処理時以外の所定のタイミングでこれらの処理を実施してもよい。   In the embodiment of the present invention, unnecessary external heap release and change of the object generation destination of the object generation instruction are performed at the time of CopyGC processing, but these processing are performed at a predetermined timing other than at the time of CopyGC processing. May be.

図22は、本発明の実施の形態のメンバオブジェクト移動処理の手順を示すフローチャートである。本処理は、CopyGC処理1702のステップ2101の処理において、実行される。   FIG. 22 is a flowchart illustrating a procedure of member object movement processing according to the embodiment of this invention. This process is executed in the process of Step 2101 of the CopyGC process 1702.

本処理を実行すると、まず、本処理の処理対象となったオブジェクトについて、未処理の参照先オブジェクトが存在するか否かを判定する(ステップ2201)。
未処理の参照先オブジェクトが存在する場合には(ステップ2201の結果が「YES」)、参照先オブジェクトがCopyGC処理1702のステップ2101の処理によるNew領域からOld領域への移動対象であるか否かを判定する(ステップ2202)。なお、参照先オブジェクトがCopyGC処理によるNew領域からOld領域への移動対象であるとは、少なくともその参照先オブジェクトがOld領域に移動するのに十分な回数のCopyGCを経ている長命なオブジェクトであることを意味する。
When this processing is executed, it is first determined whether or not there is an unprocessed reference destination object for the object that is the processing target of this processing (step 2201).
If there is an unprocessed reference destination object (the result of step 2201 is “YES”), whether or not the reference destination object is a target to be moved from the New area to the Old area by the process of step 2101 of the CopyGC process 1702. Is determined (step 2202). Note that a reference object is a target to be moved from the New area to the Old area by CopyGC processing is a long-lived object that has undergone at least a number of CopyGCs to move the reference object to the Old area. Means.

参照先オブジェクトがNew領域からOld領域への移動対象である場合には(ステップ2202の結果が「YES」)、参照先オブジェクトのメンバオブジェクト適合率が、JavaVM110の設定閾値(第3の閾値)以上であるか否かを判定する(ステップ2203)。なお、この判定では、メンバオブジェクトのクラスサイズなどに応じて、メンバオブジェクト適合率に重み付けを行ってもよい。   When the reference destination object is a movement target from the New area to the Old area (the result of Step 2202 is “YES”), the member object relevance ratio of the reference destination object is equal to or greater than the setting threshold (third threshold) of the JavaVM 110 It is determined whether or not (step 2203). In this determination, the member object relevance ratio may be weighted according to the class size of the member object.

参照先オブジェクトのメンバオブジェクト適合率が、設定閾値以上である場合には(ステップ2203の結果が「YES」)、参照先オブジェクトを起点オブジェクトと同じ外部ヒープに移動する(ステップ2204)。   If the member object conformance rate of the reference destination object is equal to or greater than the set threshold value (the result of step 2203 is “YES”), the reference destination object is moved to the same external heap as the origin object (step 2204).

図12は、本発明の実施の形態のメンバオブジェクト移動処理の(a)開始時点、及び、(b)終了時点における外部ヒープ1、外部ヒープ2、及び、Javaヒープ115のNew領域とOld領域に格納されたオブジェクトの状態を示す図である。
各ノードはオブジェクトを示している。なお、ノード内の記号はクラス名の略称を示している。例えば、ノード内の記号が“A”であるオブジェクト1201のクラス名は“ClassA”になる。また、オブジェクトを連結する矢印は、オブジェクトの参照関係を示している。
FIG. 12 shows the New and Old areas of the external heap 1, the external heap 2 and the Java heap 115 at the start and (b) end of the member object move processing according to the embodiment of the present invention. It is a figure which shows the state of the stored object.
Each node represents an object. Note that symbols in the nodes indicate class names. For example, the class name of the object 1201 whose symbol in the node is “A” is “ClassA”. An arrow connecting the objects indicates the reference relationship of the objects.

ここで、オブジェクト1201は、外部ヒープ1に格納された起点オブジェクトである。また、オブジェクト1208は、外部ヒープ2に格納された起点オブジェクトである。オブジェクト1201が格納された外部ヒープ1の外部ヒープヘッダ901には、オブジェクト1201に係るメンバオブジェクト情報303へのポインタが格納してあり、このポインタによりオブジェクト1201に係るメンバオブジェクト情報303を参照する。同様に、オブジェクト1208が格納された外部ヒープ2の外部ヒープヘッダ901には、オブジェクト1208に係るメンバオブジェクト情報303へのポインタが格納してあり、このポインタによりオブジェクト1208に係るメンバオブジェクト情報303を参照する。なお、ここでは、オブジェクト1201に係るメンバオブジェクト情報303は図6に示してあるメンバオブジェクト情報303であるものとする。このメンバオブジェクト情報303の起点オブジェクトデータ構造601を参照して、ClassAの起点オブジェクトはFullGCによってOld領域で4回解放されたことがわかる。また、メンバオブジェクト情報303のメンバオブジェクトデータ構造606を参照して、ClassAの起点オブジェクトがFullGCによって解放されたことによってClassFのメンバオブジェクトがOld領域で3回解放されたこと、メンバオブジェクト情報303のメンバオブジェクトデータ構造605を参照して、ClassAの起点オブジェクトがFullGCによって解放されたことによってClassEのメンバオブジェクトがOld領域で2回解放されたことなどがわかる。   Here, the object 1201 is a starting object stored in the external heap 1. An object 1208 is a starting point object stored in the external heap 2. A pointer to member object information 303 related to the object 1201 is stored in the external heap header 901 of the external heap 1 in which the object 1201 is stored, and the member object information 303 related to the object 1201 is referred to by this pointer. Similarly, a pointer to the member object information 303 related to the object 1208 is stored in the external heap header 901 of the external heap 2 in which the object 1208 is stored, and the member object information 303 related to the object 1208 is referred to by this pointer. . Here, it is assumed that the member object information 303 related to the object 1201 is the member object information 303 shown in FIG. Referring to the starting object data structure 601 of this member object information 303, it can be seen that the starting object of Class A has been released four times in the Old area by FullGC. Further, referring to the member object data structure 606 of the member object information 303, the ClassA member object is released three times in the Old area by releasing the starting object of ClassA by FullGC, the members of the member object information 303 With reference to the object data structure 605, it can be seen that the class A member object was released twice in the Old area by releasing the starting object of Class A by FullGC.

ここで、ClassB、ClassC、ClassD、ClassE、ClassF、及び、ClassGのメンバオブジェクト適合率は、それぞれ、1.00、1.00、1.00、0.50、0.75、0.25である。メンバオブジェクト適合率が高いメンバオブジェクトは、起点オブジェクトが不要になると同時に不要になる可能性が高いので、メンバオブジェクト適合率が高いメンバオブジェクトを起点オブジェクトと同じ外部ヒープに格納するようにすることによって、起点オブジェクトが不要になると同時に、その外部ヒープを解放することによって、メンバオブジェクト適合率が高いメンバオブジェクトを解放できる可能性も高くなる。そのため、メンバオブジェクト移動処理では、メンバオブジェクト適合率の高いメンバオブジェクトを起点オブジェクトと同じ外部ヒープに移動するようにする。例えば、メンバオブジェクト適合率の設定閾値が0.60の場合、メンバオブジェクト適合率が0.60以上であるオブジェクト1202、オブジェクト1203、オブジェクト1204、及び、オブジェクト1206は、メンバオブジェクト移動処理によって、オブジェクト1201と同じ外部ヒープ1に移動する。一方、メンバオブジェクト適合率が0.60以上でないオブジェクト1205は、メンバオブジェクト移動処理によって、ステップ2203の結果が「YES」となる別の起点オブジェクトであるオブジェクト1208と同じ外部ヒープ2に移動する。また、オブジェクト1207は、外部ヒープ領域116に格納された起点オブジェクトからオブジェクト参照を順次辿ることによって到達可能なオブジェクトであるが、メンバオブジェクト適合率が0.60以上ではないので、Javaヒープ領域115のOld領域に移動する。   Here, the member object matching rates of ClassB, ClassC, ClassD, ClassE, ClassF, and ClassG are 1.00, 1.00, 1.00, 0.50, 0.75, and 0.25, respectively. A member object with a high member object conformance rate is likely to be unnecessary at the same time as the starting object becomes unnecessary, so by storing a member object with a high member object conformance rate in the same external heap as the starting object, At the same time as the starting object becomes unnecessary, releasing the external heap also increases the possibility of releasing a member object having a high member object matching rate. For this reason, in the member object moving process, a member object having a high member object matching rate is moved to the same external heap as the starting object object. For example, when the setting threshold value of the member object conformance rate is 0.60, the object 1202, the object 1203, the object 1204, and the object 1206 having the member object conformance rate of 0.60 or more are subject to the same external heap as the object 1201 by the member object moving process. Move to 1. On the other hand, the object 1205 whose member object relevance rate is not 0.60 or more moves to the same external heap 2 as the object 1208 which is another starting object whose result of step 2203 is “YES” by the member object moving process. The object 1207 is an object that can be reached by sequentially tracing the object reference from the starting object stored in the external heap area 116. However, since the member object relevance rate is not 0.60 or more, the Old area of the Java heap area 115 Move to.

ここで、図22のメンバオブジェクト移動処理のフローチャートの説明に戻る。
ステップ2204の処理の終了後には、参照先オブジェクトに対して、メンバオブジェクト移動処理を呼び出し、メンバオブジェクト移動処理を実行する(ステップ2205)。
Now, the description returns to the flowchart of the member object movement process of FIG.
After the process of step 2204 is completed, the member object movement process is called for the reference destination object, and the member object movement process is executed (step 2205).

参照先オブジェクトがNew領域からOld領域への移動対象でない場合(ステップ2202の結果が「NO」)、参照先オブジェクトのメンバオブジェクト適合率が、設定閾値以上でない場合(ステップ2203の結果が「NO」)、及び、ステップ2205の処理の終了後には、ステップ2201の処理に戻る。そして、未処理の参照先オブジェクトに対して、本処理の実行を継続する。
未処理の参照先オブジェクトが存在しない場合には(ステップ2201の結果が「NO」)、本処理を終了する。
When the reference destination object is not the object to be moved from the New area to the Old area (the result of step 2202 is “NO”), when the member object precision of the reference destination object is not equal to or greater than the set threshold (the result of step 2203 is “NO”) ), And after the process of step 2205 ends, the process returns to step 2201. Then, the execution of this process is continued for the unprocessed reference destination object.
If there is no unprocessed reference destination object (the result of step 2201 is “NO”), this process ends.

なお、このメンバオブジェクト移動処理において、ステップ2202の処理は省略してもよい。つまり、参照先オブジェクト(メンバオブジェクト)を起点オブジェクトが存在する外部ヒープと同じ外部ヒープに移動するか否かの判断は、ステップ2203の判定だけで行ってもよい。換言すれば、場合によっては、参照先オブジェクトがOld領域へ移るほど長命でなくても、参照先オブジェクトを起点オブジェクトと同じ外部ヒープに移動するように処理してGCの発生を抑えるほうが好都合である。ただ、一概にはいえないが、図22の処理のように、ステップ2202の判定を設けて、より長命な参照先オブジェクトを起点オブジェクトと同じ外部ヒープに移動することは効果的である。   In this member object movement process, the process of step 2202 may be omitted. That is, whether or not to move the reference object (member object) to the same external heap as the external heap in which the origin object exists may be determined only by the determination in step 2203. In other words, in some cases, it is more convenient to suppress the occurrence of GC by processing the referenced object to move to the same external heap as the starting object, even if the referenced object is not long enough to move to the Old area. . However, although it cannot be generally stated, it is effective to provide a determination in step 2202 and move a longer-lived reference destination object to the same external heap as the origin object, as in the processing of FIG.

本発明の実施の形態では、例えば図23のネットワーク構成に示すように、複数の計算機システム101とウェブサーバ201とがネットワーク203を介して通信可能に接続している。計算機システム101は、Javaソースファイル104の記述内容に従って機能するJavaアプリケーション132を有しており、JavaVM110がJavaアプリケーション132を実行することで所定のサービスを実現する。   In the embodiment of the present invention, for example, as shown in the network configuration of FIG. 23, a plurality of computer systems 101 and a web server 201 are communicably connected via a network 203. The computer system 101 has a Java application 132 that functions in accordance with the description content of the Java source file 104, and the Java VM 110 executes the Java application 132 to realize a predetermined service.

一方、ウェブサーバ201は、入力装置、出力装置、プロセッサ、記憶装置といったハードウェア資源を有するコンピュータである。このウェブサーバ201は、例えばJavaサーブレット202を有している。ウェブサーバ201は、Javaサーブレット202を機能させることにより、動的にウェブページを生成し、そのウェブページをリクエストのあった計算機システム101に送信する。   On the other hand, the web server 201 is a computer having hardware resources such as an input device, an output device, a processor, and a storage device. The web server 201 has a Java servlet 202, for example. The web server 201 dynamically creates a web page by causing the Java servlet 202 to function, and transmits the web page to the computer system 101 that requested the web page.

なお、計算機システム101は、Javaアプリケーション132ではなく、Javaアプレットを有していてもよい。この場合、ウェブサーバ201が提供するウェブページを閲覧するウェブブラウザを用いてJavaアプレットを実行することで所定のサービスを実現する。
また、計算機システム101が有するJavaVM110は、予め出荷時に搭載されたものであってもよいし、ウェブサーバ201から取得したものであってもよい。
The computer system 101 may have a Java applet instead of the Java application 132. In this case, a predetermined service is realized by executing a Java applet using a web browser that browses a web page provided by the web server 201.
Further, the Java VM 110 included in the computer system 101 may be previously installed at the time of shipment, or may be acquired from the web server 201.

≪その他≫
前記した各実施形態は、本発明を実施するために好適のものであるが、その実施形式はこれらに限定されるものでなく、本発明の要旨を変更しない範囲内において種々変形することが可能である。
≪Others≫
Each of the above-described embodiments is suitable for carrying out the present invention, but the form of implementation is not limited to these, and various modifications can be made without departing from the scope of the present invention. It is.

例えば、本実施形態で取り扱ったGCは、世代別GCであったが、本発明が適用可能なGCはこれに限らない。例えばパラレルGCに対しても適用可能である。   For example, the GC handled in this embodiment is a generational GC, but the GC to which the present invention is applicable is not limited to this. For example, it can be applied to a parallel GC.

また、オブジェクトプロファイリング情報テーブル302において登録するオブジェクトプロファイリング回数503は、FullGCの回数でなく、CopyGCの回数であったり、他のGCの回数であったりしてもよい。   In addition, the object profiling count 503 registered in the object profiling information table 302 may be the number of copy GCs or the number of other GCs instead of the number of full GCs.

その他、ハードウェア、ソフトウェア、各フローチャート等の具体的な構成について、本発明の趣旨を逸脱しない範囲で適宜変更が可能である。   In addition, specific configurations of hardware, software, flowcharts, and the like can be appropriately changed without departing from the spirit of the present invention.

101 計算機システム(情報処理装置)
102 補助記憶(記憶部)
103 Javaクラスファイル
104 Javaソースファイル
105 オブジェクト解析情報ファイル
106 設定ファイル
107 主記憶(記憶部)
108 データ領域
109 Javaコンパイラ
110 JavaVM
111 バイトコード読み込み部
112 バイトコード情報
113 オブジェクト生成先変更部
114 メソッド実行部
115 Javaヒープ領域(第1のメモリ領域)
116 外部ヒープ領域(第2のメモリ領域)
117 外部ヒープ1
118 外部ヒープ2
119 外部ヒープ3
120 メモリ管理部
121 オブジェクト生成部
122 GC部
123 FullGC部
124 CopyGC部
125 オブジェクト解析部
126 オブジェクト解析情報
127 オペレーティングシステム
128 バス
129 プロセッサ(制御部)
130 入力装置
131 出力装置
132 Javaアプリケーション
201 ウェブサーバ
202 Javaサーブレット
203 ネットワーク
301 オブジェクト生成情報テーブル
302 オブジェクトプロファイリング情報テーブル
303 メンバオブジェクト情報
101 Computer system (information processing equipment)
102 Auxiliary storage (storage unit)
103 Java class file 104 Java source file 105 Object analysis information file 106 Setting file 107 Main memory (storage unit)
108 Data Area 109 Java Compiler 110 JavaVM
111 Byte code reading unit 112 Byte code information 113 Object generation destination changing unit 114 Method executing unit 115 Java heap area (first memory area)
116 External heap area (second memory area)
117 External heap 1
118 External heap 2
119 External heap 3
DESCRIPTION OF SYMBOLS 120 Memory management part 121 Object generation part 122 GC part 123 FullGC part 124 CopyGC part 125 Object analysis part 126 Object analysis information 127 Operating system 128 Bus 129 Processor (control part)
DESCRIPTION OF SYMBOLS 130 Input device 131 Output device 132 Java application 201 Web server 202 Java servlet 203 Network 301 Object generation information table 302 Object profiling information table 303 Member object information

Claims (7)

プログラムを実行するために確保したメモリ領域において、不要になったメモリ領域は自動的に解放する自動解放機能を備えた仮想マシンが稼働する情報処理装置におけるメモリ管理方法であって、
前記情報処理装置の記憶部は、
前記メモリ領域として、前記自動解放機能の対象となる第1のメモリ領域と、
前記メモリ領域として、前記自動解放機能の対象外となる第2のメモリ領域と、を有し、
プログラムを実行するときに生成されるオブジェクトごとに、当該オブジェクトに係るオブジェクト生成命令と、前記オブジェクト生成命令により当該オブジェクトを前記第1のメモリ領域に生成した回数を示すオブジェクト生成回数と、前記自動解放機能により前記第1のメモリ領域を解放した回数を示すオブジェクトプロファイリング回数と、を含むオブジェクト解析情報を記憶しており、
前記情報処理装置の制御部は、
前記オブジェクト解析情報を参照して、前記オブジェクトのオブジェクト生成回数が、前記記憶部に記憶されている第1の閾値以上であるか否かを判定するステップと、
前記オブジェクト生成回数が前記第1の閾値以上であるとき、前記オブジェクト生成回数に対する前記オブジェクトプロファイリング回数の割合が、前記記憶部に記憶されている第2の閾値以上であるか否かを判定するステップと、
前記割合が前記第2の閾値以上であるとき、前記オブジェクト生成命令によるオブジェクトの生成先を前記第2のメモリ領域に変更するステップと、を実行する
ことを特徴とするメモリ管理方法。
A memory management method in an information processing apparatus that operates a virtual machine having an automatic release function that automatically releases a memory area that is no longer necessary in a memory area reserved for executing a program,
The storage unit of the information processing apparatus
As the memory area, a first memory area targeted for the automatic release function;
A second memory area that is not subject to the automatic release function, as the memory area;
For each object generated when the program is executed, an object generation instruction related to the object, an object generation count indicating the number of times the object is generated in the first memory area by the object generation instruction, and the automatic release Object analysis information including the object profiling count indicating the number of times the first memory area has been released by the function,
The control unit of the information processing apparatus
Referring to the object analysis information, determining whether the number of object generations of the object is equal to or greater than a first threshold stored in the storage unit;
Determining whether a ratio of the object profiling frequency to the object generation frequency is equal to or greater than a second threshold value stored in the storage unit when the object generation frequency is equal to or greater than the first threshold value; When,
When the ratio is equal to or greater than the second threshold, the step of changing the generation destination of the object by the object generation instruction to the second memory area is executed.
前記情報処理装置の制御部は、
前記第1のメモリ領域に生成されたオブジェクトのうち、前記仮想マシンが直接参照可能なオブジェクト、および前記直接参照可能なオブジェクトが直接的または間接的に参照するオブジェクトを除くオブジェクトを特定するステップと、
前記オブジェクト解析情報を参照して、前記特定したオブジェクトのオブジェクト生成回数が前記第1の閾値以上であり、当該オブジェクト生成回数に対する前記オブジェクトプロファイリング回数の割合が前記第2の閾値以上であるとき、前記オブジェクト生成命令によるオブジェクトの生成先を前記第2のメモリ領域に変更するステップと、を実行する
ことを特徴とする請求項1に記載のメモリ管理方法。
The control unit of the information processing apparatus
Identifying objects other than objects that can be directly referred to by the virtual machine and objects that are directly or indirectly referenced by the directly referenceable objects among the objects generated in the first memory area;
With reference to the object analysis information, when the object generation count of the identified object is equal to or greater than the first threshold, and a ratio of the object profiling count to the object generation count is equal to or greater than the second threshold, The memory management method according to claim 1, further comprising: changing a generation destination of an object by an object generation instruction to the second memory area.
前記情報処理装置の制御部は、
前記特定したオブジェクトにおいて、前記仮想マシンから直接参照されず、並びにいずれのオブジェクトからも参照されないオブジェクトである起点オブジェクト、および前記起点オブジェクトが直接的または間接的に参照するオブジェクトであるメンバオブジェクトを設定するステップと、
前記起点オブジェクトのオブジェクトプロファイリング回数に対する前記メンバオブジェクトのオブジェクトプロファイリング回数の割合が、前記記憶部に記憶されている第3の閾値以上であるか否かを判定するステップと、
前記割合が前記第3の閾値以上であるとき、前記メンバオブジェクトも前記第2のメモリ領域に移動するステップと、を実行する
ことを特徴とする請求項2に記載のメモリ管理方法。
The control unit of the information processing apparatus
In the specified object, a starting object that is an object that is not directly referenced from the virtual machine and that is not referred to by any object, and a member object that is an object that the starting object directly or indirectly references are set. Steps,
Determining whether the ratio of the object profiling count of the member object to the object profiling count of the starting object is equal to or greater than a third threshold stored in the storage unit;
The memory management method according to claim 2, wherein when the ratio is equal to or greater than the third threshold, the member object is also moved to the second memory area.
前記自動解放機能は、世代別ガベージコレクションによる自動解放機能であり、
前記第1のメモリ領域は、長命でないオブジェクトが格納されるNew領域と、長命なオブジェクトが格納されるOld領域とを含んで構成される
ことを特徴とする請求項1から請求項3のいずれか一項に記載のメモリ管理方法。
The automatic release function is an automatic release function by generational garbage collection,
The first memory area includes a New area in which an object that is not long-lived is stored, and an Old area in which an object that is long-lived is stored. The memory management method according to one item.
前記オブジェクトプロファイリング回数が示す前記第1のメモリ領域の解放は、前記New領域および前記Old領域の両方を含む領域を対象にする解放である
ことを特徴とする請求項4に記載のメモリ管理方法。
The memory management method according to claim 4, wherein the release of the first memory area indicated by the number of times of object profiling is a release for an area including both the New area and the Old area.
プログラムを実行するために確保したメモリ領域において、不要になったメモリ領域は自動的に解放する自動解放機能を備えた仮想マシンが稼働する情報処理装置として機能させるメモリ管理プログラムであって、
前記情報処理装置の記憶部は、
前記メモリ領域として、前記自動解放機能の対象となる第1のメモリ領域と、
前記メモリ領域として、前記自動解放機能の対象外となる第2のメモリ領域と、を有し、
プログラムを実行するときに生成されるオブジェクトごとに、当該オブジェクトに係るオブジェクト生成命令と、前記オブジェクト生成命令により当該オブジェクトを前記第1のメモリ領域に生成した回数を示すオブジェクト生成回数と、前記自動解放機能により前記第1のメモリ領域を解放した回数を示すオブジェクトプロファイリング回数と、を含むオブジェクト解析情報を記憶しており、
前記メモリ管理プログラムは、前記情報処理装置の制御部に、
前記オブジェクト解析情報を参照して、前記オブジェクトのオブジェクト生成回数が、前記記憶部に記憶されている第1の閾値以上であるか否かを判定する処理と、
前記オブジェクト生成回数が前記第1の閾値以上であるとき、前記オブジェクト生成回数に対する前記オブジェクトプロファイリング回数の割合が、前記記憶部に記憶されている第2の閾値以上であるか否かを判定する処理と、
前記割合が前記第2の閾値以上であるとき、前記オブジェクト生成命令によるオブジェクトの生成先を前記第2のメモリ領域に変更する処理と、を実行させる
ことを特徴とするメモリ管理プログラム。
A memory management program that functions as an information processing apparatus that operates a virtual machine having an automatic release function that automatically releases a memory area that is no longer necessary in a memory area reserved for executing a program,
The storage unit of the information processing apparatus
As the memory area, a first memory area targeted for the automatic release function;
A second memory area that is not subject to the automatic release function, as the memory area;
For each object generated when the program is executed, an object generation instruction related to the object, an object generation count indicating the number of times the object is generated in the first memory area by the object generation instruction, and the automatic release Object analysis information including the object profiling count indicating the number of times the first memory area has been released by the function,
The memory management program is stored in the control unit of the information processing apparatus.
With reference to the object analysis information, a process of determining whether or not the number of object generations of the object is equal to or greater than a first threshold stored in the storage unit;
A process of determining whether a ratio of the object profiling frequency to the object generation frequency is equal to or greater than a second threshold value stored in the storage unit when the object generation frequency is equal to or greater than the first threshold value. When,
When the ratio is equal to or greater than the second threshold value, a process of changing an object generation destination by the object generation instruction to the second memory area is executed.
プログラムを実行するために確保したメモリ領域において、不要になったメモリ領域は自動的に解放する自動解放機能を備えた仮想マシンが稼働する情報処理装置であって、
前記メモリ領域として、前記自動解放機能の対象となる第1のメモリ領域と、
前記メモリ領域として、前記自動解放機能の対象外となる第2のメモリ領域と、を有し、
プログラムを実行するときに生成されるオブジェクトごとに、当該オブジェクトに係るオブジェクト生成命令と、前記オブジェクト生成命令により当該オブジェクトを前記第1のメモリ領域に生成した回数を示すオブジェクト生成回数と、前記自動解放機能により前記第1のメモリ領域を解放した回数を示すオブジェクトプロファイリング回数と、を含むオブジェクト解析情報を記憶している記憶部と、
前記オブジェクト解析情報を参照して、前記オブジェクトのオブジェクト生成回数が、前記記憶部に記憶されている第1の閾値以上であるか否かを判定する制御と、
前記オブジェクト生成回数が前記第1の閾値以上であるとき、前記オブジェクト生成回数に対する前記オブジェクトプロファイリング回数の割合が、前記記憶部に記憶されている第2の閾値以上であるか否かを判定する制御と、
前記割合が前記第2の閾値以上であるとき、前記オブジェクト生成命令によるオブジェクトの生成先を前記第2のメモリ領域に変更する制御と、を実行する制御部とを有する
ことを特徴とする情報処理装置。
An information processing apparatus that operates a virtual machine having an automatic release function that automatically releases a memory area that is no longer necessary in a memory area reserved for executing a program,
As the memory area, a first memory area targeted for the automatic release function;
A second memory area that is not subject to the automatic release function, as the memory area;
For each object generated when the program is executed, an object generation instruction related to the object, an object generation count indicating the number of times the object is generated in the first memory area by the object generation instruction, and the automatic release A storage unit storing object analysis information including an object profiling count indicating the number of times the first memory area is released by a function;
Control for referring to the object analysis information to determine whether the number of times the object has been generated is equal to or greater than a first threshold stored in the storage unit;
Control for determining whether a ratio of the object profiling frequency to the object generation frequency is equal to or greater than a second threshold value stored in the storage unit when the object generation frequency is equal to or greater than the first threshold value. When,
A control unit that executes control to change a generation destination of the object by the object generation instruction to the second memory area when the ratio is equal to or greater than the second threshold. apparatus.
JP2009236257A 2009-10-13 2009-10-13 Memory management method, memory management program, and information processing apparatus Expired - Fee Related JP5199975B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2009236257A JP5199975B2 (en) 2009-10-13 2009-10-13 Memory management method, memory management program, and information processing apparatus
PCT/JP2010/053520 WO2011045949A1 (en) 2009-10-13 2010-03-04 Memory management method, memory management program, and information processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009236257A JP5199975B2 (en) 2009-10-13 2009-10-13 Memory management method, memory management program, and information processing apparatus

Publications (3)

Publication Number Publication Date
JP2011085985A true JP2011085985A (en) 2011-04-28
JP2011085985A5 JP2011085985A5 (en) 2011-06-16
JP5199975B2 JP5199975B2 (en) 2013-05-15

Family

ID=43876004

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009236257A Expired - Fee Related JP5199975B2 (en) 2009-10-13 2009-10-13 Memory management method, memory management program, and information processing apparatus

Country Status (2)

Country Link
JP (1) JP5199975B2 (en)
WO (1) WO2011045949A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014171002A1 (en) * 2013-04-19 2014-10-23 株式会社日立製作所 Memory management method, computer, and recording medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110543357B (en) * 2018-05-28 2023-01-13 华为云计算技术有限公司 Method, related device and system for managing application program object

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003241967A (en) * 2002-02-15 2003-08-29 Matsushita Electric Ind Co Ltd Program execution device, its method and program executed therein
US6681234B2 (en) * 2000-12-12 2004-01-20 Sun Microsystems, Inc. Method and apparatus for storing long-lived objects in a virtual machine
US20070180002A1 (en) * 2006-01-27 2007-08-02 Sun Microsystems, Inc. Method and apparatus for reducing object pre-tenuring overhead in a generational garbage collector
JP2010044532A (en) * 2008-08-11 2010-02-25 Hitachi Ltd Memory management method, memory management program and memory management device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6681234B2 (en) * 2000-12-12 2004-01-20 Sun Microsystems, Inc. Method and apparatus for storing long-lived objects in a virtual machine
JP2003241967A (en) * 2002-02-15 2003-08-29 Matsushita Electric Ind Co Ltd Program execution device, its method and program executed therein
US20070180002A1 (en) * 2006-01-27 2007-08-02 Sun Microsystems, Inc. Method and apparatus for reducing object pre-tenuring overhead in a generational garbage collector
JP2010044532A (en) * 2008-08-11 2010-02-25 Hitachi Ltd Memory management method, memory management program and memory management device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
CSNG200900328001; 小幡  元樹: 'Javaにおける明示的メモリ管理' 情報処理学会論文誌  論文誌ジャーナル 第50巻,第7号, 20090715, p.1693-1715, 社団法人情報処理学会 *
JPN6013002426; 小幡  元樹: 'Javaにおける明示的メモリ管理' 情報処理学会論文誌  論文誌ジャーナル 第50巻,第7号, 20090715, p.1693-1715, 社団法人情報処理学会 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014171002A1 (en) * 2013-04-19 2014-10-23 株式会社日立製作所 Memory management method, computer, and recording medium

Also Published As

Publication number Publication date
JP5199975B2 (en) 2013-05-15
WO2011045949A1 (en) 2011-04-21

Similar Documents

Publication Publication Date Title
US7904493B2 (en) Method and system for object age detection in garbage collection heaps
US7406684B2 (en) Compiler, dynamic compiler, and replay compiler
US9417931B2 (en) Unified metadata for external components
US20080244531A1 (en) Method and system for generating a hierarchical tree representing stack traces
US8990790B2 (en) Java native interface array handling in a distributed java virtual machine
US8856752B2 (en) Monitoring asset state to enable partial build
Roemer et al. Smarttrack: efficient predictive race detection
JP5031470B2 (en) Memory management method, information processing apparatus, and memory management program
US8397045B2 (en) Memory management device, memory management method, and memory management program
WO2009055914A1 (en) Static analysis defect detection in the presence of virtual function calls
US7096339B2 (en) System and method for detecting memory management programming errors
EP3084598B1 (en) Execution guards in dynamic programming
WO2014159147A1 (en) Diagnostics of state transitions
US20060101420A1 (en) Programming language support for integrating undo and exception handling
US8296742B2 (en) Automatic native generation
US7409677B1 (en) Method and system for creation and use of embedded trace description
US9158516B2 (en) Dual mode evaluation for programs containing recursive computation
EP3635561B1 (en) Asynchronous operation query
JP2006350876A (en) Heap dump acquisition method
JP5199975B2 (en) Memory management method, memory management program, and information processing apparatus
US11106522B1 (en) Process memory resurrection: running code in-process after death
US8839207B2 (en) Debugging extensible markup language
CN112487438B (en) Heap object Use-After-Free vulnerability detection method based on identifier consistency
JP2008102748A (en) Program execution method, language processing system, and run-time routine
US20230236835A1 (en) Cooperative garbage collection barrier elision

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110308

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110308

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20130129

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130208

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20160215

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees