ThreadMonitor helps developers to fine-tune the behaviour of threaded Java applications running on Jamaica run-time systems. These run-time systems can be either the JamaicaVM or any application that was created using the Jamaica Builder.
The event collection for ThreadMonitor in the Jamaica run-time system is controlled by two system properties:
jamaica.scheduler_events_port
jamaica.scheduler_events_port_blocking
To enable the event collection in the JamaicaVM, a user sets the value of one of these properties to the port number to which the ThreadMonitor GUI will connect later. If the user chooses the blocking property, the VM will stop after the bootstrapping and before the main method is invoked. This enables a developer to investigate the startup behavior of an application.
> jamaicavm -Djamaica.scheduler_events_port=2712 HelloWorld
**** accepting Scheduler Events Recording requests on port #2712
Hello World!
Hello World!
Hello World!
...
|
When event collection is enabled, the requested events are written into a buffer and sent to the ThreadMonitor tool by a high priority periodic thread. The amount of buffering and the time periods can be controlled from the GUI.