2 .\" Copyright (c) 2009-10 Aggelos Economopoulos
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .Nd analyze a trace stream
41 utility is used to analyze an event trace stream.
42 It takes a few global options, after which the user should
43 specify a subcommand, followed by the subcommands options.
45 The global options are
46 .Bl -tag -width indent
48 Specifies the file containing the event stream.
55 Lists the individual events, one per line.
56 The timestamps are relative to the previous event.
57 The flags it accepts are:
58 .Bl -tag -width indent-two
60 Limits the displayed events to those matching
65 Prints out statistics about the specified variable.
66 It needs at least two additional parameters.
67 The first one specifies the expected variable type.
68 The second specifies the variable name.
69 Currently, the supported variable types are
73 The first is for 'continuous' values and will be treated as a floating
75 The second is for events that appear in pairs of data constructors with
81 If the variable takes values of
83 type, then there must be two more arguments: one specifying the
85 constructor and another specifying the
88 So in our example those would be BeginEvent and EndEvent, in that order.
89 The command will display appropriate statistics for the chosen value type
90 (if the variable is assigned values of different types, those assignments
92 The user can specify additional flags immediatelly after the expected
93 variable type. Those are:
94 .Bl -tag -width indent-two
96 Generates SVG plots of potentially interesting variable properties.
97 For integer variables, it will plot the value of the variable versus time.
98 For completion variables, it will generate a histogram of the time elapsed
99 between matching Begin and End events.
100 Currently, this will only work if the ploticus program is installed as
101 .Pa /usr/local/bin/ploticus .
102 The svg files will all start with
106 will leave behind the data files used to generate the plots (with the
111 These files can be used to create new plots with a program of the user's
116 Generates an svg file (by default
118 in the current directory, displaying the stream events.
119 The flags it accepts are:
120 .Bl -tag -width indent-two
122 Limits the displayed events to those occurring within the
123 specified time interval.
124 The interval is specified in the form [c|m]<num>:<num>.
127 starts with 'c', <num> is absolute (i.e. not relative to the start of the
128 event stream) clock cycles (integral).
131 starts with 'm', <num> is a floating point number specifying milliseconds
132 since the first event in the stream.
134 Specifies an alternate output file.
136 .\" ==== summary ====
138 Displays summary information about the event stream.
141 Firstly, one can generate an event trace as described in
143 Assume that our trace is in
146 .Bd -literal -offset indent
147 evtranalyze -f trace.evtr summary
150 will display summary information for the number of events encountered
152 .Bd -literal -offset indent
153 evtranalyze -f trace.evtr show
156 will display those events in chronological order, merging event traces
157 from all system cpus.
158 .Bd -literal -offset indent
159 evtranalyze -f trace.evtr stats integer varname
162 will display statistics about the integer variable
165 .Bd -literal -offset indent
166 evtranalyze -f trace.evtr stats completion -p test varname Open Close
169 displays statistics for completion events (matching Open/Close constructors)
172 and in addition generates appropriate plots in files named
179 utility first appeared in
185 utility was implemented by
186 .An Aggelos Economopoulos Aq Mt aggelos@dragonflybsd.org