diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-05-27 13:59:10 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-05-27 13:59:11 -0700 |
| commit | f9cdaa2860e20f3f36595646b7a82082aa772df8 (patch) | |
| tree | 40513df8eb4aec40cc4ec28e0ba4855d532be476 /trace2/tr2_tmr.c | |
| parent | Merge branch 'sj/use-mmap-to-check-packed-refs' (diff) | |
| parent | sequencer: stop pretending that an assignment is a condition (diff) | |
| download | git-f9cdaa2860e20f3f36595646b7a82082aa772df8.tar.gz git-f9cdaa2860e20f3f36595646b7a82082aa772df8.zip | |
Merge branch 'js/misc-fixes'
Assorted fixes for issues found with CodeQL.
* js/misc-fixes:
sequencer: stop pretending that an assignment is a condition
bundle-uri: avoid using undefined output of `sscanf()`
commit-graph: avoid using stale stack addresses
trace2: avoid "futile conditional"
Avoid redundant conditions
fetch: avoid unnecessary work when there is no current branch
has_dir_name(): make code more obvious
upload-pack: rename `enum` to reflect the operation
commit-graph: avoid malloc'ing a local variable
fetch: carefully clear local variable's address after use
commit: simplify code
Diffstat (limited to 'trace2/tr2_tmr.c')
| -rw-r--r-- | trace2/tr2_tmr.c | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/trace2/tr2_tmr.c b/trace2/tr2_tmr.c index 51f564b07a..038181ad9b 100644 --- a/trace2/tr2_tmr.c +++ b/trace2/tr2_tmr.c @@ -102,25 +102,11 @@ void tr2_update_final_timers(void) struct tr2_timer *t_final = &final_timer_block.timer[tid]; struct tr2_timer *t = &ctx->timer_block.timer[tid]; - if (t->recursion_count) { - /* - * The current thread is exiting with - * timer[tid] still running. - * - * Technically, this is a bug, but I'm going - * to ignore it. - * - * I don't think it is worth calling die() - * for. I don't think it is worth killing the - * process for this bookkeeping error. We - * might want to call warning(), but I'm going - * to wait on that. - * - * The downside here is that total_ns won't - * include the current open interval (now - - * start_ns). I can live with that. - */ - } + /* + * `t->recursion_count` could technically be non-zero, which + * would constitute a bug. Reporting the bug would potentially + * cause an infinite recursion, though, so let's ignore it. + */ if (!t->interval_count) continue; /* this timer was not used by this thread */ |
