Revision 22890ab5 tracetool
b/tracetool | ||
---|---|---|
169 | 169 |
|
170 | 170 |
linetoh_end_simple() |
171 | 171 |
{ |
172 |
return |
|
172 |
cat <<EOF |
|
173 |
#define NR_TRACE_EVENTS $simple_event_num |
|
174 |
extern TraceEvent trace_list[NR_TRACE_EVENTS]; |
|
175 |
EOF |
|
173 | 176 |
} |
174 | 177 |
|
175 | 178 |
linetoc_begin_simple() |
176 | 179 |
{ |
177 |
return |
|
180 |
cat <<EOF |
|
181 |
#include "trace.h" |
|
182 |
|
|
183 |
TraceEvent trace_list[] = { |
|
184 |
EOF |
|
185 |
simple_event_num=0 |
|
186 |
|
|
178 | 187 |
} |
179 | 188 |
|
180 | 189 |
linetoc_simple() |
181 | 190 |
{ |
182 |
return |
|
191 |
local name |
|
192 |
name=$(get_name "$1") |
|
193 |
cat <<EOF |
|
194 |
{.tp_name = "$name", .state=0}, |
|
195 |
EOF |
|
196 |
simple_event_num=$((simple_event_num + 1)) |
|
183 | 197 |
} |
184 | 198 |
|
185 | 199 |
linetoc_end_simple() |
186 | 200 |
{ |
187 |
return |
|
201 |
cat <<EOF |
|
202 |
}; |
|
203 |
EOF |
|
188 | 204 |
} |
189 | 205 |
|
190 | 206 |
# Process stdin by calling begin, line, and end functions for the backend |
Also available in: Unified diff