|
@@ -4,65 +4,72 @@ trace \- show (real-time) process behavior
|
|
|
.SH SYNOPSIS
|
|
|
.B trace
|
|
|
[
|
|
|
-.B \-d
|
|
|
-.I profdev
|
|
|
+.B -d
|
|
|
+.I file
|
|
|
]
|
|
|
[
|
|
|
-.B \-v
|
|
|
+.B -v
|
|
|
]
|
|
|
[
|
|
|
-.B \-w
|
|
|
+.B -w
|
|
|
+]
|
|
|
+[
|
|
|
+.I pid
|
|
|
+\&...
|
|
|
]
|
|
|
-[pid ... ]
|
|
|
.SH DESCRIPTION
|
|
|
.I Trace
|
|
|
displays the behavior of processes running on the machine. In its
|
|
|
window it shows a time line for each traced process. Running
|
|
|
-processes are shown as colored blocks. When a process is scheduled as
|
|
|
-a real-time process, black up arrows indicate process releases, black
|
|
|
-down arrows indicate process deadlines, red down arrows indicate the
|
|
|
-process ran over its allotted scheduled time, and green down arrows to
|
|
|
-indicates a process yielded the processor before its deadline.
|
|
|
-Non-real-time processes do not have such release times and deadlines
|
|
|
-and no real-time information is shown for such processes.
|
|
|
-.PP
|
|
|
-Trace reads /proc/trace to retrieve trace events from the kernel
|
|
|
-scheduler. Trace events are binary data structures, which are
|
|
|
-generated by the kernel scheduler whenever a noteworthy event occurs.
|
|
|
-The
|
|
|
-.B \-d
|
|
|
-flag can be used to specify another trace file.
|
|
|
-.PP
|
|
|
-The
|
|
|
-.B \-v
|
|
|
-flag prints out the events as they are received from the event file.
|
|
|
+processes appear as colored blocks, with arrows marking important
|
|
|
+events in real-time processes
|
|
|
+(see
|
|
|
+.IR proc (3)).
|
|
|
+Black up arrows mark process releases,
|
|
|
+black down arrows mark process deadlines,
|
|
|
+green down arrows mark times when a process yielded the processor
|
|
|
+before its deadline,
|
|
|
+red down arrows mark times when the process overran its allotted time.
|
|
|
.PP
|
|
|
-The \-w
|
|
|
-flag makes
|
|
|
-.B trace
|
|
|
-open a new window for its display.
|
|
|
+.I Trace
|
|
|
+reads
|
|
|
+.B /proc/trace
|
|
|
+to retrieve trace events from the kernel
|
|
|
+scheduler. Trace events are binary data structures generated by
|
|
|
+the kernel scheduler.
|
|
|
+It is assumed that the reader of
|
|
|
+.B /proc/trace
|
|
|
+and the kernel providing it have the same byte order.
|
|
|
.PP
|
|
|
-To enable process tracing echo the string "traceon" into
|
|
|
-/proc/<pid>/ctl. To disable tracing of a process echo "traceoff"
|
|
|
-in the control file. Trace enables tracing on all processes as specified
|
|
|
-by their
|
|
|
-.B pids
|
|
|
+The options are:
|
|
|
+.TP
|
|
|
+.B -d
|
|
|
+specify an alternate trace event file
|
|
|
+.TP
|
|
|
+.B -v
|
|
|
+print events as they are read from the trace event file
|
|
|
+.TP
|
|
|
+.B -w
|
|
|
+run in a new window rather than using the current one
|
|
|
+.PD
|
|
|
.PP
|
|
|
-The following one-character commands are recognized by
|
|
|
-.BR trace :
|
|
|
+.I Trace
|
|
|
+recognizes these keystroke commands while it is running:
|
|
|
.TP
|
|
|
.B +
|
|
|
-Zoom in by a factor of two,
|
|
|
+zoom in by a factor of two
|
|
|
.TP
|
|
|
.B -
|
|
|
-Zoom out by a factor of two,
|
|
|
+zoom out by a factor of two
|
|
|
.TP
|
|
|
.B p
|
|
|
-Pause or resume,
|
|
|
+pause or resume
|
|
|
.TP
|
|
|
.B q
|
|
|
-Quit.
|
|
|
-.SH "SEE ALSO
|
|
|
+quit
|
|
|
+.PD
|
|
|
+.PP
|
|
|
+.SH SEE ALSO
|
|
|
.IR proc (3)
|
|
|
.SH FILES
|
|
|
.TF /sys/include/trace.h
|
|
@@ -72,6 +79,6 @@ trace event file
|
|
|
.TP
|
|
|
.B /sys/include/trace.h
|
|
|
trace event data structures
|
|
|
-.TD
|
|
|
+.PD
|
|
|
.SH SOURCE
|
|
|
.B /sys/src/cmd/trace
|