Skip to content

Commit abd81a3

Browse files
jeffhostetlergitster
authored andcommitted
trace2:data: add trace2 transport child classification
Add trace2 child classification for transport processes. Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 0671b4d commit abd81a3

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

connect.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,6 +1248,7 @@ struct child_process *git_connect(int fd[2], const char *url,
12481248
conn = NULL;
12491249
} else if (protocol == PROTO_GIT) {
12501250
conn = git_connect_git(fd, hostandport, path, prog, version, flags);
1251+
conn->trace2_child_class = "transport/git";
12511252
} else {
12521253
struct strbuf cmd = STRBUF_INIT;
12531254
const char *const *var;
@@ -1290,9 +1291,11 @@ struct child_process *git_connect(int fd[2], const char *url,
12901291
strbuf_release(&cmd);
12911292
return NULL;
12921293
}
1294+
conn->trace2_child_class = "transport/ssh";
12931295
fill_ssh_args(conn, ssh_host, port, version, flags);
12941296
} else {
12951297
transport_check_allowed("file");
1298+
conn->trace2_child_class = "transport/file";
12961299
if (version > 0) {
12971300
argv_array_pushf(&conn->env_array, GIT_PROTOCOL_ENVIRONMENT "=version=%d",
12981301
version);

transport-helper.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ static struct child_process *get_helper(struct transport *transport)
127127
argv_array_pushf(&helper->env_array, "%s=%s",
128128
GIT_DIR_ENVIRONMENT, get_git_dir());
129129

130+
helper->trace2_child_class = helper->args.argv[0]; /* "remote-<name>" */
131+
130132
code = start_command(helper);
131133
if (code < 0 && errno == ENOENT)
132134
die(_("unable to find remote helper for '%s'"), data->name);

0 commit comments

Comments
 (0)