...
- Continuous sending of invocation sequence data
- Invocation sequences that span over multiple threads
- Invocation sequences that span over multiple JVMs
- Storage of the invocation sequences in memory and as files (if requested by the user)
- Reduction of method sensor storage (only save method sensors if they are configured)
Overview
Each invocation in Java always occur within one Thread. Within this thread an invocation may use methods of multiple classes. Inner Thread calls are all synchronous (read blocking) calls, thus the sequence is very strictly defined.
...
M5 start | M6 start | M6 end | M5 end |
Method sensor storage
Usually the analysis of a problem is based on invocation sequences. The invocation sequence is a container for method sensors. But the most likely case is that method sensors are mainly integrated in order to see the invocation sequence and not to create a chart that can be presented all the time. To address this, it would be meaningful to:
- Allows measure the concrete time that a method within an invocation took (if there is a timer defined) but
- only add additional graphing data for the timer if this is explicitly requested within the configuration
Braindump
- Each thread has a unique number (per JVM) automatically assigned
- But threads can and - in fact are - reused. For example thread pools do not instantiate new threads, but instead pass different Runnable instances to the existing threads. Each different runnable is itself a different functionality. Thus the thread ID cannot be safely used for identification
- To build up an invocation sequence, each invoked method must know the method that was invoked before it
- Innerthread communication can simply make use of the ThreadLocal pattern and build a stack of the concrete methods being called
- Interthread and inter JVM communication has to connect the stacks of the involved threads. This can be done by an invocation identifier that is passed from the caller to the callee.
- Invocation identifier must also include the method identification that invoked this call
- Continuous sending of information
- Each method needs to have a thread-wide identification (stored within the stack)
- Each invocation of a method must refer to the parent invocation
- CMR server can match its current call tree with the information sent by the agent. Based on the invocation identification it will find the correct sequence. it will use the method identification to complete the tree
...