git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Elijah Newren <newren@gmail.com>,
	Johannes Schindelin <johannes.schindelin@gmx.de>,
	Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: [PATCH v2 2/2] merge-ort: do leave Trace2 region even if checkout fails
Date: Fri, 29 Jul 2022 17:12:07 +0000	[thread overview]
Message-ID: <d2e1af0f922ea5316074dd0867c66650161b0ab5.1659114727.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.1307.v2.git.1659114727.gitgitgadget@gmail.com>

From: Johannes Schindelin <johannes.schindelin@gmx.de>

In 557ac0350d9 (merge-ort: begin performance work; instrument with
trace2_region_* calls, 2021-01-23), we added Trace2 instrumentation, but
in the error path that returns early, we forgot to tell Trace2 that
we're leaving the region. Let's fix that.

Pointed-out-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 merge-ort.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/merge-ort.c b/merge-ort.c
index e820e45a8e8..eb0296902ad 100644
--- a/merge-ort.c
+++ b/merge-ort.c
@@ -3158,6 +3158,7 @@ void merge_switch_to_result(struct merge_options *opt,
 			/* failure to function */
 			result->clean = -1;
 			merge_finalize(opt, result);
+			trace2_region_leave("merge", "checkout", opt->repo);
 			return;
 		}
 		trace2_region_leave("merge", "checkout", opt->repo);
@@ -3169,6 +3170,8 @@ void merge_switch_to_result(struct merge_options *opt,
 			/* failure to function */
 			result->clean = -1;
 			merge_finalize(opt, result);
+			trace2_region_leave("merge", "record_conflicted",
+					    opt->repo);
 			return;
 		}
 		trace2_region_leave("merge", "record_conflicted", opt->repo);
-- 
gitgitgadget

  parent reply	other threads:[~2022-07-29 17:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-29  8:52 [PATCH] merge-ort: clean up after failed merge Johannes Schindelin via GitGitGadget
2022-07-29 15:31 ` Elijah Newren
2022-07-29 17:12 ` [PATCH v2 0/2] " Johannes Schindelin via GitGitGadget
2022-07-29 17:12   ` [PATCH v2 1/2] " Johannes Schindelin via GitGitGadget
2022-07-29 17:12   ` Johannes Schindelin via GitGitGadget [this message]
2022-07-30  0:50   ` [PATCH v2 0/2] " Elijah Newren
2022-07-31 18:44     ` 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=d2e1af0f922ea5316074dd0867c66650161b0ab5.1659114727.git.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=johannes.schindelin@gmx.de \
    --cc=newren@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).