Browse Prior Art Database

Process and Implementation for using byte code insertion to relate application components executing within the context of application threads

IP.com Disclosure Number: IPCOM000130110D
Original Publication Date: 2005-Oct-11
Included in the Prior Art Database: 2005-Oct-11
Document File: 4 page(s) / 34K

Publishing Venue

IBM

Abstract

Transaction Performance Monitoring tools use correlating tokens to track a user transaction. A user transaction may be modeled by a directed graph where nodes in the graph represent a component in an application that was used to process the user transaction. Edges in the graph relate the components according to program execution dependency. For example, if component A uses component B in a user transaction, then a node X for component A would be a parent of a node Y for component B. Transaction performance monitoring may use correlating tokens, such as those defined by the Open Group's industry standard Application Response Measurement (ARM) interface. Those correlating tokens can be used to generate edges. This article describes how to solve the problem of using correlating tokens when the user transaction is being monitored within an application thread when byte code insertion is used to create probes that monitor the user transaction.

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 54% of the total text.

Page 1 of 4

Process and Implementation for using byte code insertion to relate application components executing within the context of application threads

One can use byte code insertion to probe application components, and relate the execution of application components within the context of an application thread. Map each thread to a unique correlating token container. Prior to executing a probed application component, a new correlating token is added to the container and designated the most recent addition. This guarantees that the next probed application component can be mapped to the previous executed application component via the correlating token. After executing the probed application component, the most recent addition to the correlating token container is removed from the container, and second most recent addition to the container becomes the most recent addition. This guarantees that an probed application component is not mapped to another application component that has already completed execution.

Byte code insertion of the probes is achieved with a byte code intertion technology, such as IBM*'s Just In Time Instrumentation (JITI) technology. The code segments below are invoked in the order shown, an depict the use of the Thread Local storage and stack. The enabled method genarates an object that is used by the probes to reference the stack. The pre method retrieves the a wrapper object for the stack, or generates a new one if one does not exist, thus initializing the stack to empty. The createTransaction method pushes a new indirect reference to the correlating token onto the stack. The completeTrasaction method pops the indirect reference to the correlating token of the stack. The component execution occurs between the createTransaction and completeTransaction methods.

1

Page 2 of 4

Monitored Component C2

Remove

Monitored Component C2

Remove

Plugin Pre

Plugin Pre

Component

C1

Component

C1

Plugin Post

Plugin Post

Monitored Component C1

Add

Monitored Component C1

Add

Correlating Tokens

Correlating Tokens

private static ThreadLocal _objThreadData = new ThreadLocal() { synchronized protected Object initialValue() { ret...