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>
This commit is contained in:
parent
0671b4d193
commit
abd81a3d79
@ -1248,6 +1248,7 @@ struct child_process *git_connect(int fd[2], const char *url,
|
|||||||
conn = NULL;
|
conn = NULL;
|
||||||
} else if (protocol == PROTO_GIT) {
|
} else if (protocol == PROTO_GIT) {
|
||||||
conn = git_connect_git(fd, hostandport, path, prog, version, flags);
|
conn = git_connect_git(fd, hostandport, path, prog, version, flags);
|
||||||
|
conn->trace2_child_class = "transport/git";
|
||||||
} else {
|
} else {
|
||||||
struct strbuf cmd = STRBUF_INIT;
|
struct strbuf cmd = STRBUF_INIT;
|
||||||
const char *const *var;
|
const char *const *var;
|
||||||
@ -1290,9 +1291,11 @@ struct child_process *git_connect(int fd[2], const char *url,
|
|||||||
strbuf_release(&cmd);
|
strbuf_release(&cmd);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
conn->trace2_child_class = "transport/ssh";
|
||||||
fill_ssh_args(conn, ssh_host, port, version, flags);
|
fill_ssh_args(conn, ssh_host, port, version, flags);
|
||||||
} else {
|
} else {
|
||||||
transport_check_allowed("file");
|
transport_check_allowed("file");
|
||||||
|
conn->trace2_child_class = "transport/file";
|
||||||
if (version > 0) {
|
if (version > 0) {
|
||||||
argv_array_pushf(&conn->env_array, GIT_PROTOCOL_ENVIRONMENT "=version=%d",
|
argv_array_pushf(&conn->env_array, GIT_PROTOCOL_ENVIRONMENT "=version=%d",
|
||||||
version);
|
version);
|
||||||
|
@ -127,6 +127,8 @@ static struct child_process *get_helper(struct transport *transport)
|
|||||||
argv_array_pushf(&helper->env_array, "%s=%s",
|
argv_array_pushf(&helper->env_array, "%s=%s",
|
||||||
GIT_DIR_ENVIRONMENT, get_git_dir());
|
GIT_DIR_ENVIRONMENT, get_git_dir());
|
||||||
|
|
||||||
|
helper->trace2_child_class = helper->args.argv[0]; /* "remote-<name>" */
|
||||||
|
|
||||||
code = start_command(helper);
|
code = start_command(helper);
|
||||||
if (code < 0 && errno == ENOENT)
|
if (code < 0 && errno == ENOENT)
|
||||||
die(_("unable to find remote helper for '%s'"), data->name);
|
die(_("unable to find remote helper for '%s'"), data->name);
|
||||||
|
Loading…
Reference in New Issue
Block a user