In a previous post I talked about Observers, and pretended everyone knew what I was talking about. This post will go into a little more detail about Observers.
The Frysk Monitor, as I mentioned in the previous post, is indented to provide a live modeling of processes on the system. The time lines in the monitor display events, these events are fed into the Monitor by Observers.
Observers are triggered by the Frysk core at interesting points during the execution of a process. The Signal Observer for example, is triggered when the traced process receives a signal. When the Frysk core realizes the process received a signal it stops the process notifies observers, the monitor plots a nice blue tick, then if there are no other requests the signal is delivered and the process is resumed. This way your program continues to run and you can monitor its execution.
When you download Frysk there is a small set of observers provided. These include Syscall Observer, Signal Observer, Clone Observer, and Fork Observer. As the Frysk core gets more robust and complete there is virtually no limit to what observers the Frysk developers and users can create: FunctionFooCalledObserver, LibraryXLoadedObserver, NullPointerExceptionObserver? You get the idea.
The Current UI provides a way to do simple customizations of these Observers, by adding filters, and actions to them. For more complex events it is possible to write these observers in Java, and theoretically any other language that can be interfaced with Java.
Developers already do something similar with print statement debugging. The Frysk Monitor builds on that inspiration: it stream lines the process, eliminates the recursive debugging process (insert printf, compile, rerun), and provides visualization that takes into consideration threads, and multiple processes.
I envision people releasing Observers that are useful to their software. an example for Frysk would be a set of observers which monitor the different state transitions within the process/task state machines in the Frysk core.
For a future post I will create a relevant observer, and blog about the process and the results, and fix the bugs I find in the way.