IP Library Granted Patent US 7,805,717
Granted Patent B1
US 7,805,717 · App. 11/252,343 · Granted Sep 28, 2010

Pre-computed dynamic instrumentation

Assignee: Symantec Operating Corporation
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 7,805,717
App. No.
11/252,343
Granted
Sep 28, 2010
Kind
B1
Abstract

A system and method for instrumenting program instructions. A processing system includes a compiler and a profiler. The compiler is configured to notify the profiler of a compilation event corresponding to first program instructions. In response to detecting the event, the profiler is configured to intercept compilation of the first program instructions, determine whether an instrumented version of the first program instructions is currently available, instruct the compiler to compile the instrumented version of the first program instructions if available, and retrieve and instrument the first program instructions if not available. The profiler may maintain an instrumentation cache for storing instrumented versions of program instructions. The instrumentation cache may further include metadata which identifies portions of program code which have been instrumented and their location. The profiler may generally instrument program instructions once during the resident life of a corresponding application.

Claims (63)

1. A computer system comprising:

a processing system comprising a compiler and a profiler;

a non-volatile storage device configured to store program instructions including first program instructions; and

an instrumentation cache on the non-volatile storage device, wherein the instrumentation cache is configured to store instrumented versions of instructions included in the first program instructions in an uncompiled state;

wherein the compiler is configured to notify the profiler of a compilation event corresponding to the first program instructions;

wherein the profiler is configured to:

detect the event and intercept compilation first instructions of the first program instructions;

determine whether an instrumented version of the first instructions is currently available on the non-volatile storage device;

in response to determining the instrumented version of the first instructions is available, instruct the compiler to compile the instrumented version of the first instructions; and

in response to determining the instrumented version is not available:

retrieve and instrument the first instructions;

store the instrumented first instructions in the instrumentation cache in an uncompiled state; and

provide the instrumented first instructions to the compiler for compilation;

wherein in response to receiving the instrumented first instructions provided by the profiler, the compiler is configured to compile the instrumented first instructions.

2. The system as recited in claim 1 , wherein the profiler is configured to access the instrumentation cache on the non-volatile storage device to determine whether the instrumented version of the first program instructions is currently available.

3. The system as recited in claim 2 , wherein the first program instructions comprise an intermediate language, and wherein the compiler comprises a just in time compiler.

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

5. The system as recited in claim 2 , wherein the profiler is further configured to:

maintain first metadata which indicates whether an instrumented version of program instructions is available, and a location of such an instrumented version of program instructions within the instrumentation cache.

6. The system as recited in claim 5 , wherein the profiler is further configured to store second metadata which identifies a relationship between given uninstrumented program instructions and an instrumented version of the given uninstrumented program instructions, wherein the second metadata comprises a mapping of an original offset of given uninstrumented program instructions within an assembly to an offset of an instrumented version of the given program instructions.

7. 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.

8. The system as recited in claim 7 , wherein the first instructions correspond to a method, and wherein the profiler is configured to:

retrieve the first instructions using a GetILFunctionBody method; and

associate the instrumented version of the first instructions with the method using a SetILFunctionBody method.

9. The system as recited in claim 1 , wherein the profiler is further operable to instrument program instructions and store instrumented program instructions in the instrumentation cache on the non-volatile storage device prior to loading a corresponding application for execution.

10. A method for instrumenting program instructions comprising:

maintaining an instrumentation cache on a non-volatile storage device, wherein the instrumentation cache is configured to store instrumented versions of instructions included in first program instructions in an uncompiled state;

notifying a profiler of a compilation event corresponding to first instructions of the first program instructions;

detecting the event and intercepting the compilation of the first instructions;

determining whether an instrumented version of the first instructions is currently available on the non-volatile storage device;

in response to determining the instrumented version of the first instructions is available, instructing a compiler to compile the instrumented version of the first instructions; and

in response to determining the instrumented version is not available:

retrieving and instrumenting the first instructions;

storing the instrumented first instructions in the instrumentation cache in an uncompiled state; and

providing the instrumented first instructions to the compiler for compilation;

wherein in response to receiving the instrumented first instructions provided by the profiler, the compiler compiling the instrumented first instructions.

11. The method as recited in claim 10 , further comprising accessing the instrumentation cache on the non-volatile storage device to determine whether the instrumented version of the first instructions is currently available.

12. The method as recited in claim 11 , wherein the first program instructions comprise an intermediate language, and the method comprises using a just in time compiler to compile program instructions.

13. The method as recited in claim 12 , further comprising a profiler registering to be notified of the event via a callback.

14. The method as recited in claim 11 , further comprising:

maintaining first metadata which indicates whether an instrumented version of program instructions is available, and a location of such an instrumented version of program instructions within the instrumentation cache.

15. The method as claim 14 , further comprising storing second metadata which identifies a relationship between given uninstrumented program instructions and an instrumented version of the given uninstrumented program instructions, wherein the second metadata comprises a mapping of an original offset of given uninstrumented program instructions within an assembly to an offset of an instrumented version of the given program instructions.

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

17. The method as recited in claim 16 , wherein the first instructions correspond to a method, and wherein the method further comprises:

retrieving the first instructions using a GetILFunctionBody method; and

associating the instrumented version of the first instructions with the method using a SetILFunctionBody method.

18. The method as recited in claim 10 , further comprising instrumenting program instructions of an application and storing instrumented program instructions in an instrumentation cache on the non-volatile storage device prior to loading the application for execution.

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

maintain an instrumentation cache on a non-volatile storage device, wherein the instrumentation cache is configured to store instrumented versions of instructions included in first program instructions in an uncompiled state;

notify a profiler of a compilation event corresponding to first instructions of the first program instructions;

detect the event and intercept the compilation of the first instructions;

determine whether an instrumented version of the first instructions is currently available on a non-volatile storage device;

in response to determining the instrumented version of the first instructions is available, instruct a compiler to compile the instrumented version of the first instructions; and

in response to determining the instrumented version is not available:

retrieve and instrumenting the first instructions;

store the instrumented first instructions in the instrumentation cache in an uncompiled state; and

provide the instrumented first instructions to the compiler for compilation;

in response to receiving the instrumented first instructions provided by the profiler, compile the instrumented first instructions.

20. The computer readable medium as recited in claim 19 , wherein the program instructions are further operable to access the instrumentation cache on the non-volatile storage device to determine whether the instrumented version of the first instructions is currently available.

21. The computer readable medium as recited in claim 20 , wherein the program instructions are further operable to:

maintain first metadata which indicates whether an instrumented version of program instructions is available, and a location of such an instrumented version of program instructions within the instrumentation cache.

22. The computer readable medium as claim 21 , wherein the program instructions are further operable to store second metadata which identifies a relationship between given uninstrumented program instructions and an instrumented version of the given uninstrumented program instructions, wherein the second metadata comprises a mapping of an original offset of given uninstrumented program instructions within an assembly to an offset of an instrumented version of the given program instructions.

23. The computer readable medium as recited in claim 19 , wherein the program instructions are further operable to instrument program instructions of an application and store instrumented program instructions in an instrumentation cache prior to loading the application for execution.

Assignments (12)
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 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 Oct 17, 2005
From: METCALF, CHRISTOPHER D.; SPERTUS, MICHAEL P.; WOLFMAN, GADI
To: VERITAS OPERATING CORPORATION
Reel/Frame 017110/0779 →