Skip to end of banner
Go to start of banner

Inner-Thread tracing (synchronous methods)

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

How to trace methods:

 

Method Invocations in JVM(First tracing approach.)

In Java the current executed methods are represented as frames, that are stored on a stack. Each frame contains all information that an invocation tracer might need.
When a method is started, it's frame is put on the stack and when it is done the associated frame is removed from the stack. In this way, the current executed method is always on top of the stack.
Each thread has a private stack containing its frames.

This could be used for tracking the method invocations in Java. But the stacks and it's frames not accessible from Java itself and it would be necessary to use an extension library written in C. This is not acceptable, since it would go against the non-functional requirements and make the tracer platform dependent.

 

Other approaches

Method-id

To make is work with asynchronous methods, each thread gets an unique ID and an continuous number for each method invocation done by this thread. This way each invocation can be associated with its thread.

 

...

Current solution:

Currently the invocation traces is implemented as container, which collects all sensor data starting from an defined start point (execution of a predefined method). This collected data is chronologically ordered, to allow to trace the invocation sequence. But this is not suitable for asynchronous methods.


The invocation data is send to the server in small pieces, on every method entry and exit. This way there is no need to store the data until the method finishes, what reduce the stress on the target application. The network has to handle smaller packs, which is also good for the performance. Also the server has the possibility to process the data earlier and it can be displayed while the method is still executing.

  • No labels