From: Junio C Hamano <gitster@pobox.com>
To: Sam Delmerico <delmerico@google.com>
Cc: git@vger.kernel.org, steadmon@google.com
Subject: Re: [PATCH] push: region_leave trace for negotiate_using_fetch
Date: Wed, 03 Jan 2024 15:37:50 -0800 [thread overview]
Message-ID: <xmqqbka27zu9.fsf@gitster.g> (raw)
In-Reply-To: <20240103224054.1940209-1-delmerico@google.com> (Sam Delmerico's message of "Wed, 3 Jan 2024 14:40:54 -0800")
Sam Delmerico <delmerico@google.com> writes:
> There were two region_enter events for negotiate_using_fetch instead of
> one enter and one leave. This commit replaces the second region_enter
> event with a region_leave.
>
> Signed-off-by: Sam Delmerico <delmerico@google.com>
> ---
> fetch-pack.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Looks right, after skimming a29263cf (fetch-pack: add tracing for
negotiation rounds, 2022-08-02). Two questions and a half.
* How did you find it? Code inspection? While writing a script to
parse the output from around this area, your script noticed the
ever-increasing nesting level? Something else?
* Would it be feasible to write some tests or tools that find
similar problems (semi-)automatically?
* Is the breakage (before this patch) something easily demonstrated
in a new test in t/ somewhere? And if so, would it be worth
doing?
Thanks. Will queue.
>
> diff --git a/fetch-pack.c b/fetch-pack.c
> index 31a72d43de..dba6d79944 100644
> --- a/fetch-pack.c
> +++ b/fetch-pack.c
> @@ -2218,7 +2218,7 @@ void negotiate_using_fetch(const struct oid_array *negotiation_tips,
> the_repository, "%d",
> negotiation_round);
> }
> - trace2_region_enter("fetch-pack", "negotiate_using_fetch", the_repository);
> + trace2_region_leave("fetch-pack", "negotiate_using_fetch", the_repository);
> trace2_data_intmax("negotiate_using_fetch", the_repository,
> "total_rounds", negotiation_round);
> clear_common_flag(acked_commits);
>
> base-commit: a26002b62827b89a19b1084bd75d9371d565d03c
next prev parent reply other threads:[~2024-01-03 23:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-03 22:40 [PATCH] push: region_leave trace for negotiate_using_fetch Sam Delmerico
2024-01-03 23:37 ` Junio C Hamano [this message]
2024-01-05 1:12 ` Sam Delmerico
2024-01-05 16:18 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqbka27zu9.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=delmerico@google.com \
--cc=git@vger.kernel.org \
--cc=steadmon@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.