KR100502380B1 - Write barrier system and method including pointer-specific instruction variant replacement mechanism - Google Patents

Write barrier system and method including pointer-specific instruction variant replacement mechanism Download PDF

Info

Publication number
KR100502380B1
KR100502380B1 KR10-1998-0710968A KR19980710968A KR100502380B1 KR 100502380 B1 KR100502380 B1 KR 100502380B1 KR 19980710968 A KR19980710968 A KR 19980710968A KR 100502380 B1 KR100502380 B1 KR 100502380B1
Authority
KR
South Korea
Prior art keywords
store
pointer
instruction
garbage collection
virtual machine
Prior art date
Application number
KR10-1998-0710968A
Other languages
Korean (ko)
Other versions
KR20000022523A (en
Inventor
제임스 마이클 오코너
마크 트렘블레이
샌제이 비쉰
Original Assignee
선 마이크로시스템즈 인코퍼레이티드
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 선 마이크로시스템즈 인코퍼레이티드 filed Critical 선 마이크로시스템즈 인코퍼레이티드
Priority to KR10-1998-0710968A priority Critical patent/KR100502380B1/en
Publication of KR20000022523A publication Critical patent/KR20000022523A/en
Application granted granted Critical
Publication of KR100502380B1 publication Critical patent/KR100502380B1/en

Links

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores
    • 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/0269Incremental or concurrent garbage collection, e.g. in real-time systems
    • G06F12/0276Generational garbage collection

Abstract

포인터-고유 명령 변형 교체 구조는 정확한 쓰기 배리어, 즉 포인터 스토어에 고유하고 비포인터 스토어에 투명한 쓰기 배리어를 촉진하고, 포인터 스토어 고유 명령 교체은 일부 구현에서 특정한 가비지컬렉션 방법 또는 방법의 조합에 흥미있는 세대간 포인터 스토어의 특정 세트에 고유한 정확한 배리어를 제공하도록 하며, 본 명세서에서 포인터 스토어의 정확한 식별은 수집된 메모리 스토어에서 일렬로 인코드된 태그를 요구하지 않고 그러한 태그를 지원하기 위해 비표준 워드 크기를 요구하지 않으며, 하나의 실시예에서, 비고속 내지 고속 트랜슬레이터 캐시는 포인터 고유 스토어 명령 교체을 제공하고, 또다른 실시예에서 자가 수정 코드는 포인터 고유 스토어 명령 교체을 제공하며, 본 발명의 포인터-고유 명령 변형 교체 구조에 따라 제공된 예시적인 쓰기 배리어는 기억된 세트 기반 방법, 카드-마킹 타입 방법, 쓰기 배리어 기반 카피 수집기 방법, 마크-스윕 방법 등을 포함하는 다수의 가비지컬렉션 방법뿐만 아니라, 그 조합 및 세대적으로 수집된 메모리 공간의 성숙부를 관리하는 트레인 알고리즘 타입 방법을 포함하는 조합을 위한 지원을 갖는 가비지컬렉션기 구현기를 가능하게 하고, 그러한 쓰기 배리어는 예를 들어 트래핑할 것인지 여부를 결정하기 위해 가비지컬렉션 페이지 마스크 또는 세대간 포인터 스토어 트랩 행렬에 대해 값을 구하는 스토어의 세트로부터 비포인터 스토어를 제거할 수 있으며, 그러한 쓰기 배리어는 또한 수집돈 세대 공간의 수정된 부분의 수집 시간 스캐닝을 위해 기억된 세트 또는 카드 테이블 스토어로부터 비포인터 스토어와 관련된 엔트리를 제거할 수 있는 것을 특징으로 한다.Pointer-specific instruction variant replacement schemes facilitate the correct write barriers, that is, write barriers that are unique to the pointer store and transparent to the non-pointer store, and pointer store-specific instruction replacements are intergenerational in some implementations that are interested in a particular garbage collection method or combination of methods. To provide an exact barrier unique to a particular set of pointer stores, where accurate identification of the pointer store does not require in-line encoded tags in the collected memory store and requires non-standard word sizes to support such tags. In one embodiment, the non-fast to fast translator cache provides pointer specific store instruction replacement, and in another embodiment, the self-modifying code provides pointer specific store instruction replacement and the pointer-specific instruction variant of the present invention. Provided according to the replacement structure Exemplary write barriers include multiple garbage collection methods, including stored set-based methods, card-marking type methods, write barrier-based copy collector methods, mark-sweep methods, as well as combinations and generationally collected memory spaces. Enables a garbage collector implementer with support for combinations including a train algorithm type method of managing the maturity of the garbage collection page, such as a garbage collection page mask or intergenerational pointer to determine whether to trap The non-pointer store can be removed from the set of stores that find a value for the store trap matrix, and such write barriers can also remove the non-pointer from the stored set or card table store for scanning the collection time of the modified portion of the collected generation space. Remove entries associated with the store That is characterized.

Description

포인터-고유 명령 변형 교환 메카니즘을 포함하는 쓰기 배리어 시스템 및 방법{WRITE BARRIER SYSTEM AND METHOD INCLUDING POINTER-SPECIFIC INSTRUCTION VARIANT REPLACEMENT MECHANISM}WRITE BARRIER SYSTEM AND METHOD INCLUDING POINTER-SPECIFIC INSTRUCTION VARIANT REPLACEMENT MECHANISM

본 발명은 가비지컬렉션(garbage collection)에 관한 것으로, 특히 가비지 수집기(garbage collector) 내의 세대(generation)를 분리하는 방법 및 시스템에 관한 것이다. TECHNICAL FIELD The present invention relates to garbage collection, and more particularly, to a method and system for separating generations in a garbage collector.

종래, 대부분의 프로그래밍 언어는 메모리의 동적 할당 및 할당해제의 책임을 프로그래머에게 일임 해 왔다. 예를 들면, C 프로그래밍 언어에 있어서, 메모리는 멀록절차(malloc procedure)(또는 그 변형)에 의해 힙(heap)으로부터 할당된다. 포인터 변수 'p'가 주어졌을 때, 명령문 p=malloc(sizeof(SomeStruct))에 대응한 기계 명령의 실행은 포인터 변수 'p'가 SomeStruct 데이터 구조를 나타내기 위해 필요한 크기의 메모리 오브젝트(memory object)를 위해 새롭게 할당된 저장영역을 지시하도록 한다. 사용 후, 포인터 변수 'p'에 의해 식별된 메모리 오브젝트는 free(p)를 호출함으로써 할당해제 되거나 자유롭게 될 수 있다. 파스칼 및 C++언어는 메모리의 명시적 할당 및 할당해제를 위한 유사한 도구을 제공한다. Traditionally, most programming languages have left the programmer with the responsibility of dynamically allocating and deallocating memory. For example, in the C programming language, memory is allocated from the heap by a malloc procedure (or a variant thereof). Given a pointer variable 'p', execution of the machine instruction corresponding to the statement p = malloc (sizeof (SomeStruct)) results in a memory object of the size needed for the pointer variable 'p' to represent the SomeStruct data structure. To indicate the newly allocated storage area. After use, the memory object identified by the pointer variable 'p' can be deallocated or freed by calling free (p). Pascal and C ++ languages provide similar tools for explicit allocation and deallocation of memory.

불행하게도, 동적 할당된 저장영역은 그 저장영역에 대한 레퍼런스 또는 포인터가 소정의 컴퓨터사용에 대해서 루트 레퍼런스 로케이션 세트내에 잔류하지 않으면 도달할 수 없게 된다. 더 이상 도달 불가능하면서 자유롭지 않은 메모리 오브젝트를 가비지(garbage)라고 불린다. 마찬가지로, 메모리 오브젝트와 관련된 저장영역은 여전히 레퍼런스 된 채로 할당해제 될 수 있다. 이 경우, 현수 레퍼런스 (dangling referencc)가 생성되었다. 일반적으로, 동적 메모리를 정확하게 관리하는 것이 어려울 수 있다. 대부분의 프로그래밍 언어에 있어서, 현수레퍼런스를 생성한 절차에서 잔존하는 데이타구조를 위해 힙 할당이 필요하다. 이들 데이터 구조가 추가 절차 또는 기능에 넘겨지면, 프로그래머나 컴파일러가 이들을 어느 시점에서 할당해제하는 것이 안전한지를 결정하는 것은 어렵거나 불가능하다. Unfortunately, dynamically allocated storage becomes unreachable unless a reference or pointer to that storage remains within the root reference location set for a given computer use. Memory objects that are no longer reachable and free are called garbage. Similarly, storage associated with memory objects can still be deallocated with reference. In this case, a dangling referencc was created. In general, it can be difficult to accurately manage dynamic memory. In most programming languages, heap allocations are required for the remaining data structures in the procedure that created the suspension reference. If these data structures are passed on to additional procedures or functions, it is difficult or impossible for the programmer or compiler to determine at what point it is safe to deallocate them.

이러한 어려움 때문에, 가비지컬렉션, 즉 프로그램에 의해 최종 사용된 후 히프-할당된 저장영역의 자동 재생(reclamation)은 동적 메모리 관리의 매력적인 대안적 모델일 수 있다. 가비지컬렉션은, 데이터공유, 지연 실행 그리고 일반적으로 상기 절차적 언어보다 실행순서의 적은 예측가능성을 적은 보여주는 JAVATM언어(JAVA는 선 마이크로 시스템사의 상표임), Prolog, Lisp, Smaltalk, Scheme, Eiffel, Dylan, ML, Haskell, Miranda, Oberon 등과 같은 기능적 언어에 대해서 특히 매력적이다. 가비지컬렉션과 그것을 위한 고전적인 알고리즘에 대한논의에 대한 Jones & Lins저, Garbage Collection: Algorithms for Automatic Dynamic Memory Management, pp 1-41, Wiley(1996)을 참조할 수 있다.Because of this difficulty, garbage collection, that is, automatic reclamation of heap-allocated storage after being last used by a program, may be an attractive alternative model of dynamic memory management. Garbage collection is a JAVA TM language (JAVA is a trademark of Sun Microsystems, Inc.) that exhibits less data sharing, lazy execution and generally less predictability of execution order than the procedural language, Prolog, Lisp, Smaltalk, Scheme, Eiffel, It is particularly attractive for functional languages such as Dylan, ML, Haskell, Miranda, and Oberon. See Jones & Lins, Garbage Collection: Algorithms for Automatic Dynamic Memory Management, pp 1-41, Wiley (1996) for a discussion of garbage collection and classical algorithms for it.

고전적인 세가지 가비지컬렉션 방법으로는 레퍼런스 카운팅(reference counting), 마크-스윕(mark-sweep), 그리고 카핑 스토리지 레클러메이션(copying storage reclamation)이 있다. 첫번째 레퍼런스 카운팅은 능동 메모리 오브젝트 또는 루트 레퍼런스 로케이션의 각각의 메모리 오브젝트에 대한 예를 들면 포인터와 같은 레퍼런스의 수를 계속하여 카운트하는 것에 기초한다. 새로운 메모리 오브젝트가 할당되고 그에 포인터가 지정될 때, 상기 메모리 오브젝트의 레퍼런스 카운트는 1로 설정된다. 그 다음, 포인터가 상기 메모리 오브젝트를 참조하도록 설정될 때마다, 상기 메모리 오브젝트의 레퍼런스 카운트는 증가된다. 상기 메모리 오브젝트에 대한 레퍼런스가 삭제되거나 덮여 쓰여지면, 상기 레퍼런스 카운트는 감소한다. 레퍼런스 카운트 '0'을 갖는 메모리 오브젝트는 도달 불가능하여 가비지로서 수집된다. 레퍼런스 카운팅 가비지수집기의 구현은 전형적으로 각 메모리 오브젝트 내에 부가필드, 레퍼런스 카운트를 포함하고, 새로운 오브젝트의 일부로서 삭제 오브젝트 및 갱신 포인터 기능을 증가시키고 감소시키는 지원을 포함한다.Three classic garbage collection methods are reference counting, mark-sweep, and copying storage reclamation. The first reference counting is based on continually counting the number of references, such as a pointer, for each memory object in the active memory object or root reference location. When a new memory object is allocated and a pointer is assigned to it, the reference count of the memory object is set to one. Then, each time a pointer is set to reference the memory object, the reference count of the memory object is incremented. If the reference to the memory object is deleted or overwritten, the reference count is decremented. Memory objects with reference count '0' are unreachable and are collected as garbage. Implementation of the reference counting garbage collector typically includes additional fields, reference counts within each memory object, and includes support to increase and decrease the delete object and update pointer functionality as part of the new object.

이에 비해, 트레이싱 수집기(tracing collector) 방법은 유효한(live) 즉, 참조가능한 메모리 오브젝트를 식별하기 위해 메모리에 대해서 레퍼런스 체인이 트래버스(traversal) 하는 것을 포함한다. 이러한 트레이싱 수집기 방법의 하나가 유효한 메모리 오브젝트를 식별하고 마크하기 위해서 메모리에 대해서 레퍼런스 체인이 트래버스되는 상기한 마크-스윕 방법이다. 마크되지 않은 메모리 오브젝트는 가비지이며 수집되어 분리된 스윕단계 동안에 상기 자유풀(free pool)로 반환된다. 마크-스윕 가비지수집기의 구현은 전형적으로 각 메모리 오브젝트 내에 부가필드, 예를 들어 마크 비트(mark bit)를 포함한다. 마크-컴팩트(mark-compact) 켈렉터는 종래 마크-스윕 방법에 압축(compaction)을 추가한다. 압축은 프래그멘테이션 (fragmentation)에 있어서 유익한 감소를 달성하기 위해서 유효한 오브젝트를 재배치한다. 레퍼런스 카운트 방법도 압축을 채용할 수 있다. In contrast, the tracing collector method involves a reference chain traversal to memory to identify a live, ie referenceable memory object. One such tracing collector method is the mark-sweep method described above, wherein a reference chain is traversed to memory to identify and mark valid memory objects. Unmarked memory objects are garbage collected and returned to the free pool during the separate sweep phase. Implementations of the mark-sweep garbage collector typically include additional fields, such as mark bits, within each memory object. Mark-compact selectors add compaction to conventional mark-sweep methods. Compression relocates valid objects to achieve a beneficial reduction in fragmentation. The reference count method can also employ compression.

또 다른 트레이싱 방법인, 카핑컬렉션은 메모리를 두 개의 반쪽영역(semi-space)로 나누며, 한 쪽은 현재 데이터를 포함하고 다른 쪽은 과거 데이터를 포함한다. 카핑 가비지컬렉션은 상기 두 개의 반쪽영역의 역할을 역전시키는 것으로써 시작한다. 그 다음 상기 카핑수집기는 새로운 반쪽영역 'ToSpace'로 도달가능한 오브젝트를 복사하면서 상기 늙은 반쪽영역 'FromSpace' 내의 유효한 오브젝트를 트래버스한다. FromSpace내의 유효한 오브젝트가 모두 트래버스되어 복사된 후에, 상기 데이타구조의 복제본이 ToSpace에 존재한다. 본질적으로, 카핑수집기는 상기가비지 중에서 유효한 오브젝트를 수집한다. 카핑수집기의 유익한 부수적 이점은 유효한 오브젝트가 ToSpace로 압축되어 그에 의해서 프래그멘테이션을 감소시키는 것이다.Another tracing method, the capping collection, divides memory into two semi-spaces, one containing current data and the other containing historical data. Coping garbage collection begins by reversing the roles of the two half regions. The capping collector then traverses a valid object in the old half area 'FromSpace' while copying the reachable object to the new half area 'ToSpace'. After all valid objects in FromSpace have been traversed and copied, a copy of the data structure exists in ToSpace. In essence, the capping collector collects valid objects among the garbage. A beneficial side benefit of the capping collector is that valid objects are compressed into ToSpace, thereby reducing fragmentation.

세대 접근법(generational approaches)은 (1) 메모리 오브젝트는 전형적으로 젊어서 죽고 (2) 트레이싱 방법은 비교적 오래된 오브젝트를 트래버스, 복사 또는 재배치하는데 상당한 자원을 소비한다는 관찰에 기초한 것이다. 세대 가비지 컬렉션 기법은 상기 힙을 두 개 이상의 세대로 나누고, 오브젝트를 나이에 의해서 분리하고, 수집노력(또는 적어도 더욱 왕성한 수집노력)을 젊은 세대(들)에 집중한다. 가장 젊은 세대는 작을 수 있기 때문에, 정지 시간과 관련된 가비지컬렉션은 평균적으로 짧게 유지될 수 있다. 한 세대 내의 가비지컬렉션은 복사, 마크-스윕, 또는 다른 가비지컬렉션 방법일 수 있다. 세대 수집기를 구현하기 위해서는, 뮤테이터 프로세스(mutator process), 가비지수집기 또는 이들 두 개의 임의의 조합이 세대간 포인터를 규정하여 이들이 상기 가비지수집기에 의해 루트 세트의 일부로 취급될 수 있도록 하는 것이 중요한 문제다. 뮤테이터는 컴퓨터 시스템에서 가비지컬렉선을 제외한 유용한 작업을 수행하는 프로세스에서 메모리를 경유하는 레퍼런스 체인의 그래프를 변경시키는 프로세스이다.Generational approaches are based on the observation that (1) memory objects typically die young and (2) tracing methods consume significant resources to traverse, copy, or relocate relatively old objects. The generation garbage collection technique divides the heap into two or more generations, separates objects by age, and concentrates collection efforts (or at least more robust collection efforts) on young generation (s). Since the youngest generation can be small, the garbage collection associated with downtime can be kept short on average. Garbage collection within a generation may be a copy, mark-sweep, or other garbage collection method. In order to implement a generational collector, it is important that a mutator process, garbage collector, or any combination of the two defines an intergenerational pointer so that they can be treated as part of the root set by the garbage collector. . Mutators are the process of changing the graph of the reference chain via memory in the process of performing useful tasks in the computer system except garbage collection.

세대간 포인터는 전형적으로 뮤테이터 프로세스 포인터 스토어를 통해서나 포인터를 포함하는 오브젝트의 승급을 통해서 발생한다. 승급된 세대간 포인터는 승급시 수집기 프로세스에 의해 쉽게 발견될 수 있다. 그러나, 포인터를 위해서 늙은 세대를 제쳐놓고 젊은 세대를 조사하는 - 고비용 프로세스임- 이 부족하기 때문에 포인터 스토어는 세대간 포인터 저장소를 탐색하기 위해서 트랩되고 기록되어야 한다. 배리어(barrier)는 잘 알려져 있고, 하드웨어, 소프트웨적으로 또는 운영체제의(전형적으로 페이징 시스템)의 지원으로 구현되어 왔다. Jones & Lins저, Garbage Collection: Algorithms for Automatic Dynamic Memory Management, pp 165-174, Wiley(1996)(세대간 포인터, 쓰기 배리어, 엔트리 테이블, 기억 세트, 순차 스토어 버퍼, 하드웨어 지원에 의한 페이지 마킹, 버츄얼 메모리 지원에 의한 페이지 마킹, 및 카드 마킹 등에 대하여 논의함)을 참조할 수 있다.Intergenerational pointers typically occur through mutator process pointer stores or through the promotion of objects containing pointers. Promoted intergenerational pointers can easily be found by the collector process upon upgrade. However, because of the lack of an older generation for pointers and a survey of younger generations—a costly process—the pointer store must be trapped and written to search for inter-generational pointer storage. Barriers are well known and have been implemented in hardware, software, or with the support of an operating system (typically a paging system). By Jones & Lins, Garbage Collection: Algorithms for Automatic Dynamic Memory Management, pp 165-174, Wiley (1996) (Intergenerational Pointers, Write Barriers, Entry Tables, Memory Sets, Sequential Store Buffers, Page Marking with Hardware Support, Virtual Page marking by memory support, card marking, and the like) are discussed.

포인터 스토어 체킹(pointer store checking)을 위한 인라인(in-line) 코드 등의 소프트웨어 기술이 사용되면, 실행시간 및 인라인 코드 오버헤드가 아주 클 수가 있다. 소프트웨어 쓰기 배리어(write barrier)의 한 예는 Ungar에 의해 제안된 것(David M. Ungar, Generation Scavenging : A Non-disturptive High Performance Storage Reclamation Algorithm, ACM SIGPLAN Notices, 19(5), pp.157-167(1984) 참조)으로, 그것은 (1) 포인터가 저장되고 있는지와 (2) 상기 포인터가 젊은 세대 오브젝트에 대한 것이고 늙은 세대 오브젝트에 저장되고 있는지를 체크하기 위해서 방해한다. 그렇다면, 상기 늙은 세대 오브젝트의 어드레스는 기억된 세트(remembered set)에 추가된다. 소프트웨어 배리어는 그들이 적용되는 동작에 많은 양의 오버헤드를 부과할 수 있다. 예를 들면, 인라인 코드에 의해 제공된 소프트웨어 스토어 배리어는 예를 들어 포인터가 저장되고 있는지, 그리고 상기 포인터가 세대간인지 체크하는 부가적인 명령 레이턴시(instruction latency)를 추가하고 코드의 전체 부피를 증가시킨다. 그러한 코드 증가는 캐시 성능에 나쁘게 영향을 준다.If software techniques such as in-line code for pointer store checking are used, the runtime and inline code overhead can be very large. An example of a software write barrier is proposed by Ungar (David M. Ungar, Generation Scavenging: A Non-disturptive High Performance Storage Reclamation Algorithm, ACM SIGPLAN Notices, 19 (5), pp.157-167 (See 1984), it interferes to check if (1) the pointer is being stored and (2) the pointer is for a young generation object and is stored in an old generation object. If so, the address of the old generation object is added to the remembered set. Software barriers can impose large amounts of overhead on the operations in which they are applied. For example, a software store barrier provided by inline code adds additional instruction latency to check whether a pointer is being stored and whether the pointer is intergenerational and increases the overall volume of code, for example. Such code increases badly affect cache performance.

상기 소프트웨어 배리어의 대안은 보호된 페이지의 액세스를 트랩하기 위해서 운영체제의 가상메모리 페이지 보호 메커니즘을 사용하거나 액세스를 트랩하여 페이지를 보호하거나 갱신된 세대간 포인터 필드를 갖는 오브젝트를 잠재적으로 포함하는 페이지 맵으로 페이지 변경 더티 비트(page modification dirty bits)를 사용하는 것이다. 그런 기술은 전형적으로 모든 스토어 중에서 포인터 스토어를, 더욱 구체적으로는 세대간 포인터 스토어의 식별을 수집시간까지 연기한다. 그러나, 가상 메모리 페이지 크기는 일반적으로 가비지컬렉션 서비스에 잘 맞지 않는다. 예를 들면, 페이지는 오브젝트에 비해 큰 경향이 있고 버츄얼 메모리 더티 비트는 단순히 포인터 스토어가 아닌 관련 페이지에 임의의 변경을 기록한다. 그 결과, 세대간 포인터에 대한 페이지 탐색의 비용이 높아질 수 있다.An alternative to the software barrier is to use a virtual memory page protection mechanism of the operating system to trap access of a protected page or to trap a access to a page map that potentially contains an object with an updated intergenerational pointer field. Is to use page modification dirty bits. Such techniques typically defer the identification of pointer stores among all stores, and more specifically, the generation of pointer stores between generations until collection time. However, virtual memory page sizes are generally not well suited for garbage collection services. For example, pages tend to be larger than objects and virtual memory dirty bits write arbitrary changes to related pages rather than just pointer stores. As a result, the cost of page navigation for intergenerational pointers can be high.

인라인 코드 소프트웨어 쓰기 배리어의 또 다른 대안은 하드웨어 배리어 (hardware barrier)의 지원이다. 많은 쓰기 배리어 구현예가 포인터와 비-포인터 스토어 사이를 구별하지 않고, 대신에 수집시간까지 세대간 포인터 체크를 연기하면서 모든 쓰기를 기록하지만, Symbolics 3600에서 가비지컬렉션을 위한 하드웨어 지원의 광범위한 사용은 페이지 마킹 기법을 효율적으로 구현하게 했다. 상기 Symbolics 3600의 세가지 특성이 이를 실행가능하게 한다. 첫째로, 하드웨어 쓰기 배리어는 세대 데이터에 대한 포인터가 아닌 모든 워드를 무시했다. 세대 메모리에 대한 레퍼런스가 페이지에 저장될 때마다, 상기 쓰기 배리어 하드웨어는 가비지컬렉션 페이지 해당 비트를 세트시킨다. 둘째로, 포인터 워드는 항상 비-포인터 워드로부터 태그를 사용하여 구별될 수 있기 때문에 태그된 아키텍쳐(tagged architecture)는 세대간 포인터를 위한 수집시간 체크를 수행하면서 오브젝트 경계를 고려할 필요를 제거했다. 상기 Symbolics 3600은 2-비트 메이저 데이터 타입 태그, 4-비트 마이너 태그 및 28-비트 어드레스를 하나의 36-비트 워드내에 수용한다. 마지막으로, 페이지는 256 워드로 전형적인 가상 메모리 페이지보다 작으므로, 페이지는 수집시간에 신속하게 탐색될 수 있다. Jones & Lins저, Garbage Collection: Algorithms for Automatic Dynamic Memory Management, pp.169-170, Wiley(1996)(Symbolics 3600상에서 하드웨어에 의한 페이지 마킹을 논의함)과, Moon저, Architecture of the Symbolics 3600, In Proceedings of the 12th Annual International Symposium on Computer Architecture, pp.76-83(1985)(오브젝트의 저장된 표현을 논의함)을 참조하라.Another alternative to the inline code software write barrier is the support of a hardware barrier. Although many write barrier implementations do not distinguish between pointers and non-pointer stores, instead write all writes by postponing pointer checks from generation to collection time, but the widespread use of hardware support for garbage collection in Symbolics 3600 allows for page marking. The technique was implemented efficiently. Three characteristics of the Symbolics 3600 make this workable. First, the hardware write barrier ignored all words that were not pointers to generation data. Each time a reference to a generation memory is stored in a page, the write barrier hardware sets the garbage collection page corresponding bit. Second, because the pointer words can always be distinguished using tags from non-pointer words, the tagged architecture eliminates the need to consider object boundaries while performing collection time checks for pointers between generations. The Symbolics 3600 accommodates two-bit major data type tags, four-bit minor tags, and 28-bit addresses in one 36-bit word. Finally, since the page is 256 words smaller than a typical virtual memory page, the page can be quickly retrieved at collection time. Jones & Lins, Garbage Collection: Algorithms for Automatic Dynamic Memory Management, pp. 169-170, Wiley (1996) (discussing page marking by hardware on Symbolics 3600), and Moon, Architecture of the Symbolics 3600, In See Proceedings of the 12th Annual International Symposium on Computer Architecture, pp. 76-83 (1985) (discussing the stored representations of objects).

세대간 포인터를 확인하는 프로세스는 중요한 수집시간 탐색을 요구한다. 한가지 개선사항은 수집된 메모리 공간(예를 들면, 힙)을 카드(card)로 불리는 작은 영역으로 나누는 것이다. 카드 마킹(card marking)은 상기 카드가 올바른 크기를 가지면 몇가지 이점을 제공한다. 그것들은 가상 메모리 페이지보다 작기 때문에, 수집시간 탐색의 양은 감소될 수 있다. 한편, 카드 테이블에 의해 점유된 공간은 양은 워드단위 마킹 기법에 필요한 것보다 적다. 일반적으로, 상기 카드내의 워드가 변경될 때마다 비트는 무조건 세트된다. 카드 마킹 수집기는 수집시간에 세대간 포인터를 위해 더티 카드(dirty card)를 탐색해야 한다. 카드를 탐색하는 비용은 복제가 일어나지 않기 때문에 실행된 스토어 수보다는 마크된 카드의 크기 와 수에 비례한다. Wilson and Moher저, Design of the Opportunistic Garbage Collector, ACM SIGPLAN Notices, 24(10), pp.23-35(1985)를 참조하라.The process of identifying intergenerational pointers requires a significant acquisition time search. One improvement is to divide the collected memory space (eg the heap) into smaller areas called cards. Card marking offers several advantages if the card is of the correct size. Since they are smaller than the virtual memory pages, the amount of collection time search can be reduced. On the other hand, the amount of space occupied by the card table is less than necessary for the word-by-word marking technique. In general, each time a word in the card changes, the bit is set unconditionally. The card marking collector must search for dirty cards for intergenerational pointers at collection time. The cost of searching for a card is proportional to the size and number of cards marked rather than the number of stores executed since no duplication occurs. See Wilson and Moher, Design of the Opportunistic Garbage Collector , ACM SIGPLAN Notices, 24 (10), pp. 23-35 (1985).

세대 접근법이 전체 가비지 수집시간을 줄이는데 매우 효과적이고 대부분의 컬렉션 기법이 파괴적이지 않을 수 있지만, 늙은 세대의 수집은 파괴적일 수 있다. 이들 늙은 세대 오브젝트를 비-파괴적인 방식으로 수집하기 위해, Hudson과 Moss는 각 컬렉션에서 성숙한 오브젝트 공간의 한정된 크기의 영역을 처리하는 알고리즘을 제안했다. 상기 알고리즘은 사실상 증가하며, 어떤 가비지든지 궁극적인 수집을 보증한다. Hudson과 Moss는 상기 문제점에 대한 해결책을 설명하기 위해서 한정된 크기의 영역을 나타내는 캐리지(carriage)와 링크구조를 유지하는 캐리지의 그룹을 나타내는 트레인(train)을 갖는 트레인 유추법을 사용한다. 상기 시스템은 특별한 하드웨어 또는 가상 메모리 메커니즘에 의존하지 않는다는 점에서 효율적이다. Hudson and Moss 저, Incremental Collection of Mature Objects, Proceedings of International Workshop on Memory Management, St. Malo France(16-18 September, 1992)를 참조하라.Generational approaches are very effective in reducing overall garbage collection time and most collection techniques may not be disruptive, while older generations can be disruptive. To collect these older generation objects in a non-destructive way, Hudson and Moss proposed an algorithm that handles a finite size region of mature object space in each collection. The algorithm increases in nature and ensures that any garbage is ultimately collected. Hudson and Moss use a train inference method with a train representing a group of carriages maintaining a link structure and a carriage representing a limited size area to explain the solution to the problem. The system is efficient in that it does not rely on special hardware or virtual memory mechanisms. By Hudson and Moss, Incremental Collection of Mature Objects , Proceedings of International Workshop on Memory Management, St. See Malo France (16-18 September, 1992).

발명의 요약Summary of the Invention

본 발명은 가비지컬렉션의 실행을 용이하게 하는 시스템, 방법, 그리고 그와 같은 시스템, 방법, 장치를 구현하는 컴퓨터 프로그램을 제공한다. 특히, 본 발명은 정확한 쓰기 배리어, 즉 포인터 스토어에 특유하고 비-포인터 스토어에 투명한 쓰기 배리어를 용이하게 하는 포인터-고유의 명령어 변형 교체 메커니즘을 제공한다. 이와 같은 쓰기 배리어는 트랩할지 여부를 결정하기 위해서, 예를 들면 세대간 포인터 스토어 트랩 매트릭스(generational pointer store trap matrix) 또는 가비지컬렉션 페이지 마스크에 대하여 부정적으로 평가된 스토어 세트로부터 비-포인터 스토어를 제거한다. 이와 같은 쓰기 배리어는 수집된 세대공간의 변경된 부분을 탐색하는 수집시간 동안 기억된 세트 또는 카드 테이블 스토어로부터 비-포인터와 관련된 엔트리도 역시 제거한다.The present invention provides a system, a method for facilitating the execution of garbage collection, and a computer program for implementing such a system, method, and apparatus. In particular, the present invention provides a pointer-specific instruction variant replacement mechanism that facilitates an accurate write barrier, that is, a write barrier specific to the pointer store and transparent to the non-pointer store. Such a write barrier removes the non-pointer store from a set of stores that are negatively evaluated against, for example, a generational pointer store trap matrix or garbage collection page mask to determine whether to trap. . Such a write barrier also removes entries associated with non-pointers from the stored set or card table store during collection time searching for changed portions of the collected generation space.

본 발명 포인터-고유의 명령어 변수 교체 메커니즘에 따라서 제공된 쓰기 배리어는 기억세트 기반 방법, 카드마킹 타입 방법, 쓰기 배리어 기반 카핑수집기 방법, 마크-스윕 방법 등 뿐만아니라 이들의 조합과 트레인 알고리즘 타입 방법을 포함하는 조합을 포함하는 아주 다양한 가비지컬렉션 방법을 지원하는 가비지 수집기 실행기를 세대적으로 수집된 메모리 공간의 성숙한 부분을 관리하는데 공급한다.The write barrier provided in accordance with the pointer-specific instruction variable replacement mechanism of the present invention includes a memory set based method, a card marking type method, a write barrier based capturing method, a mark-sweeping method, etc., as well as a combination and train algorithm type method thereof. The Garbage Collector Launcher, which supports a wide variety of garbage collection methods, including combinations, provides for the management of the mature portion of the memory space that has been collected for generations.

포인터 스토어 고유의 명령 교체는 본 발명에 따른 몇몇 실행이 이하에서 설명된 가비지컬렉션 방법을 포함하여 특정 가비지컬렉션 방법 또는 방법들의 조합에 관계되는 특별한 세대간 포인터 스토어 세트에 특유한 정확한 배리어를 제공하도록 한다. 여기서 포인터 스토어의 정확한 확인은 수집된 메모리 저장영역과 인라인 인코드 된 태크를 필요로 하지 않으며, 이러한 태크를 지원하기 위한 비표준 워드 크기를 필요로 하지 않는다. 한 실시예에 있어서, 비고속-고속(non-quick to quick) 트랜슬레이터 캐쉬는 포인터 고유의 스토어 명령 교체를 제공한다. 또다른 실시예에 있어서, 자기 수정 코드는 포인터 고유의 스토어 명령 교체를 제공한다.Pointer store specific instruction replacement allows some implementations in accordance with the present invention to provide accurate barriers specific to a particular intergenerational pointer store set involved in a particular garbage collection method or combination of methods, including the garbage collection method described below. Accurate verification of pointer stores here does not require collected memory storage and inline encoded tags, and does not require non-standard word sizes to support these tags. In one embodiment, the non-quick to quick translator cache provides pointer specific store instruction replacement. In another embodiment, the self modifying code provides pointer specific store instruction replacement.

본 발명의 한 실시예에 의하면, 장치는 가상 기계 명령 프로세서, 상기 가상 기계 명령 프로세서의 명령 교체 성분, 및 쓰기 배리어를 포함한다. 상기 가상 기계 명령 프로세서에 의해 실행가능한 명령은 스토어 명령의 프로그램 어커런스를 포함한다. 상기 명령 교체 성분은 상기 스토어 명령을 검지하고, 상기 특정 프로그램 어커런스의 스토어 타겟 필드가 포인터 타입 필드로 분석되면 상기 스토어 명령의 특정 프로그램 어커런스를 포인터-고유의 스토어 명령으로 선택적으로 교체한다. 상기 쓰기 배리어는 상기 가상 기계 명령 프로세서에서 상기 포인터-고유의 스토어 명령의 실행에 의해서 제공된다. 추가적인 실시예에 있어서, 상기 명령 교체 성분은 가상 기계 명령 프로세서의 명령 경로에 결합된 트랜슬레이터 캐쉬를 포함한다. 상기 스토어 타겟 필드의 분석(resolution)은 프로그램 어커런스 식별자의 부조화 표시에 응답하여 상기 트랜슬레이터 캐쉬에 의해 트리거된다. 상기 트랜슬레이터 캐쉬는, 상기 분석이 상기 스토어 타겟 필드의 타입이 레퍼런스인 것을 표시하면, 상기 스토어 명령의 포인터-고유의 변형을 캐쉬하고 상기 프로그램 어커런스 식별자를 그와 관련시킨다. 또 다른 추가적인 실시예에 있어서, 상기 명령 교체 성분은 상기 스토어 명령의 특정 프로그램 어커런스의 메모리내의 이미지를 수정함으로써 상기 스토어 명령의 특별한 프로그램 어커런스를 교체한다. According to one embodiment of the invention, an apparatus includes a virtual machine command processor, an instruction replacement component of the virtual machine command processor, and a write barrier. Instructions executable by the virtual machine instruction processor include program occurrences of store instructions. The instruction replacement component detects the store instruction and selectively replaces the specific program occurrence of the store instruction with a pointer-specific store instruction if the store target field of the particular program occurrence is resolved to a pointer type field. The write barrier is provided by the execution of the pointer-specific store instruction in the virtual machine instruction processor. In a further embodiment, the instruction replacement component includes a translator cache coupled to the instruction path of the virtual machine instruction processor. The resolution of the store target field is triggered by the translator cache in response to a mismatch indication of a program occurrence identifier. The translator cache caches a pointer-specific variant of the store instruction and associates the program occurrence identifier with it if the analysis indicates that the type of the store target field is a reference. In yet another additional embodiment, the instruction replacement component replaces a particular program occurrence of the store instruction by modifying an image in memory of a particular program occurrence of the store instruction.

다양한 실시예에 있어서, 상기 가상 기계 명령 프로세서는 적어도 상기 명령의 서브셋을 직접 실행할 하드웨어 프로세서 또는 하드웨어 프로세서 상에서 실행가능한 소프트웨어 프로그램을 대안으로 포함하며, 여기서 상기 스토어 명령 및 상기 포인터-고유의 스토어 명령은 상기 소프트웨어 프로그램에 의해 실행가능하다.In various embodiments, the virtual machine instruction processor may alternatively comprise a hardware processor or a software program executable on a hardware processor that directly executes at least a subset of the instructions, wherein the store instruction and the pointer-specific store instruction are stored in the It can be executed by a software program.

본 발명에 따른 또 다른 실시예에 있어서, 포인터 스토어를 필터링하기 위한 방법은 스토어 명령의 프로그램 어커런스를 검지하는 것과 상기 스토어 명령의 프로그램 어커런스를 위한 스토어 타겟 필드 타입 정보의 분석에 기초한 포인터-고유의 스토어 명령으로 상기 스토어 명령의 프로그램 어커런스를 선택적으로 교체하는 것을 포함한다. 상기 포인터-고유의 스토어 명령의 실행은 가비지컬렉션 구성 스토어의 내용에 따른 선택적인 트랩핑을 포함한다.In another embodiment according to the present invention, a method for filtering a pointer store comprises a pointer-specific store based on detecting a program occurrence of a store instruction and an analysis of store target field type information for the program occurrence of the store instruction. And optionally replacing the program occurrence of the store instruction. Execution of the pointer-specific store instruction includes selective trapping according to the contents of the garbage collection configuration store.

추가적인 실시예에 있어서, 상기 방법은 포인터-고유의 스토어 명령을 실행하는 것과 상기 가비지컬렉션 구성 스토어의 제 1 내용에 따른 실행을 선택적으로 트랩핑하는 것을 포함한다. 상기 가비지컬렉션 구성 스토어는 쓰기 배리어를 선택된 세대간 포인터 스토어로 프로그램적으로 인코드한다. 또 다른 추가적인 실시예에 있어서, 상기 방법은 상기 포인터 고유의 스토어 명령을 실행하는 것과 상기 가비지컬렉션 구성 스토어의 제 2 내용에 따른 실행을 선택적으로 트랩핑하는 것을 포함한다. 상기 가비지컬렉션 구성 스토어는 쓰기 배리어를 포인터 스토어를 가로지르는 가비지컬렉션 페이지 경계로 프로그램적으로 인코드한다.In a further embodiment, the method includes executing a pointer-specific store instruction and selectively trapping execution according to the first content of the garbage collection configuration store. The garbage collection configuration store programmatically encodes a write barrier into a selected intergenerational pointer store. In yet another further embodiment, the method includes executing the pointer specific store instruction and selectively trapping the execution according to the second content of the garbage collection configuration store. The garbage collection configuration store programmatically encodes a write barrier to a garbage collection page boundary across the pointer store.

또 다른 추가적인 실시예에 있어서, 상기 선택적 교체는 상기 스토어 명령의 프로그램 어커런스를 위한 고유 식별자를 사용하는 명령 트랜슬레이터 캐시에서 검색(lookup)을 실행하는 것을 포함한다. 만약 상기 고유 식별자가 상기 명령 트랜슬레이터 캐시의 엔트리와 일치한다면, 그와 관련한 상기 포인터-고유의 스토어 명령을 대신한다. 또 다른 실시예에서, 상기 선택적 교체는 상기 스토어 명령의 특정 프로그램 어커런스의 메모리상의 이미지를 수정하는 것을 포함한다.In yet another additional embodiment, the selective replacement includes performing a lookup in an instruction translator cache that uses a unique identifier for a program occurrence of the store instruction. If the unique identifier matches an entry in the instruction translator cache, it replaces the pointer-specific store instruction associated with it. In another embodiment, the selective replacement includes modifying an image in memory of a particular program occurrence of the store instruction.

당업자라면 첨부한 도면을 참조하여 본 발명의 여러 목적, 특징 및 이점을 잘 이해할 수 있다.Those skilled in the art will appreciate the various objects, features and advantages of the present invention with reference to the accompanying drawings.

도 1은 본 발명에 따른 가비지컬렉션 발생 분리를 위한 지원을 포함하는 가상 기계 하드웨어 프로세서의 실시예를 나타내는 블록도,1 is a block diagram illustrating an embodiment of a virtual machine hardware processor that includes support for garbage collection occurrence separation in accordance with the present invention;

도 2는 JAVA 가상 기계 실행의 실시예의 하드웨어 프로세서(도 1)와 소프트웨어 요소를 포함하는 JAVA 응용 환경의 소프트웨어와 하드웨어 요소 사이의 "빌드 어폰" 관계를 도시하는 도면,FIG. 2 illustrates a “build upon” relationship between software and hardware elements of a JAVA application environment that includes a hardware processor (FIG. 1) and software elements of an embodiment of JAVA virtual machine execution;

도 3은 도 1의 하드웨어 프로세서에 다수의 가능한 부가물을 도시한 도면,3 illustrates a number of possible additions to the hardware processor of FIG. 1;

도 4는 도 1의 하드웨어 프로세서상에서 실행하는 뮤테이터 프로세스에 의해서 만들어진 포인터 스토어를 가로지르는 세대간 및 카드 경계를 트랩핑하기 위해 본 발명의 실시예에 따라 제공된 쓰기 배리어의 동작을 도시하는 도면,4 illustrates the operation of a write barrier provided in accordance with an embodiment of the present invention for trapping intergenerational and card boundaries across a pointer store made by a mutator process running on the hardware processor of FIG.

도 5는 본 발명의 실시예에 따른 오브젝트 레퍼런스(objectref) 포맷을 도시하는 도면,5 illustrates an object ref format according to an embodiment of the present invention;

도 6A는 본 발명의 한 실시예에 따른 오브젝트 포맷을 나타내는 도면,6A illustrates an object format according to an embodiment of the present invention;

도 6B는 본 발명의 한 실시예에 따른 대안적인 조정된 오브젝트 포맷을 나타내는 도면,6B illustrates an alternative coordinated object format, in accordance with an embodiment of the present invention;

도 7은 포인터 스토어를 가로지르는 세대간 및 카드 경계의 트래핑을 용이하도록 포인터 비고유의 바이트코드를 포인터-고유의 바이트코드로 동적으로 교체하기 위해 본 발명에 따라 사용된 바이트코드 교체 캐시의 한 실시예를 나타내는 도면, 및7 illustrates one embodiment of a bytecode replacement cache used in accordance with the present invention to dynamically replace pointer-native bytecodes with pointer-specific bytecodes to facilitate trapping of intergenerational and card boundaries across a pointer store. Drawing, and

도 8은 본 발명에 따른 가비지컬렉션에 대한 구조적인 지원에 의해 지원될 수 있는 세대 수집기 방법에 기초한 예시적인 기억된 세트를 나타내는 도면이다.8 is a diagram illustrating an exemplary stored set based on a generation collector method that may be supported by structural support for garbage collection in accordance with the present invention.

서로 다른 도면에서 동일한 참조부호의 사용은 유사하거나 동일한 항목을 나타낸다Use of the same reference numerals in different drawings indicates similar or identical items.

..

바람직한 실시예(들)에 대한 설명Description of the Preferred Embodiment (s)

본 발명을 실행하기 위한 최선의 방식에 대한 상세한 설명을 다음과 같이 기술한다. 이 설명은 본 발명을 설명하기 위한 것이고, 이를 한정하는 것으로 이해되어서는 안된다.Detailed description of the best mode for carrying out the invention is described as follows. This description is intended to illustrate the invention and should not be understood as limiting it.

가비지컬렉션 세대의 격리에 대해 여기에 기술된 구조적 지원은 세대간 포인터 스토어 트랩 매트릭스, 오브젝트 참조 세대 태깅, 상기 세대간 포인터 스토어 트랩 매트릭스 및 오브젝트 참조 세대 태깅에 응답하는 쓰기 배리어, 가비지컬렉션 트랩 처리기(handler)를 포함하고, 쓰기 배리어가 지원되는 포인터 고유의 명령으로 포인터 비고유 명령의 선택적인 동적 교체를 용이하게 한다.The structural support described herein for the isolation of garbage collection generations includes intergenerational pointer store trap matrix, object reference generation tagging, write barriers in response to the intergenerational pointer store trap matrix, and object reference generation tagging, garbage collection trap handlers. ) And a pointer-specific instruction with a write barrier to facilitate selective dynamic replacement of pointer non-unique instructions.

일반적으로, 본 발명에 따른 실시예는 가비지 수집된 시스템에서 세대를 분리하기 위한 여러 가지 측면의 구조적인 지원을 이용할 수 있다. 이런 구조적인 지원은 하드웨어적으로, 소프트웨어적으로 또는 하드웨어와 소프트웨어의 조합으로 제공될 수 있지만, 상기 구조적인 지원이 실질적으로 하드웨어로 제공되는 실시예가 통상 향상된 성능과 감소된 메모리 요구 이점을 제공할 것이다. 이 때문에, 본 명세서에서는 예시적인 하드웨어 가상 기계 명령 프로세서 실시예가 기술되고 있다. 그러나, 당업자라면 이 설명에 기초하여 첨부한 특허청구범위의 범위에 포함되는 가상 기계 명령 프로세서의 소프트웨어(예를 들면, 인터프리터, JIT(just-in-time) 컴파일러 등) 구현에 기초한 구현예를 포함하는 대안적인 실시예를 인식할 수 있을 것이다.In general, embodiments in accordance with the present invention may utilize various aspects of structural support for segregating generations in a garbage collected system. Such structural support may be provided in hardware, software, or a combination of hardware and software, but embodiments in which the structural support is provided substantially in hardware will typically provide improved performance and reduced memory requirements. . For this reason, an exemplary hardware virtual machine instruction processor embodiment is described herein. However, those skilled in the art will include implementations based on software (eg, interpreters, just-in-time compilers, etc.) implementations of virtual machine instruction processors that fall within the scope of the appended claims based on this description. It will be appreciated that alternative embodiments may be made.

JAVA 가상 기계 명령 프로세서 실시예JAVA virtual machine command processor embodiment

도 1은 본 발명에 따른 가비지컬렉션을 재배치하는 한정된 정지시간에 대한지원을 포함하고, JAVA 가상 기계 명령에 독립적인 프로세서 구조를 직접 실행하는 가상 기계 명령 프로세서(100), 이하 하드웨어 프로세서(100)의 예시적인 하드웨어 실시예를 나타낸다. 가상 기계 명령을 실행하는데 있어서 하드웨어 프로세서(100)의 성능은 인텔 PENTIUM 마이크로프로세서 또는 선마이크로시스템즈 ULTRASPARC 프로세서와 같은, 동일한 가상 기계 명령을 소프트웨어 JAVA 인터프리터를 가지고 번역하는 하이엔드(high-end) CPU보다 보통 좋다,(ULTRASPARC는 캘리포니아주 마운틴뷰의 선마이크로시스템즈의 등록상표이고, PENTIUM은 캘리포니아주 서니베일의 인텔 등록상표이다). 또한, 하드웨어 프로세서(100)의 성능은 JAVA JIT 컴파일러를 갖는 몇몇 하이엔드 CPU보다 좋다. 하드웨어 프로세서(100)는 저가이고, 낮은 전력 소비를 나타낸다. 그 결과, 하드웨어 프로세서(100)는 휴대용 애플리케이션에 적합하다.1 includes support for a finite downtime for relocating garbage collection in accordance with the present invention, and of a virtual machine instruction processor 100, hereinafter hardware processor 100, which directly executes a processor architecture independent of JAVA virtual machine instructions. An exemplary hardware embodiment is shown. The performance of the hardware processor 100 in executing virtual machine instructions is usually higher than a high-end CPU that translates the same virtual machine instructions with a software JAVA interpreter, such as an Intel PENTIUM microprocessor or Sun Microsystems ULTRASPARC processor. OK, (ULTRASPARC is a registered trademark of Sun Microsystems, Mountain View, California, and PENTIUM is an Intel registered trademark of Sunnyvale, California). In addition, the performance of the hardware processor 100 is better than some high-end CPUs with a JAVA JIT compiler. Hardware processor 100 is inexpensive and exhibits low power consumption. As a result, the hardware processor 100 is suitable for portable applications.

하드웨어 프로세서(100)는 실질적으로 하드웨어적으로, 25-50Kbyte의 메모리 스토어, 예를 들어 판독전용메모리(ROM) 또는 랜덤액세스메모리(RAM)를 제공하며, 소프트웨어 인터프리터에 의해 요구되는 다른 것은 제거되거나 대안적으로 할당될 수 있다. 가비지컬렉션을 위한 하드웨어 지원은 가비지컬렉션을 위한 인라인 코드(예를 들어, 컴파일러가 제공된 읽기 및/또는 쓰기 배리어)를 줄이고, 제한된 메모리의 효율적 이용을 촉진하고, 가비지컬렉션 오버헤드와 정지 시간을 줄임으로써 제한된 메모리의 JAVA 가상기계 구현을 위한 추가적인 이점을 제공한다. 큰 메모리의 이용이 금지되는, 예를 들어 네트워크 응용을 위한 인터넷 칩, 셀룰러폰 프로세서, 다른 통신 집적회로 또는 내장(embedded) 프로세서와 같은 다른 저전력, 저비용 애플리케이션 및 휴대용 장치를 포함하는 환경에서, 하드웨어 프로세서 (100)가 유리하다.The hardware processor 100 substantially provides a hardware store of 25-50 Kbytes of memory, for example read only memory (ROM) or random access memory (RAM), the other required by the software interpreter is removed or alternatively. Can be assigned as Hardware support for garbage collection reduces inline code for garbage collection (e.g., read and / or write barriers provided by the compiler), facilitates efficient use of limited memory, and reduces garbage collection overhead and downtime. It provides additional benefits for implementing JAVA virtual machines with limited memory. In an environment involving other low-power, low-cost applications and portable devices, such as, for example, Internet chips for cellular applications, cellular phone processors, other communications integrated circuits or embedded processors, where the use of large memory is prohibited, hardware processors 100 is advantageous.

심지어 대용량 메모리가 실용적인 환경에서도, 가비지컬렉션을 위한 하드웨어 지원은 배리어 구현과 관련된 오버헤드를 줄이고, 메모리의 효율 개선을 촉진하며, 가비지컬렉션 구현을 위한 정지시간을 줄인다. 특히, 하드웨어 프로세서(100)는 JAVA 가상기계 구현예와 관련하여 가비지컬렉션 방법 및 구현에 대한 이점을 제공한다. 그러나, 당업자라면 이 설명에 기초하여 예를 들어 번역된 JIT 컴파일러 JAVA 가상기계 구현을 포함하는 다른 JAVA 가상기계 구현 뿐만 아니라 다른 비-JAVA 가상기계 구현에 대한 변형을 파악할 수 있을 것이다.Even in large memory environments, hardware support for garbage collection reduces the overhead associated with implementing barriers, promotes improved memory efficiency, and reduces downtime for garbage collection. In particular, the hardware processor 100 provides advantages for garbage collection methods and implementations with respect to JAVA virtual machine implementations. However, one of ordinary skill in the art, based on this description, will be able to identify variations on other non-JAVA virtual machine implementations as well as other JAVA virtual machine implementations including, for example, translated JIT compiler JAVA virtual machine implementations.

여기서 사용된 것처럼, 가상 기계는 실제 컴퓨팅 기계와 같이 명령 세트를 갖고 다양한 메모리 영역을 사용하는 추상적인 컴퓨팅 기계이다. 가상기계 규격은 가상기계 구현에 의해 실행되는 가상 기계명령에 독립된 한 세트의 프로세서 구조를 규정한다. 일반적으로, 가상기계 구현은 하드웨어(예를 들어 하드웨어 프로세서(100)의 경우와 같이)적으로, 소프트웨어(예를 들어 번역된 JIT 컴파일러 구현의 경우와 같이)적으로 또는 하드웨어와 소프트웨어의 조합일 수 있다. 각각의 가상기계 명령은 실행될 구체적인 동작을 규정한다. 상기 가상기계는 가상기계 명령 또는 상기 가상기계의 근원적인 구현을 생성하는데 사용되는 컴퓨터 언어를 이해할 필요가 없다. 다만 가상기계 명령에 대한 특정 포맷만을 이해하면 된다. 한 실시예에서, 상기 가상기계 명령은 JAVA 가상기계 명령이다. 각각의 JAVA 가상기계 명령은 정보, 오퍼랜드 및 다른 필요한 정보를 식별하는 명령을 인코드하는 하나 이상의 바이트를 포함한다.As used herein, a virtual machine is an abstract computing machine that has a set of instructions and uses various memory regions like a real computing machine. The virtual machine specification defines a set of processor structures that are independent of the virtual machine instructions executed by the virtual machine implementation. In general, the virtual machine implementation may be hardware (such as in the case of hardware processor 100, for example), software (such as in the case of translated JIT compiler implementations), or a combination of hardware and software. have. Each virtual machine command defines a specific action to be executed. The virtual machine does not need to understand the computer language used to generate the virtual machine instructions or the underlying implementation of the virtual machine. You only need to understand the specific format for the virtual machine instructions. In one embodiment, the virtual machine command is a JAVA virtual machine command. Each JAVA virtual machine command includes one or more bytes that encode a command that identifies information, operands, and other necessary information.

이 실시예에서, 하드웨어 프로세서(100)(도 1)는 바이트코드를 포함하는 상기 JAVA 가상기계 명령을 처리한다. 하드웨어 프로세서(100)는 대부분의 상기 바이트코드를 직접 실행한다. 그러나, 몇몇 바이트코드의 실행은 마이크로코드를 통해 구현된다. 참조상 본 명세서에 포함된 Lindholm & Yellen, The JAVATM Virtual Machine Specification(Addison-Wesley, 1996), ISBN 0-201-63452-X 는 예시적인 JAVA 가상기계 명령 세트를 포함한다. 하드웨어 프로세서(100)에 의해서 지원되는특정 가상기계 명령 세트는 본 발명의 중요한 측면은 아니다. 그러나, 상기 가상기계 명령의 관점에서, 당업자는 특정 가상기계 명령 세트를 위해서 또는 JAVA 가상기계 규격으로 변경을 위해 본 발명을 변형할 수 있다.In this embodiment, hardware processor 100 (FIG. 1) processes the JAVA virtual machine instruction that includes bytecode. The hardware processor 100 executes most of the bytecodes directly. However, the execution of some bytecodes is implemented through microcode. Lindholm & Yellen, The JAVA Virtual Machine Specification (Addison-Wesley, 1996), ISBN 0-201-63452-X, incorporated herein by reference, includes an exemplary JAVA virtual machine instruction set. The specific virtual machine instruction set supported by the hardware processor 100 is not an important aspect of the present invention. However, in view of the above virtual machine instructions, those skilled in the art can modify the present invention for a particular virtual machine instruction set or for changing to the JAVA virtual machine specification.

한 실시예에서, 하드웨어 프로세서(100)는 I/O 버스 및 메모리 인터페이스 유닛(110), 명령 캐시(125)를 포함하는 명령 캐시 유닛(120), 비고속-고속 트랜슬레이터 캐시(131)를 포함하는 명령 디코드 유닛(130), 통합 실행 유닛(140), 스택 캐시(155)를 포함하는 스택 관리 유닛(150), 데이터 캐시(165)를 포함하는 데이터 캐시 유닛(160) 및 프로그램 카운터 및 트랩 제어 로직(170)를 포함한다. 여기에 기술된 가비지컬렉션 특성에 대한 지원은 기본적으로 프로그램 카운터 및 트랩 제어 로직(170)에 몇몇 부가적인 지원(예를 들어 상기 프로그램 카운터를 트래핑 스토어에 이어지는 다음 JAVA 가상기계 명령으로 강제하기 위한 지원을 포함함)을 갖는 실행 유닛(140)의 레지스터(144)와 정수유닛(142)에 존재한다. 한 실시예에서, 비고속-고속 트랜슬레이터 캐시(131)는 정수 유닛(142)의 하드웨어 쓰기 배리어 로직에 대한 포인터 고유성을 촉진시킨다. 이들 유닛들은 아래 기술되어 있다.In one embodiment, the hardware processor 100 includes an I / O bus and memory interface unit 110, an instruction cache unit 120 including an instruction cache 125, and a non-high-speed translator cache 131. The command decode unit 130, the integrated execution unit 140, the stack management unit 150 including the stack cache 155, the data cache unit 160 including the data cache 165, and the program counter and trap control. Includes logic 170. Support for the garbage collection feature described herein basically provides some additional support for program counter and trap control logic 170 (e.g., support for forcing the program counter to the next JAVA virtual machine instruction following the trapping store). It is present in the register 144 and the integer unit 142 of the execution unit 140 having a). In one embodiment, the fast-fast translator cache 131 facilitates pointer uniqueness for the hardware write barrier logic of the integer unit 142. These units are described below.

도 2는 예를 들어 부분적으로 하드웨어 프로세서(100)(도 1)에 의해 규정되고, 부분적으로 그 프로세서에서 실행 가능한 응용 환경과 같은 JAVA 응용 환경의 소프트웨어와 하드웨어 구성요소 사이의 "설정된" 관계를 나타낸다. JAVA 응용/애플릿 소프트웨어(210)는 AWT 클래스(241), 네트 및 I/O 클래스(242) 및 JAVA OS 윈도우(243), JAVA OS 그래픽(248), TCP(244), NFS(245), UDP(246), IP(247), 이더넷(222), 키보드 및 마우스(221) 소프트웨어 구성요소를 포함하는 애플릿/응용 프로그래밍 인터페이스 (220)를 규정하는, 한 실시예에서 JAVA 바이트코드를 포함하는 소프트웨어 구성요소를 이용한다. 도 2의 실시예에서, JAVA OS 그래픽(248) 및 이더넷(222) 소프트웨어 구성요소는 베이스라인 JAVA Virtual Machine Specification 에 의해 규정된 것 이외의 확장된 바이트코드도 역시 포함한다. 내장 응용 프로그래밍 인터페이스(EAPI)(230)의 구성요소는 JAVA Virtual Machine Specification 에 따른 JAVA 가상 기계 구현(250)의 하드웨어 및 소프트웨어 구성요소와 기본 클래스(231)를 포함한다.FIG. 2 illustrates, for example, a "established" relationship between software and hardware components of a JAVA application environment, such as partly defined by hardware processor 100 (FIG. 1), and partly executable on that processor. . JAVA application / applet software 210 includes AWT class 241, net and I / O class 242, and JAVA OS window 243, JAVA OS graphics 248, TCP 244, NFS 245, UDP. Software configuration including JAVA bytecode in one embodiment, defining an applet / application programming interface 220 including 246, IP 247, Ethernet 222, keyboard and mouse 221 software components. Use elements In the embodiment of FIG. 2, the JAVA OS graphics 248 and Ethernet 222 software components also include extended bytecodes other than those defined by the baseline JAVA Virtual Machine Specification. The components of the embedded application programming interface (EAPI) 230 include the hardware and software components of the JAVA virtual machine implementation 250 and the base class 231 according to the JAVA Virtual Machine Specification.

JAVA 가상기계 구현(250)은 JAVA 가상기계 명령을 평가하기 위해 하드웨어 프로세서(100)와 그 위에서 실행 가능한 트랩 코드를 포함한다. 또한, JAVA 가상기계 구현(250)은 클래스 로더(252), 바이트코드 검사기(253), 스레드관리기 (thread manager)(254) 및 가비지수집기(251) 소프트웨어와 같은 확장 바이트코드(예를 들어 가비지컬렉션과 관련하여 아래에 기술된 메모리 포인터 스토어 바이트코드 및 액세스 배리어를 포함함) 및 마이크로커널(microkernel)(255)에 대한 하드웨어 지원을 포함한다. JAVA 가상기계 구현(250)은 JAVA 가상기계 명세 호환 부분(250a) 뿐만 아니라 구현 종속 부분을 포함한다. 상기 JAVA 가상기계 명세가 가비지컬렉션이 제공되는 것을 규정하지만, 상기 사용된 특정 가비지컬렉션 방법은 구현 종속적이다.JAVA virtual machine implementation 250 includes hardware processor 100 and executable trap code thereon to evaluate JAVA virtual machine instructions. The JAVA virtual machine implementation 250 also includes extended bytecode (e.g. garbage collection), such as class loader 252, bytecode checker 253, thread manager 254, and garbage collector 251 software. Hardware pointer store bytecodes and access barriers described below in connection with the < RTI ID = 0.0 > and < / RTI > JAVA virtual machine implementation 250 includes implementation dependent portions as well as JAVA virtual machine specification compliant portion 250a. Although the JAVA virtual machine specification specifies that garbage collection is provided, the particular garbage collection method used is implementation dependent.

JAVA 가상기계 구현(250)의 예시적인 하드웨어 프로세서(100) 구현과 관련하여 여기에 기술된 가비지컬렉션에 대한 구조적인 특성은 특히 세대 가비지컬렉션 방법에 적합하다. 그러나, 당업자라면 이 설명에 기초하여 일반적으로 예를 들어 비세대 수집기 구현, 증분형 마크-압축 수집기, 카핑 수집기 등을 포함하는 재할당 수집기에 대한 본 발명의 한정된 정지 시간 지원의 응용을 파악할 수 있을 것이다.The structural characteristics of the garbage collection described herein in connection with the exemplary hardware processor 100 implementation of the JAVA virtual machine implementation 250 are particularly suitable for generation garbage collection methods. However, one of ordinary skill in the art, based on this description, will be able to understand the application of the limited downtime support of the present invention to reallocating collectors, including, for example, non-generation collector implementations, incremental mark-compression collectors, capping collectors, and the like. will be.

도 3A는 보다 정교한 시스템을 생성하기 위해서 하드웨어 프로세서(100)에 대한 몇가지 가능한 부가물을 나타낸다. 도시된 8가지 기능, 즉 NTSC 인코더 (310), MPEG(302), 이더넷 제어기(303), VIS(304), ISDN(305), I/O 제어기(306), ATM 어셈블리/리어셈블리(307) 및 무선 링크(308) 중 어느 하나를 지원하는 회로가 본 발명의 하드웨어 프로세서(100)와 동일한 칩에 집적될 수 있다.3A shows some possible additions to hardware processor 100 to create a more sophisticated system. Eight functions shown: NTSC encoder 310, MPEG 302, Ethernet controller 303, VIS 304, ISDN 305, I / O controller 306, ATM assembly / reassembly 307 And circuitry supporting any of the wireless links 308 may be integrated on the same chip as the hardware processor 100 of the present invention.

또한, 당업자라면 상기한 부가회로 중 어느 하나를 갖는 하드웨어 프로세서(100)의 실시예를 포함하는 하드웨어 프로세서(100)를 병합하는 광범위한 컴퓨터 시스템을 파악할 수 있을 것이다. 예시적인 컴퓨터 시스템(300) 실시예는 물리적인 메모리 스토어(예를 들어 RAM 및/또는 ROM), 컴퓨터 판독 가능 매체 액세스 장치(예를 들어, 디스크, CD-ROM, 테이프 및/또는 메모리 기술 기반 컴퓨터 판독 가능 매체 액세스 장치 등), 입/출력 장치 인터페이스(예를 들어, 키보드 및/또는 포인팅 장치, 디스플레이 장치 등에 대한 인터페이스) 및 통신 장치 및/또는 인터페이스를 포함한다. 적합한 통신 장치 및/또는 인터페이스는 네트워크 또는 전화 기반 통신에 대한 것, 공중 교체망, 사설망 등의 지상통신선 및/또는 무선 부분을 포함하는 통신망과의 연결을 위한 것을 포함한다. 본 발명의 몇몇 실시예에서, 명령 스트림(예를 들어 JAVA 바이트코드를 포함하는)은 상기 통신 장치 또는 인터페이스를 통하여 하드웨어 프로세서(100)에 의한 실행을 위해 송신 및/또는 수신된다.Those skilled in the art will also recognize a wide variety of computer systems incorporating the hardware processor 100 that includes embodiments of the hardware processor 100 having any of the additional circuits described above. Exemplary computer system 300 embodiments include a physical memory store (eg, RAM and / or ROM), a computer readable medium access device (eg, disk, CD-ROM, tape, and / or memory technology based computer). Readable medium access devices, etc.), input / output device interfaces (eg, interfaces for keyboard and / or pointing devices, display devices, etc.) and communication devices and / or interfaces. Suitable communication devices and / or interfaces include those for network or telephone-based communications, for connection with telecommunications networks including terrestrial lines and / or wireless portions, such as public switched networks, private networks, and the like. In some embodiments of the invention, instruction streams (including JAVA bytecodes) are transmitted and / or received for execution by hardware processor 100 via the communication device or interface.

가비지컬렉션을 위한 구조상의 지원Structural Support for Garbage Collection

하드웨어 프로세서(100)는 자체에서 실행 가능한 가비지컬렉션 소프트웨어로서 구현된 세대 수집기 방법을 포함하는 다양한 가비지컬렉션 방법에 대한 구조상 지원을 제공한다. 특히, 하드웨어 프로세서(100)는 프로그램 가능 스토어 필터링, 태그형 오브젝트 참조와 오브젝트 헤더 포맷 및 확장된 바이트코드 지원을 포함한다.The hardware processor 100 provides structural support for a variety of garbage collection methods, including generation collector methods implemented as garbage collection software executable by itself. In particular, hardware processor 100 includes programmable store filtering, tagged object references and object header formats, and extended bytecode support.

프로그램 가능 스토어 필터링Programmable Store Filtering

도 4는 상기 힙에 대한 스토어의 프로그램 가능 필터링을 지원하는 슈퍼바이저 기록 가능 레지스터 GC_CONFIG의 한 실시예를 나타낸다. 도 1과 관련하여, 레지스터 GC_CONFIG는 레지스터(144)에 포함되고, 실행유닛(140)에 접근 가능하다. 한 실시예에서, 12비트의 레지스터 GC_CONFIG는 페이지간 포인터 스토어 검사를 위해 페이지 크기를 선택하는데 사용하는 필드 GC_PAGE_MASK를 규정한다. 12비트의 필드 GC_PAGE_MASK는 0x3F로 규정된 부가적인 8개의 보다 유효한 비트와 0x000으로 규정된 12개의 덜 유효한 비트를 갖는 32비트 가비지컬렉션 페이지 마스크의 비트 23:12로서 사용된다. 생성된 32비트의 가비지컬렉션 페이지 마스크는 프로그램 가능 가비지컬렉션 페이지 경계를 교차하는 포인터 스토어에 대한 스토어 배리어를 형성하는데 사용된다. 스토어 데이터 value와 포인터 스토어의 objectref 타겟(예를 들어 스택 캐시(155)에 표시된 오퍼랜드 스택의 상위에 존재하는 value와 objectref에 대해 동작하는 aputfield_quick 명령)은 32비트 가비지컬렉션 페이지 마스크에 의해 효율적으로 마스크되고, value(objectref)가 타겟 오브젝트가 존재하는 곳과는 다른 가비지컬렉션 페이지를 가리키는지를 판정하기 위해 비교된다. 상기 방식에서, 가비지컬렉션 페이지 크기는 가상 메모리 페이지 크기와는 무관하다. 게다가, 가비지컬렉션 페이지는 가상 메모리 지원 없이 저비용, 저전력 휴대용 애플리케이션 또는 인터넷 기기용 애플리케이션과 같은 컴퓨터 시스템 및 운영체제 환경에서 제공될 수 있다. 도 4의 실시예에서, 이 설명에 기초하여 다른 가비지컬렉션 페이지 크기와 크기 범위에 대한 적절한 변형이 당업자에게는 명백해지지만, 레지스터 GC_CONFIG는 4KByte 내지 8MByte 범위의 가비지컬렉션 페이지 크기를 프로그램 가능하게 규정하는 것을 허용한다.4 illustrates one embodiment of a supervisor writeable register GC_CONFIG that supports programmable filtering of the store for the heap. With reference to FIG. 1, register GC_CONFIG is contained in register 144 and accessible to execution unit 140. In one embodiment, the 12-bit register GC_CONFIG defines the field GC_PAGE_MASK, which is used to select the page size for inter-page pointer store checks. The 12-bit field GC_PAGE_MASK is used as bits 23:12 of the 32-bit garbage collection page mask with an additional 8 more valid bits defined as 0x3F and 12 less valid bits defined as 0x000. The generated 32-bit garbage collection page mask is used to form a store barrier for the pointer store across the programmable garbage collection page boundary. The store data value and the objectref target of the pointer store (for example, the aputfield_quick command that operates on the value and objectref that resides above the operand stack shown in the stack cache 155) are efficiently masked by the 32-bit garbage collection page mask. , value (objectref) is compared to determine if it points to a garbage collection page different from where the target object exists. In this manner, the garbage collection page size is independent of the virtual memory page size. In addition, garbage collection pages can be provided in computer system and operating system environments such as low cost, low power portable applications or applications for Internet devices without virtual memory support. In the embodiment of Figure 4, based on this description, appropriate variations to other garbage collection page sizes and size ranges will be apparent to those skilled in the art, but register GC_CONFIG allows programmatically defining garbage collection page sizes in the range of 4 KBytes to 8 MBytes. do.

레지스터 GC_CONFIG는 또한 세대간 포인터 스토어 트랩 매트릭스를 프로그램 가능하게 규정하는 필드 WB_VECTOR를 포함한다. 필드 WB_VECTOR는 스토어 데이터 value와 연관된 포인터 데이터 세대와, 그의 objectref 타겟과 연관된 타겟 오브젝트 세대를 갖는 포인터 스토어가 트랩하는 세대 쌍을 인코드한다. 도 4의 실시예에서, WB_VECTOR는 가비지컬렉션 트랩은 바람직한 포인터 데이터와 타겟 오브젝트 세대 쌍에 대한 1비트 표시의 4x4 매트릭스를 규정한다. 다른 실시예는 보다 크거나 작은 매트릭스를 규정할 수 있고, 부가적인 상태(예를 들어, no_trap, gc_notify2 및 gc_notify3)를 선택적으로 인코드할 수 있다.The register GC_CONFIG also includes a field WB_VECTOR that programmatically defines the inter-generation pointer store trap matrix. The field WB_VECTOR encodes a pointer data generation associated with the store data value and a generation pair that the pointer store having a target object generation associated with its objectref target traps. In the embodiment of FIG. 4, WB_VECTOR specifies that the garbage collection trap defines a 4x4 matrix of 1-bit representations for the desired pointer data and the target object generation pair. Other embodiments may define larger or smaller matrices and optionally encode additional states (eg no_trap, gc_notify2 and gc_notify3).

도 4의 실시예를 참조하면, 타겟 오브젝트 objectref의 2비트 태그는 필드 WB_VECTOR에 4비트 인덱스를 형성하기 위해 그 안에 저장되는 value의 2개의 태그 비트와 연관된다. 2비트 태그는 각각 아래에 기술된 바와 같이 세대 구성원 정보를 인코드한다. 다음에 필드 WB_VECTOR의 인덱스된 비트는 쓰기 배리어가 대응하는 포인터 스토어를 트랩하는지를 인코드한다. 필드 WB_VECTOR는 모든 세대간 포인터 스토어(즉, 포인터 데이터 세대와 타겟 오브젝트 세대가 동일하지 않은 모든 포인터 스토어), 모든 포인터 스토어(세대간 뿐만 아니라 한 세대내), 보다 새로운 세대 포인터 스토어(즉, 보다 늙은 세대 오브젝트로의 보다 젊은 세대 포인터의 저장) 등에 대한 트래핑을 인코드하기 위해 프로그램 가능하게 구성될 수 있다. 일반적으로, 세대 쌍에 대한 임의의 복합 트래핑이 지원된다. 도 4의 실시예에서는 4세대까지가 지원되지만, 당업자라면 이 설명에 기초하여 보다 많은 수의 세대에 대한 적절한 변형을 파악할 수 있을 것이다.Referring to the embodiment of FIG. 4, the 2-bit tag of the target object objectref is associated with two tag bits of value stored therein to form a 4-bit index in the field WB_VECTOR. Each 2-bit tag encodes household member information as described below. The indexed bit of the field WB_VECTOR then encodes whether the write barrier traps the corresponding pointer store. The field WB_VECTOR is used for all intergenerational pointer stores (that is, all pointer stores where the pointer data generation and the target object generation are not the same), all pointer stores (not only between generations, but within one generation), and newer generation pointer stores (that is, older ones). Programmatically to encode trappings, such as storing younger generation pointers into generation objects). In general, any complex trapping for generation pairs is supported. Although up to four generations are supported in the embodiment of FIG. 4, those skilled in the art will be able to determine appropriate variations for a larger number of generations based on this description.

한 실시예에서, 필드 GC_PAGE_MASK와 필드 WB_VECTOR는 포인터 스토어에 대한 쓰기 배리어의 동작을 프로그램 가능하게 규정한다. 특히, 아래에 보다 상세히 기술되는 것처럼, 하드웨어 프로세서(100)에 의해 제공된 확장 바이트코드 지원은 쓰기 배리어로 하여금 비포인터 스토어에서 포인터 스토어를 식별하도록 하고, 필드 GC_PAGE_MASK와 WB_VECTOR는 또한 하드웨어 프로세서(100)로 하여금 프로그램 가능하게 규정된 포인터 스토어 세트를 트랩하기 위해 쓰기 배리어를 프로그램 가능하게 필터링하도록 한다. 그러나, 대안적인 실시예는 종래의 배리어 구현에서 프로그램 가능하게 규정된 명백한 포인터 기억장소 세트를 여전히 이용하면서 하드웨어 프로세서(100)의 확장 바이트코드 지원에 의해 제공된 포인터 기억장소에 대한 유리한 정확한 식별을 보류할 수 있다.In one embodiment, field GC_PAGE_MASK and field WB_VECTOR programmatically define the operation of the write barrier for the pointer store. In particular, as described in more detail below, extended bytecode support provided by the hardware processor 100 causes the write barrier to identify a pointer store in a non-pointer store, and the fields GC_PAGE_MASK and WB_VECTOR are also directed to the hardware processor 100. Allow programmatically filtering the write barrier to trap a programmatically defined set of pointer stores. However, alternative embodiments may hold advantageously accurate identification of the pointer storage provided by the hardware processor 100's extended bytecode support while still using the explicit set of pointer storage that is programmatically defined in conventional barrier implementations. Can be.

도 4는 네 개의 수집된 메모리 영역(450)에 관련하여 프로그램 할 수 있는 스터어 필터링 지원을 나타낸다. 가비지수집기 프로세스(420)는 기억된 세트(460)가 뮤테이터 프로세스(410)에 의해 만들어지는 젊은 세대 포인터 스토어를 기록하는 세대 수집기를 구현하기 위해서 하드웨어 프로세스(100)에서 실행할 수 있는 바이트코드를 포함한다. 세대간 포인터 스토어 트랩 매트릭스(470)의 내용은 필드 WB_VECTOR의 내용에 대응하고, 쓰기 배리어를 젊은 세대 포인터 스토어에 인코드한다. 이하 설명된 바와 같이 인코드되는 태그는 스토어 데이터 포인터 값과 연관된 세대와 뮤테이터 프로세스(410)의 포인터 스토어 명령(즉, aputfield_quick 명령)의 objectref 타겟과 연관된 세대를 위해 세대간 포인터 스토어 트랩 매트릭스(470)내로 인덱스하기 위해 사용된다. 그렇게 인덱스된 세대간 포인터 스토어 트랩 매트릭스(470) 요소의 내용에 기초하여, 쓰기 배리어(430)는 가비지컬렉션 트랩 핸들러(gc_notify)(440)를 불러내어 value와 objectref에 관련된 태그가 젊은 세대 오브젝트에 대한 레퍼런스가 늙은 세대 오브젝트내로 저장되어 있는 것을 나타내는지 aputfield_quick 포인터 스토어를 트랩한다.4 illustrates programmable stear filtering support with respect to four collected memory regions 450. The garbage collector process 420 includes bytecode that can be executed by the hardware process 100 to implement a generation collector in which the stored set 460 records the young generation pointer store created by the mutator process 410. do. The contents of the inter-generation pointer store trap matrix 470 correspond to the contents of the field WB_VECTOR and encode the write barrier into the young generation pointer store. As described below, the encoded tag includes an intergenerational pointer store trap matrix 470 for generations associated with the store data pointer value and generations associated with the objectref target of the pointer store instruction (ie, the aputfield_quick instruction) of the mutator process 410. Used to index into Based on the contents of the inter-generated pointer store trap matrix 470 elements so indexed, the write barrier 430 invokes a garbage collection trap handler (gc_notify) 440 so that the tags associated with the value and objectref are for the young generation object. Trap the aputfield_quick pointer store to indicate that the reference is stored in an old generation object.

여기서의 설명에 기초하여, 당업자는 세대간 포인터 스토어 트랩 매트릭스(470)(즉, 필드 WB_VECTOR의) 및/또는 필드 GC_PAGE_MASK의 내용에 의해 제공된 프로그램할 수 있게 선택된 특정 스토어 필터링을 지원하는 가비지컬렉션 트랩 핸들러(440)를 위한 다양한 알맞은 구현을 파악할 것이다. 세대간 포인터 스토어 트랩 매트릭스(470)의 내용(도 4)에 따른 한 실시예에서, 가비지컬렉션 트랩 핸들러(440)는 기억된 세트 데이터 구조(예들 들어, 수집된 메모리 영역(450)의 세대 1, 2, 및 3에 각각 대응하는 기억된 세트 461, 462, 및 463를 포함함) 트랩핑 스토어에 대한 정보를 저장하기 위해 하드웨어 프로세서(100)에서 실행할 수 있는 바이트코드를 포함한다.Based on the description herein, one of ordinary skill in the art would appreciate that a garbage collection trap handler that supports programmatically selected specific store filtering provided by the intergenerational pointer store trap matrix 470 (ie of field WB_VECTOR) and / or the contents of field GC_PAGE_MASK. It will identify various suitable implementations for 440. In one embodiment according to the contents of the inter-generation pointer store trap matrix 470 (FIG. 4), the garbage collection trap handler 440 may store stored set data structures (e.g., generation 1, of collected memory region 450). And stored sets 461, 462, and 463 corresponding to 2, and 3, respectively). The bytecode executable by the hardware processor 100 to store information about the trapping store.

또 다른 실시예에서, 세대간 포인터 스토어 트랩 매트릭스(470)의 내용은 모든 포인터 스토어(세대간 또는 다른 방법으로)를 트랩하기 위해서 프로그램할 수 있게 정의된다. 가비지컬렉션 트랩 핸들러(440)와 관련된 대안적 카드 마킹 타입 실시예는 카드 테이블 데이터 구조에 상기 트랩핑 스토어에 대한 정보를 저장하기 위해 하드웨어 프로세서(100)에서 실행할 수 있는 바이트코드를 포함한다. 종래의 카드 마킹 구현과 대조하여, 여기서 설명된 가비지컬렉션을 위한 구조는 하드웨어 프로세서(100)가 포인터 스토어와 일반적인 저장을 구분하고, 세대간 포인터 스토어와 일반적인 포인터 스토어를 구분하도록 지원한다. 이러한 이유로, 또 다른 카드 마킹 타입 실시예에서 세대간 포인터 스토어 트랩 매트릭스(470)의 내용은 세대간 포이터 스토어만 트랩하도록 프로그램 할 수 있게 정의된다.In another embodiment, the contents of the intergenerational pointer store trap matrix 470 are defined to be programmable to trap all pointer stores (intergenerational or otherwise). An alternative card marking type embodiment associated with garbage collection trap handler 440 includes bytecode that may be executed by hardware processor 100 to store information about the trapping store in a card table data structure. In contrast to conventional card marking implementations, the structure for garbage collection described herein supports the hardware processor 100 to distinguish between a pointer store and a general store, and to distinguish between a generational pointer store and a general pointer store. For this reason, in another card marking type embodiment, the content of the intergenerational pointer store trap matrix 470 is defined to be programmable to trap only intergenerational pointer store.

기억된 세트 스타일 실시예 및 카드 마킹 스타일 실시예에서, 확장된 바이트코드 지원은 하드웨어 프로세서(100)가 아래에 더 상세하게 설명된 것과 같이 비포인터 스토어 중에서 포인터 스토어를 정확히 식별하도록 한다. 또한, 세대간 포인터 스토어 트랩 매트릭스(470)(즉, 필드 WB_VECTOR에 의한)와 쓰기 배리어(430)에 의해 제공된 상기 힙에의 스터어를 프로그래머블하게 필터링하는 것은 하드웨어 프로세서(100)가 수집시간보다 뮤테이터 프로세스(410) store time에서 세대간인(intergenerational) 포인터 스토어를 정의하는 것을 허용한다. 이러한 이유로, 용어 카드 마킹은 수집 동안에 수집기 프로세스(420)에 의해 사용하기 위한 가비지컬렉션 트랩 핸들러(440)의 실시예에 의해 제공되는 저장장치의 종류(즉, 카드 테이블)로 설명된다. 용어 "카드 마킹"의 사용은 포인터 또는 문자 데이터가 저장되는 것과는 상관없이 모든 스토어가 트랩될 필요가 있다는 것을 의미하지는 않는다.In stored set style embodiments and card marking style embodiments, extended bytecode support allows the hardware processor 100 to correctly identify a pointer store among non-pointer stores as described in more detail below. In addition, programmatically filtering the stur to the heap provided by the inter-generation pointer store trap matrix 470 (i.e., by field WB_VECTOR) and the write barrier 430 may cause the hardware processor 100 to mute the collection time. Data process 410 allows defining an intergenerational pointer store at store time. For this reason, the term card marking is described as the type of storage (ie, card table) provided by the embodiment of the garbage collection trap handler 440 for use by the collector process 420 during collection. The use of the term "card marking" does not mean that all stores need to be trapped regardless of whether pointer or character data is stored.

도 4는 또한 포인터 스토어의 트랩핑에 기초한 가비지컬렉션 페이지를 지원하는 것을 나타낸다. 필드 GC_PAGE_MASK는 스토어 데이터 포인터 값과 포인터 스토어 명령의 objectref 타겟(즉, aputfield_quick 명령)을 비교하기 위해 프로그램할 수 있는 마스크를 제공한다. 쓰기 배리어(430)는 value와 objectref에 대한 가비지컬렉션 페이지가 일치하지 않는다면 포인터 스토어를 트랩한다. 추가적인 저장 필터링은 필드 GC_PAGE_MASK에 의해 제공하고 쓰기 배리어(430)는 수집기 프로세스(420)의 구현에 의해서 가장 늙은 세대의 비파괴적인 수집을 위해서 Hudson 트레인 알고리즘(R.Hudson and J.E.B. Moss 저 , Incremental Garbage Collection for Mature Objects, Proceedings of International Workshop on Memory Management, St.Malo,France,16-18,Sept.1992)이 채용된 하드웨어 프로세서(100)상에서 수집기 프로세스(420) 구현에 특히 유용하다. 당업자는 Hudson의 트레인 알고리즘에 따른 트레인 "cars"를 정의하는데 필드 GC_PAGE_MASK에 의해 정의된 가비지컬렉션 페이지 크기가 사용되는 알맞은 구현을 인식할 수 있을 것이다.4 also shows support for garbage collection pages based on the trapping of pointer stores. The field GC_PAGE_MASK provides a programmable mask to compare the store data pointer value with the objectref target of the pointer store instruction (ie, the aputfield_quick instruction). The write barrier 430 traps the pointer store if the garbage collection pages for value and objectref do not match. Additional storage filtering is provided by the field GC_PAGE_MASK and the write barrier 430 is implemented by the Hudson train algorithm (R. Hudson and JEB Moss, Incremental Garbage Collection for the oldest generation) by the implementation of the collector process 420. Mature Objects , Proceedings of International Workshop on Memory Management, St. Malo, France, 16-18, Sept. 1992) are particularly useful for implementing the collector process 420 on a hardware processor 100 employing. Those skilled in the art will recognize the appropriate implementation in which the garbage collection page size defined by the field GC_PAGE_MASK is used to define the train "cars" according to Hudson's train algorithm.

예를 통해서, aputfield_quick 바이트코드의 구문(syntax)과 그에 따른 하드웨어 프로세서(100)의 동작은 다음과 같다:By way of example, the syntax of the aputfield_quick bytecode and thus the operation of the hardware processor 100 is as follows:

동작: 가비지컬렉션 체크로 오브젝트에 레퍼런스 필드 설정Behavior: Setting a reference field on an object with garbage collection checks

형식:form:

aputfield_quick aputfield_quick offsetbyte1 offsetbyte1 offsetbyte2 offsetbyte2

스택: ...,objectref,valueStack: ..., objectref, value

...        ...

설명: reference 타입 objectref 및 reference 타입 value는 오퍼랜드 스택(operand stack)으로부터 튀어 나온다. 상기 value는 objectref에 의해 참조된 상기 클래스 인스턴스내로 특정된 오프셋에 쓰여진다. 상기 오프셋의 값은 (오프셋바이트 1《 8)|오프셋바이트 2이다.Description: The reference type objectref and reference type value pop out of the operand stack. The value is written to the offset specified in the class instance referenced by objectref. The value of the offset is (offset byte 1 < 8) |

실행시간 예외: 만일 상기 objectref가 null 이면, aputfield_quick 는 NullPointException 내준다.Runtime exception: If the objectref is null, aputfield_quick throws a NullPointException.

objectref와 value 각각의 가장 왼쪽 자릿수 두 비트는 4-비트 인덱스를 형성하기 위해 연쇄된다. 이 인덱스는 GC_CONFIG 레지스터의 16-비트 WB_VECTOR 필드로부터 한 비트를 선택한다. 만일 선택된 비트가 설정되면, gc_notify 트랩이 발생된다.The two leftmost digits of objectref and value are concatenated to form a 4-bit index. This index selects one bit from the 16-bit WB_VECTOR field in the GC_CONFIG register. If the selected bit is set, a gc_notify trap is generated.

index=((objectref & 0xC0000000)≫28)|(value≫30)index = ((objectref & 0xC0000000) »28) | (value≫30)

if(GC_CONFIG.WB_VECTOR [index]= = 1)if (GC_CONFIG.WB_VECTOR [index] = = 1)

generate gc_notifygenerate gc_notify

주의: 이 명령의 Opcode는 원래 putfield였고, 필드에 대한 동작은 reference 타입 필드에 대응하는 클래스 인스턴스 데이터내에 동적으로 오프셋을 갖도록 결정되었다.Note: The opcode for this command was originally putfield, and the behavior for the field was determined to have a dynamic offset in the class instance data corresponding to the reference type field.

putfield 명령에 의해 참조된 상수 풀 엔트리가 분석될 때, 상기 필드를 위한 오프셋이 발생되고, 상기 필드의 타입이 결정된다. 16-비트 오프셋은 최초의 putfield 명령의 두개의 오퍼랜드 바이트를 교체한다. 상기 필드의 타입은 putfield_quick, putfield2_quick, 또는 aputfield_quick 바이트코드가 최초의 putfield 바이트코드를 교체하는지를 결정한다.When the constant pool entry referenced by the putfield command is resolved, an offset for the field is generated and the type of the field is determined. The 16-bit offset replaces the two operand bytes of the original putfield instruction. The type of the field determines whether the putfield_quick, putfield2_quick, or aputfield_quick bytecode replaces the first putfield bytecode.

클래스(오브젝트 내의 레퍼런스 필드보다 오히려) 내의 정적 레퍼런스 필드를 설정하기 위한 aputstatic_quick 바이트코드의 구문과 그에 따른 하드웨어 프로세서(100)의 동작은 유사하다.The syntax of the aputstatic_quick bytecode for setting a static reference field in a class (rather than a reference field in an object) and the operation of the hardware processor 100 accordingly is similar.

고속 가비지컬렉션 트랩 핸들러High Speed Garbage Collection Trap Handler

한 실시예에서, 가비지 컬렉션의 고속 처리는 벡터된 트랩에 의해 제공되고, In one embodiment, fast processing of garbage collection is provided by vectored traps,

gc_notify(tt=0x27), prioity=17 gc_notify (tt = 0x27), prioity = 17

는 하드웨어 프로세서(100)에 의해 실행할 수 있는 바이트코드를 포함하는 연관된 가비지컬렉션 트랩 핸들러(440)를 트리거 하는 트랩 제어 로직(170)에 의해 구현된다. 한 실시예에서, 각 페이지 경계 교차 포인터 스토어 또는 세대간 포인터 스토어에 대한 응답으로 발생하던지간에, 단일 가비지컬렉션 트랩 핸들러(440)는 가비지컬렉션 트랩의 각각을 서비스한다. 가비지컬렉션 트랩이 트랩핑 스토어가 완료되기 전에 일어나기 때문에, 가비지컬렉션 트랩 핸들러(440)는 기억된 세트또는 카드 테이블 갱신과 같이, 하드웨어 프로세서(100)가 무한하게 트랩핑하는 것을 방지하기 위해 수행된 가비지컬렉션 기능에 더하여 트랩핑 스토어를 모방하는 것이 필요하다. 그 다음 가비지컬렉션 트랩 핸들러(440)는 상기 스토어에 후속하는 명령에 상기 PC를 강제해야 한다.Is implemented by trap control logic 170 to trigger an associated garbage collection trap handler 440 that includes bytecode executable by hardware processor 100. In one embodiment, whether it occurs in response to each page boundary cross pointer store or intergenerational pointer store, a single garbage collection trap handler 440 serves each of the garbage collection traps. Because garbage collection traps occur before the trapping store is complete, garbage collection trap handler 440 is garbage collected to prevent the hardware processor 100 from trapping indefinitely, such as a stored set or card table update. In addition to the collection function, it is necessary to mimic the trapping store. The garbage collection trap handler 440 then has to force the PC to a command following the store.

가비지컬렉션 트랩에 의해서 영향을 받은 JAVA 가상 기계 명령은 aputfield_quick, aputststic_quick, aastore, anewarray, multianewarray, newarray, putfield, putstatic 및 new를 포함한다. 이들 중에서, aputfield_quick, aputstatic_quick, 및 aastore만이 상기 필드 WB_VECTOR 및/또는 GC_PAGE_MASK의 내용에 따라 동적 필터링과 같은 가비지컬렉션 체크를 수행하는 것이 필요하다. 다른 것은 가비지컬렉션 메카니즘 사용, 예를 들어, 세대 멤버쉽 태그를 적절히 초기화하는데 사용된 가비지컬렉션 메커니즘을 알기만하면 된다. 한 실시예에서, 상기 aastore 바이트코드는 모방 루틴에 트랩하고 aastore 트랩 핸들러는 적당한 가비지컬렉션 체크를 수행한다. 간단한 트랩 핸들러 구현은 aastore 트랩 핸들러에서의 오퍼랜드 스택의 맨위에 상기 arrayref를 저장시키고, 만일 필요하다면 적당한 체크와 트랩을 수행하기 위해서 dup, getfield_quick #0, aputfield_quick #0 바이트코드 시퀀스를 실행한다.JAVA virtual machine instructions affected by garbage collection traps include aputfield_quick, aputststic_quick, aastore, anewarray, multianewarray, newarray, putfield, putstatic and new. Of these, only aputfield_quick, aputstatic_quick, and aastore need to perform garbage collection checks such as dynamic filtering in accordance with the contents of the fields WB_VECTOR and / or GC_PAGE_MASK. Others only need to know the garbage collection mechanism used, for example, the garbage collection mechanism used to properly initialize generation membership tags. In one embodiment, the aastore bytecode traps the copy routine and the aastore trap handler performs the appropriate garbage collection check. A simple trap handler implementation stores the arrayref on top of the operand stack in the aastore trap handler, and executes the dup, getfield_quick # 0, aputfield_quick # 0 bytecode sequences to perform appropriate checks and traps if necessary.

태그된 레퍼런스와 오브젝트 포맷Tagged References and Object Formats

도 5는 하드웨어 프로세서(100)에서 나타낸 것과 같은 오브젝트 레퍼런스 (objectref)의 한 실시예를 나타낸다. 상기 objectref의 세 비트는 가비지컬렉션 힌트를 위해 사용될 수 있다. 특히, 필드 GC_TAG는 쓰기 배리어(430)가 상기한 바와 같이 포인터 스토어를 트랩하는지를 결정하기 위해서 레지스터 필드 GC_CONFIG.WB_VECTOR내의 인덱스의 일부를 형성한다. 도 5의 실시예에서, 필드 GC_TAG는 상기한 바와 같이 쓰기 배리어(430)가 사용할 수 있도록 세대 멤버쉽 정보를 인코드한다. 추가적인 처리 비트 H는 상기 오브젝트가 처리를 통해 직접 또는 간접으로 상기 objectref에 의해서 참조되는지를 표시한다. 처리는 추가적인 수준의 우회에 의한 비용에도 불구하고, 그에 대한 포인터(또는 objectrefs)의 대규모 갱신 없이 메모리 오브젝트의 재배치를 용이하게 하는 참조방법을 제공한다. 이들 두개의 필드는 하드웨어 프로세서(100)의 정수 유닛(142)(도 1)에 제공되기 전에 마스크된다.5 illustrates one embodiment of an object reference (objectref) as shown in hardware processor 100. Three bits of the objectref can be used for garbage collection hints. In particular, the field GC_TAG forms part of the index in the register field GC_CONFIG.WB_VECTOR to determine if the write barrier 430 traps the pointer store as described above. In the embodiment of FIG. 5, field GC_TAG encodes generation membership information for use by the write barrier 430 as described above. An additional processing bit H indicates whether the object is referenced by the objectref directly or indirectly through processing. The processing provides a reference method that facilitates the relocation of memory objects without massive updates of pointers (or objectrefs) to them, despite the cost of additional levels of bypass. These two fields are masked before being provided to the integer unit 142 (FIG. 1) of the hardware processor 100.

하드웨어 프로세서(100)의 한 실시예에서, 오브젝트(600)은 헤더부분(610)과 인스턴스 변수 저장부분(620)을 포함하는 메모리로 대표된다. 도 6a는 이와 같은 실시예를 도시한다. 헤더부분(610)은 그 자체가 오브젝트 클래스를 나타내는 메소드 벡터 테이블 베이스부분(612)을 포함하는 32-비트 워드와 상기 오브젝트의 동기상태 및 상기 가비지수집기의 정보를 위해 예비된 5-비트 추가 저장영역(614)를 포함한다. 선택적으로, 제 2 헤더 워드, 예를 들어 모니터 포인터(616)는 그 오브젝트에 할당된 모니터의 어드레스를 포함할 수 있고, 그에 의해 제 1헤더 위드에 5-비트 추가 저장영역(614) 모두를 가비지컬렉션 정보를 위해서 이용할 수 있게 한다. 도 6A의 실시예에서, 오브젝트 레퍼런스(objectref)는 메소드 호출의 오버헤드를 최소화하기 위해 메소드 벡터 테이블 베이스부분(612)의 위치를 가리킨다.In one embodiment of the hardware processor 100, the object 600 is represented by a memory that includes a header portion 610 and an instance variable storage portion 620. 6A illustrates such an embodiment. The header portion 610 is a 32-bit word which itself comprises a method vector table base portion 612 representing the object class and a 5-bit additional storage area reserved for the synchronization status of the object and the information of the garbage collector. 614. Optionally, the second header word, eg, monitor pointer 616, may include the address of the monitor assigned to that object, thereby garbage all of the 5-bit additional storage 614 in the first header with. Make it available for collection information. In the embodiment of Figure 6A, the object reference (objectref) points to the location of the method vector table base portion 612 to minimize the overhead of the method call.

헤더부분(610)의 세 비트는 수집기 프로세스(420)와 같은 가비지수집기가 이용할 수 있다. 헤더부분(610)에서, 세 개의 하위 비트(헤더(2;0)) 및 두 개의 상위 비트(헤더(31:30))는 상기 헤더가 포인터로 취급될 때 마스크 오프된다. 이러한 세 개의 비트(헤더(31:30,2))는 가비지수집기가 오브젝트(600)에 대하여 정보를 저장하는데 이용할 수 있다. 비트 0 과 1 은 오브젝트 동기화를 위해서 LOCK 와 WANT 비트를 유지하는데 사용될 수 있다. 또는, 제 2 헤더 워드(예를 들어 모니터 포인터(616))는 오브젝트(600)의 동기상태를 유지하기 위해서 제공될 수 있고, 가비지컬렉션 지원을 위해 다섯 개의 비트 모두를 남긴다. 가비지컬렉션 지원을 위한 비트가 어떻게 사용되는지는 수집기 프로세스(420) 및 가비지컬렉션 트랩 핸들러(440)를 구현한 특별한 타입의 가비지컬렉션 방법에 의존한다. 가능한 이용은세대내에서 오브젝트를 늙게 하는 마크 비트, 카운터 비트를 포함한다. 상기한 바와 같이, 헤더부분(610)의 제 2 헤더 워드 실시예에서, 다섯 개의 비트는 수집기 프로세스(420)과 같은 가비지수집기에서 이용할 수 있다.Three bits of header portion 610 may be used by a garbage collector, such as collector process 420. In the header portion 610, three lower bits (header 2; 0) and two upper bits (header 31:30) are masked off when the header is treated as a pointer. These three bits (headers 31:30, 2) can be used by the garbage collector to store information about the object 600. Bits 0 and 1 can be used to hold the LOCK and WANT bits for object synchronization. Alternatively, a second header word (eg, monitor pointer 616) may be provided to keep the object 600 in sync, leaving all five bits for garbage collection support. How the bits for garbage collection support are used depends on the particular type of garbage collection method that implements the collector process 420 and the garbage collection trap handler 440. Possible uses include mark bits and counter bits that age the object in generations. As noted above, in the second header word embodiment of header portion 610, five bits are available in a garbage collector, such as collector process 420.

도 6A의 실시예에서, 인스턴스 변수 저장부분(620)은 메소드 벡터 테이블 베이스부분(612) 뒤에 한 워드를 시작하고 오브젝트(600)의 인스턴스 변수를 포함한다. objectref의 가장 오른쪽 자릿수 비트는 레퍼런스가 조정되는지(==1) 아닌지 (==0)를 규정하고, 대안적인 "처리된", 오브젝트 포맷은 도 6B에 나타낸다. 처리된 레퍼런스는 오브젝트(600)가 생성되고 모든 후속하는 레퍼런스의 처리(즉, 상기 오브젝트에 접근할 저장영역 포인터(650b))가 완료될 때, 치리된 레퍼런스가 형성된다. 이 지원은 상기 근원적인 오브젝트 저장영역보다 오히려 처리를 복사함으로써 오브젝트 재배치 비용을 줄이는 가비지수집기의 몇몇 유형을 위해서 제공되며, 인스턴스 변수에 대한 것을 포함한다. In the embodiment of FIG. 6A, the instance variable storage portion 620 starts one word after the method vector table base portion 612 and includes the instance variables of the object 600. The rightmost digit bit of the objectref specifies whether the reference is adjusted (== 1) or not (== 0), and an alternative "processed" object format is shown in FIG. 6B. The processed reference is formed when the object 600 is created and processing of all subsequent references (ie, storage pointer 650b to access the object) is completed. This support is provided for some types of garbage collectors that reduce object relocation costs by copying processing rather than the underlying object storage, including for instance variables.

포인터 비고유 바이트코드의 동적 교체를 위한 확장된 바이트코드 지원 Extended bytecode support for dynamic replacement of pointer non-native bytecodes

하드웨어 프로세서(100)는 고속 변수에 의한 실행 유닛에 공급되는 바이트코드를 동적으로 교체함으로써 JAVA바이트 코드의 실행을 가속하기 위한 특징을 포함한다. 그러나, 이제 설명하는 바와 같이, 빠른 바이트코드 교체 특성은 하드웨어 프로세서(100)가 가비지컬렉션을 위한 쓰기 배리어의 구현을 이용하도록 포인터 고유 저장 동작 바이트코드로 데이터 타입 비고유 저장 동작을 동적으로 재배치한다. The hardware processor 100 includes a feature for accelerating execution of the JAVA byte code by dynamically replacing the byte code supplied to the execution unit by the fast variable. However, as will now be described, the fast bytecode replacement feature dynamically relocates the data type non-unique storage operation to the pointer intrinsic storage operation bytecode such that the hardware processor 100 utilizes the implementation of a write barrier for garbage collection.

한 실시예에 있어서, 오브젝트 또는 클래스내의 필드를 설정하기 위한 putfield 및 putstatic 바이트코드는 대응하는 고속 변형(예, putfield_quick, putfield2_quick, 또는 aputfield_quick, 및 putstatic_quick, putstatic2_quick, 또는 aputstatic_quick)으로 동적 교체된다. 상기 특정 교체 바이트코드는 동작되는 필드의 타입에 좌우된다. 예를들면, reference 타입 필드에 동작하도록 정해진 putfield 바이트코드는 aputfield_quick 바이트코드에 의해서 동적으로 교체된다. 고속 바이트코드 교체는 상기 병합된 참조에서 기술된 바와 같이 상기 관련된 비고속 바이트코드가 실행되는 처음에 이루어진 작업을 로딩하고 연결하는 것을 이용하지만, 가비지컬렉션에 있어서 더욱 중요한 것은, 포인터 고유의 고속 바이트코드로의 동적 교체는 하드웨어 프로세서와 같은 가상 기계 명령 프로세서가 포인터 저장과 데이터 타입 비고유의 스토어 바이트코드의 비포인터 저장을 식별하도록 한다. 포인터 고유의 바이트코드로의 교체는 스토어에 대한 트래핑 빈도수를 감소시키며, 이는 오직 포이터 스토어 바이트코드 변형만이(즉, aputfield_quick 또는 aputstatic_quick) 쓰기 배리어 구현에 참여할 필요가 있기 때문이다.In one embodiment, the putfield and putstatic bytecodes for setting fields in an object or class are dynamically replaced with corresponding fast transforms (eg, putfield_quick, putfield2_quick, or aputfield_quick, and putstatic_quick, putstatic2_quick, or aputstatic_quick). The particular replacement bytecode depends on the type of field being operated on. For example, putfield bytecodes specified to operate on reference type fields are dynamically replaced by aputfield_quick bytecodes. Fast bytecode replacement utilizes loading and concatenating the work done initially when the associated non-fast bytecode is executed as described in the merged reference, but more importantly for garbage collection, pointer-specific fast bytecode Dynamic replacement of the locale allows a virtual machine instruction processor, such as a hardware processor, to identify pointer storage and non-pointer storage of data type non-unique store bytecodes. Replacing pointer-specific bytecodes reduces the trapping frequency for the store, since only pointer store bytecode variants (ie, aputfield_quick or aputstatic_quick) need to participate in the write barrier implementation.

이제 동적 바이트코드 교체의 한 실시예가 도 7을 참조하여 설명된다. 도 7은 하드웨어 프로세서(100) 일부의 블록도이며, 상기 하드웨어 프로세서(100)는 한 실시예의 스택캐시(155)(도 1 참조)에서 나타낸 오퍼랜드 캐시(723), 명령 디코더(135), 비고속-고속 트랜슬레이터 캐시(131), 트랩 로직회로(170), 소프트웨어 검색코드(31, 32, 33), 및 실행유닛(140)을 포함한다. 비고속-고속 트랜슬레이터 캐시(131)는 명령 및 데이터 프로세서(12)와 연합메모리(14)를 포함한다. 차례로 연합메모리(14)는 명령 식별자 섹션(18), 데이터 세트 메모리 섹션(20), 입력회로(22) 및 출력회로(24)를 포함한다.One embodiment of dynamic bytecode replacement is now described with reference to FIG. FIG. 7 is a block diagram of a portion of hardware processor 100, which includes operand cache 723, instruction decoder 135, and non-high speed shown in stack cache 155 (see FIG. 1) in one embodiment. A high speed translator cache 131, a trap logic circuit 170, software search codes 31, 32, 33, and an execution unit 140. The non-high speed translator cache 131 includes an instruction and data processor 12 and an associated memory 14. In turn, the associative memory 14 comprises an instruction identifier section 18, a data set memory section 20, an input circuit 22 and an output circuit 24.

명령 디코더(135)는 명령 캐시 유닛(120)으로부터 JAVA 바이트 코드와 같은 명령 흐름을 수신하기 위해 연결된다. 본 발명은 JAVA 바이트 코드와 관련하여 기술되지만, 당업자는 본 명세서에 기초한 다른 가상기계 환경에서 다른 형태의 명령을 동적으로 교체하기 위한 변형을 인지할 것이다. 비록 여기에 상술된 바이트코드 교체 특성은 상기 병합된 특허 출원에 보다 일반적으로 기술된 것과 같이 명령 파라미터의 실행 시간 분석에 근거한 명령 실행 가속에 일반적으로 적용가능하지만, 명세서는 쓰기 배리어의 실행을 용이하게 하기 위한 상기 동적 교체을 효율적으로 실행하기 위한 하드웨어 프로세서(100)상과 포인터 비특성 비고속 바이트코드와 다른 포인터 특성 고속을 가지는 포인터 비특성 비고속 바이트코드의 동적 교체에 초점을 맞춘다.The instruction decoder 135 is coupled to receive an instruction flow, such as JAVA byte code, from the instruction cache unit 120. Although the present invention is described in the context of JAVA byte code, those skilled in the art will recognize variations for dynamically replacing other types of instructions in other virtual machine environments based on this specification. Although the bytecode replacement characteristic described hereinabove is generally applicable to instruction execution acceleration based on analysis of the execution time of instruction parameters as described more generally in the merged patent application, the specification facilitates the execution of a write barrier. It focuses on the hardware processor 100 for efficiently executing the dynamic replacement for the purpose, and the dynamic replacement of the pointer non-high speed bytecode with the pointer non-high speed bytecode different from the pointer non-high speed bytecode.

도 7을 보면, 명령 디코더(135)는 버스(11)상에 디코드된 바이트코드를 제공하고 상기 디코드 된 바이트코드에 대응하는 프로그램 카운터(PC) 값을 버스(13)상에 제공한다. 이들 바이트코드와 PC 값은 실행 유닛(140)과 명령 및 데이터 프로세서(12)로 제공된다. 또한, PC 값은 연합 메모리(14)의 입력 회로(22)에 제공된다. 일반적으로, 각 PC 값은 바이트코드의 대응 프로그램 어커런스를 유일하게 확인한다. 오퍼랜드 스택(723)의 상부 엔트리는 명령 및 데이터 프로세서(12)에 제공된다.Referring to FIG. 7, the command decoder 135 provides a decoded bytecode on the bus 11 and provides a program counter (PC) value on the bus 13 corresponding to the decoded bytecode. These bytecodes and PC values are provided to execution unit 140 and instructions and data processor 12. In addition, the PC value is provided to the input circuit 22 of the associated memory 14. In general, each PC value uniquely identifies the corresponding program occurrence of the bytecode. The top entry of operand stack 723 is provided to instruction and data processor 12.

연합 메모리(14)내에서, 명령 식별자 메모리 섹션(18)은 다수의 (N) 엔트리를 포함한다. 상기 N개의 엔트리 각각은 바이트코드 확인 값 PC_0, PC_1, PC_2, PC_3, …PC_N과 같은 대응하는 바이트코드 확인 값을 저장하는 것이 가능하다. 명령 식별자 메모리 섹션(18)에 저장된 바이트코드 확인 값 각각은 다른 PC 값에 대응한다. 명령 식별자 메모리 섹션(18)의 폭은 상기 프로그램 카운터의 폭에 대응하여 선택된다.In the associative memory 14, the instruction identifier memory section 18 includes a number of (N) entries. Each of the N entries has a bytecode check value PC_0, PC_1, PC_2, PC_3,... It is possible to store the corresponding bytecode confirmation value, such as PC_N. Each bytecode check value stored in the command identifier memory section 18 corresponds to a different PC value. The width of the instruction identifier memory section 18 is selected corresponding to the width of the program counter.

데이터 세트 메모리 섹션(20)은 N 엔트리를 포함하여, 명령 식별자 섹션(18)내의 각 엔트리가 데이터 세트 섹션(20)내의 관련 엔트리를 가지도록 한다. 데이터 세트 메모리 섹션(20)의 N 엔트리 각각은 데이터 세트 DATA_0, DATA_1, DATA_2, DATA_3, …DATA_N과 같은 데이터 세트를 저장하는 것이 가능하다. 아래에 상술된 바와 같이, 데이터 세트 메모리 섹션(20)에 저장된 데이터 세트 각각은 바이트코드의 대응 프로그램 어커런스의 고속 변형의 실행을 위한 데이터를 포함한다. 한 실시예에서, 데이터 세트 메모리 섹션(20)은 4개의 32비트 워드의 폭을 가진다. 그러나, 데이터 세트 메모리 섹션(20)은 다른 실시예에서 다른 폭을 가질 수 있다.The data set memory section 20 includes N entries such that each entry in the command identifier section 18 has an associated entry in the data set section 20. Each of the N entries in the data set memory section 20 is a data set DATA_0, DATA_1, DATA_2, DATA_3,... It is possible to store a data set such as DATA_N. As detailed below, each data set stored in the data set memory section 20 includes data for the execution of fast modification of the corresponding program occurrence of the bytecode. In one embodiment, data set memory section 20 is four 32-bit words wide. However, data set memory section 20 may have a different width in other embodiments.

명령 및 데이터 프로세서(12)는 버스(11)상에 제공된 바이트코드를 모니터하고, 대응 데이터 세트가 고속 접속가능하다면, 버스(11)상의 현재 바이트코드는 가속된 방법으로 실행되어지는 것이 가능한 비고속 바이트코드인지를 결정한다. 만약 그렇다면, 비고속 바이트코드의 고속 변형은 대응 데이터 세트와 함께 비고속- 고속 트랜슬레이터 캐시(131)로 캐시될 것이다. 일반적으로, 비고속 바이트코드는 0, 1 또는 보다 고속 변형을 가질 수 있다. JAVA 가상기계 명세는 다음의 비고속 바이트코드: anewarray, checkcast, getfield, getstatic, instanceof, invokeinterface, invokespecial, invokestatic, invokevirtual, ldc, ldc_w, ldc2_w, multianewarray, new, putfield, 및 putstatic를 설명하고, 그것은 하드웨어 프로세서(100)의 한 실시예에서 고속 변형을 갖는다. putfield, putstatic 및 aastore를 포함하는 비고속 저장 지향 바이트코드에 있어서, 타겟 필드에 대응하는 상수 풀 엔트리의 분석은, 만약 분석이 포인터 저장 작동을 가리킨다면, aputfield_quick(가비지컬렉션 체크를 가지고 오부젝트내의 참조 필드 설정) 또는 aputstatic_quick(폐영역 회수 체크를 가지는 클래스에서 정적 참조 필드 설정)과 같은 포인터 고유 고속 변형으로 교체을 허용한다. 만약 분석이 참조(예를들어 비포인터 형태)와 다른 형태의 오브젝트 필드를 가리킨다면, 교체는 putfield_quick(물체에서의 필드 설정), putfield2_quick(오브젝트에서의 길거나 이중의 필드 설정), putstatic_quick(클래스에서의 정적 필드 설정) 또는 putstatic2_quick(클래스에서 길거나 이중 정적 필드 설정)과 같은 다른 고속 변형에 의한다.The instruction and data processor 12 monitors the bytecode provided on the bus 11, and if the corresponding data set is fast accessible, then the current bytecode on the bus 11 can be executed in an accelerated manner. Determines if this is a bytecode. If so, the fast variant of the non-fast bytecode will be cached into the non-fast-translator cache 131 with the corresponding data set. In general, non-fast bytecodes may have zero, one, or faster variants. The JAVA virtual machine specification describes the following non-fast bytecodes: anewarray, checkcast, getfield, getstatic, instanceof, invokeinterface, invokespecial, invokestatic, invokevirtual, ldc, ldc_w, ldc2_w, multianewarray, new, putfield, and putstatic. In one embodiment of the processor 100 has a high speed variant. For non-fast storage oriented bytecodes, including putfield, putstatic, and aastore, parsing constant pool entries corresponding to target fields is equivalent to aputfield_quick (reference in object with garbage collection check if analysis points to pointer storage operation). Allows replacement with pointer-specific fast variants, such as setting fields) or aputstatic_quick (setting a static reference field in a class with a closed area reclaim check). If the analysis points to an object field of a different type than the reference (for example, non-pointer type), the replacement is putfield_quick (field setting on the object), putfield2_quick (long or double field setting on the object), putstatic_quick (in class Static field settings) or other fast variants such as putstatic2_quick (long or double static field settings in a class).

일반적으로, 대응 데이터 세트가 고속 접속가능하다면, 가속 실행이 가능한 비고속 바이트코드는 이하에서 고속 변형을 가지는 비고속 바이트코드로 지칭된다. 고속 변형을 가지는 비고속 바이트코드는 명령 디코더(135)에 의해 제공되는 바이트코드의 서브세트를 형성한다. 명령 및 데이터 프로세서(12)는 현재 바이트코드의 확인부를 디코딩함으로써 현재 바이트코드가 고속 변형을 가지는 비고속 바이트코드인지를 결정한다. 고속 변형을 가지는 비고속 바이트코드의 N 프로그램 어커런스를 위한 지원이 데이터 세트 메모리와 명령 식별자 메모리에서 엔트리에 의해 제공된다. 상기 엔트리의 일부는 대응 프로그램 어커런스가 포인터 저장을 분석하기 위한 비고속 저장 지향(그러나, 포인터 비고유의) 바이트코드의 포인터 고유 고속 변형을 위해 사용되어질 수 있다.In general, if a corresponding data set is fast connectable, non-fast bytecodes capable of performing acceleration are referred to as non-fast bytecodes having fast transformations hereinafter. The non-fast bytecodes with fast modification form a subset of the bytecodes provided by the instruction decoder 135. The instruction and data processor 12 decodes the confirmation portion of the current bytecode to determine whether the current bytecode is a non-fast bytecode with fast transformation. Support for N program occurrences of non-fast bytecode with fast modification is provided by entries in the data set memory and the instruction identifier memory. Portions of this entry may be used for pointer-specific fast modification of non-fast storage oriented (but pointer non-unique) bytecodes for which corresponding program occurrences analyze pointer storage.

비고속-고속 트랜슬레이터 캐시(131)는 현재 PC 값을 가지는 현재 바이트코드에 따라 다음과 같이 작동한다. 명령 디코더(135)는 현재 PC 값과 디코드된 현재 바이트코드를 실행 유닛(140)과 명령 및 데이터 프로세서(12)에 제공한다. 디코드된 바이트코드가 고속 변형, 고속 변형 로드 바이트코드 또는 재시도 바이트코드를 가지는 비고속 바이트코드일 때, 명령 및 데이터 프로세서(12)가 작동한다. 만약 명령 디코더(135)에 의해 버스(11)상에 제공되는 현재 바이트코드가 고속 변형, 고속 변형 로드 바이트코드 또는 재시도 바이트코드를 가지는 비고속 바이트코드가 아니라면, 명령 및 데이터 프로세서(12)는 바이트코드에 반응하지 않고, 대신에, 현재 바이트 코드 및 현재 PC 값은 실행을 위해 실행 유닛(140)에 제공된다.The non-high speed translator cache 131 operates as follows according to the current bytecode having the current PC value. The instruction decoder 135 provides the current PC value and the decoded current bytecode to the execution unit 140 and the instruction and data processor 12. The instruction and data processor 12 operates when the decoded bytecode is a fast transform, a fast transform load bytecode, or a non-fast bytecode with a retry bytecode. If the current bytecode provided on the bus 11 by the instruction decoder 135 is not a fast bytecode with a fast transform, fast transform load bytecode or retry bytecode, the instruction and data processor 12 Instead of responding to the bytecode, the current bytecode and current PC value are provided to the execution unit 140 for execution.

그러나, 현재 바이트코드가 고속 변형을 가지는 비고속 바이트코드일 때, 명령 및 데이터 프로세서(12)는 현재 명령에 반응하여 작동된다. 한 실시예에서, 바이트코드 putfield 및 putstatic은 데이터 프로세서(12)를 작동한다. 작동시에, 명령 및 데이터 프로세서(12)는 라인(21)상에 나타나는 신호 NO_MATCH의 상태를 결정한다. 초기에는 명령 식별자 메모리 섹션(18)에 저장된 명령 식별자 PC_0, PC_1, PC_2, PC_3, …PC_N은 무효 값으로 설정된다. 대안으로 명령 식별자과 관련한 '유효' 비트는 제거될 수 있다. 어느 경우에서나 입력회로(22)에 제공된 상기 현재 PC값은 처음에는 명령확인 메로리 섹션(18)에 저장된 상기 명령 식별자 중 어느 것과도 일치하지 않는다. 따라서, 신호 NO_MATCH가 나타난다. 현재 PC 값과 명령 식별자 PC_1, PC_1, PC_2, PC_3, …PC_N 사이의 매치의 부재는 현재 바이트코드를 실행하기 위해 필요한 데이터 세트가 연합 메모리(14)에 현재 저장되지 않았다는 것을 가리킨다. 결과적으로, 명령 및 데이터 프로세서(12)는 상기 비고속 바이트코드를 적당한 고속 변형으로 교체를 허용하기 위해 상기 데이터 세트를 초기에 위치를 알아내고 회수하여야 한다.However, when the current bytecode is a non-fast bytecode with a fast variant, the instruction and data processor 12 operates in response to the current instruction. In one embodiment, bytecode putfield and putstatic operate data processor 12. In operation, the instruction and data processor 12 determines the state of the signal NO_MATCH appearing on line 21. Initially the instruction identifiers PC_0, PC_1, PC_2, PC_3,..., Stored in the instruction identifier memory section 18. PC_N is set to an invalid value. Alternatively, the 'valid' bit associated with the command identifier can be removed. In either case, the current PC value provided to the input circuit 22 does not initially match any of the command identifiers stored in the command confirmation memory section 18. Thus, the signal NO_MATCH appears. Current PC value and command identifiers PC_1, PC_1, PC_2, PC_3,... The absence of a match between PC_Ns indicates that the data set needed to execute the current bytecode is not currently stored in association memory 14. As a result, the instruction and data processor 12 must initially locate and retrieve the data set to allow replacement of the non-fast bytecode with a suitable fast variant.

현재 바이트코드가 고속 변형을 가지는 비고속 바이트코드하는 분석과 상기 나타난 신호 NO_MATCH에 반응하여, 명령 및 데이터 프로세서(12)는 제어 신호 TRAP을 나타낸다. 제어 신호 TRAP은 트랩 로직(170)에 제공된다. 제어 신호 TRAP에 대응하여, 트랩 로직(170)은 실행 유닛(170)의 작동을 일시적으로 중지하고, 대응 하는 소프트웨어 코드부(31, 32 또는 33)가 액세스 되도록 한다. 액세스된 상기 소프트웨어 코드부는 표시된 제어 신호 TRAP이 나타나도록 한 상기 비고속 바이트코드에 의존한다.In response to the non-fast bytecode analysis in which the current bytecode has a fast deformation and the signal NO_MATCH shown above, the instruction and data processor 12 represents the control signal TRAP. The control signal TRAP is provided to the trap logic 170. In response to the control signal TRAP, the trap logic 170 temporarily suspends the operation of the execution unit 170 and allows the corresponding software code portion 31, 32 or 33 to be accessed. The software code part that is accessed depends on the non-fast bytecode that caused the indicated control signal TRAP to appear.

한 실시예에서, 트랩 로직(170)은 제어 신호 TRAP을 나타나게 한 바이트코드의 특별한 프로그램 어커런스를 확인하기 위해서 현재 PC 값을 사용하여 명령 캐시 유닛(120)을 액세스한다. 소프트웨어에서 실행된 스위치문은 적당한 소프트웨어 코드부(상기 확인된 바이트코드에 따른)로의 실행을 가리킨다. 대안 실시예에서, 트랩 벡터와 같은 다른 방법이 상기 적당한 소프트웨어 코드부로의 실행을 유도하기 위해 사용되어질 수 있다.In one embodiment, the trap logic 170 accesses the instruction cache unit 120 using the current PC value to identify the particular program occurrence of the bytecode that caused the control signal TRAP. A switch statement executed in software indicates execution into an appropriate software code section (according to the identified bytecode above). In alternative embodiments, other methods, such as trap vectors, may be used to direct execution to the appropriate software code portion.

그러므로, 상기 확인된 바이트코드가 제 1 바이트코드 INST_0에 대응할 때, 상기 스위치문은 대응하는 소프트웨어 코드부(31)가 액셋스되도록 한다. 실시예에서, 제 1 바이트코드 INST_0은 putfield이고, 제 2 바이트코드 INST_1은 putstatic이다. 상기 확인된 바이트코드가 다른 임의의 바이트코드(예로 INST_N으로 표시되는)에 대응할 때, 상기 스위치문은 대응하는 소프트웨어 코드부(33)가 액세스 되게한다.Therefore, when the checked bytecode corresponds to the first bytecode INST_0, the switch statement causes the corresponding software code portion 31 to be accessed. In an embodiment, the first bytecode INST_0 is putfield and the second bytecode INST_1 is putstatic. When the identified bytecode corresponds to another arbitrary bytecode (e.g. denoted by INST_N), the switch statement causes the corresponding software code portion 33 to be accessed.

소프트웨어 코드부(31, 32, …33)는 바이트코드, INST_0 (예를들면, putfield), INST_1(예를들면 putstatic)…INST_N을 각각 실행하기 위해 필요한 상기 데이터 세트를 찾아서 회수한다. 다른 방법으로 설명하면, 소프트웨어 코드부(31, 32,…33)는 바이트코드 INST_0, INST_1, …INST_N의 프로그램 어커런스를 위해서 상수 풀 엔트리를 각각 분석한다. 임의의 비고속 바이트코드(예를들면 putfield와 putstatic)는 다수의 고속 변형(예를들면 putfield_quick, putfield2_quick, aputfield_quick, putstatic_quick, putstatic2_quick 및 aputstatic_quick)을 가지기 때문에, 상기 대응하는 소프트웨어 코드부는 또한 적당한 고속 변형을 선택한다. 만약 대응하는 상수 풀 엔트리의 분석이 저장 지향 바이트코드(예를 들면 putfield)의 특별한 프로그램 어커런스가 포인터 스토어(예를 들면 스토어 타겟 오브젝트 필드의 타입이 reference이면)를 가리킨다면, 포인터 고유의 고속 변형(예를들면 aputfield_quick)을 가지고 교체하는 것은 적당하다.The software code sections 31, 32, ... 33 are byte code, INST_0 (e.g. putfield), INST_1 (e.g. putstatic)... Find and retrieve the data set needed to execute INST_N respectively. In other words, the software code sections 31, 32, ... 33 are byte code INST_0, INST_1,... For each occurrence of INST_N, a constant pool entry is analyzed. Since any non-fast bytecodes (e.g. putfield and putstatic) have a number of high-speed variants (e.g. putfield_quick, putfield2_quick, aputfield_quick, putstatic_quick, putstatic2_quick and aputstatic_quick), the corresponding software code portion also has a suitable high-speed variant. Choose. If the analysis of the corresponding constant pool entry indicates that a particular program occurrence of the storage oriented bytecode (eg putfield) points to a pointer store (eg if the type of the store target object field is a reference), then the pointer-specific fast variant ( For example, replacing with aputfield_quick is appropriate.

소프트웨어 코드부(31, 32,…33)는 상기 회수된 데이터세트를 오퍼랜드 스택(723)에 로드되도록 한다. 소프트웨어코드부(31, 32, …33)는 명령 디코더(135)에 고속 변형 로드 바이트코드를 제공한다. 명령 디코더(135)는 상기 회수된 데이터 세트가 오퍼랜드 스택(723)에 로드 된 후에 수신된 고속 변형 로드 바이트코드를 디코드한다. 상기 디코드된 고속 변형 로드 바이트코드는 버스(11)상의 명령 및 데이터 프로세서(12)로 제공된다. 명령 및 데이터 프로세서(12)는 버스(11)상에 존재하는 각각의 고속 변형 로드 바이트코드를 확인하고, 이에 따라 오퍼랜드 스택(723)으로 사전에 로드되어진 대응 데이터 세트를 회수한다.Software code portions 31, 32, ... 33 cause the retrieved dataset to be loaded into operand stack 723. The software code sections 31, 32, ... 33 provide the fast decoder load bytecode to the instruction decoder 135. The instruction decoder 135 decodes the fast transform load bytecode received after the retrieved data set is loaded into the operand stack 723. The decoded fast modified load bytecode is provided to the instruction and data processor 12 on the bus 11. The instruction and data processor 12 identifies each fast variant load bytecode present on the bus 11 and, accordingly, retrieves the corresponding data set previously loaded into the operand stack 723.

다음에 명령 및 데이터 프로세서(12)는 회수된 데이터 세트와 현재 PC 값을 연합 메모리(14)에 로드한다. 한 실시예에서, 상기 현재 PC 값은 명령 식별자 PC_0으로 명령 식별자 메모리 섹션(18)의 제 1 엔트리에 기록되고, 대응 회수된 데이터 세트는 데이터 세트 DATA_0으로 데이터 세트 섹션(20)의 제 1 엔트리에 기록된다. 현재 PC 값은 명령 및 데이터 프로세서(12)로부터 버스(15)상의 메모리 섹션(18)으로 루트된다. 메모리(14)내의 특별한 엔트리를 선택하기 위해 사용된 방법은 예를들면, 랜덤, LRU(least recently used) 알고리즘 또는 FIFO 알고리즘일 수 있다. 상기 데이터세트는 명령 및 데이터 프로세서(12)로부터 데이터 세트 메모리 섹션(20)으로 버스(17)에 경로 설정된다.The instruction and data processor 12 then loads the retrieved data set and the current PC value into the associated memory 14. In one embodiment, the current PC value is written to the first entry of the command identifier memory section 18 with the command identifier PC_0 and the corresponding retrieved data set is written to the first entry of the data set section 20 with the data set DATA_0. Is recorded. The current PC value is routed from the instruction and data processor 12 to the memory section 18 on the bus 15. The method used to select a particular entry in memory 14 may be, for example, a random, last recently used (LRU) algorithm or a FIFO algorithm. The dataset is routed on the bus 17 from the instruction and data processor 12 to the dataset memory section 20.

상기 현재 PC 값과 상기 회수된 데이터 세트가 메모리(14)로 입력된 다음에, 명령 및 데이터 프로세서(12)는 상기 소프트웨어 코드가 제어 신호 TRAP을 유발하는 상기 비고속 명령을 재시도하도록 한다. 이 때, 입력 회로(22)로 다시 제공되는 현재 PC 값은 상기 명령 식별자 메모리 섹션(18)내에 저장된 명령 식별자(예를들면, 명령 식별자 PC_0)과 일치한다. 결과적으로, 신호 NO_MATCH는 나타나지 않는다. 따라서, 명령 및 데이터 프로세서(12)는 트랩 로직(170)을 경유하는 대응 데이터 세트와 소프트웨어 코드부(31, 32, …33)중 대응하는 하나를 찾아서 회수하는 것을 시도하지 않는다.After the current PC value and the retrieved data set have been entered into memory 14, instructions and data processor 12 cause the software code to retry the non-high speed instruction causing a control signal TRAP. At this time, the current PC value provided back to the input circuit 22 matches the command identifier (eg, command identifier PC_0) stored in the command identifier memory section 18. As a result, the signal NO_MATCH does not appear. Thus, the instruction and data processor 12 does not attempt to find and retrieve the corresponding data set via the trap logic 170 and the corresponding one of the software code portions 31, 32,... 33.

상기 현재 PC 값은 명령 식별자 PC_0과 일치하기 때문에, 출력 섹션(24)은 실행 유닛(140)으로 대응 데이터 세트 DATA_0을 전달한다. 따라서, 실행 유닛(140)은 비고속-고속 트랜슬레이터 캐시(131)로 상기 관련된 데이터 세트 DATA_0(고속변형 바이트코드 포함)과 현재 PC 값을 회수한다. 이에 응하여, 실행 유닛(140)은 상기 고속 변형 바이트코드를 실행한다.Since the current PC value matches the command identifier PC_0, the output section 24 delivers the corresponding data set DATA_0 to the execution unit 140. Thus, execution unit 140 retrieves the associated data set DATA_0 (including fast modified bytecodes) and current PC values into non-fast-fast translator cache 131. In response, the execution unit 140 executes the fast modified bytecode.

일단 상기 PC 값과 고속 변형을 가지는 비고속 바이트코드와 관련된 데이터 세트가 연합 메모리(14)로 로드되면, 고속 변형을 가지는 상기 비고속 바이트코드의 특별한 프로그램 어커런스는 상기 소프트웨어 코드를 액세스 할 필요없이 상수 풀을 분석하지 않고도 이어서 실행되어질 수 있다. 또한, 저장 지향 바이트코드의 특별한 프로그램 어커런스를 위해, 상기 특별한 프로그램 어커런스가 포인터 스토어로 귀결된다면 포인터 특정 고속 변형(예를들면, putfield-quick)이 실행되고, 특별한 프로그램 어커런스가 비포인터(또는 문자값) 스토어로 귀결된다면 비포인터 고속 변형(예를들면, putfield_quick 또는 putfield2_quick)이 실행된다. 또한, 상기 비고속 바이트코드가 프로그램 이미지에서 중복입력되지 않기 때문에, 상기 비고속 바이트코드는 원래의 형태로 이용할 수 있게 된다. 게다가, 상기 비고속 바이트코드가 중복입력되지 않기 때문에 비고속 바이트코드는 판독 전용 메모리에서 선택적으로 저장되어질 수 있다.Once the data set associated with the non-fast bytecode having the fast value and the PC value is loaded into the associated memory 14, the special program occurrence of the non-fast bytecode with the fast variant is constant without the need to access the software code. It can then be run without analyzing the pool. In addition, for a special program occurrence of storage oriented bytecode, if the particular program occurrence results in a pointer store, a pointer specific fast variant (e.g. putfield-quick) is executed, and the special program occurrence is a non-pointer (or character value). Non-pointer fast transforms (eg, putfield_quick or putfield2_quick) are executed. In addition, since the non-high speed bytecode is not inputted in the program image, the non-high speed bytecode can be used in its original form. In addition, since the non-fast bytecodes are not duplicated, the non-fast bytecodes can be selectively stored in a read-only memory.

다음의 실시예는 하드웨어 프로세서(100), 특히 뮤테이터 프로세서(410)(도 4)에 의해 포인터 스토어를 선택적으로 트랩핑하기 위해서 쓰기 배리어(430)의 포인터 스토어 고유 구현을 용이하게 하는 비고속-고속 트랜슬레이터 캐시(131)의 작동을 좀더 명확히 해줄 것이다. 명령 디코더(135)는 고속 변형을 가지는 비고속 바이트코드(예를들면 putstatic)를 초기에 수신하며, 여기서 상기 비고속 바이트코드의 특별한 프로그램 어커런스는 0×000100 이라는 대응하는 PC 값을 가진다. 바이트코드 putstatic의 상기 특별한 프로그램의 어커런스가 명령 식별자 메모리 섹션(18)에 나타나지 않는다고 가정하면, 상기 현재 PC값 0×000100은 입력회로(22)가 신호 NO_MATCH를 나타내도록 한다. 신호 NO_MATCH와 바이트코드 putstatic가 고속 변형을 가지는 비고속 바이트코드인 분석에 대응하여 명령 및 데이터 프로세서(12)는 제어 신호 TRAP을 나타낸다. 트랩 로직(170)은 상기 현재 바이트코드를 바이트코드 INST_1(즉 putstatic)로 식별하기 위해서 상기 PC 값을 사용한다. 바이트코드 INST_1로 확인되어지는 현재 바이트코드에 대응하여 소프트웨어 스위치문은 대응하는 소프트웨어 코드부(32)의 실행을 지시한다.The following embodiment is a non-high-speed to facilitate pointer store specific implementation of the write barrier 430 to selectively trap the pointer store by the hardware processor 100, in particular the mutator processor 410 (FIG. 4). It will make the operation of the fast translator cache 131 more clear. The instruction decoder 135 initially receives a non-fast bytecode (e.g. putstatic) having a fast transform, where the special program occurrence of the non-fast bytecode has a corresponding PC value of 0x000100. Assuming that an occurrence of the special program of bytecode putstatic does not appear in the instruction identifier memory section 18, the current PC value 0x000100 causes the input circuit 22 to indicate the signal NO_MATCH. Corresponding to the analysis that the signal NO_MATCH and the bytecode putstatic are non-fast bytecodes with fast deformation, the instruction and data processor 12 represents the control signal TRAP. Trap logic 170 uses the PC value to identify the current bytecode as bytecode INST_1 (ie putstatic). Corresponding to the current bytecode identified by the bytecode INST_1, the software switch statement instructs the execution of the corresponding software code portion 32.

다음에 소프트웨어 코드부(32)는 상기 스토어 타겟 오브젝트 필드와 관련한 상수 풀 엔트리를 분석하여, 바이트코드 INST_1을 실행하기 위해 필요한 상기 데이터 세트를 회수하고, 상기 데이터 세트를 오퍼랜드 스택(723)에 로드한다. 소프트웨어 코드부(32)는 명령 디코더(135)로 고속 변형 로드 바이트코드를 제공한다. 응답으로 명령 디코더(135)는 명령 및 데이터 프로세서(12)에 디코드된 고속 변형 로드 바이트코드를 제공한다. 명령 및 데이터 프로세서(12)는 오퍼랜드 스택(723)으로부터 상기 데이터 세트를 회수하고, 상기 데이터 세트를 데이터 세트 DATA_0으로 데이터 세트 메모리 섹션(20)의 제 1 엔트리에 로드한다. 소프트웨어 코드부 (32)는 상기 스토어 타겟 오브젝트 필드가 reference 타입(즉, putstatic의 특별한 프로그램 어커런스가 포인터 스토어인지)인지를 결정하고, 데이터 세트 DATA_0를 가지는 상기 적당한 포인터 고유의 고속 변형 바이트코드 aputstatic_quick을 포함한다.Software code section 32 then analyzes the constant pool entry associated with the store target object field, retrieves the data set needed to execute bytecode INST_1, and loads the data set into operand stack 723. . The software code portion 32 provides the fast decoder load bytecode to the instruction decoder 135. In response, the instruction decoder 135 provides the decoded fast transform load bytecode to the instruction and data processor 12. Instruction and data processor 12 retrieves the data set from operand stack 723 and loads the data set as data set DATA_0 into the first entry of data set memory section 20. Software code section 32 determines whether the store target object field is of type reference (i.e., whether a particular program occurrence of putstatic is a pointer store), and includes the appropriate pointer specific fast variant bytecode aputstatic_quick with data set DATA_0. do.

명령 및 데이터 프로세서(12)는 명령 식별자 PC_0으로써 명령 식별자 메모리 섹션(18)의 제 1 엔트리로 현재 PC 값 0×000100 을 추가로 로드한다. 그 다음에명령 및 데이터 프로세서(12)는 비고속 바이트코드 INST_1(즉 putstatic)과 현재 PC 값 0×000100을 각 버스(11, 13)상에 나타낸다. 한 실시예에서, 명령 및 데이터 프로세서(12)는 상기 제어 신호 TRAP을 나타나게 하는 바이트코드로 제어를 다시 전달하는 트랩(ret-from-trap) 바이트코드 리턴을 발행함으로써 이를 얻을 수 있다. 이 때, 입력 회로(22)는 현재 PC 값과 명령 식별자 PC_0사이의 일치를 확인한다. 응답으로, 연합 메모리(14)는 명령 식별자 PC_0(즉 포인터 고유 고속 변형 바이트코드 aputstatic-quick을 포함하는 데이터 세트 DATA_0)과 관련된 데이터 세트를 출력회로(24)에 제공한다. 출력회로(24)는 상기 포인터 고유 고속 변형 바이트코드 aputstatic_quick를 실행하는 실행 유닛(140)으로 상기 데이터 세트 DATA_0를 전달한다.The instruction and data processor 12 further loads the current PC value 0x000100 into the first entry of the instruction identifier memory section 18 as the instruction identifier PC_0. The instruction and data processor 12 then displays the non-fast bytecode INST_1 (i.e. putstatic) and the current PC value 0x000100 on each bus 11,13. In one embodiment, the command and data processor 12 may obtain this by issuing a ret-from-trap bytecode return that transfers control back to the bytecode resulting in the control signal TRAP. At this time, the input circuit 22 confirms the correspondence between the current PC value and the command identifier PC_0. In response, the associative memory 14 provides the output circuit 24 with a data set associated with the instruction identifier PC_0 (i.e., the data set DATA_0 including pointer specific fast variant bytecode aputstatic-quick). The output circuit 24 transfers the data set DATA_0 to the execution unit 140 which executes the pointer specific fast modified bytecode aputstatic_quick.

고속 변형을 가지는 다른 비고속 바이트코드와 명령 디코더(135)에 의해 그 후에 수신된 동일한 비고속 바이트코드의 다른 프로그램 인스턴스는 유사한 방법으로 처리된다. 예를들면, 관련 PC 값 0x000200 을 가지는 비고속 바이트코드 INST_1(즉 putstatic)의 또 다른 프로그램 어커런스는, 명령 식별자 PC_1로써 명령 식별자 섹션(18)에 저장되어지는 PC 값 0×000100과, 데이터 세트 DATA_1로써 데이터 세트 메모리 섹션(20)에 저장되어지는 명령 INST_1과 관련한 데이터 세트에 기인한다. 만약 바이트코드 putstatic의 상기 특별한 프로그램 어커런스가 문자값 스토어로 분석한다면, 명령 식별자 PC_1(즉 데이터 세트 DATA_1)과 관련한 데이터 세트는 포인터 고유의 고속 변형이라기 보다는 putstatic2_quick과 같은 고속 변형 바이트코드를 포함할 것이다. 비고속 바이트코드 INST_1(예를들면 데이터 세트 DATA_0)의 제 1 프로그램 어커런스와 관련한 데이터 세트는 비고속 바이트코드 INST_1(예를들면 데이터 세트 DATA_1)의 제 2 프로그램 어커런스와 관련한 데이터 세트와 동일하지는 않다는 것을 주의하라.Other non-fast bytecodes with fast modifications and other program instances of the same non-fast bytecodes that are subsequently received by the instruction decoder 135 are processed in a similar manner. For example, another program occurrence of the non-fast bytecode INST_1 (ie putstatic) with the associated PC value 0x000200 is the PC value 0x000100 stored in the instruction identifier section 18 as the instruction identifier PC_1, and the data set DATA_1. This is due to the data set associated with the command INST_1 being stored in the data set memory section 20. If the special program occurrence of the bytecode putstatic resolves to a character value store, then the data set associated with the instruction identifier PC_1 (i.e., data set DATA_1) will contain a fast variant bytecode such as putstatic2_quick rather than a pointer specific fast variant. Note that the data set associated with the first program occurrence of non-fast bytecode INST_1 (e.g. data set DATA_0) is not the same as the data set associated with the second program occurrence of non-high speed bytecode INST_1 (e.g. data set DATA_1). Be careful.

바이트코드 putstatic의 2개의 프로그램 어커런스를 분석하는 것에 의해, 포인터 고유 스토어 바이트코드 aputstatic_quick 에 제 1 프로그램 어커런스와 포인터 비고유의 스토어 바이트코드 putstatic2_quick 에 제 2 프로그램 어커런스, 하드웨어 프로세서(100)의 비고속-고속 트랜슬레이터 캐쉬(131)는 쓰기 배리어(430)를 포인터 스토어에 한정한다. 전술한 바와 같이, 하드웨어 프로세서(100)에 의해 바이트코드 aputfield_quick을 참조 평가를 통해서 쓰기 배리어(포인터 고유 고속 변형 바이트코드로 구현된 것 처럼)는 objectref와 value 오퍼랜드의 각각의 가장 왼쪽 자릿수 2비트를 연쇄시키는 것에 의해 4비트 인덱스를 형성한다. 이 인덱스는 레지스터 GC_CONFIG의 16비트 필드 WB_VECTOR로부터 한 비트를 선택한다. 상기 선택된 비트가 설정되면, 트랩 gc_notify가 발생된다.Non-high-speed bytecode 2 by analyzing the programs the occurrence of putstatic pointer-specific store bytecode aputstatic _ first program occurrence with a pointer Remarks significant store byte second program occurrence, hardware processor 100 to the code putstatic2_quick the quick - The fast translator cache 131 confines the write barrier 430 to the pointer store. As described above, through the evaluation of the bytecode aputfield_quick by the hardware processor 100, the write barrier (as implemented by the pointer-specific fast variant bytecode) concatenates the two leftmost digits of each of the objectref and value operands. By forming a 4-bit index. This index selects one bit from the 16-bit field WB_VECTOR in register GC_CONFIG. If the selected bit is set, a trap gc_notify is generated.

index=((objectref & 0xC0000000)>>28) | (value>>30)index = ((objectref & 0xC0000000) >> 28) | (value >> 30)

if(GC_CONFIG.WB_VECTOR[index]==1)   if (GC_CONFIG.WB_VECTOR [index] == 1)

generate gc_notify       generate gc_notify

실행유닛(140)(도 1)의 일 실시예에 있어서, 바이트코드 계산을 위한 로직회로는 레지스터 GC_CONFIG(도 4)에 결합하고 상기 논리 표현을 실행한다. 당업자는 다양한 적절한 구현예를 인식할 수 있을 것이다.In one embodiment of execution unit 140 (FIG. 1), the logic circuit for bytecode calculation is coupled to register GC_CONFIG (FIG. 4) and executes the logical representation. Those skilled in the art will recognize various suitable embodiments.

또 다른 실시예에 있어서, 쓰기 배리어(430)(포인터 고유 고속 변형 바이트코드에 의한 구현된)는 세대간 스토어 트랩핑과 포인터 스토어 트래핑을 교차하는 가비지컬렉션 페이지 경계 양쪽을 지원한다. 전술한 바와 같이, 쓰기 배리어(430)의 상기 실시예는 objectref 와 store_data 오퍼랜드의 각각의 가장 왼쪽자릿수 2비트를 연쇄시키는 것에 의해 4비트 인덱스를 형성한다. 이 인덱스는 레지스터 GC_CONFIG의 16비트 필드 WB_VECTOR로부터 한 비트를 선택한다. 상기 선택된 비트가 세트되면, 트랩 gc_notify가 발생된다. 그러나, objectref 와 store_data 오퍼랜드의 마스크된 부분의 비교에 제 2 트리거가 의해 제공된다. 상기 마스크는 레지스터 GC_CONFIG의 GC_PAGE_MASK 필드, 즉 비트 27:16 에 의해 프로그램가능하게 규정된다. 제 2 트리거는 프로세서 상태 레지스터 PSR의 가비지컬렉션 페이지 인에이블 비트 GCE에 의해서 보호된다.In another embodiment, the write barrier 430 (implemented by pointer specific fast variant bytecodes) supports both garbage collection page boundaries that intersect generational store trapping and pointer store trapping. As described above, the embodiment of the write barrier 430 forms a 4-bit index by concatenating the leftmost two bits of each of the objectref and store_data operands. This index selects one bit from the 16-bit field WB_VECTOR in register GC_CONFIG. If the selected bit is set, a trap gc_notify is generated. However, a second trigger is provided for the comparison of the masked portion of the objectref and store_data operand. The mask is programmablely defined by the GC_PAGE_MASK field of register GC_CONFIG, bit 27:16. The second trigger is protected by the garbage collection page enable bit GCE of the processor status register PSR.

if{(GC_CONFIG[(objectref[31:30]##store_data[31:30])}==1)if {(GC_CONFIG [(objectref [31:30] ## store_data [31:30])} == 1)

OR((PSR.GCE==1) AND   OR ((PSR.GCE == 1) AND

((store_data[31:12] & 0x3F##GC_CONFIG[27:16])!=((store_data [31:12] & 0x3F ## GC_CONFIG [27:16])! =

(objectref[31:12] & 0x3F##GC_CONFIG[27:16])}(objectref [31:12] & 0x3F ## GC_CONFIG [27:16])}

then trap             then trap

실행유닛(140)(도 1)의 일 실시예에 있어서, 바이트코드 계산을 위한 논리회로는 레지스터 GC_CONFIG(도 4)에 결합되어 상기 논리표현을 구현한다. 당업자는 다양한 적절한 구현예를 인식할 수 있다.In one embodiment of execution unit 140 (FIG. 1), the logic circuit for bytecode calculation is coupled to register GC_CONFIG (FIG. 4) to implement the logical representation. Those skilled in the art will recognize various suitable embodiments.

쓰기 배리어(430)의 유리한 대안적 실시예는 가비지컬렉션 경계 크로싱 체크를 수집된 메모리 공간의 특정 세대 또는 세대들, 전형적으로 가장 늙은 세대로 제한하기 위한 메커니즘을 제공한다. 변형된 페이지 체크 트래핑 식, 즉An advantageous alternative embodiment of the write barrier 430 provides a mechanism for limiting garbage collection boundary crossing checks to certain generations or generations of collected memory space, typically the oldest generation. Transformed page check trapping expression, i.e.

if((PSR.GCE==1) ||if ((PSR.GCE == 1) |

((objectref[31:30] == store_data[31:30]) &&((objectref [31:30] == store_data [31:30]) &&

(GEN_PAGE_CHECK_ENABLE[objectref[31:30]]==1))) &&(GEN_PAGE_CHECK_ENABLE [objectref [31:30]] == 1))) &&

((objectref[31:12] & 0x3F##GC_PAGE_MASK) !=((objectref [31:12] & 0x3F ## GC_PAGE_MASK)! =

(store_data[31:12] & 0x3F##GC_PAGE_MASK)))(store_data [31:12] & 0x3F ## GC_PAGE_MASK))

then trap 은  then trap is

상기 objectref 및 store_data 오퍼랜드의 세대 태그 비트(예, 비트 31:30)가 동일한 것을 요구한다. 가장 오래된 세대를 인코딩하기 위한 유연성을 허용하기 위해, 레지스터 GC_CONFIG의 달리 사용되지 않은 4비트(예, 비트 31:28)가 필드 GEN_PAGE_CHECK_ENABLE를 인코드하기 위해서 사용될 수 있다. 이 4비트 필드는 가비지컬렉션 페이지 경계 크로싱 스토어의 트래핑이 제한되어지는 세대(들)가 어느 것인지를 나타낸다. 당업자는 상술한 세대간 포인터 스토어 트래핑을 가지는, 상기 세대 특유의 가비지 컬렉션 페이지 경계 크로싱 스토어 트래핑을 포함하는 다양한 적절한 구현예를 인식할 것이다.Generation tag bits (eg bits 31:30) of the objectref and store_data operand require the same. To allow flexibility for encoding the oldest generation, four otherwise unused bits (eg bits 31:28) of register GC_CONFIG can be used to encode field GEN_PAGE_CHECK_ENABLE. This 4-bit field indicates which generation (s) the trapping of the garbage collection page boundary crossing store is limited to. Those skilled in the art will recognize various suitable implementations, including the generation-specific garbage collection page boundary crossing store trapping, having the intergenerational pointer store trapping described above.

전술한 바와 같이, 비고속-고속 트랜슬레이터 캐시(131)의 동작은 reference 타입의 필드에 대응하는 클래스 인스턴스 데이타속에 오프셋을 갖는 필드상에서 동작하도록 결정된 상기 원래의 바이트코드 putfield를 바이트코드 aputfield_quick로 교체한다. putfield 명령에 의해 참조된 상수 풀 엔트리가 분석될 때, 필드에 대한 오프셋이 발생되며, 상기 필드의 타입은 reference 로 결정된다. 비고속-고속 트랜슬레이터 캐시(131)의 대응 데이터 세트 DATA_1에 포함된 16비트 오프셋은 원래의 putfield 명령의 2개의 오퍼랜드 바이트를 교체한다. 상기 필드의 타입은 putfield_quick 또는 putfield2_quick 바이트코드보다 aputfield_quick 바이트코드가 상기 원래의 putfield 바이트코드를 교체하는 것을 결정했다. 레지스터 GC_CONFIG의 필드 WB_VECTOR 및 GC_PAGE_MASK의 내용에 따라서 쓰기 배리어(430) 일 실시예(고속 변형 바이트코드 aputfield_quick에 의해 부분적으로 구현됨)는 전술한 바와 같이 포인터 스토어를 트랩할 수 있다.As described above, the operation of the non-fast translator cache 131 replaces the original bytecode putfield with the bytecode aputfield_quick determined to operate on a field with an offset in the class instance data corresponding to a field of reference type. . When a constant pool entry referenced by the putfield command is resolved, an offset for the field is generated and the type of the field is determined as reference. The 16-bit offset included in the corresponding data set DATA # 1 of the non-fast-fast translator cache 131 replaces the two operand bytes of the original putfield instruction. The type of field determined that the aputfield_quick bytecode replaces the original putfield bytecode rather than the putfield_quick or putfield2_quick bytecode. Depending on the contents of the fields WB_VECTOR and GC_PAGE_MASK of the register GC_CONFIG, one embodiment of the write barrier 430 (partially implemented by the fast variant bytecode aputfield_quick) may trap the pointer store as described above.

하드웨어 프로세서(100)에 대한 다이나믹 바이트코드 교체의 일실시예를 기술한다. 다이나믹 바이트코드 교체의 다른 실시예는 자가변형 코드에 기초한다. 비고속-고속 트랜슬레이터 캐시(131)의 설명에 비추어, 자가변형 코드 실시예는 캐시의 구현 비실용적이거나 바람직하지 않을 때(예, 비용때문에) 이점을 가진다. 이러한 경우에 있어서, 비고속-고속 트랜슬레이터 캐시(131)는 제거될 수 있다. 그 대신에, 트랩 코드, 예를 들어 소프트웨어 코드부(31, 32,…)가 원래의 비고속바이트코드의 특정 프로그램 어커런스의 후속 실행이 상기 고속 변형을 평가할 수있도록 상기 명령 스페이스내로 직접 기록하는 것에 의해 그의 적절한 변형으로 원래의 바이트코드를 교체한다. 동적 바이트코드 교체 메커니즘에 기초한 자가변형 코드의 일 실시예는 미국특허 제5,367,685호에 기술되어 있다.One embodiment of dynamic bytecode replacement for hardware processor 100 is described. Another embodiment of dynamic bytecode replacement is based on self-modifying codes. In view of the description of the non-fast-fast translator cache 131, self-modifying code embodiments have an advantage when the implementation of the cache is impractical or undesirable (e.g., due to cost). In such a case, the non-fast translator cache 131 may be cleared. Instead, the trap code, e.g., the software code section 31, 32, ..., writes directly into the instruction space so that subsequent execution of a particular program occurrence of the original non-high speed bytecode can evaluate the fast variant. By replacing the original bytecode with its appropriate variant. One embodiment of a self-modifying code based on a dynamic bytecode replacement mechanism is described in US Pat. No. 5,367,685.

가비지컬렉션 실시예Garbage Collection Example

이제 전술한 가비지컬렉션에 대한 상기 구조적 지원의 사용이 다음 세가지 세대 수집기 접근법과 관련하여 설명된다: Ungar 의 기억된 세트 세대 수집기의 실시예, 세대 수집기에 기초한 Wilson의 카드 테이블의 실시예 및 Hudson의 트레인 알고리즘에 기초한 수집기.The use of the above structural support for the garbage collection described above is now described in relation to the following three generation collector approaches: an embodiment of Ungar's memorized set generation collector, an embodiment of Wilson's card table based on the generation collector and a train of Hudson Collector based on algorithm.

기억된 세트 기반 세대 수집기(Remembered Set-based Generational Collector)Remembered Set-based Generational Collector

도 8은 Ungar식의 기억된 세트를 사용하는 세대 가비지컬렉션을 도시한다. 이 가비지컬렉션 접근의 실시(예, 쓰기 배리어(430), 수집기 프로세스(420) 및 가비지컬렉션 트랩 핸들러(440) 포함) 이하의 방식으로 하드웨어 프로세서(100)의 특성을 유리하게 이용할 수 있다.8 shows generation garbage collection using an Ungar stored set. Implementation of this garbage collection approach (eg, including write barrier 430, collector process 420, and garbage collection trap handler 440) may advantageously utilize the characteristics of hardware processor 100 in the following manner.

1. 모든 스토어를 트랩 할 필요가 없다. 특히, 단지 힙내의 포인터 스토어만이 체크될 필요 있다. 전술한 aputfield_quick 및 aputstatic_quick 바이트코드의 사용은 이러한 포인터 스토어만의 체크를 허용한다.1. No need to trap all stores. In particular, only pointer stores in the heap need to be checked. The use of the aputfield_quick and aputstatic_quick bytecodes described above allows checking of these pointer stores only.

또한, 스택 캐시(155)에 표시된 오퍼랜드 스택 또는 로컬변수에 대한 스토어는 만약 오퍼랜드 스택, 로컬변수 및 정적 영역이 루트 세트의 부분으로 가정된다면 트랩은 필요하지 않다. 스택 캐시(155)의 엔트리에 나타낸 오브젝트 참조는 포인터로써 식별될 수 있다.In addition, the store for the operand stack or local variable indicated in the stack cache 155 does not require a trap if the operand stack, local variable and static area are assumed to be part of the root set. The object reference indicated in the entry of the stack cache 155 may be identified as a pointer.

2. 전술한 바와 같이, 하드웨어 프로세서(100)의 쓰기 배리어(430) 지원은 만약 젊은 세대 오브젝트의 objectref가 늙은 세대 오브젝트로 저장되어 있는지를트랩한다.2. As described above, the write barrier 430 support of the hardware processor 100 traps if the objectref of the young generation object is stored as an old generation object.

3. 어떤 실시예에 있어서,단지 2개의 세대가 수집된 메모리 공간(850)내에 지원되는 실시예에 있어서, 레지스터 GC_CONFIG의 필드 WB_VECTOR은 값 0x5050 을 포함한다. 상기 objectref의 필드 GC_TAG의 1 비트(즉 비트 30)만이 고려된다. 일 실시예에 있어서, 0 값은 상기 objectref 가 젊은 세대(810)내의 한 오브젝트를 가리키는 것으로 정의하면, 반면 1 값은 상기 objectref 가 늙은 세대(820)내의 오브젝트를 가리키는 것으로 정의한다. 이 실시예에 있어서, 비트 31이 사실상 무시될 수 있다. 더 많은 수의 세대를 위한 실시예는 본 발명이 속하는 기술분야의 당업자에 자명할 것이다. 필드 WB_VECTOR의 내용에 따르면, 쓰기 배리어(430)는 늙은 세대(820) 오브젝트로부터의 포인터가 젊은 세대(810) 오브젝트로 포인터가 저장될 때마다 가비지컬렉션 트랩 핸들러(440)를 트리거한다. 이 실시예에 있어서, PSR.GCE 비트는 0 으로 설정되며, 필드 GC_PAGE_MASK의 내용에 기초하여 쓰기 배리어(430) 동작을 무력하게 한다.3. In some embodiments, in an embodiment in which only two generations are supported in the collected memory space 850, the field WB_VECTOR of the register GC_CONFIG contains the value 0x5050. Only one bit (ie bit 30) of the field GC_TAG of the objectref is considered. In one embodiment, a value of 0 defines that the objectref points to an object in the young generation 810, while a value of 1 defines that the objectref points to an object in the old generation 820. In this embodiment, bit 31 can be effectively ignored. Embodiments for a greater number of generations will be apparent to those skilled in the art. According to the contents of the field WB_VECTOR, the write barrier 430 triggers a garbage collection trap handler 440 whenever a pointer from an old generation 820 object is stored as a young generation 810 object. In this embodiment, the PSR.GCE bit is set to 0, which disables the write barrier 430 operation based on the contents of the field GC_PAGE_MASK.

4. 상기 스토어를 위한 트랩 조건4. Trap conditions for the store

if{(GC_CONFIG[(objectref[31:30]##store_data[31:30])}==1)if {(GC_CONFIG [(objectref [31:30] ## store_data [31:30])} == 1)

OR((PSR.GCE==1) AND   OR ((PSR.GCE == 1) AND

((store_data[31:12] AND 0x3F##GC_CONFIG[27:16])!=       ((store_data [31:12] AND 0x3F ## GC_CONFIG [27:16])! =

(objectref[31:12] AND 0x3F##GC_CONFIG[27:16])}        (objectref [31:12] AND 0x3F ## GC_CONFIG [27:16])}

then trap             then trap

여기서, store_data는 타겟 오브젝트내로 저장되는 32비트 포인터이며. objectref는 상기 스토어가 만들어지는 오브젝트로 32비트 포인터이다.Where store_data is a 32-bit pointer stored in the target object. objectref is the 32-bit pointer to the object from which the store is created.

5. 하드웨어 프로세서(100)가 트랩할 때, 즉 쓰기 배리어(430)가 가비지컬렉션 트랩 핸들러(440)를 트리거 할 때, 하드웨어 프로세서(100)의 실행은 가비지컬렉션 트랩 핸들러(44)를 점프한다. 한 실시예에 있어서, 가비지컬렉션 트랩 핸들러(440)는 기억된 세트(830)에 정보를 저장하며 트래핑 포인터 스토어를 모방한다.5. When the hardware processor 100 traps, that is, when the write barrier 430 triggers the garbage collection trap handler 440, the execution of the hardware processor 100 jumps to the garbage collection trap handler 44. In one embodiment, garbage collection trap handler 440 stores information in stored set 830 and mimics a trapping pointer store.

6. 가비지컬렉션 동안, 오브젝트는 젊은 세대(810)로부터 늙은 세대(820)로 승급한 오브젝트, 상기 승급한 오브젝트에 대한 모든 참조 필드 GC_TAG는 상기 승급한 오브젝트가 상기 더 늙은 세대의 부분인 것을 반영하기 위하여 갱신된다. 6. During garbage collection, the object is the object promoted from the young generation 810 to the old generation 820, all the reference fields GC_TAG for the promoted object reflect that the promoted object is part of the older generation. Is updated.

카드 테이블 기반 세대 수집기Card Table Based Generation Collector

카드에 기초한 세대 수집기를 구현하기 위해, 레지스터 GC_CONFIG의 필드 WB_VECTOR가 0xFFFF로 설정된다. 이는 쓰기 배리어(433)가 힙에 대한 모든 포인터 스토어를 트랩하도록 하며 가비지컬렉션 트랩 핸들러(440)와 같은 트랩 핸들러를 트리거 하도록 한다. 이러한 카드에 기초한 세대 정보 수집 실시예에 있어서, 가비지컬렉션 트랩 핸들러(440)는 카드 테이블 데이터 구조에 추가저장을 실행하며 트래핑 스토어를 모방한다. 대조적으로 Wilson식의 종래의 카드기반 세대 수집기 실시와 대조적으로 상술한 실시예는 단지 포인터 스토어를 트랩한다. 또 다른 실시예에 있어서, 레지스터 GC_CONFIG의 필드 WB_VECTOR는 역시 세대간의 포인터 스토어만에 대응하는 쓰기 배리어(430)의 트래핑 행동을 정의하기 위해서 적절한 값이 설정된다. 이 방식에 있어서, 수집 시간 스캐닝은 세대간 포인터 스토어가 일어나는 카드에 한정될 수 있다. 이러한 실시예에 있어서, 상기 카드 테이블은 전술한 기억된 세트 실시예와 대조적으로 중복 제거기능을 제공하는 이점을 가진다.To implement a card based generation collector, the field WB_VECTOR in the register GC_CONFIG is set to 0xFFFF. This causes the write barrier 433 to trap all pointer stores for the heap and to trigger a trap handler, such as garbage collection trap handler 440. In this card-based generation information collection embodiment, garbage collection trap handler 440 performs additional storage on the card table data structure and mimics a trapping store. In contrast to the Wilson-based conventional card-based generation collector implementation, the above described embodiment only traps a pointer store. In another embodiment, the field WB_VECTOR in register GC_CONFIG is set to an appropriate value to define the trapping behavior of write barrier 430, which also corresponds only to intergenerational pointer stores. In this manner, acquisition time scanning may be limited to cards where inter-generation pointer stores occur. In this embodiment, the card table has the advantage of providing a deduplication function as opposed to the stored set embodiment described above.

트레인 알고리즘 기반 수집기 Train algorithm based collector

Hudson의 트레인 알고리즘(train algorithm)은 세대 시스템의 가장 늙은 세대의 비 파괴적 수집을 허용하는 것으로 잘 알려져 있다. 가장 늙은 세대내의 서로 다른 메모리 공간("cars")사이에서 참조를 기억하는 것은 쓰기 배리어를 사용하여 작동한다. 하드웨어 프로세서(100)의 실시에 있어서, 이들 "cars"는 고정된 2의 제곱의 한도로 정렬된 2의 제곱 크기의 영역으로 정의된다. 필드 GC_PAGE_MASK는 이런 종류의 가비지컬렉션 알고리즘에 대한 쓰기 배리어(430)의 동작을 규정한다. 만약 프로세서 상태 레지스터 비트 PSR.GCE가 1로 설정되면, 가비지컬렉션 페이지 경계(필드 GC_PAGE_MASK 로 규정된)를 넘는 모든 포인터 스토어는 쓰기 배리어(430)가 가비지컬렉션 트랩 핸들러(440)를 트리거하도록 한다. 이러한 실시예에 있어서, 상기 페이지('cars') 크기를 관리하는 가비지컬렉션 트랩 핸들러(440)는 레지스터 GC_CONFIG의 필드 GC_PAGE_MASK에 기초하여 프로그램가능하게 규정된다. 상술한 실시예에서 4KByte 내지 8MByte사이의 페이지 영역이 지원된다.Hudson's train algorithm is well known to allow non-destructive collection of the oldest generation of generation systems. Remembering references between different memory spaces ("cars") in the oldest generation uses a write barrier. In the implementation of hardware processor 100, these " cars " The field GC_PAGE_MASK defines the operation of the write barrier 430 for this kind of garbage collection algorithm. If the processor status register bit PSR.GCE is set to 1, all pointer stores beyond the garbage collection page boundary (defined as field GC_PAGE_MASK) cause the write barrier 430 to trigger the garbage collection trap handler 440. In this embodiment, the garbage collection trap handler 440 that manages the page ('cars') size is programmatically defined based on the field GC'PAGE'MASK in the register GC'CONFIG. In the above embodiment, a page area between 4 KBytes and 8 MBytes is supported.

다른 수집기Other collector

쓰기 배리어에 종속하는 몇몇 실시간 가비지수집기가 개발되어 있다. 이들 가비지수집기의 구현은 쓰기 배리어(430)의 포인터 특유의 특성을 이용할 수 있다. Steele에 의해 제안된 것과 같은 증분 마크-스윕 수집기(Guy L. Steele, Multiprocessing Compactifying Garbage Collection, Communications of the ACM, 18(9)(1975) 참조) 역시 상기 쓰기 배리어(430)의 포인터 특유의 특성을 이용할 수 있다.Several real-time garbage collectors have been developed that are dependent on write barriers. Implementations of these garbage collectors may utilize pointer-specific characteristics of the write barrier 430. Incremental mark-sweep collectors, such as proposed by Steele (see Guy L. Steele, Multiprocessing Compactifying Garbage Collection, Communications of the ACM, 18 (9) (1975)), also point to pointer-specific characteristics of the write barrier 430. It is available.

본 발명은 다양한 실시예를 참조하여 기술되었지만 이들 실시예는 예시적인 것이며, 본 발명의 범위를 한정하는 것으로 해석되어서는 안된다. 상기 실시예의 다양한 변형, 변경, 추가 및 개선이 가능하다. 본 발명은 JAVA 프로그래밍 언어와 JAVA 가상기계와 관련하여 실시예를 참조하여 기술하였지만 그것들에 한정되지 않으며, 아주 다양한 프로세서 환경을 위한 시스템, 물품, 방법 및 장치를 포함한다.Although the present invention has been described with reference to various embodiments, these embodiments are illustrative and should not be construed as limiting the scope of the invention. Various modifications, changes, additions, and improvements to the above embodiments are possible. The present invention has been described with reference to embodiments in conjunction with a JAVA programming language and a JAVA virtual machine, but is not limited thereto, and includes systems, articles, methods and apparatus for a wide variety of processor environments.

또한, 본 발명은 하드웨어, 소프트웨어의 형태로 기술하였지만 가상 기계 명령 프로세서의 실행은 세대간 포인터 스토어 트랩 매트릭스, 오브젝트 참조 세대 태깅, 세대간 포인터 스토어 트랩 매트릭스와 오브젝트 참조 세대 태깅에 반응하는쓰기 배리어, 가비지컬렉션 트랩 핸들러를 채용하며, 및/또는 적절한 쓰기 배리어 지원으로 포인터 고유의 명령과 함께 포인터 비고유 명령의 선택적인 동적 교체를 용이하게 할 수 있다. 이들 및 다른 변형, 변경, 추가 및 개선이 본 발명의 기술사상을 벗어나지 않는 범위내에서 가능하다.In addition, although the present invention has been described in the form of hardware and software, the execution of the virtual machine instruction processor may be performed by intergenerational pointer store trap matrices, object reference generation tagging, intergenerational pointer store trap matrix and object reference generation tagging. Adopting a collection trap handler, and / or proper write barrier support can facilitate selective dynamic replacement of pointer non-unique instructions with pointer specific instructions. These and other variations, modifications, additions and improvements are possible without departing from the spirit of the invention.

Claims (40)

가상기계 명령 프로세서;Virtual machine instruction processor; 상기 가상기계 명령 프로세서의 명령 교체 구성요소; 및An instruction replacement component of the virtual machine instruction processor; And 상기 가상기계 명령 프로세서상의 포인터-고유 스토어 명령의 실행에 의해 제공된 쓰기 배리어로 이루어지고,A write barrier provided by execution of a pointer-specific store instruction on the virtual machine instruction processor, 상기 가상기계 명령 프로세서에 의해 실행가능한 명령은 스토어 명령의 프로그램 어커런스를 포함하며, 상기 명령 교체 구성요소는 상기 스토어 명령을 검출하고, 만일 상기 특정 프로그램 어커런스의 스토어 타겟 필드가 포인터 타입 필드에 참조하면 상기 스토어 명령의 특정 프로그램 어커런스를 포인터-고유 스토어 명령으로 교체하는 것을 특징으로 하는 장치.The instructions executable by the virtual machine instruction processor include a program occurrence of a store instruction, the instruction replacement component detects the store instruction, and if the store target field of the particular program occurrence refers to a pointer type field. And replace a particular program occurrence of a store instruction with a pointer-specific store instruction. 제 1 항에 있어서,The method of claim 1, 상기 명령 교체 구성요소는 상기 가상기계 명령 프로세서의 명령 경로와 연결된 트랜슬레이터 캐시를 포함하고,The instruction replacement component includes a translator cache associated with an instruction path of the virtual machine instruction processor, 상기 스토어 타겟 필드의 참조는 프로그램 어커런스 식별자 불일치 표시에 응하여 상기 트랜슬레이터 캐시에 의해 트리거되며,A reference of the store target field is triggered by the translator cache in response to a program occurrence identifier mismatch indication, 상기 트랜슬레이터 캐시는 상기 스토어 명령의 포인터-고유 변형을 캐시하고, 만일 상기 참조가 상기 스토어 타겟 필드의 타입이 레퍼런스인 것을 지시하면 상기 프로그램 어커런스 식별자를 그것에 관련시키는 것을 특징으로 하는 장치.The translator cache caches a pointer-specific modification of the store instruction and associates the program occurrence identifier with it if the reference indicates that the type of the store target field is a reference. 제 2 항에 있어서,The method of claim 2, 가상기계 명령 프로세서는 적어도 상기 명령의 서브세트(subset)를 직접 실행하도록 적응된 하드웨어 프로세서를 포함하고,The virtual machine instruction processor comprises a hardware processor adapted to directly execute at least a subset of the instruction, 상기 트랜슬레이터 캐시는 상기 하드웨어 프로세서의 실행 유닛과 명령 디코더 사이에 연결되는 것을 특징으로 하는 장치.And wherein said translator cache is coupled between an execution unit of said hardware processor and an instruction decoder. 제 1 항에 있어서,The method of claim 1, 상기 명령 교체 구성요소는 상기 스토어 명령의 상기 특정 프로그램 어커런스의 메모리상의 이미지를 수정하므로써 상기 스토어 명령의 상기 특정 프로그램 어커런스를 교체하는 것을 특징으로 하는 장치.And the instruction replacement component replaces the specific program occurrence of the store instruction by modifying an image in memory of the specific program occurrence of the store instruction. 제 1 항에 있어서,The method of claim 1, 상기 가상기계 명령 프로세서는 적어도 상기 명령의 하나의 서브세트를 직접 실행하도록 적응된 하드웨어 프로세서를 포함하고,The virtual machine instruction processor comprises a hardware processor adapted to directly execute at least one subset of the instructions, 상기 쓰기 배리어는 상기 하드웨어 프로세서의 가비지컬렉션 구성 레지스터에 반응하는 논리회로를 포함하며, 상기 논리회로는 상기 포인터-고유 스토어 명령의 가비지컬렉션 트랩을 필터링하기 위해 상기 하드웨어 프로세서에 의해 사용되는 것을 특징으로 하는 장치.The write barrier includes a logic circuit responsive to a garbage collection configuration register of the hardware processor, the logic circuit being used by the hardware processor to filter the garbage collection trap of the pointer-specific store instruction. Device. 제 1 항에 있어서,The method of claim 1, 상기 가상기계 명령 프로세서는 하드웨어 프로세서상에서 실행가능한 소프트웨어 프로그램을 포함하고, 상기 스토어 명령 및 상기 포인터-고유 스토어 명령은 상기 소프트웨어 프로그램에 의해 실행가능한 것을 특징으로 하는 장치.And wherein the virtual machine instruction processor comprises a software program executable on a hardware processor, wherein the store instruction and the pointer-specific store instruction are executable by the software program. 제 6 항에 있어서,The method of claim 6, 상기 소프트웨어 프로그램은 이에 액세스가능한 가비지컬렉션 구성 저장장치를 한정하고,The software program defines a garbage collection configuration storage device accessible thereto, 상기 포인터-고유 스토어 명령의 상기 실행은 상기 가비지컬렉션 구성 저장장치의 내용에 따라 상기 포인터-고유 스토어 명령의 가비지컬렉션 트랩을 필터링하기 위한 논리연산을 구현하는 하드웨어 프로세서 명령의 값을 구하는 것을 포함하는 것을 특징으로 하는 장치.The execution of the pointer-unique store instruction comprises obtaining a value of a hardware processor instruction that implements a logical operation to filter garbage collection traps of the pointer-specific store instruction in accordance with the contents of the garbage collection configuration storage device. Characterized in that the device. 제 6 항에 있어서,The method of claim 6, 상기 소프트웨어 프로그램은 상기 가상기계 명령을 위한 인터프리터를 포함하는 것을 특징으로 하는 장치.And the software program comprises an interpreter for the virtual machine instructions. 제 6 항에 있어서,The method of claim 6, 상기 소프트웨어 프로그램은 상기 가상기계 명령을 상기 하드웨어 프로세서 명령으로 증가적으로 컴파일하는 즉시(JIT : just-in-time) 컴파일러를 포함하는 것을 특징으로 하는 장치.And the software program comprises a just-in-time (JIT) compiler that incrementally compiles the virtual machine instructions into the hardware processor instructions. 제 1 항에 있어서,The method of claim 1, 상기 스토어 명령은 JAVA 가상기계 바이트코드인 것을 특징으로 하는 장치.And said store command is a JAVA virtual machine bytecode. 제 1 항에 있어서,The method of claim 1, 상기 스토어 명령은 제 1 고속 변형을 갖는 비고속 바이트코드이고,The store instruction is a non-fast bytecode with a first fast variant, 상기 포인터-고유 명령은 상기 제 1 고속 변형인 것을 특징으로 하는 장치.And the pointer-unique command is the first fast variant. 제 5 항에 있어서,The method of claim 5, 상기 가비지컬렉션 레지스터는 상기 구성요소중의 하나가 상기 쓰기 배리어가 스토어 레퍼런스 데이터 및 그 스토어 타겟 오브젝트와 관련된 세대 태그가 주어진 상기 포인터-고유 스토어 명령의 특정 프로그램 어커런스의 실행을 트랩해야하는지를 나타내도록, 스토어 타겟 오브젝트 및 스토어 레퍼런스 데이터에 대응하는 구성요소를 갖는 세대간 포인터 스토어 트랩 매트릭스 표현을 포함하는 것을 특징으로 하는 장치.The garbage collection register is stored such that one of the components indicates whether the write barrier should trap the execution of a particular program occurrence of the pointer-specific store instruction given the store reference data and the generation tag associated with the store target object. And an inter-generation pointer store trap matrix representation having components corresponding to the target object and the store reference data. 1 항에 있어서,According to claim 1, 상기 가상기계 명령 프로세서는 가비지컬렉션 구성 스토어 표현을 포함하고,The virtual machine command processor includes a garbage collection configuration store representation, 상기 포인터 고유 스토어 명령의 상기 실행은 상기 포인터-고유 스토어 명령의 특정 프로그램 어커런스가 상기 가비지컬렉션 구성 스토어에 의해 트래핑하기 위한 것으로 표시된 경계 교차 포인터를 저장할 것인지 여부를 결정하는 것을 포함하는 것을 특징으로 하는 장치.The execution of the pointer specific store instruction comprises determining whether a particular program occurrence of the pointer-specific store instruction stores a boundary crossing pointer that is marked for trapping by the garbage collection configuration store. . 제 13 항에 있어서,The method of claim 13, 상기 경계 교차 포인터는 세대간 포인터이고,The boundary crossing pointer is an intergenerational pointer, 상기 가비지컬렉션 구성 스토어는 세대간 포인터 스토어 트랩 매트릭스 표현을 포함하는 것을 특징으로 하는 장치.And the garbage collection configuration store includes an inter-generation pointer store trap matrix representation. 제 13 항에 있어서,The method of claim 13, 상기 경계 교차 포인터는 가비지컬렉션 페이지 경계 교차 포인터이고,The boundary crossing pointer is a garbage collection page boundary crossing pointer, 상기 가비지컬렉션 구성 스토어는 가비지컬렉션 페이지 마스크 표현을 포함하는 것을 특징으로 하는 장치.And the garbage collection configuration store includes a garbage collection page mask representation. 제 1 항에 있어서,The method of claim 1, 상기 쓰기 배리어에 반응하는 오류 처리기를 구비하는 것을 특징으로 하는 장치.And an error handler responsive to said write barrier. 제 16 항에 있어서,The method of claim 16, 상기 오류 처리기는 기억된 세트에 저장하기 위한 명령을 포함하는 것을 특징으로 하는 장치.And the error handler includes instructions for storing in a stored set. 제 16 항에 있어서,The method of claim 16, 상기 오류 처리기는 카드 테이블에 저장하기 위한 명령을 포함하는 것을 특징으로 하는 장치.And the error handler includes instructions for storing in a card table. 제 16 항에 있어서,The method of claim 16, 상기 가상기계 명령 프로세서에 의해 실행가능한 명령의 세대 수집기 프로세스를 추가로 구비하고,Further comprising a generation collector process of instructions executable by the virtual machine instruction processor, 상기 오류 처리기는 상기 세대 수집기 프로세스에 의해 사용하기 위한 데이터 구조로 트래핑된 스토어 데이터를 식별하는 정보를 저장하기 위해 상기 가상기계 명령 프로세서에 의해 실행가능한 명령을 포함하는 것을 특징으로 하는 장치.And the error handler includes instructions executable by the virtual machine command processor to store information identifying store data trapped in a data structure for use by the generation collector process. 스토어 명령의 프로그램 어커런스를 검출하는 단계; 및Detecting a program occurrence of a store instruction; And 상기 스토어 명령의 상기 프로그램 어커런스에 대한 스토어 타겟 필드 타입 정보의 참조를 기초로 상기 스토어 명령의 상기 프로그램 어커런스를 포인터-고유 스토어 명령으로 선택적으로 교체하는 단계로 이루어지고,Selectively replacing the program occurrence of the store instruction with a pointer-specific store instruction based on a reference of store target field type information for the program occurrence of the store instruction, 상기 포인터-고유 스토어 명령의 실행 단계는 가비지컬렉션 구성 스토어의 내용에 따라 선택적인 트래핑 단계를 포함하는 것을 특징으로 하는 포인터 스토어를 필터링하는 방법.And executing the pointer-unique store instruction comprises an optional trapping step according to the contents of the garbage collection configuration store. 제 20 항에 있어서,The method of claim 20, 상기 포인터-고유 스토어 명령을 실행하는 단계; 및Executing the pointer-specific store instruction; And 상기 가비지컬렉션 구성 스토어의 제 1 내용에 따라 상기 실행 단계를 선택적으로 트래핑하는 단계를 추가로 구비하고,Optionally trapping the execution step according to the first content of the garbage collection configuration store, 상기 가비지컬렉션 구성 스토어는 쓰기 배리어를 선택된 세대간 포인터 스토어로 프로그램가능하게 인코드하는 것을 특징으로 하는 포인터 스토어를 필터링하는 방법.And the garbage collection configuration store programmatically encodes a write barrier to a selected intergenerational pointer store. 제 20 항에 있어서,The method of claim 20, 상기 포인터-고유 스토어 명령을 실행하는 단계; 및Executing the pointer-specific store instruction; And 상기 가비지컬렉션 구성 스토어의 제 2 내용에 따라 상기 실행 단계를 선택적으로 트래핑하는 단계를 구비하고,Selectively trapping said execution step in accordance with a second content of said garbage collection configuration store, 상기 가비지컬렉션 구성 스토어는 쓰기 배리어를 가비지컬렉션 페이지 경계 교차 포인터 스토어로 프로그램 가능하게 인코드하는 것을 특징으로 하는 포인터 스토어를 필터링하는 방법.And the garbage collection configuration store programmatically encodes a write barrier into a garbage collection page boundary cross pointer store. 제 20 항에 있어서,The method of claim 20, 상기 스토어 명령은 그것의 제 1 고속 변형을 갖는 비고속 바이트코드이고,The store instruction is a non-fast bytecode with its first fast variant, 상기 포인터-고유 스토어 명령은 상기 제 1 고속 변형인 것을 특징으로 하는 포인터 스토어를 필터링하는 방법.And the pointer-unique store instruction is the first fast variant. 제 20 항에 있어서,The method of claim 20, 상기 스토어 명령의 제 2 프로그램 어커런스에 대응하는 비포인터 스토어 명령을 실행하는 단계를 구비하고,Executing a non-pointer store instruction corresponding to a second program occurrence of the store instruction, 상기 비포인터 스토어 명령의 실행단계는 상기 가비지컬렉션 구성 스토어의 내용에 따른 선택적인 트래핑 단계를 포함하지 않는 것을 특징으로 하는 포인터 스토어를 필터링하는 방법.And executing the non-pointer store instruction does not include an optional trapping step according to the contents of the garbage collection configuration store. 제 24 항에 있어서,The method of claim 24, 상기 스토어 명령은 그것의 제 1 및 제 2 고속 변형을 갖는 비고속 바이트코드이고,The store instruction is a non-fast bytecode with its first and second fast variant, 상기 포인터-고유 스토어 명령은 상기 제 1 고속 변형이며,The pointer-native store instruction is the first fast variant, 상기 비포인터 스토어 명령은 상기 제 2 고속 변형인 것을 특징으로 하는 포인터 스토어를 필터링하는 방법.And wherein said non-pointer store instruction is said second fast variant. 제 20 항에 있어서,The method of claim 20, 상기 선택적 트래핑에 반응하며, 트랩 처리기를 실행하는 단계를 추가로 구비하는 것을 특징으로 하는 포인터 스토어를 필터링하는 방법.In response to the selective trapping, further comprising executing a trap handler. 제 20 항에 있어서,The method of claim 20, 상기 선택적 트래핑에 반응하며, 기억된 세트내 상기 스토어 명령 타겟 오브젝트를 식별하는 명령을 저장하는 단계를 구비하는 것을 특징으로 하는 포인터 스토어를 필터링하는 방법.And responsive to the selective trapping, storing instructions that identify the store instruction target object in a stored set. 제 20 항에 있어서,The method of claim 20, 상기 선택적 트래핑 단계에 반응하며, 카드 테이블내 상기 스토어 명령 타겟 오브젝트를 나타내는 정보를 저장하는 단계를 구비하는 것을 특징으로 하는 포인터 스토어를 필터링하는 방법.And responsive to said selective trapping, storing information indicative of said store command target object in a card table. 제 20 항에 있어서,The method of claim 20, 상기 검출 단계는 상기 스토어 명령의 상기 프로그램 어커런스와 관련된 프로그램 카운터 값을 저장된 프로그램 카운터 값과 일치(match)시키는 것을 특징으로 하는 포인터 스토어를 필터링하는 방법.And wherein said detecting step matches a program counter value associated with said program occurrence of said store instruction with a stored program counter value. 제 20 항에 있어서,The method of claim 20, 상기 선택적 교체 단계는 상기 스토어 명령의 상기 특정 프로그램 어커런스의 메모리상의 이미지를 수정하는 단계를 포함하는 것을 특징으로 하는 포인터 스토어를 필터링하는 방법.And wherein said selectively replacing comprises modifying an image in memory of said specific program occurrence of said store instruction. 제 20 항에 있어서,The method of claim 20, 상기 선택적 교체 단계는:The optional replacement step is: 상기 스토어 명령의 상기 프로그램 어커런스를 위한 고유 식별자를 이용하여 명령 트랜슬레이터 캐시내 검색을 수행하는 단계; 및Performing a search in an instruction translator cache using a unique identifier for the program occurrence of the store instruction; And 만일 상기 고유 식별자가 상기 명령 트랜슬레이터 캐시의 제 1 엔트리와 일치하면, 그와 관련된 상기 포인터-고유 스토어 명령을 대신하는 단계를 구비하는 것을 특징으로 하는 포인터 스토어를 필터링하는 방법.If the unique identifier matches a first entry in the instruction translator cache, replacing the pointer-specific store instruction associated with it. 제 31 항에 있어서,The method of claim 31, wherein 상기 선택적 교체 단계는:The optional replacement step is: 만일 상기 고유 식별자가 명령 트랜슬레이터 캐시의 제 2 엔트리와 일치하는 경우, 그와 관련된 비포인터 스토어 명령을 대신하는 단계를 추가로 구비하고,If the unique identifier matches a second entry in the instruction translator cache, further comprising substituting a non-pointer store instruction associated therewith, 상기 비포인터 스토어 명령의 실행은 상기 가비지컬렉션 구성 스토어 내용에 따른 선택적 트래핑 단계를 포함하지 않는 것을 특징으로 하는 포인터 스토어를 필터링하는 방법.And the execution of the non-pointer store instruction does not include an optional trapping step according to the garbage collection configuration store contents. 제 31 항에 있어서,The method of claim 31, wherein 상기 선택적 교체 단계는:The optional replacement step is: 만일 상기 고유 식별자가 상기 명령 트랜슬레이터 캐시의 어떠한 엔트리와도 일치되지 않는 경우, 상기 스토어 명령의 상기 프로그램 어커런스의 스토어 타겟 필드를 위한 타입 정보를 결정하는 단계; If the unique identifier does not match any entry in the instruction translator cache, determining type information for a store target field of the program occurrence of the store instruction; 상기 명령 트랜슬레이터 캐시내 상기 결정 단계의 결과를 저장하는 단계; 및 Storing a result of said determining step in said instruction translator cache; And 상기 검색 수행 단계 및 상기 대신하는 단계를 재시도하는 단계를 추가로 포함하는 것을 특징으로 하는 포인터 스토어를 필터링하는 방법.And retrying the performing search and the substituting step. 제 20 항에 있어서,The method of claim 20, 상기 스토어 명령의 상기 프로그램 어커런스의 스토어 타겟 필드를 위한 타입 정보를 결정하는 단계를 추가로 구비하는 것을 특징으로 하는 방법.Determining type information for a store target field of the program occurrence of the store instruction. 제 20 항에 있어서,The method of claim 20, 상기 결정 단계는 상기 스토어 타겟 필드와 관련된 데이터 세트를 검색하는 단계를 포함하고, 상기 데이터 세트는 상기 스토어 타겟 필드 타입 정보를 포함하는 것을 특징으로 하는 포인터 스토어를 필터링하는 방법.And wherein the determining step comprises retrieving a data set associated with the store target field, wherein the data set includes the store target field type information. 제 20 항에 있어서,The method of claim 20, 상기 결정 단계는 상기 스토어 타겟 필드 타입 정보를 포함하는 정보를 상기 스토어 명령의 상기 프로그램 어커런스의 스토어 타겟 오브젝트와 관련된 상수 풀 테이블로부터 검색하는 단계를 포함하고, 상기 상수 풀 테이블은 상기 스토어 타겟 필드와 관련된 상수 풀 필드를 포함하는 것을 특징으로 하는 포인터 스토어를 필터링하는 방법.The determining step includes retrieving information including the store target field type information from a constant pool table associated with a store target object of the program occurrence of the store instruction, wherein the constant pool table is associated with the store target field. A method of filtering a pointer store, comprising a constant pool field. 제 20 항에 있어서,The method of claim 20, 상기 결정 단계는:The determining step is: 상기 스토어 타겟 필드와 관련된 데이터 세트를 검색하는 단계; 및Retrieving a data set associated with the store target field; And 상기 상기 포인터-고유 스토어 명령 및 데이터 세트로부터의 정보를 명령 트랜슬레이터 캐시내에 저장하는 단계를 포함하는 것을 특징으로 하는 포인터 스토어를 필터링하는 방법.Storing information from the pointer-unique store instruction and data set in an instruction translator cache. 가상기계 명령 프로세서에서 뮤테이터 프로세스 포인터 스토어를 필터링하는 방법에 있어서,A method for filtering a mutator process pointer store in a virtual machine command processor, comprising: 포인터 비고유 뮤테이터 스토어 명령의 프로그램 어커런스를 그 비포인터 변형과 포인터-고유 변형 중의 하나로 선택적으로 변형하는 단계; 및Selectively transforming a program occurrence of a pointer non-unique mutator store instruction into one of its non-pointer and pointer-specific variants; And 상기 포인터-고유 변형의 오퍼랜드와 가비지컬렉션 구성 스토어 내용의 대응에 기초하여 상기 포인터-고유 변형만을 사실상 트래핑하는 단계를 구비하고,Substantially trapping only the pointer-unique variation based on the correspondence of the operand of the pointer-uniform variation and the garbage collection configuration store contents, 상기 변형 단계는 상기 포인터 비고유 뮤테이터 스토어의 스토어 타겟 필드 타입의 실행 시간 결정에 기초하는 것을 특징으로 하는 포인터 스토어를 필터링하는 방법.And wherein said modifying step is based on a runtime determination of a store target field type of said pointer non-unique mutator store. 제 38 항에 있어서,The method of claim 38, 상기 변형 단계에 연속하고, 상기 변형된 프로그램 어커런스만을 위해서, 상기 포인터 비고유 뮤테이터 스토어 명령 대신 상기 포인터-고유 변형을 실행하는 단계를 추가로 구비하는 것을 특징으로 하는 포인터 스토어를 필터링하는 방법.And continuing to the modifying step, and executing the pointer-specific modifying instead of the pointer non-unique mutator store instruction only for the modified program occurrence. 실행가능한 뮤테이터 및 가비지 수집기 프로세스를 갖는 가상기계 명령 프로세서에서 포인터 스토어를 선택적으로 트래핑하는 구조적 지원부에 있어서, A structural support for selectively trapping a pointer store in a virtual machine instruction processor having an executable mutator and garbage collector process, 상기 구조적 지원부는, The structural support unit, 가비지 컬렉션 구성 스토어;Garbage collection configuration store; 포인터 비고유 명령을 상기 포인터 비고유 명령을 위한 타겟 필드 타입의 변화에 기초한 그 고속 변형으로 교체하기 위해 상기 가상기계 명령 프로세서의 명령 경로와 작동가능하게 연결된 명령 교체 수단; 및Instruction replacing means operably connected with an instruction path of the virtual machine instruction processor to replace a pointer non-unique instruction with its fast variant based on a change in target field type for the pointer non-unique instruction; And 상기 가상기계 명령 프로세서상에 포인터 고유 고속 변형의 실행에 의해 제공된 쓰기 배리어로 이루어지고,A write barrier provided by the execution of a pointer specific fast variant on the virtual machine command processor, 만일 상기 타겟 필드 타입이 레퍼런스 타입인 경우, 상기 고속 변형은 포인터 고유 고속 변형이 되며, If the target field type is a reference type, the fast transform is a pointer-specific fast transform, 상기 쓰기 배리어는 상기 가비지컬렉션 구성 스토어 반응하는 것을 특징으로 하는 구조적 지원부.And the write barrier responds to the garbage collection configuration store.
KR10-1998-0710968A 1997-04-23 1998-04-21 Write barrier system and method including pointer-specific instruction variant replacement mechanism KR100502380B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR10-1998-0710968A KR100502380B1 (en) 1997-04-23 1998-04-21 Write barrier system and method including pointer-specific instruction variant replacement mechanism

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
US08/841,508 1997-04-23
US8/841,508 1997-04-23
KR10-1998-0710968A KR100502380B1 (en) 1997-04-23 1998-04-21 Write barrier system and method including pointer-specific instruction variant replacement mechanism

Publications (2)

Publication Number Publication Date
KR20000022523A KR20000022523A (en) 2000-04-25
KR100502380B1 true KR100502380B1 (en) 2005-09-28

Family

ID=43671756

Family Applications (1)

Application Number Title Priority Date Filing Date
KR10-1998-0710968A KR100502380B1 (en) 1997-04-23 1998-04-21 Write barrier system and method including pointer-specific instruction variant replacement mechanism

Country Status (1)

Country Link
KR (1) KR100502380B1 (en)

Also Published As

Publication number Publication date
KR20000022523A (en) 2000-04-25

Similar Documents

Publication Publication Date Title
JP4130481B2 (en) Write barrier system and method including pointer-dependent pseudo-instruction replacement mechanism
EP0914633B1 (en) Generation isolation system and method for garbage collection
EP0914632B1 (en) Write barrier apparatus and method for trapping garbage collection page boundary crossing pointer stores
US6185581B1 (en) Train-algorithm-based garbage collector employing fixed-size remembered sets
US6434577B1 (en) Scalable-remembered-set garbage collection
US6424977B1 (en) Train-algorithm-based garbage collector employing reduced oversized-object threshold
US6434576B1 (en) Popular-object handling in a train-algorithm-based garbage collector
US6415302B1 (en) Train-algorithm-based garbage collector employing farthest-forward-car indicator
US6449626B1 (en) Reduced-cost remembered-set processing in a train-algorithm-based garbage collector
US5930807A (en) Apparatus and method for fast filtering read and write barrier operations in garbage collection system
JP3881702B2 (en) Bounded downtime garbage collection system and method including a write barrier for source and target instances of partially relocated objects
JP3957770B2 (en) Bounded downtime garbage collection system and method including a write barrier associated with a source instance of a partially relocated object
US6529919B1 (en) Incremental class unloading in a train-algorithm-based garbage collector
US7136887B2 (en) Method and mechanism for finding references in a card in time linear in the size of the card in a garbage-collected heap
KR20000068812A (en) Data processor with localised memory reclamation
US7062518B2 (en) Efficiently supporting the existence of long trains in a generation managed by the train algorithm
US20040186862A1 (en) Parallel caching of insertions into remembered-sets
US7096329B2 (en) Better placement of objects promoted into a generation managed by the train algorithm
KR100502380B1 (en) Write barrier system and method including pointer-specific instruction variant replacement mechanism
US7024437B2 (en) Better placement of objects reachable from special objects during collection based on the train algorithm
US7039664B2 (en) Combining entries in a card object table
KR100576904B1 (en) Write barrier system and method for trapping garbage collection page boundary crossing pointer stores
US7149762B1 (en) Handling futile collections in the train algorithm through selective extension of the collection set

Legal Events

Date Code Title Description
A201 Request for examination
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20130620

Year of fee payment: 9

FPAY Annual fee payment

Payment date: 20140701

Year of fee payment: 10

FPAY Annual fee payment

Payment date: 20150618

Year of fee payment: 11

FPAY Annual fee payment

Payment date: 20160616

Year of fee payment: 12

FPAY Annual fee payment

Payment date: 20170616

Year of fee payment: 13

EXPY Expiration of term