Claims
- 1. A method of transparent dynamic optimization in a multiprocessing system, comprising:
monitoring execution of an application binary on a first processor with an execution monitor running on another processor of the system; and transparently optimizing one or more segments of the original application binary with a runtime optimizer executing on said another processor of the system.
- 2. The method of claim 1, further comprising:
executing an instrumented copy of the application binary on said first processor in the system.
- 3. The method of claim 1, wherein said monitoring is conducted with reference to execution characteristics produced by executing instrumented code included in an instrumented copy of the application binary.
- 4. The method of claim 1, wherein said optimization is conducted with reference to execution characteristics gathered by the execution monitor, and without performance impact to the concurrently executing application binary.
- 5. The method of claim 1, further comprising:
simultaneously modifying the original execution application binary by replacing one or more segments with a recently optimized segment.
- 6. The method of claim 5, wherein said modification is conducted in a manner that is transparent to a user of the application binary.
- 7. The method of claim 1, further comprising:
removing an instrumentation code from an optimized portion before inserting into the executing application binary.
- 8. The method of claim 1, further comprising determining, by instrumentation, the one or more segments to have been frequently executed.
- 9. The method of claim 1, further comprising:
inserting new instrumentation into an optimized portion to continue to monitor execution characteristics of the recently optimized application binary.
- 10. The method of claim 1, wherein the optimizing includes removing unnecessary branching from a frequently executed code path.
- 11. The method of claim 1, wherein the optimizing includes specializing an application binary to exploit a full architectural power of a particular network node on which it is running.
- 12. The method of claim 1, wherein the application binary includes profiling instructions and program data gathered at compile time and stored in the binary for use by said runtime optimizer.
- 13. The method of claim 1, wherein at least portions of the executing application binary are not previously instrumented.
- 14. The method of claim 13, wherein said at least portions include at least one of a legacy binary without a source code, and a shared runtime library, said method further comprising:
monitoring frequently executing binaries; analyzing said binaries, and making a copy in which to insert appropriate instrumentation code; and on a future invocation of said binary, switching to an instrumented copy and proceeding with execution thereof.
- 15. The method of claim 14, wherein said binaries are analyzed while not being executed.
- 16. The method of claim 1, wherein said system includes a cluster of nodes communicating via distributed shared memory.
- 17. The method of claim 1, wherein said system includes a shared multiprocessor system (SMP).
- 18. The method of claim 2, wherein the instrumented application binary is produced during a process of dynamically translating an instruction stream of a target application, for execution on a host system.
- 19. A method for a multiprocessor computing environment to perform simultaneous, dynamic optimization of an application with respect to its execution environment, comprising:
executing an instrumented copy of the application on a first processor in the system; monitoring the execution of the application with an execution monitor running on another processor of the system, said monitoring being conducted with reference to the execution characteristics produced by executing instrumentation code included in the instrumented copy of the application; optimizing one or more segments of the original application with a runtime optimizer executing on another processor of the system, said optimization being conducted with reference to execution characteristics gathered by the execution monitor, and without performance impact to the concurrently executing application; modifying the original execution application by replacing one or more segments with the recently optimized segment, said modification being conducted in a manner that is transparent to a user of the application.
- 20. A method for performing simultaneous, dynamic optimization of an application with respect to its execution environment, in a multiprocessor system, comprising:
monitoring each execution of a program or application running in a first processor, by an execution monitor, running in a separate processor or as a separate process running across multiple processors; creating, by binary code as it executes, a profile data of execution characteristics of said binary code, said binary code containing instrumentation code for monitoring performance; continuously evaluating, by said execution monitor, the profile data; and when a given threshold condition is satisfied, invoking a dynamic optimizer to optimize frequently executing code fragments, said optimized code fragments being inserted in the executing instruction stream for use in a subsequent execution thereof.
- 21. The method of claim 20, wherein excess processing cycles in the multiprocessor system are used to observe execution characteristics of the executing application, and transparently modify the executing application to improve its performance.
- 22. The method of claim 20, wherein a newly inserted code fragment contains no instrumentation.
- 23. The method of claim 20, wherein a newly inserted code fragment contains re-instrumented code to detect further changes in the execution characteristics of the application.
- 24. A method of transparent dynamic optimization in a shared multiprocessing (SMP) system, comprising:
executing an application binary on a first processor; monitoring, on another processor in the system, a behavior of the execution; and optimizing the execution of the application binary while the application binary is executing.
- 25. The method of claim 24, wherein said application binary is instrumented.
- 26. The method of claim 24, wherein at least some of the application binary is not previously instrumented.
- 27. A system for transparent dynamic optimization in a multiprocessing system, comprising:
an execution monitor for monitoring execution of an application binary on a first processor, said execution monitor running on another processor of the system, said execution monitor including a dynamic optimizer for simultaneously, with said monitoring, optimizing one or more segments of the original application binary, said optimizer executing on said another processor of the system.
- 28. The system of claim 27, wherein said execution monitor includes a fragment cache for storing dynamically re-optimized fragments of the instrumented binary application.
- 29. The system of claim 27, wherein said execution monitor performs the monitoring with reference to execution characteristics produced by executing instrumentation code included in an instrumented copy of the application binary.
- 30. The system of claim 27, wherein said dynamic optimizer performs the optimization with reference to execution characteristics gathered by the execution monitor, and without performance impact to the concurrently executing application binary.
- 31. The system of claim 27, wherein said execution monitor simultaneously modifies the original execution application binary by replacing one or more segments with a recently optimized segment.
- 32. The system of claim 31, wherein said modification is conducted in a manner that is transparent to a user of the application binary.
- 33. The system of claim 27, wherein said execution monitor removes the instrumentation code from an optimized portion before inserting into the executing application binary.
- 34. The system of claim 27, wherein said execution monitor inserts new instrumentation into an optimized portion to continue to monitor execution characteristics of the recently optimized application binary.
- 35. The system of claim 27, wherein the dynamic optimizer removes unnecessary branching from a frequently executed code path.
- 36. The system of claim 27, wherein the dynamic optimizer specializes an application binary to exploit a full architectural power of a particular network node on which it is running.
- 37. The system of claim 27, wherein the application binary includes profiling instructions and some program data gathered at compile time and stored in the binary for use by said dynamic optimizer.
- 38. The system of claim 27, wherein at least portions of the executing application binary are not previously instrumented.
- 39. The system of claim 38, wherein said at least some portions include at least one of a legacy binary without a source code, and a shared runtime library, said system further comprising:
means for monitoring frequently executing binaries; means for analyzing said binaries, and making a copy in which to insert appropriate instrumentation code; and means, on a future invocation of said binary, for switching to an instrumented copy and proceeding with execution thereof.
- 40. The system of claim 39, wherein said binaries are analyzed while not being executed.
- 41. The system of claim 27, further including a cluster of nodes communicating via distributed shared memory.
- 42. The system of claim 27, wherein said system includes a shared multiprocessor system (SMP).
- 43. The system of claim 28, wherein an instrumented application binary is produced during a process of dynamically translating an instruction stream of a target application, for execution on a host system.
- 44. The system of claim 27, wherein said execution monitor is dedicated to said first processor.
- 45. The system of claim 28, wherein said execution monitor further includes:
a fragment manager for managing fragments in said fragment cache; and a profile monitor which is triggered by the executing application binary when a predetermined condition is met to provide an input to the fragment manager, wherein the dynamic optimizer passes optimized fragments back to the fragment cache via the fragment manager, wherein the execution monitor decides which portion of the application binary to extract for optimization, and extracts said portion of the application binary by making a copy of the instructions, and storing the instructions such that the dynamic optimizer can refer to and make changes to the copy, wherein said execution monitor provides profile information to the dynamic optimizer which is relevant for optimizing a specific fragment.
- 46. A signal-bearing medium tangibly embodying a program of machine-readable instructions executable by a digital processing apparatus to perform a method of transparent dynamic optimization in a multiprocessing system, comprising:
monitoring execution of an application binary on a first processor with an execution monitor running on another processor of the system; and transparently optimizing one or more segments of the original application binary with a runtime optimizer executing on said another processor of the system.
- 47. An emulation system for a multiprocessor system having a plurality of host processors, comprising:
an execution monitor for producing instrumented binary while dynamically translating an instruction stream of a target application, for execution on a host system, wherein said execution monitor thread comprises one of a plurality of translation threads, and wherein at least one of the translation threads is employed to dynamically optimize code fragments selected by the execution monitor.
- 48. The emulation system of claim 47, wherein one of said translation threads comprises an optimizer thread,
wherein sequences of code with frequent execution are dynamically optimized to enhance performance, wherein said sequences are identified by instrumentation code inserted by an interpreter translation thread which monitors execution frequency of cached code, and wherein monitor threads continually track said frequency such that when a predetermined threshold is reached, the optimizer thread is informed that a given code sequence is a candidate for optimization, and provided with an emulated real address of a guest instruction that introduced the code sequence to be optimized.
- 49. An emulation system for a multiprocessor lsystem, comprising:
a plurality of threads, wherein one of the translation threads comprises an exectuion monitor, and wherein at least one of said translation threads comprises a dynamic optimizer.
CROSS-REFERENCE TO RELATED APPLICATION
[0001] The present application is related to U.S. patent application Ser. No. ______, filed on ______, to Nair et al., entitled “METHOD AND SYSTEM FOR EFFICIENT EMULATION OF MULTIPROCESSOR MEMORY CONSISTENCY” having IBM Docket No. YOR920010532US1, to U.S. patent application Ser. No. ______, filed on ______, to Altman et al., entitled “METHOD AND SYSTEM FOR MULTIPROCESSOR EMULATION ON A MULTIPROCESSOR HOST SYSTEM” having IBM Docket No. YOR920010533US1, to U.S. patent application Ser. No. ______, filed on ______, to Nair et al., entitled “HYBRID MECHANISM FOR MORE EFFICIENT EMULATION AND METHOD THEREFOR” having IBM Docket No. YOR920010534US1, and to U.S. patent application Ser. No. ______, filed on ______, to Nair et al., entitled “METHOD AND SYSTEM FOR EFFICIENT EMULATION OF MULTIPROCESSOR ADDRESS TRANSLATION ON A MULTIPROCESSOR HOST” having IBM Docket No. YOR920010535US1, each assigned to the present assignee, and incorporated herein by reference.