The Jitan Environment
|
In this example, we can see that the identifiers of the objects are in blue. A programmer
can know at first sight if the considered object is a thread or not thanks to the thread
status which appears in green (e. g. the threads #0 and #2). This window presents the activity
of the threads through a continuation and an execution environment, the fields of
each object: for example "contents" and "available" which have both the value 0 for the
object #1.
On this window we can also visualize classes which have static variables: here the Consumer class.
We can also zoom on an object
with the middle button of the mouse in order to examine the field values.
Of course it is possible to visualize more complex topologies such as on the following picture.
On this figure you can detect a cycle between the objects #8, #16 and #17, and several DAGs.
Here is the caption window which presents all color and graphic codes used in our environment.
These codes are detailed in the Example.
We can visualize directly that thread #4 is "runnable", thread #5 is "blocked", thread #2 is
"dormant", thread #0 is "dead", object #3 is "unlocked", and object #1 is "locked".
On top of the window, the programmer can visualize on which object each thread is currently
working and through which objects it has got this reference (and the chain of dynamic calls).
For example we can see that thread #2 is executing a method on object 3 and within this method, the thread
executes another method call on object #4 then on object #1 and on the object #3 again. This
represents an indirect method call.
A crucial problem when writing concurrent applications is to know where synchronizations have
to be placed. It is therefore very useful to figure out concurrent accesses to objects. For
each object of the system, including threads, our environment gives all the threads that are currently
accessing it. The lower part of the above window exhibits that the object #3 is currently
accessed by the threads #6, #5, and #2.