Commit cff6d93
tracepoint: Reduce duplication of __DO_TRACE_CALL
The logic for invoking __DO_TRACE_CALL was extracted to a static inline
function called __rust_do_trace_##name so that Rust can call it
directly. This logic does not include the static branch, to avoid a
function call when the tracepoint is disabled.
Since the C code needs to perform the same logic after checking the
static key, this logic is currently duplicated. Thus, remove this
duplication by having C call the static inline function too.
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Link: https://lore.kernel.org/20241212131237.1988409-1-aliceryhl@google.com
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>1 parent 9e49ca7 commit cff6d93
1 file changed
Lines changed: 7 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
221 | | - | |
| 221 | + | |
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
| |||
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
271 | | - | |
| 271 | + | |
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
| |||
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
| 280 | + | |
| 281 | + | |
286 | 282 | | |
287 | 283 | | |
288 | 284 | | |
| |||
291 | 287 | | |
292 | 288 | | |
293 | 289 | | |
294 | | - | |
| 290 | + | |
295 | 291 | | |
296 | 292 | | |
297 | 293 | | |
298 | 294 | | |
299 | 295 | | |
300 | 296 | | |
301 | 297 | | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
| 298 | + | |
| 299 | + | |
306 | 300 | | |
307 | 301 | | |
308 | 302 | | |
| |||
0 commit comments