Multiprocessor Programming Toolkit for Design Reuse
US-2024394048-A1 · Nov 28, 2024 · US
US9256410B2 · US · B2
| Field | Value |
|---|---|
| Publication number | US-9256410-B2 |
| Application number | US-201213593411-A |
| Country | US |
| Kind code | B2 |
| Filing date | Aug 23, 2012 |
| Priority date | Aug 9, 2012 |
| Publication date | Feb 9, 2016 |
| Grant date | Feb 9, 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 method and an apparatus to continuously re-compile a code are described. The code can be compiled in a speculatively optimized manner from a source code to access an untyped variable according to a type prediction of runtime values for the untyped variable. Failures of the type prediction during the execution can be dynamically tracked. Each failure may be associated a runtime value with a type outside of the type prediction. The type prediction may be adjusted according to the failures tracked for future runtime values of the untyped variable. The source code can be recompiled for execution to optimize the access to the untyped variable for the future runtime values according to the adjusted type prediction.
Opening claim text (preview).
What is claimed is: 1. A machine-readable non-transitory storage medium having instructions therein, which when executed by a machine, cause the machine to perform a method, the method comprising: executing a code compiled from a source code, the source code including an access of an untyped variable, the compiled code being speculatively optimized according to a type prediction for runtime values of the untyped variable, wherein the type prediction corresponds to a collection of possible types for the untyped variable; collecting a subset of the runtime values into a profile database during the execution; tracking failures of the type prediction during the execution, wherein each tracked failure is associated with an identified type of one of the runtime values, wherein the identified type is outside of the type prediction, and wherein the tracked failures are collected into a profile database; analyzing information stored in the profile database including the collected runtime values and the tracked failures to update a statistics of types of the runtime values, the statistics indicating a certain type of the runtime values causing the tracked failures; determining a failure rate for the type prediction based on the profile database and a runtime status; adjusting the type prediction according to the statistics for future runtime values of the untyped variable, wherein the adjusted type prediction corresponds to a separate collection of possible types for the untyped variable, and wherein adjusting the type prediction further comprises recompiling a recompiled code from the source code if the failure rate exceeds a failure threshold; and executing the recompiled code of the source code to optimize the access to the untyped variable for the future runtime values according to the adjusted type prediction. 2. The medium of claim 1 , wherein the type prediction represents a collection of possible types for the runtime values, and wherein the compiled code includes baseline instructions and optimized instructions for the access, the baseline instructions to allow the access for all possible types of values for the untyped variable, the optimized instructions to perform the access for the collection of possible types of values for the untyped variable. 3. The medium of claim 2 , wherein the adjusted type prediction indicates any type of value is possible for the future runtime values of the untyped variable, wherein the recompiled code includes the baseline instructions, and wherein the access in the recompiled code corresponds to the baseline instructions without additional optimized instructions for the access. 4. The medium of claim 2 , wherein the adjusted type prediction represents a separate collection of possible types for the future runtime values, and wherein the recompiled code includes baseline instructions and separate optimized instructions to perform the access for the separate collection of possible types of values for the untyped variable. 5. The medium of claim 2 , wherein the compiled code includes jump instructions to cause the baseline instructions to be executed if the optimized instructions cannot be completely executed because of the failures, and wherein the tracking is based on the jump instructions. 6. The medium of claim 1 , wherein the source code specifies a data processing task including the access to the untyped variable, further comprising: profiling the data processing task via one or more executions, each execution based on a separate code compiled from the source; and maintaining the profile database associated with the data processing task based on the profiling. 7. The medium of claim 6 , wherein the execution is associated with a runtime state including a data instance for the untyped variable, the data instance causing a failure of the type prediction, and wherein the tracking comprises: identifying a particular type of the data instance from the runtime; and updating the profile database with the failure associated with the particular type. 8. The medium of claim 6 , wherein the compiled code includes profiling instructions to store each runtime value for the untyped variable in a preconfigured storage location, and wherein the collected runtime values are sampled from the preconfigured storage location to the profile database in a random and infrequent manner. 9. The medium of claim 6 , wherein the analysis indicates which types of the runtime values causes the failures. 10. The medium of claim 9 , wherein the statistics is updated according to a dynamic schedule. 11. The medium of claim 10 , further comprising: monitoring the runtime status for multiple executions, the runtime status indicating a progress of each of the executions; and configuring a runtime setting for the executions, the runtime setting specifying the dynamic schedule for an analysis of the profile database based on the progress. 12. The medium of claim 11 , wherein the runtime status includes a number of invocations of the data processing task for the progress. 13. The medium of claim 12 , wherein the runtime status includes a measure of memory usage indicating amount of memory used, and wherein a next schedule for the analysis in the dynamic schedule corresponds to more invocations of the data processing task as the memory usage increases. 14. The medium of claim 11 , wherein the runtime setting dynamically specifies the failure threshold. 15. The medium of claim 11 , wherein the dynamic schedule specifies when to recompile the recompiled code, and wherein the recompilation occurs less frequently than the analysis. 16. The medium of claim 11 , further comprising: updating the dynamic schedule to prolong the profiling for the execution if the runtime status indicates that the profile database does not include enough data. 17. The medium of claim 16 , wherein the source code includes a plurality of untyped variables for the data processing task, wherein the runtime status indicates which of the untyped variables have been accessed during the execution, and wherein the profile database does not include enough data if a percentage of the untyped variables, which have been assessed during the execution, does not exceed a fullness threshold. 18. A machine-readable non-transitory storage medium having instructions therein, which when executed by a machine, cause the machine to perform a method, the method comprising: providing a type prediction of runtime values of an untyped variable via an execution of a baseline code block compiled without optimization for an access to the untyped variable in a source code, wherein the type prediction corresponds to a collection of possible value types for the untyped variable; collecting a subset of the runtime values into a profile database during the execution; tracking failures of the type prediction via an execution of an optimized code block speculatively optimized for the access according to the type prediction, the tracking indicating whether the type prediction is successful, wherein each tracked failure is associated with a type of a run time value of the untyped variable outside of the type prediction, wherein the tracked failures are collected into the profile database; analyzing information stored in the profile database including the collected runtime values and the tracked failures to update a statistics of types of the runtime values; determining a failure rate for the type prediction based on the profile database and a runtime status; adjusting the type prediction according to the statist
Performance evaluation by tracing or monitoring · CPC title
for performance assessment · CPC title
Monitoring involving counting · CPC title
Performance evaluation by statistical analysis · CPC title
Type checking · CPC title
Related publications grouped by family.
Answers are generated from the same data shown on this page.