trace2: mark unused us_elapsed_absolute parameters
Many trace2 targets ignore the absolute elapsed time parameters. However, the virtual interface needs to retain the parameter since it is used by others (e.g., the perf target). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King committed
Aug 29, 2023 at 19:45 UTC
e46a25b05dc5d6e2e3d75c448db02f0408ad2bad
2 files changed
+25
-18
trace2/tr2_tgt_event.c
+13
-10
@@ -335,7 +335,7 @@ static void fn_alias_fl(const char *file, int line, const char *alias,
335
}
336
337
static void fn_child_start_fl(const char *file, int line,
338
- uint64_t us_elapsed_absolute,
338
+ uint64_t us_elapsed_absolute UNUSED,
339
const struct child_process *cmd)
340
{
341
const char *event_name = "child_start";
@@ -367,7 +367,8 @@ static void fn_child_start_fl(const char *file, int line,
367
}
368
369
static void fn_child_exit_fl(const char *file, int line,
370
- uint64_t us_elapsed_absolute, int cid, int pid,
370
+ uint64_t us_elapsed_absolute UNUSED,
371
+ int cid, int pid,
372
int code, uint64_t us_elapsed_child)
373
{
374
const char *event_name = "child_exit";
@@ -388,7 +389,8 @@ static void fn_child_exit_fl(const char *file, int line,
389
}
390
391
static void fn_child_ready_fl(const char *file, int line,
391
- uint64_t us_elapsed_absolute, int cid, int pid,
392
+ uint64_t us_elapsed_absolute UNUSED,
393
+ int cid, int pid,
394
const char *ready, uint64_t us_elapsed_child)
395
{
396
const char *event_name = "child_ready";
@@ -409,7 +411,7 @@ static void fn_child_ready_fl(const char *file, int line,
411
}
412
413
static void fn_thread_start_fl(const char *file, int line,
412
- uint64_t us_elapsed_absolute)
414
+ uint64_t us_elapsed_absolute UNUSED)
415
{
416
const char *event_name = "thread_start";
417
struct json_writer jw = JSON_WRITER_INIT;
@@ -423,7 +425,7 @@ static void fn_thread_start_fl(const char *file, int line,
425
}
426
427
static void fn_thread_exit_fl(const char *file, int line,
426
- uint64_t us_elapsed_absolute,
428
+ uint64_t us_elapsed_absolute UNUSED,
429
uint64_t us_elapsed_thread)
430
{
431
const char *event_name = "thread_exit";
@@ -439,7 +441,8 @@ static void fn_thread_exit_fl(const char *file, int line,
441
jw_release(&jw);
442
}
443
442
-static void fn_exec_fl(const char *file, int line, uint64_t us_elapsed_absolute,
444
+static void fn_exec_fl(const char *file, int line,
445
+ uint64_t us_elapsed_absolute UNUSED,
446
int exec_id, const char *exe, const char **argv)
447
{
448
const char *event_name = "exec";
@@ -460,8 +463,8 @@ static void fn_exec_fl(const char *file, int line, uint64_t us_elapsed_absolute,
463
}
464
465
static void fn_exec_result_fl(const char *file, int line,
463
- uint64_t us_elapsed_absolute, int exec_id,
464
- int code)
466
+ uint64_t us_elapsed_absolute UNUSED,
467
+ int exec_id, int code)
468
{
469
const char *event_name = "exec_result";
470
struct json_writer jw = JSON_WRITER_INIT;
@@ -511,7 +514,7 @@ static void fn_repo_fl(const char *file, int line,
514
}
515
516
static void fn_region_enter_printf_va_fl(const char *file, int line,
514
- uint64_t us_elapsed_absolute,
517
+ uint64_t us_elapsed_absolute UNUSED,
518
const char *category,
519
const char *label,
520
const struct repository *repo,
@@ -538,7 +541,7 @@ static void fn_region_enter_printf_va_fl(const char *file, int line,
541
}
542
543
static void fn_region_leave_printf_va_fl(
541
- const char *file, int line, uint64_t us_elapsed_absolute,
544
+ const char *file, int line, uint64_t us_elapsed_absolute UNUSED,
545
uint64_t us_elapsed_region, const char *category, const char *label,
546
const struct repository *repo, const char *fmt, va_list ap)
547
{
trace2/tr2_tgt_normal.c
+12
-8
@@ -86,7 +86,7 @@ static void fn_version_fl(const char *file, int line)
86
}
87
88
static void fn_start_fl(const char *file, int line,
89
- uint64_t us_elapsed_absolute, const char **argv)
89
+ uint64_t us_elapsed_absolute UNUSED, const char **argv)
90
{
91
struct strbuf buf_payload = STRBUF_INIT;
92
@@ -215,7 +215,7 @@ static void fn_alias_fl(const char *file, int line, const char *alias,
215
}
216
217
static void fn_child_start_fl(const char *file, int line,
218
- uint64_t us_elapsed_absolute,
218
+ uint64_t us_elapsed_absolute UNUSED,
219
const struct child_process *cmd)
220
{
221
struct strbuf buf_payload = STRBUF_INIT;
@@ -243,7 +243,8 @@ static void fn_child_start_fl(const char *file, int line,
243
}
244
245
static void fn_child_exit_fl(const char *file, int line,
246
- uint64_t us_elapsed_absolute, int cid, int pid,
246
+ uint64_t us_elapsed_absolute UNUSED,
247
+ int cid, int pid,
248
int code, uint64_t us_elapsed_child)
249
{
250
struct strbuf buf_payload = STRBUF_INIT;
@@ -256,7 +257,8 @@ static void fn_child_exit_fl(const char *file, int line,
257
}
258
259
static void fn_child_ready_fl(const char *file, int line,
259
- uint64_t us_elapsed_absolute, int cid, int pid,
260
+ uint64_t us_elapsed_absolute UNUSED,
261
+ int cid, int pid,
262
const char *ready, uint64_t us_elapsed_child)
263
{
264
struct strbuf buf_payload = STRBUF_INIT;
@@ -268,7 +270,8 @@ static void fn_child_ready_fl(const char *file, int line,
270
strbuf_release(&buf_payload);
271
}
272
271
-static void fn_exec_fl(const char *file, int line, uint64_t us_elapsed_absolute,
273
+static void fn_exec_fl(const char *file, int line,
274
+ uint64_t us_elapsed_absolute UNUSED,
275
int exec_id, const char *exe, const char **argv)
276
{
277
struct strbuf buf_payload = STRBUF_INIT;
@@ -284,8 +287,8 @@ static void fn_exec_fl(const char *file, int line, uint64_t us_elapsed_absolute,
287
}
288
289
static void fn_exec_result_fl(const char *file, int line,
287
- uint64_t us_elapsed_absolute, int exec_id,
288
- int code)
290
+ uint64_t us_elapsed_absolute UNUSED,
291
+ int exec_id, int code)
292
{
293
struct strbuf buf_payload = STRBUF_INIT;
294
@@ -321,7 +324,8 @@ static void fn_repo_fl(const char *file, int line,
324
}
325
326
static void fn_printf_va_fl(const char *file, int line,
324
- uint64_t us_elapsed_absolute, const char *fmt,
327
+ uint64_t us_elapsed_absolute UNUSED,
328
+ const char *fmt,
329
va_list ap)
330
{
331
struct strbuf buf_payload = STRBUF_INIT;