IP Library Granted Patent US 8,464,225
Granted Patent B2
US 8,464,225 · App. 11/744,876 · Granted Jun 11, 2013

Method and system for adaptive, generic code instrumentation using run-time or load-time generated inheritance information for diagnosis and monitoring application performance and failure

Inventor: Bernd Greifeneder (Linz, AT)
Assignee: dynaTrace software GmbH
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,464,225
App. No.
11/744,876
Granted
Jun 11, 2013
Kind
B2
Abstract

A system for generic, run-time adaptive placement of byte code instrumentation takes into account object oriented inheritance relationships that are stored in an inheritance repository. The inheritance repository, which mirrors the structure of the monitored application, is created at run-time and is updated if the code base of the monitored application changes either dynamically at run-time or by manually changing the configuration and restarting the application. The inheritance repository contains meta-data of application classes and their relationships, like direct and indirect inheritance. The inheritance repository information is used to evaluate generic instrumentation placement rules, like rules that match to methods of classes that inherit from a specific base class. The inheritance repository is generated concurrently with instrumentation placement at application load-time or run-time and persists between application runs to enable dedicated adaptation runs to create the repository.

Claims (90)

1. A computer-implemented method comprising:

(A) extracting, from original bytecode, class meta-data for a plurality of classes;

(B) generating, based on the extracted meta-data, an inheritance repository representing relationships among the plurality of classes, the relationships including at least one relationship between a first class and a second class, wherein the first class is a direct super class of a third class, and wherein the third class is a direct super class of the second class;

(C) using the inheritance repository to evaluate at least one instrumentation rule on the plurality of classes, thereby identifying a subset of the plurality of classes;

(D) instrumenting original bytecode containing the subset of the plurality of classes to produce instrumented bytecode;

(E) using the inheritance repository to evaluate the at least one instrumentation rule on the plurality of classes of the first application during a second run of the first application;

wherein (A) comprises extracting the class meta-data at load-time and wherein (B) comprises generating the inheritance repository at load-time;

wherein (A) further comprises extracting, from original bytecode of a first application, class meta-data for a plurality of classes of the first application; and

wherein (C) comprises using the inheritance repository to evaluate at least one instrumentation rule on the plurality of classes of the first application during a first run of the first application, thereby identifying a subset of the plurality of classes of the first application.

2. The method of claim 1 , wherein the relationships among the plurality of classes comprise class inheritance relationships.

3. The method of claim 2 , wherein the class meta-data comprises:

meta-data for the third class, specifying that the first class is a direct super class of the third class;

meta-data for the second class, specifying that the third class is a direct super class of the second class; and

wherein (B) comprises generating, within the inheritance repository, a record of an indirect inheritance relationship between the first class and the second class.

4. The method of claim 1 , wherein the relationships among the plurality of classes comprise interface implementation relationships.

5. The method of claim 4 , wherein the class meta-data comprises:

meta-data for the third class, specifying that the third class implements an interface;

meta-data for the second class, specifying that the third class is a direct super class of the second class; and

wherein (B) comprises generating, within the inheritance repository, a record specifying that the second class implements the interface.

6. The method of claim 1 , wherein the class meta-data comprises:

meta-data for the third class, specifying that the third class implements a first interface and that the third class is a direct super class of the second class; and

wherein (B) comprises generating, within the inheritance repository, a record indicating that the second class implements the first interface.

7. The method of claim 1 , wherein the at least one instrumentation rule comprises a concrete instrumentation rule specifying a class name descriptor; and

wherein (C) comprises determining whether the plurality of classes includes a class having a name which matches the specified class name descriptor.

8. The method of claim 1 , wherein the at least one instrumentation rule comprises a concrete instrumentation rule specifying a method name descriptor; and

wherein (C) comprises determining whether the plurality of classes includes a method having a name which matches the specified method name descriptor.

9. The method of claim 1 , wherein the at least one instrumentation rule comprises a generic instrumentation rule specifying a class name descriptor and a direction indicator; and

wherein (C) comprises identifying, within the plurality of classes, the following:

any class C having a name which matches the specified class name descriptor;

any class having an inheritance relationship to class C in the direction indicated by the direction indicator.

10. The method of claim 1 , wherein the at least one instrumentation rule comprises a generic instrumentation rule specifying an interface name descriptor and a direction indicator; and

wherein (C) comprises identifying, within the plurality of classes, the following:

any class C which implements an interface matching the specified interface name descriptor;

any class C having an inheritance relationship to class C in the direction indicated by the direction indicator.

11. The method of claim 1 , further comprising:

(F) using the inheritance repository to evaluate at least one instrumentation rule on the plurality of classes at run-time, thereby identifying a subset of the plurality of classes; and

(G) instrumenting original bytecode containing the subset of the plurality of classes at run-time to produce instrumented bytecode.

12. The method of claim 11 , wherein the at least one instrumentation rule comprises a generic instrumentation rule specifying a class name descriptor and a direction indicator; and

wherein (C) comprises identifying, within the plurality of classes, the following:

any class C having a name which matches the specified class name descriptor;

any class having an inheritance relationship to class C in the direction indicated by the direction indicator.

13. The method of claim 11 , wherein the at least one instrumentation rule comprises a generic instrumentation rule specifying an interface name descriptor and a direction indicator; and

wherein (C) comprises identifying, within the plurality of classes, the following:

any class C which implements an interface matching the specified interface name descriptor;

any class C having an inheritance relationship to class C in the direction indicated by the direction indicator.

14. A non-transitory computer-readable medium tangibly storing computer program instructions executable by a computer processor to perform a method comprising:

(A) extracting, from original bytecode, class meta-data for a plurality of classes;

(B) generating, based on the extracted meta-data, an inheritance repository representing relationships among the plurality of classes, the relationships including at least one relationship between a first class and a second class, wherein the first class is a direct super class of a third class, and wherein the third class is a direct super class of the second class;

(C) using the inheritance repository to evaluate at least one instrumentation rule on the plurality of classes, thereby identifying a subset of the plurality of classes;

(D) instrumenting original bytecode containing the subset of the plurality of classes to produce instrumented bytecode;

(E) using the inheritance repository to evaluate the at least one instrumentation rule on the plurality of classes of the first application during a second run of the first application;

wherein (A) comprises extracting the class meta-data at load-time and wherein (B) comprises generating the inheritance repository at load-time;

wherein (A) further comprises extracting, from original bytecode of a first application, class meta-data for a plurality of classes of the first application; and

wherein (C) comprises using the inheritance repository to evaluate at least one instrumentation rule on the plurality of classes of the first application during a first run of the first application, thereby identifying a subset of the plurality of classes of the first application.

15. The computer-readable medium of claim 14 , wherein the relationships among the plurality of classes comprise class inheritance relationships.

16. The computer-readable medium of claim 15 , wherein the class meta-data comprises:

meta-data for the third class, specifying that the first class is a direct super class of the third class;

meta-data for the second class, specifying that the third class is a direct super class of the second class; and

wherein (B) comprises generating, within the inheritance repository, a record of an indirect inheritance relationship between the first class and the second class.

17. The computer-readable medium of claim 14 , wherein the relationships among the plurality of classes comprise interface implementation relationships.

18. The computer-readable medium of claim 17 , wherein the class meta-data comprises:

meta-data for the third class, specifying that the third class implements an interface;

meta-data for the second class, specifying that the third class is a direct super class of the second class; and

wherein (B) comprises generating, within the inheritance repository, a record specifying that the second class implements the interface.

19. The computer-readable medium of claim 14 , wherein the class meta-data comprises:

meta-data for the third class, specifying that the third class implements a first interface and that the third class is a direct super class of the second class; and

wherein (B) comprises generating, within the inheritance repository, a record indicating that the second class implements the first interface.

20. The computer-readable medium of claim 14 , wherein the at least one instrumentation rule comprises a concrete instrumentation rule specifying a method name descriptor; and

wherein (C) comprises determining whether the plurality of classes includes a method having a name which matches the specified method name descriptor.

21. The computer-readable medium of claim 14 , wherein the at least one instrumentation rule comprises a concrete instrumentation rule specifying a class name descriptor; and

wherein (C) comprises determining whether the plurality of classes includes a class having a name which matches the specified class name descriptor.

22. The computer-readable medium of claim 14 , wherein the at least one instrumentation rule comprises a generic instrumentation rule specifying a class name descriptor and a direction indicator; and

wherein (C) comprises identifying, within the plurality of classes, the following:

any class C having a name which matches the specified class name descriptor;

any class having an inheritance relationship to class C in the direction indicated by the direction indicator.

23. The computer-readable medium of claim 14 , wherein the at least one instrumentation rule comprises a generic instrumentation rule specifying an interface name descriptor and a direction indicator; and

wherein (C) comprises identifying, within the plurality of classes, the following:

any class C which implements an interface matching the specified interface name descriptor;

any class C having an inheritance relationship to class C in the direction indicated by the direction indicator.

24. The computer-readable medium of claim 14 , wherein the method further comprises:

(F) using the inheritance repository to evaluate at least one instrumentation rule on the plurality of classes at run-time, thereby identifying a subset of the plurality of classes; and

(G) instrumenting original bytecode containing the subset of the plurality of classes at run-time to produce instrumented bytecode.

25. The computer-readable medium of claim 24 , wherein the at least one instrumentation rule comprises a generic instrumentation rule specifying a class name descriptor and a direction indicator; and

wherein (C) comprises identifying, within the plurality of classes, the following:

any class C having a name which matches the specified class name descriptor;

any class having an inheritance relationship to class C in the direction indicated by the direction indicator.

26. The computer-readable medium of claim 24 , wherein the at least one instrumentation rule comprises a generic instrumentation rule specifying an interface name descriptor and a direction indicator; and

wherein (C) comprises identifying, within the plurality of classes, the following:

any class C which implements an interface matching the specified interface name descriptor;

any class C having an inheritance relationship to class C in the direction indicated by the direction indicator.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 16, 2022
From: DYNATRACE SOFTWARE GMBH
To: DYNATRACE LLC
Reel/Frame 062119/0843 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 16, 2010
From: GREIFENEDER, BERND
To: DYNATRACE SOFTWARE GMBH
Reel/Frame 024696/0556 →
Continuity (1)
Related Publication 20080276227A1 · Nov 6, 2008