Write barrier system and method including pointer-specific instruction variant replacement mechanism
First Claim
1. An apparatus comprising:
- a virtual machine instruction processor, wherein executable instructions include program occurrences of a store instruction;
an instruction replacement component of said virtual machine instruction processor, wherein said instruction replacement component detects said store instruction and selectively replaces a particular program occurrence of said store instruction with a pointer-specific store instruction if a store target field of said particular program occurrence resolves to a pointer-type field; and
a write barrier provided by execution of said pointer-specific store instruction on said virtual machine instruction processor.
2 Assignments
0 Petitions
Accused Products
Abstract
A pointer-specific instruction variant replacement mechanism facilitates an exact write barrier, i.e., a write barrier specific to pointer stores and transparent to non-pointer stores. Pointer store specific instruction replacement allows some implementations to provide an exact barrier specific to the particular set of intergenerational pointer stores that are of interest to a particular garbage collection method or combination of methods. The exact identification of pointer stores herein does not require tags encoded in-line with collected memory storage and does not require non-standard word sizes to support such tags. In one embodiment, a non-quick to quick translator cache provides pointer specific store instruction replacement. In another, self modifying code provides pointer specific store instruction replacement. An exemplary write barrier provided in accordance with the pointer-specific instruction variant replacement mechanism of this invention affords a garbage collector implementer with support for a wide variety of garbage collection methods, including remembered set-based methods, card-marking type methods, write barrier based copying collector methods, mark-sweep methods, etc., as well as combinations thereof and combinations including train algorithm type methods to managing mature portions of a generationally collected memory space. Such a write barrier can eliminate non-pointer stores from the set of stores that are evaluated against, for example, an intergenerational pointer store trap matrix or a garbage collection page mask to determine whether or not to trap. Such a write barrier can also eliminate entries associated with non-pointer stores from remembered set or card table stores for collection time scanning of modified portions of a collected generational space.
-
Citations
40 Claims
-
1. An apparatus comprising:
-
a virtual machine instruction processor, wherein executable instructions include program occurrences of a store instruction; an instruction replacement component of said virtual machine instruction processor, wherein said instruction replacement component detects said store instruction and selectively replaces a particular program occurrence of said store instruction with a pointer-specific store instruction if a store target field of said particular program occurrence resolves to a pointer-type field; and a write barrier provided by execution of said pointer-specific store instruction on said virtual machine instruction processor. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19)
-
-
20. A method for filtering pointer stores, said method comprising:
-
detecting a first program occurrence of a store instruction; and selectively replacing said first program occurrence of said store instruction with a pointer-specific store instruction based on resolution of store target field type information for said first program occurrence of said store instruction; executing said pointer-specific store instruction; and selectively trapping said executing in accordance with contents of said garbage collection configuration store. - View Dependent Claims (21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37)
-
-
38. A method for filtering mutator process pointer stores in a virtual machine instruction processor, said method comprising:
-
selectively transforming a program occurrence of a pointer non-specific mutator store instruction into one of a pointer-specific variant and a non-pointer variant thereof, said transforming based on an execution-time determination of store target field type of said pointer non-specific mutator store; and trapping substantially only said pointer-specific variant based on correspondence between operands thereof and contents of a garbage collection configuration store. - View Dependent Claims (39)
-
-
40. Architectural support for selectively trapping pointer stores in a virtual machine instruction processor having mutator and garbage collector processes executable thereon, said architectural support comprising:
-
a garbage collection configuration store; instruction replacement means operably coupled into an instruction path of said virtual machine instruction processor to replace a pointer non-specific instruction with a quick variant thereof based on resolution of target field type for said pointer non-specific instruction, said quick variant being a pointer specific quick variant if said target field type is reference type; a write barrier provided by execution of said pointer specific quick variant on said virtual machine instruction processor, said write barrier responsive to said garbage collection configuration store.
-
Specification