Next: Interrupting Program Execution Up: The Concert Debugger Users Previous: Getting Started and

Tracing Program Execution

The Concert Debugger provides trace facilities for observing the program execution as it progresses. Tracing can be specified for the entire program, or for selected portions of it. Portions can be selected by indicating that only certain methods on certain classes should traced. Furthermore, tracing differentiates between when a message is sent and when a method starts execution, since these can be distinct events for concurrent programs.

a message send
is when one objects sends another (possibly itself) a message to execute a given method with the supplied arguments. This is the basic mechanism by which object communicate in Concert. One object can always send a message to another object, regardless of locks or synchronization. Local method invocations do not require a message send, and hence some method executions will not have corresponding messages.
method execution
is when the method actually starts running on an object. The method starts in response to a message send, but the actual method execution can be arbitrarily delayed from the message send due to synchronization if the object is executing another method when it receives a message. If the receiving object gets involved in a deadlock, method execution may never occur.

The Concert Debugger provides commands by which message sends, method executions or both can be traced for all invocations in the program or for certain selected methods for specific classes. The following list summarizes the available commands.

trace send all
turns on tracing for message sends for the entire program. All message sends will be traced and printed out.
trace sched all
turns on tracing for method invocations for the entire program. All methods actually executed methods will be traced and printed out.
trace send <class name> <method name>
turns on tracing for messages sends of the given method. All message sends for this method will be traced and printed out.
trace sched <class name> <method name>
turns on tracing for method executions of the given method. All method executions for this method will be traced and printed out.

Also, all of these trace commands have a corresponding untrace command that turns tracing off. Also, It is OK to turn tracing off when it is not on, so you can say untrace both all to turn of all tracing regardless of how it was enabled.

An example trace is shown below. Note that the numbers on the left hand side of the trace are output from the program, rather than part of the trace messages.


(cadb) concert trace sched tiny_buffer get
tracing execution of message get to objects of class tiny_buffer
(cadb) run
Starting program: simple-buffer-example.ca.exec 

scheduled message (4b2410) method tiny_buffer get () on <object: 0,4b2210>
scheduled message (4b2410) method tiny_buffer get () on <object: 0,4b2210>
3scheduled message (4b2410) method tiny_buffer get () on <object: 0,4b2210>
4scheduled message (4b2410) method tiny_buffer get () on <object: 0,4b2210>
7scheduled message (4b2410) method tiny_buffer get () on <object: 0,4b2210>
6scheduled message (4b2410) method tiny_buffer get () on <object: 0,4b2210>
7scheduled message (4b2410) method tiny_buffer get () on <object: 0,4b2210>
8scheduled message (4b2410) method tiny_buffer get () on <object: 0,4b2210>
9scheduled message (4b2410) method tiny_buffer get () on <object: 0,4b2210>
10scheduled message (4b2410) method tiny_buffer get () on <object: 0,4b2210>
11scheduled message (4b2410) method tiny_buffer get () on <object: 0,4b2210>
12scheduled message (4b2410) method tiny_buffer get () on <object: 0,4b2210>
13scheduled message (4b2410) method tiny_buffer get () on <object: 0,4b2210>
14scheduled message (4b2410) method tiny_buffer get () on <object: 0,4b2210>
15scheduled message (4b2410) method tiny_buffer get () on <object: 0,4b2210>
16scheduled message (4b2410) method tiny_buffer get () on <object: 0,4b2210>
17scheduled message (4b2410) method tiny_buffer get () on <object: 0,4b2210>
18scheduled message (4b2410) method tiny_buffer get () on <object: 0,4b2210>
19scheduled message (4b2410) method tiny_buffer get () on <object: 0,4b2210>
20scheduled message (4b2410) method tiny_buffer get () on <object: 0,4b2210>
21scheduled message (4b2410) method tiny_buffer get () on <object: 0,4b2210>
22scheduled message (4b2410) method tiny_buffer get () on <object: 0,4b2210>
23scheduled message (4b2410) method tiny_buffer get () on <object: 0,4b2210>
24scheduled message (4b2410) method tiny_buffer get () on <object: 0,4b2210>
25scheduled message (4b2410) method tiny_buffer get () on <object: 0,4b2210>
26scheduled message (4b2410) method tiny_buffer get () on <object: 0,4b2210>
27scheduled message (4b2410) method tiny_buffer get () on <object: 0,4b2210>
28scheduled message (4b2410) method tiny_buffer get () on <object: 0,4b2210>
29scheduled message (4b2410) method tiny_buffer get () on <object: 0,4b2210>
30scheduled message (4b2410) method tiny_buffer get () on <object: 0,4b2210>
31scheduled message (4b2410) method tiny_buffer get () on <object: 0,4b2210>
32<object: 2,d1e110>
done
program took 0.180000 seconds

-----------------------------------------------------------



Next: Interrupting Program Execution Up: The Concert Debugger Users Previous: Getting Started and


Julian Dolby
Concurrent Systems Architecture Group