Shared code caching for program code conversion
First Claim
Patent Images
1. A method of translating a subject code executable by a subject computing architecture into a target code executable by a second computing architecture, wherein the subject code includes at least a first program and a second program, comprising:
- providing a first translator instance which translates the subject code of the first program into the target code including translating a first portion of the subject code into a portion of the target code;
caching said portion of the target code into a shared code cache facility;
providing a second translator instance which is different from the first translator instance and which translates the subject code of the second program into the target code, wherein the second translator instance operates simultaneously with the first translator instance;
retrieving the cached portion of the target code from the shared code cache facility upon a compatibility detection between said cached portion of the target code and a second portion of the subject code in the second program, including loading the portion of the target code in the shared code cache facility into a portion of memory which is shared amongst at least the first and second translator instances; and
,copying at least one part of the shared code cache facility to a private portion of memory associated with the second translator instance upon modification of the at least one part of the shared code cache facility by the second translator instance.
4 Assignments
0 Petitions
Accused Products
Abstract
Subject program code is translated to target code in basic block units at run-time in a process wherein translation of basic blocks is interleaved with execution of those translations. A shared code cache mechanism is added to persistently store subject code translations, such that a translator may reuse translations that were generated and/or optimized by earlier translator instances.
-
Citations
66 Claims
-
1. A method of translating a subject code executable by a subject computing architecture into a target code executable by a second computing architecture, wherein the subject code includes at least a first program and a second program, comprising:
-
providing a first translator instance which translates the subject code of the first program into the target code including translating a first portion of the subject code into a portion of the target code; caching said portion of the target code into a shared code cache facility; providing a second translator instance which is different from the first translator instance and which translates the subject code of the second program into the target code, wherein the second translator instance operates simultaneously with the first translator instance; retrieving the cached portion of the target code from the shared code cache facility upon a compatibility detection between said cached portion of the target code and a second portion of the subject code in the second program, including loading the portion of the target code in the shared code cache facility into a portion of memory which is shared amongst at least the first and second translator instances; and
,copying at least one part of the shared code cache facility to a private portion of memory associated with the second translator instance upon modification of the at least one part of the shared code cache facility by the second translator instance. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32)
-
-
33. A computer system, comprising:
-
a target processor; a shared code cache facility; and translator code for translating a subject program code into target code executable on said target processor, said translator code comprising code executable by said target processor to; provide a first translator instance which translates the subject code of a first program into the target code including translating a first portion of the subject code into a portion of the target code; cache said portion of the target code in the shared code cache facility; and provide a second translator instance which translates the subject code of a second program into the target code, wherein the second translator instance is different from the first translator instance and operates simultaneously with the first translator instance, and wherein the second translator instance retrieves the cached portion of the target code from the shared code cache facility upon a compatibility detection between said cached portion of the target code and a second portion of the subject code in the second program, including loading the portion of the target code in the shared code cache facility into a portion of memory which is shared amongst at least the first and second translator instances; and
, copying at least one part of the shared code cache facility to a private portion of memory associated with the second translator instance upon modification of the at least one part of the shared code cache facility by the second translator instance. - View Dependent Claims (34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48)
-
-
49. A program storage medium storing translator code for translating subject code into target code, wherein the subject code includes at least a first program and a second program, said translator code, when executed by a computer, comprising:
-
providing a first translator instance executing on the computer which translates the subject code of the first program into the target code including translating a first portion of the subject code into a portion of the target code; caching said portion of the target code into a shared code cache facility; and providing a second translator instance executing on the computer, wherein the second translator instance is different from the first translator instance and wherein the second translator instance translates the subject code of the second program into the target code, including retrieving the cached portion of the target code from the shared code cache facility upon a compatibility detection between said cached portion of the target code and a second portion of the subject code in the second program, including loading the portion of the target code in the shared code cache facility into a portion of memory which is shared amongst at least the first and second translator instances; and
, copying at least one part of the shared code cache facility to a private portion of memory associated with the second translator instance upon modification of the at least one part of the shared code cache facility by the second translator instance. - View Dependent Claims (50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64)
-
-
65. A program storage medium storing translator code for translating subject code into target code when said translator code is executed by a computer, the translator code comprising:
-
program code providing a first translator instance for translating a first portion of subject code in a first program into a portion of target code; and program code for caching said portion of target code into a shared code cache facility and for providing a second translator instance for retrieving said target code from said shared code cache facility upon detection of compatibility between a second portion of subject code in a second program and said portion of target code, wherein said second translator instance operates simultaneously with the first translator instance, and program code for loading the portion of the target code in the shared code cache facility into a portion of memory which is shared amongst at least the first and second translator instances; and
, copying at least one part of the shared code cache facility to a private portion of memory associated with the second translator instance upon modification of the at least one part of the shared code cache facility by the second translator instance.
-
-
66. A method of translating a subject code executable by a subject computing architecture into a target code executable by a second computing architecture, wherein the subject code includes at least a first program and a second program, comprising:
-
providing a first translator instance which translates the subject code of the first program into the target code including translating a first portion of the subject code into a first portion of the target code; caching said first portion of the target code into a shared code cache facility; providing a second translator instance which is different from the first translator instance and which translates the subject code of the second program into the target code, including translating a second portion of the subject code of the second program into a second portion of the target code; and retrieving the cached first portion of the target code from the shared code cache facility upon a compatibility detection between said first cached portion of the target code and a second portion of the subject code in the second program and a determination that the first cached portion is better than the second portion of the target code, including loading the first portion of the target code in the shared code cache facility into a portion of memory which is shared amongst at least the first and second translator instances.
-
Specification