Methods and apparatus to validate translated guest code in a dynamic binary translator
US-9223553-B2 · Dec 29, 2015 · US
US9250938B2 · US · B2
| Field | Value |
|---|---|
| Publication number | US-9250938-B2 |
| Application number | US-25149708-A |
| Country | US |
| Kind code | B2 |
| Filing date | Oct 15, 2008 |
| Priority date | Oct 15, 2008 |
| Publication date | Feb 2, 2016 |
| Grant date | Feb 2, 2016 |
A practical reading order for non-experts. Skip the full description unless you need deep technical detail.
What the patent document calls the invention.
A short plain-language summary of the technical disclosure.
Who owns or filed the patent and who is credited as inventor.
Filing, priority, publication, and grant dates set the timeline.
The legal scope of protection — read this for what is actually claimed.
Technology tags used to group this patent with similar filings.
Prior art links and similar publications in this corpus.
Official abstract text for this publication.
A program entity that generates code but that does not perturb global state is identified. Code produced by the identified program entity can be assigned an identifier and cached the first time it is executed. Subsequent executions of the program entity can eliminate generation of the code and/or translation of the generated code into native binary code. The runtime generated code and native binary code can be cached in a machine-wide cache, or can be added to the metadata of the assembly generated from the source code of the program entity.
Opening claim text (preview).
What is claimed: 1. A system that caches runtime-generated code comprising: a processor; and a memory coupled to the processor that contains a program, which, when executed by the processor, is configured to cache a cacheable entity in a cache by performing the steps of: determining whether a dynamic-code-generating entity is a pure function; in response to determining that the dynamic-code-generating entity is a pure function, calculating an identifier for the cacheable entity, the cacheable entity comprising runtime-generated code generated based on the dynamic-code-generating entity, the runtime-generated code comprising intermediate byte code; determining whether the calculated identifier is found in a first cache configured to store the runtime-generated code; in response to determining that the calculated identifier is not found in the first cache, generating and storing the cacheable entity in the first cache; and in response to determining that the calculated identifier is found in the first cache: determining whether the calculated identifier is found in a second cache configured to store native binary code for the runtime-generated code that is generated from the intermediate byte code; and generating, loading, and executing the native binary code and storing the generated native binary code in the second cache in response to determining that the calculated identifier is not found in the second cache. 2. The system of claim 1 , the steps further comprising: in response to determining that the calculated identifier is found in the first cache, bypassing generation of intermediate byte code for the runtime-generated code for subsequent executions of the dynamic-code-generating entity. 3. The system of claim 1 , the steps further comprising: in response to determining that the calculated identifier is found in the second cache, bypassing generation of native binary code for the runtime-generated code for subsequent executions of the dynamic-code-generating entity. 4. The system of claim 1 , wherein the intermediate byte code for the runtime-generated code is generated by a Reflection Emit mechanism when the dynamic-code-generating entity executes. 5. The system of claim 1 , wherein the calculated identifier is comprised of a name associated with the dynamic-code-generating entity, at least one argument passed to the dynamic-code-generating entity and a version indicator for the dynamic-code-generating entity. 6. The system of claim 1 , wherein the first cache comprises a system-wide cache and the second cache comprises a system-wide cache. 7. A method of caching runtime-generated code comprising: determining whether a runtime-code-generating entity is a pure function; in response to determining the runtime-code-generating entity is a pure function: calculating an identifier for an entity comprising runtime-generated code generated based on the runtime-code-generating entity, the runtime-generated code entity comprising intermediate byte code created by a Reflection Emit mechanism, the calculated identifier comprising execution-context-specific characteristics of the runtime-generated code, the execution-context-specific characteristics identifying a version of the runtime-code-generating entity; determining whether the calculated identifier is found in a first cache configured to store the runtime-generated code entity; in response to determining that the calculated identifier is not found in the first cache, generating and storing the runtime-generated code entity in the first cache keyed on the calculated identifier upon a first execution of the runtime-generated code entity; in response to determining that the calculated identifier is found in the first cache: determining whether the calculated identifier is found in a second cache configured to store native binary code for the runtime-generated code entity that is generated from the intermediate byte code; and loading and executing the native binary code from second cache in response to determining that the calculated identifier is found in the second cache; and returning the stored runtime-generated code entity in response to a second execution of the stored runtime-generated code entity, wherein generation of the intermediate byte code for the stored runtime-generated code entity is bypassed for the second execution of the stored runtime-generated code entity. 8. The method of claim 7 , further comprising: in response to determining that the calculated identifier is not found in the second cache, generating the native binary code for the runtime-generated code from the intermediate byte code for the stored runtime-generated code entity. 9. The method of claim 7 , wherein the first cache is a source assembly comprising the stored runtime-generated code entity. 10. The method of claim 7 , wherein the calculated identifier comprises an identifier comprised of a name associated with the runtime-code-generating entity, at least one argument passed to the runtime-code-generating entity and a version indicator for the runtime-code-generating entity. 11. A computer-readable storage medium, the computer-readable storage medium being hardware and comprising computer-executable instructions which when executed cause a managed computing environment to: determine whether a runtime-code-generating entity is a pure function; and in response to determining the runtime-code-generating entity is a pure function: calculate an identifier for a cacheable entity, the cacheable entity comprising runtime-generated code generated based on the runtime-code-generating entity, the runtime-generated code comprising intermediate byte code; determine whether the calculated identifier is found in a first cache configured to store the runtime-generated code; in response to determining that the calculated identifier is not found in the first cache, generate and store the cacheable entity in the first cache; and in response to determining that the calculated identifier is found in the first cache: determine whether the calculated identifier is found in a second cache configured to store native binary code for the runtime-generated code that is generated from the intermediate byte code; and generate, load, and execute the native binary code and store the generated native binary code in the second cache in response to determining that the calculated identifier is not found in the second cache. 12. The computer-readable storage medium of claim 11 , comprising further computer-executable instructions, which when executed cause the computing environment to: in response to determining that the calculated identifier is found in the first cache, bypass generation of the intermediate byte code for the runtime-generated code for subsequent executions of the runtime-code-generating entity. 13. The computer-readable storage medium of claim 11 , comprising further computer-executable instructions, which when executed cause the computing environment to: in response to determining that the calculated identifier is found in the second cache, bypass generation of the native binary code from the intermediate byte code for the runtime-generated code for the subsequent executions of the runtime-code-generating entity. 14. The computer-readable storage medium of claim 11 , comprising further computer-executable instructions, which when executed cause the computing environment to: cache the native binary code in a source assembly of the runtime-code-generating entity. 15. The computer-readable storage medium of claim 11 , comprising further computer-
Involving translation to a different instruction set architecture, e.g. just-in-time translation in a JVM · CPC title
Related publications grouped by family.
Answers are generated from the same data shown on this page.