US7389500B2ExpiredUtilityA1

Selective pre-compilation of virtual code to enhance boot time emulator performance

69
Assignee: MICROSOFT CORPPriority: Jul 8, 2005Filed: Jul 8, 2005Granted: Jun 17, 2008
Est. expiryJul 8, 2025(expired)· nominal 20-yr term from priority
Inventors:Victor Tan
G06F 9/45516G06F 9/45504G06F 8/40
69
PatentIndex Score
4
Cited by
21
References
14
Claims

Abstract

A method and computer-readable medium perform a pre-boot scan of an emulated binary to detect a function that is above a predetermined complexity threshold. The detected function may then be precompiled during a boot-up process. The pre-boot scan may also detect a function that falls below a second predetermined complexity threshold. The detected function may be placed inline with the code body. Just-in-time translation may then be performed at runtime.

Claims

exact text as granted — not AI-modified
1. A method, comprising:
 scanning virtual code having a plurality of functions during a pre-boot scan; 
 performing a calculation during the pre-boot scan to determine whether a function of the plurality of functions is a complex function, wherein the calculation compares a runtime benefit of precompiling the function to an increase in boot-time caused by precompiling the fuction; 
 if the function is identified as a complex function according to the calculation, precompiling the complex function; and 
 performing a just-in-time translation of a remainder of the plurality of functions in the virtual code. 
 
   
   
     2. The method of  claim 1 , wherein the calculation includes utilizing a number of lines of code in the function to identify whether a function is a complex function. 
   
   
     3. The method of  claim 1 , wherein the calculation to determine whether the function of the plurality of functions is the complex function takes into account a measure of time it takes to boot up if the function is precompiled versus a duration of time it takes to boot up if the function is not precompiled. 
   
   
     4. The method of  claim 1 , wherein the virtual code has a main body and at least one subroutine, and further comprising:
 determining that at the at least one subroutine is a complex function according to the calculation; and 
 placing the at least one subroutine in the main body of the virtual code. 
 
   
   
     5. The method of  claim 4 , wherein the at least one subroutine has a line of code and wherein the main body has a function call corresponding to the subroutine, and wherein said placing step comprises copying the line of code from the at least one subroutine and replacing the function call in the main body of the virtual code with the line of code. 
   
   
     6. A method, comprising:
 performing a pre-boot scan of an emulated binary of a software application; 
 identifying a first function within the binary that exceeds a first predetermined threshold; 
 identifying a second function within the binary that requires a context switch for execution and is below a second predetermined threshold; 
 precompiling the first function; 
 placing the second function inline in a main body of the emulated binary; and 
 performing a just-in-time translation of the emulated binary. 
 
   
   
     7. The method of  claim 6 , wherein the just-in-time translation produces a second binary that is adapted to be executed by a predetermined processor. 
   
   
     8. The method of  claim 7 , further comprising executing the translated binary. 
   
   
     9. The method of  claim 6 , wherein the just-in-time translation is performed at a runtime of the software application. 
   
   
     10. The method of  claim 6 , wherein the software application is gaming software. 
   
   
     11. The method of  claim 6 , wherein the first and second functions relate to graphics rendering. 
   
   
     12. A computer-readable medium having computer-executable instructions for performing a method, the method comprising:
 scanning virtual code having a plurality of functions during a pre-boot scan; 
 performing a calculation during the pre-boot scan to determine whether a function of the plurality of functions is a complex function, wherein the calculation compares a runtime benefit of precompiling the function to an increase in boot-time caused by precompiling the fuction; 
 if the function is identified as a complex function according to the calculation, precompiling the complex function; and 
 performing a just-in-time translation of a remainder of the plurality of functions in the virtual code. 
 
   
   
     13. The computer-readable medium of  claim 12 , wherein the virtual code has a main body and at least one subroutine, and further comprising:
 determining that at the at least one subroutine is a complex function according to the calculation; and 
 placing the at least one subroutine in the main body of the virtual code. 
 
   
   
     14. The computer-readable medium of  claim 13 , wherein the at least one subroutine has a line of code and wherein the main body has a function call corresponding to the subroutine, and wherein said placing step comprises copying the line of code from the at least one subroutine and replacing the function call in the main body of the virtual code with the line of code.

Cited by (0)

No later patents cite this yet.

References (0)

No backward citations on record.