IP Library Granted Patent US 8,176,480
Granted Patent B1
US 8,176,480 · App. 11/362,956 · Granted May 8, 2012

Adaptive instrumentation through dynamic recompilation

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 8,176,480
App. No.
11/362,956
Granted
May 8, 2012
Kind
B1
Abstract

A system and method for instrumenting program instructions. A processing system includes a compiler and a profiler. The profiler is configured to instrument an application by inserting one or more instrumentation instructions in the application. During execution of the application, execution is monitored and a particular condition is detected. Responsive to the condition, a portion of the code which corresponds to the detected condition is identified. A request is conveyed for recompilation of code which corresponds to code. Prior to recompilation of the code, the profiler instruments the portion of code. Execution and monitoring of the execution continue, and instrumentation/recompilation may be repeated. Initially, relatively little of the application code may be instrumented. As execution and monitoring continues, more and more of the application code may be dynamically instrumented during execution.

Claims (75)

1. A computer system comprising:

a processor;

a compiler; and

a profiler, wherein the profiler is configured to:

insert one or more instrumentation instructions in an application to form an instrumented application;

(i) execute the instrumented application;

(ii) detect a condition during execution of the instrumented application wherein execution of one or more instrumented portions of code in the instrumented application are exhibiting excessive performance latency; and

(iii) in response to detecting said condition:

identify the one or more instrumented portions of code within the application that corresponds to the detected condition; and

dynamically instrument the identified one or more instrumented portions of code during runtime by:

inserting one or more additional instrumentation instructions in the identified one or more instrumented portions of code; and

conveying a request for recompilation of the identified one or more instrumented portions of code with the additional one or more instrumentation instructions;

wherein the profiler is configured to repeat performance of (i), (ii), and (iii) as needed to identify a particular portion of the identified one or more instrumented portions of code which are contributing to the excessive performance latency.

2. The system as recited in claim 1 , wherein the compiler is configured to notify the profiler of a compilation event prior to recompiling the code.

3. The system as recited in claim 1 , wherein the application comprises an intermediate language, the identified portion of code comprises previously compiled native code, and wherein the compiler comprises a just in time compiler.

4. The system as recited in claim 2 , wherein the profiler is configured to register with the processing system to be notified of the compilation event via a callback.

5. The system as recited in claim 2 , further comprising a profiling API of a Microsoft .NET framework, and wherein the event comprises a JITCompilationStarted event.

6. The system as recited in claim 1 , wherein the profiler is configured to:

identify a plurality of root services as being root services in a hierarchy of services;

instrument each of the root services;

detect a given condition relating to performance of the application, subsequent to instrumenting each of the root services;

in response to identifying a particular service of the plurality of root services as corresponding to the given condition:

examine the particular service to identify a selected plurality of services utilized by the particular service;

instrument each of the selected plurality of services; and

convey a request for recompilation of the selected plurality of services as instrumented.

7. A method for dynamically instrumenting application code, the method comprising:

inserting one or more instrumentation instructions in an application to form an instrumented application;

(i) executing the instrumented application;

(ii) detecting a condition during execution of the instrumented application wherein execution one or more instrumented portions of code in the instrumented application are exhibiting excessive performance latency; and

(iii) in response to detecting said condition:

identifying the one or more instrumented portions of code within the application that that correspond to the detected condition;

dynamically instrumenting the identified one or more instrumented portions of code during runtime by:

inserting one or more additional instrumentation instructions in the identified one or more instrumented portions of code; and

conveying a request for recompilation of the identified one or more instrumented portions of code with the additional one or more instrumentation instructions;

repeating performance of (i), (ii), and (iii) as needed to identify a particular portion of the instrumented portion of the identified one or more instrumented portions of code which is contributing to the excessive performance latency.

8. The method as recited in claim 7 , further comprising notifying the profiler of a compilation event prior to recompiling the code.

9. The method as recited in claim 7 , wherein the application comprises an intermediate language, the identified portion of code comprises previously compiled native code, and wherein the compiler comprises a just in time compiler.

10. The method as recited in claim 8 , further comprising registering with the processing system to be notified of the event via a callback.

11. The method as recited in claim 8 , further comprising a profiling API of a Microsoft .NET framework, and wherein the event comprises a JITCompilationStarted event.

12. The method as recited in claim 7 , further comprising:

identifying a plurality of root services as being root services in a hierarchy of services;

instrumenting each of the root services;

detecting a given condition relating to performance of the application, subsequent to instrumenting each of the root services;

in response to identifying a particular service of the plurality of root services as corresponding to the given condition:

examining the particular service to identify a selected plurality of services utilized by the particular service;

instrumenting each of the selected plurality of services; and

convey a request for recompilation of the selected plurality of services as instrumented.

13. A computer readable storage medium comprising program instructions, wherein when executed the program instructions are operable to:

insert one or more instrumentation instructions in an application to form an instrumented application;

(i) execute the instrumented application;

(ii) detect a condition during execution of the instrumented application wherein execution of one or more instrumented portions of code in the instrumented application are exhibiting excessive performance latency; and

(iii) in response to detecting said condition:

identify the one or more instrumented portions of code within the application that corresponds to the detected condition; and

dynamically instrument the identified one or more instrumented portions of code during runtime by:

inserting one or more additional instrumentation instructions in the identified one or more instrumented portions of code; and

conveying a request for recompilation of the identified one or more instrumented portions of code with the additional one or more instrumentation instructions;

wherein the profiler is configured to repeat performance of (i), (ii), and (iii) as needed to identify a particular portion of the identified one or more instrumented portions of code which are contributing to the excessive performance latency.

14. The computer readable storage medium as recited in claim 13 , wherein the program instructions are further operable to receive notification of a compilation event prior to recompilation of the code.

15. The computer readable storage medium as recited in claim 13 , wherein the application comprises an intermediate language, the identified portion of code comprises previously compiled native code, and wherein the compiler comprises a just in time compiler.

16. The computer readable storage medium as recited in claim 14 , wherein the program instructions are further operable to register to be notified of the compilation event via a callback.

17. The computer readable storage medium as recited in claim 13 , wherein the program instructions are further operable to:

identify a plurality of root services as being root services in a hierarchy of services;

instrument each of the root services;

detect a given condition relating to performance of the application, subsequent to instrumenting each of the root services;

in response to identifying a particular service of the plurality of root services as corresponding to the given condition:

examine the particular service to identify a selected plurality of services utilized by the particular service;

instrument each of the selected plurality of services; and

convey a request for recompilation of the selected plurality of services as instrumented.

18. The computer readable storage medium as recited in claim 13 , wherein the condition comprises a performance latency.

19. The system as recited in claim 6 , wherein the plurality of services utilized by the particular service are only those services directly called by the particular service.

20. The system as recited in claim 1 , wherein the profiler is configured to:

identify a plurality of root services as being root services in a hierarchy of services;

instrument each of the root services;

monitor execution of the application; and

selectively instrument only those services which are directly called by a service that has been identified as corresponding to a condition relating to performance latency of the application.

Assignments (16)
SECURITY INTEREST Recorded Dec 12, 2025
From: ARCTERA US LLC
To: CITIBANK, N.A., AS COLLATERAL AGENT
Reel/Frame 073951/0470 →
TERMINATION AND RELEASE OF PATENT SECURITY AGREEMENT AT R/F 070530/0497 Recorded Dec 1, 2025
From: BANK OF AMERICA, N.A., AS COLLATERAL AGENT
To: ARCTERA US LLC
Reel/Frame 073833/0730 →
SECURITY INTEREST Recorded Mar 17, 2025
From: ARCTERA US LLC
To: BANK OF AMERICA, N.A., AS COLLATERAL AGENT
Reel/Frame 070530/0497 →
RELEASE OF SECURITY INTEREST Recorded Dec 16, 2024
From: ACQUIOM AGENCY SERVICES LLC, AS COLLATERAL AGENT
To: VERITAS TECHNOLOGIES LLC (F/K/A VERITAS US IP HOLDINGS LLC)
Reel/Frame 069712/0090 →
RELEASE OF SECURITY INTEREST Recorded Dec 13, 2024
From: WILMINGTON TRUST, NATIONAL ASSOCIATION, AS NOTES COLLATERAL AGENT
To: VERITAS TECHNOLOGIES LLC
Reel/Frame 069634/0584 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 9, 2024
From: VERITAS TECHNOLOGIES LLC
To: ARCTERA US LLC
Reel/Frame 069548/0468 →
ASSIGNMENT OF SECURITY INTEREST IN PATENT COLLATERAL Recorded Nov 25, 2024
From: BANK OF AMERICA, N.A., AS ASSIGNOR
To: ACQUIOM AGENCY SERVICES LLC, AS ASSIGNEE
Reel/Frame 069440/0084 →
TERMINATION AND RELEASE OF SECURITY IN PATENTS AT R/F 037891/0726 Recorded Nov 30, 2020
From: WILMINGTON TRUST, NATIONAL ASSOCIATION, AS COLLATERAL AGENT
To: VERITAS US IP HOLDINGS, LLC
Reel/Frame 054535/0814 →
SECURITY INTEREST Recorded Aug 20, 2020
From: VERITAS TECHNOLOGIES LLC
To: WILMINGTON TRUST, NATIONAL ASSOCIATION, AS NOTES COLLATERAL AGENT
Reel/Frame 054370/0134 →
MERGER AND CHANGE OF NAME Recorded Apr 18, 2016
From: VERITAS US IP HOLDINGS LLC; VERITAS TECHNOLOGIES LLC
To: VERITAS TECHNOLOGIES LLC
Reel/Frame 038455/0752 →
SECURITY INTEREST Recorded Feb 23, 2016
From: VERITAS US IP HOLDINGS LLC
To: WILMINGTON TRUST, NATIONAL ASSOCIATION, AS COLLATERAL AGENT
Reel/Frame 037891/0726 →
SECURITY INTEREST Recorded Feb 23, 2016
From: VERITAS US IP HOLDINGS LLC
To: BANK OF AMERICA, N.A., AS COLLATERAL AGENT
Reel/Frame 037891/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 4, 2016
From: SYMANTEC CORPORATION
To: VERITAS US IP HOLDINGS LLC
Reel/Frame 037697/0412 →
CORRECTIVE ASSIGNMENT TO CORRECT THE ASSIGNEE PREVIOUSLY RECORDED ON REEL 019872 FRAME 979. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNEE IS SYMANTEC OPERATING CORPORATION. Recorded Mar 5, 2012
From: VERITAS OPERATING CORPORATION
To: SYMANTEC OPERATING CORPORATION
Reel/Frame 027819/0462 →
CHANGE OF NAME Recorded Sep 26, 2007
From: VERITAS OPERATING CORPORATION
To: SYMANTEC CORPORATION
Reel/Frame 019872/0979 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 27, 2006
From: SPERTUS, MICHAEL P.
To: VERITAS OPERATING CORPORATION
Reel/Frame 017632/0676 →