Multi-Phase Application Profiling and Compilation
Abstract
A computer implemented method manages application execution. A processor set monitors an execution of an application. The processor set collects current profile information for the application in response to detecting a phase change in the execution of the application. The processor set compares the current profile information with previously collected profile information for a number of existing profiles. The processor set patches the application to use an existing specialized body that is an optimized version of a general body that has been optimized for the previously collected profile information for an existing profile in the number of existing profiles in response to the current profile information matching the previously collected profile information for the existing profile.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1 . A computer implemented method for managing application execution, the computer implemented method comprising:
monitoring, by a processor set, an execution of an application; collecting, by the processor set, current profile information for the application in response to detecting a phase change in the execution of the application; comparing, by the processor set, the current profile information with previously collected profile information for a number of existing profiles; and patching, by the processor set, the application to use an existing specialized body that is an optimized version of a general body that has been optimized for the previously collected profile information for an existing profile in the number of existing profiles in response to the current profile information matching the previously collected profile information for the existing profile.
2 . The computer implemented method of claim 1 further comprising:
compiling, by the processor set, the general body with optimization for the current profile information to form a new specialized body in response to the current profile information not matching the previously collected profile information for the number of existing profiles; and
patching, by the processor set, the application to use the new specialized body.
3 . The computer implemented method of claim 2 further comprising:
saving, by the processor set, the current profile information as part of the previously collected profile information; and
associating, by the processor set, the current profile information with the new specialized body.
4 . The computer implemented method of claim 1 further comprising:
running, by the processor set, the application that has been patched to use the existing specialized body.
5 . The computer implemented method of claim 1 further comprising:
detecting a frequency of a slow path execution; and
determining that the phase change has occurred in response to the frequency of slow path execution exceeding a threshold.
6 . The computer implemented method of claim 1 , wherein collecting, by the processor set, the current profile information comprises:
compiling, by the processor set, the general body with profiling instrumentation to form an instrumented body; patching, by the processor set, the application to call the instrumented body; running, by the processor set, the application using the instrumented body; and collecting, by the processor set, the current profile information in response to the application using the instrumented body.
7 . The computer implemented method of claim 1 , wherein the current profile information and the previously collected profile information comprises at least one of a function call, a branch, a system call, or an expected value.
8 . The computer implemented method of claim 1 , wherein the phase change is indicated by at least one of a software event, a hardware event, or an external condition.
9 . A computer system comprising:
a processor set; a set of one or more computer-readable storage media; and program instructions, collectively stored in the set of one or more storage media, for causing the processor set to perform the following computer operations: monitor an execution of an application; collect current profile information for the application in response to detecting a phase change in the execution of the application; compare the current profile information with previously collected profile information for a number of existing profiles; and patch the application to use an existing specialized body that is an optimized version of a general body that has been optimized for the previously collected profile information for an existing profile in the number of existing profiles in response to the current profile information matching the previously collected profile information for the existing profile.
10 . The computer system of claim 9 , wherein the program instructions, collectively stored in the set of one or more storage media, further causes the processor set to perform the following computer operations:
compile, by the processor set, the general body with optimization for the current profile information to form a new specialized body in response to the current profile information not matching the previously collected profile information for the number of existing profiles; and patching, by the processor set, the application to use the new specialized body.
11 . The computer system of claim 10 , wherein the program instructions, collectively stored in the set of one or more storage media, further causes the processor set to perform the following computer operations:
save the current profile information as part of the previously collected profile information; and associate the current profile information with the new specialized body.
12 . The computer system of claim 9 , wherein the program instructions, collectively stored in the set of one or more storage media, further causes the processor set to perform the following computer operations:
run the application that has been patched to use the existing specialized body.
13 . The computer system of claim 9 , wherein the program instructions, collectively stored in the set of one or more storage media, further causes the processor set to perform the following computer operations:
detect a frequency of a slow path execution; and determine that the phase change has occurred in response to the frequency of slow path execution exceeding a threshold.
14 . The computer system of claim 9 , wherein in collecting the current profile information, wherein the program instructions, collectively stored in the set of one or more storage media, causes the processor set to perform the following computer operations:
compile the general body with profiling instrumentation to form an instrumented body; patch the application to call the instrumented body; run the application using the instrumented body; and collect the current profile information in response to running the application using the instrumented body.
15 . The computer system of claim 9 , wherein the current profile information and the previously collected profile information comprises at least one of a function call, a branch, a system call, or an expected value.
16 . The computer system of claim 9 , wherein the phase change is indicated by at least one of a software event, a hardware event, or an external condition.
17 . A computer program product for managing application execution, the computer program product comprising:
a set of one or more computer-readable storage media; program instructions, collectively stored in the set of one or more storage media, for causing a processor set to perform the following computer operations: monitor an execution of an application; collect current profile information for the application in response to detecting a phase change in the execution of the application; compare the current profile information with previously collected profile information for a number of existing profiles; and patch the application to use an existing specialized body that is an optimized version of a general body that has been optimized for the previously collected profile information for an existing profile in the number of existing profiles in response to the current profile information matching the previously collected profile information for the existing profile.
18 . The computer program product of claim 17 , wherein the program instructions, collectively stored in the set of one or more storage media further cause the processor set to:
compile the general body with optimization for the current profile information to form a new specialized body in response to the current profile information not matching the previously collected profile information for the number of existing profiles; and patch the application to use the new specialized body.
19 . The computer program product of claim 18 , wherein the program instructions, collectively stored in the set of one or more storage media further cause the processor set to:
save the current profile information as part of the previously collected profile information; and associate the current profile information with the new specialized body.
20 . The computer program product of claim 9 further comprising:
running, by the processor set, the application that has been patched to use the existing specialized body.Join the waitlist — get patent alerts
Track US2025383858A1 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.