git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v7 08/15] trace2:data: add trace2 hook classification

From
JGJeff Hostetler via GitGitGadget <gitgitgadget@gmail.com>
Date
Feb 22, 2019, 22:25 UTC
Message-ID
<18659d61da6aaa0df834f0547b6363c98c0a58b8.1550874298.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.108.v7.git.gitgitgadget@gmail.com>
From: Jeff Hostetler <jeffhost@microsoft.com>
Classify certain child processes as hooks.
Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
---
 builtin/am.c           | 1 +
 builtin/receive-pack.c | 4 ++++
 builtin/worktree.c     | 1 +
 sequencer.c            | 2 ++
 transport.c            | 1 +
 5 files changed, 9 insertions(+)
diff --git a/builtin/am.c b/builtin/am.c
index 95370313b6..a81e61c1bc 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -468,6 +468,7 @@ static int run_post_rewrite_hook(const struct am_state *state)
 
 	cp.in = xopen(am_path(state, "rewritten"), O_RDONLY);
 	cp.stdout_to_stderr = 1;
+	cp.trace2_hook_name = "post-rewrite";
 
 	ret = run_command(&cp);
 
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index 33187bd8e9..6eef8575b9 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -694,6 +694,8 @@ static int run_and_feed_hook(const char *hook_name, feed_fn feed,
 	proc.argv = argv;
 	proc.in = -1;
 	proc.stdout_to_stderr = 1;
+	proc.trace2_hook_name = hook_name;
+
 	if (feed_state->push_options) {
 		int i;
 		for (i = 0; i < feed_state->push_options->nr; i++)
@@ -807,6 +809,7 @@ static int run_update_hook(struct command *cmd)
 	proc.stdout_to_stderr = 1;
 	proc.err = use_sideband ? -1 : 0;
 	proc.argv = argv;
+	proc.trace2_hook_name = "update";
 
 	code = start_command(&proc);
 	if (code)
@@ -1190,6 +1193,7 @@ static void run_update_post_hook(struct command *commands)
 	proc.no_stdin = 1;
 	proc.stdout_to_stderr = 1;
 	proc.err = use_sideband ? -1 : 0;
+	proc.trace2_hook_name = "post-update";
 
 	if (!start_command(&proc)) {
 		if (use_sideband)
diff --git a/builtin/worktree.c b/builtin/worktree.c
index 3f9907fcc9..6cc094a453 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree.c
@@ -402,6 +402,7 @@ static int add_worktree(const char *path, const char *refname,
 			cp.dir = path;
 			cp.env = env;
 			cp.argv = NULL;
+			cp.trace2_hook_name = "post-checkout";
 			argv_array_pushl(&cp.args, absolute_path(hook),
 					 oid_to_hex(&null_oid),
 					 oid_to_hex(&commit->object.oid),
diff --git a/sequencer.c b/sequencer.c
index 213815dbfc..c1e36196a1 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -1103,6 +1103,7 @@ static int run_rewrite_hook(const struct object_id *oldoid,
 	proc.argv = argv;
 	proc.in = -1;
 	proc.stdout_to_stderr = 1;
+	proc.trace2_hook_name = "post-rewrite";
 
 	code = start_command(&proc);
 	if (code)
@@ -3784,6 +3785,7 @@ static int pick_commits(struct repository *r,
 				hook.in = open(rebase_path_rewritten_list(),
 					O_RDONLY);
 				hook.stdout_to_stderr = 1;
+				hook.trace2_hook_name = "post-rewrite";
 				argv_array_push(&hook.args, post_rewrite_hook);
 				argv_array_push(&hook.args, "rebase");
 				/* we don't care if this hook failed */
diff --git a/transport.c b/transport.c
index 99678153c1..ed5a733c4a 100644
--- a/transport.c
+++ b/transport.c
@@ -1061,6 +1061,7 @@ static int run_pre_push_hook(struct transport *transport,
 
 	proc.argv = argv;
 	proc.in = -1;
+	proc.trace2_hook_name = "pre-push";
 
 	if (start_command(&proc)) {
 		finish_command(&proc);
-- 
gitgitgadget
Previous: Jeff Hostetler via GitGitGadgetNext: Jeff Hostetler via GitGitGadget
Message 132 of 154 in “Trace2 tracing facility”
  1. 00/14 Trace2 tracing facilityJeff Hostetler via GitGitGadget, Jan 22, 2019
  2. 04/14 trace2:data: add trace2 regions to wt-statusJeff Hostetler via GitGitGadget, Jan 22, 2019
  3. 03/14 trace2: collect platform-specific process informationJeff Hostetler via GitGitGadget, Jan 22, 2019
  4. 07/14 trace2:data: add trace2 transport child classificationJeff Hostetler via GitGitGadget, Jan 22, 2019
  5. 05/14 trace2:data: add editor/pager child classificationJeff Hostetler via GitGitGadget, Jan 22, 2019
  6. 08/14 trace2:data: add trace2 hook classificationJeff Hostetler via GitGitGadget, Jan 22, 2019
  7. 02/14 trace2: create new combined trace facilityJeff Hostetler via GitGitGadget, Jan 22, 2019
  8. SZEDER GáborJan 25, 2019
  9. Junio C HamanoJan 25, 2019
  10. 11/14 trace2:data: add subverb to checkout commandJeff Hostetler via GitGitGadget, Jan 22, 2019
  11. 12/14 trace2:data: add subverb to reset commandJeff Hostetler via GitGitGadget, Jan 22, 2019
  12. 14/14 trace2: t/helper/test-trace2, t0210.sh, t0211.sh, t0212.shJeff Hostetler via GitGitGadget, Jan 22, 2019
  13. 10/14 pack-objects: add trace2 regionsDerrick Stolee via GitGitGadget, Jan 22, 2019
  14. Derrick StoleeJan 23, 2019
  15. 09/14 trace2:data: add trace2 instrumentation to index read/writeJeff Hostetler via GitGitGadget, Jan 22, 2019
  16. 13/14 trace2:data: add subverb for rebaseJeff Hostetler via GitGitGadget, Jan 22, 2019
  17. 06/14 trace2:data: add trace2 sub-process classificationJeff Hostetler via GitGitGadget, Jan 22, 2019
  18. 01/14 trace2: Documentation/technical/api-trace2.txtJeff Hostetler via GitGitGadget, Jan 22, 2019
  19. Junio C HamanoJan 23, 2019
  20. Jeff HostetlerJan 25, 2019
  21. SZEDER GáborJan 25, 2019
  22. Josh SteadmonJan 25, 2019
  23. Junio C HamanoJan 22, 2019
  24. Josh SteadmonJan 25, 2019
  25. Jeff HostetlerJan 30, 2019
  26. Jeff HostetlerJan 28, 2019
  27. Junio C HamanoJan 28, 2019
  28. 00/14 Trace2 tracing facilityJeff Hostetler via GitGitGadget, Jan 28, 2019
  29. 03/14 trace2: collect platform-specific process informationJeff Hostetler via GitGitGadget, Jan 28, 2019
  30. 01/14 trace2: Documentation/technical/api-trace2.txtJeff Hostetler via GitGitGadget, Jan 28, 2019
  31. 05/14 trace2:data: add editor/pager child classificationJeff Hostetler via GitGitGadget, Jan 28, 2019
  32. 07/14 trace2:data: add trace2 transport child classificationJeff Hostetler via GitGitGadget, Jan 28, 2019
  33. 08/14 trace2:data: add trace2 hook classificationJeff Hostetler via GitGitGadget, Jan 28, 2019
  34. 09/14 trace2:data: add trace2 instrumentation to index read/writeJeff Hostetler via GitGitGadget, Jan 28, 2019
  35. 12/14 trace2:data: add subverb to reset commandJeff Hostetler via GitGitGadget, Jan 28, 2019
  36. 11/14 trace2:data: add subverb to checkout commandJeff Hostetler via GitGitGadget, Jan 28, 2019
  37. 13/14 trace2:data: add subverb for rebaseJeff Hostetler via GitGitGadget, Jan 28, 2019
  38. 14/14 trace2: t/helper/test-trace2, t0210.sh, t0211.sh, t0212.shJeff Hostetler via GitGitGadget, Jan 28, 2019
  39. Junio C HamanoJan 28, 2019
  40. Jeff HostetlerJan 29, 2019
  41. 10/14 pack-objects: add trace2 regionsDerrick Stolee via GitGitGadget, Jan 28, 2019
  42. 02/14 trace2: create new combined trace facilityJeff Hostetler via GitGitGadget, Jan 28, 2019
  43. 06/14 trace2:data: add trace2 sub-process classificationJeff Hostetler via GitGitGadget, Jan 28, 2019
  44. 04/14 trace2:data: add trace2 regions to wt-statusJeff Hostetler via GitGitGadget, Jan 28, 2019
  45. 00/14 Trace2 tracing facilityJeff Hostetler via GitGitGadget, Jan 30, 2019
  46. 03/14 trace2: collect platform-specific process informationJeff Hostetler via GitGitGadget, Jan 30, 2019
  47. 04/14 trace2:data: add trace2 regions to wt-statusJeff Hostetler via GitGitGadget, Jan 30, 2019
  48. 01/14 trace2: Documentation/technical/api-trace2.txtJeff Hostetler via GitGitGadget, Jan 30, 2019
  49. 06/14 trace2:data: add trace2 sub-process classificationJeff Hostetler via GitGitGadget, Jan 30, 2019
  50. 08/14 trace2:data: add trace2 hook classificationJeff Hostetler via GitGitGadget, Jan 30, 2019
  51. 10/14 pack-objects: add trace2 regionsDerrick Stolee via GitGitGadget, Jan 30, 2019
  52. 09/14 trace2:data: add trace2 instrumentation to index read/writeJeff Hostetler via GitGitGadget, Jan 30, 2019
  53. 05/14 trace2:data: add editor/pager child classificationJeff Hostetler via GitGitGadget, Jan 30, 2019
  54. 11/14 trace2:data: add subverb to checkout commandJeff Hostetler via GitGitGadget, Jan 30, 2019
  55. 12/14 trace2:data: add subverb to reset commandJeff Hostetler via GitGitGadget, Jan 30, 2019
  56. 14/14 trace2: t/helper/test-trace2, t0210.sh, t0211.sh, t0212.shJeff Hostetler via GitGitGadget, Jan 30, 2019
  57. 02/14 trace2: create new combined trace facilityJeff Hostetler via GitGitGadget, Jan 30, 2019
  58. 13/14 trace2:data: add subverb for rebaseJeff Hostetler via GitGitGadget, Jan 30, 2019
  59. 07/14 trace2:data: add trace2 transport child classificationJeff Hostetler via GitGitGadget, Jan 30, 2019
  60. 00/14 Trace2 tracing facilityJeff Hostetler via GitGitGadget, Jan 30, 2019
  61. 13/14 trace2:data: add subverb for rebaseJeff Hostetler via GitGitGadget, Jan 30, 2019
  62. 14/14 trace2: t/helper/test-trace2, t0210.sh, t0211.sh, t0212.shJeff Hostetler via GitGitGadget, Jan 30, 2019
  63. SZEDER GáborJan 31, 2019
  64. Junio C HamanoJan 31, 2019
  65. Jeff HostetlerFeb 1, 2019
  66. 12/14 trace2:data: add subverb to reset commandJeff Hostetler via GitGitGadget, Jan 30, 2019
  67. 11/14 trace2:data: add subverb to checkout commandJeff Hostetler via GitGitGadget, Jan 30, 2019
  68. 02/14 trace2: create new combined trace facilityJeff Hostetler via GitGitGadget, Jan 30, 2019
  69. 09/14 trace2:data: add trace2 instrumentation to index read/writeJeff Hostetler via GitGitGadget, Jan 30, 2019
  70. 10/14 pack-objects: add trace2 regionsDerrick Stolee via GitGitGadget, Jan 30, 2019
  71. 07/14 trace2:data: add trace2 transport child classificationJeff Hostetler via GitGitGadget, Jan 30, 2019
  72. 08/14 trace2:data: add trace2 hook classificationJeff Hostetler via GitGitGadget, Jan 30, 2019
  73. 06/14 trace2:data: add trace2 sub-process classificationJeff Hostetler via GitGitGadget, Jan 30, 2019
  74. 05/14 trace2:data: add editor/pager child classificationJeff Hostetler via GitGitGadget, Jan 30, 2019
  75. 04/14 trace2:data: add trace2 regions to wt-statusJeff Hostetler via GitGitGadget, Jan 30, 2019
  76. 03/14 trace2: collect platform-specific process informationJeff Hostetler via GitGitGadget, Jan 30, 2019
  77. SZEDER GáborJan 31, 2019
  78. Jeff HostetlerFeb 1, 2019
  79. 01/14 trace2: Documentation/technical/api-trace2.txtJeff Hostetler via GitGitGadget, Jan 30, 2019
  80. SZEDER GáborJan 31, 2019
  81. Jeff HostetlerJan 31, 2019
  82. Junio C HamanoJan 31, 2019
  83. Junio C HamanoJan 31, 2019
  84. 00/15 Trace2 tracing facilityJeff Hostetler via GitGitGadget, Feb 1, 2019
  85. 03/15 trace2: collect Windows-specific process informationJeff Hostetler via GitGitGadget, Feb 1, 2019
  86. 04/15 trace2:data: add trace2 regions to wt-statusJeff Hostetler via GitGitGadget, Feb 1, 2019
  87. 01/15 trace2: Documentation/technical/api-trace2.txtJeff Hostetler via GitGitGadget, Feb 1, 2019
  88. 06/15 trace2:data: add trace2 sub-process classificationJeff Hostetler via GitGitGadget, Feb 1, 2019
  89. 08/15 trace2:data: add trace2 hook classificationJeff Hostetler via GitGitGadget, Feb 1, 2019
  90. 09/15 trace2:data: add trace2 instrumentation to index read/writeJeff Hostetler via GitGitGadget, Feb 1, 2019
  91. 11/15 trace2:data: add subverb to checkout commandJeff Hostetler via GitGitGadget, Feb 1, 2019
  92. 02/15 trace2: create new combined trace facilityJeff Hostetler via GitGitGadget, Feb 1, 2019
  93. 15/15 trace2: add for_each macros to clang-formatJeff Hostetler via GitGitGadget, Feb 1, 2019
  94. 14/15 trace2: t/helper/test-trace2, t0210.sh, t0211.sh, t0212.shJeff Hostetler via GitGitGadget, Feb 1, 2019
  95. Ævar Arnfjörð BjarmasonFeb 13, 2019
  96. 13/15 trace2:data: add subverb for rebaseJeff Hostetler via GitGitGadget, Feb 1, 2019
  97. 10/15 trace2:data: pack-objects: add trace2 regionsDerrick Stolee via GitGitGadget, Feb 1, 2019
  98. 12/15 trace2:data: add subverb to reset commandJeff Hostetler via GitGitGadget, Feb 1, 2019
  99. 07/15 trace2:data: add trace2 transport child classificationJeff Hostetler via GitGitGadget, Feb 1, 2019
  100. 05/15 trace2:data: add editor/pager child classificationJeff Hostetler via GitGitGadget, Feb 1, 2019
  101. 00/15 Trace2 tracing facilityJeff Hostetler via GitGitGadget, Feb 6, 2019
  102. 04/15 trace2:data: add trace2 regions to wt-statusJeff Hostetler via GitGitGadget, Feb 6, 2019
  103. 01/15 trace2: Documentation/technical/api-trace2.txtJeff Hostetler via GitGitGadget, Feb 6, 2019
  104. 07/15 trace2:data: add trace2 transport child classificationJeff Hostetler via GitGitGadget, Feb 6, 2019
  105. 06/15 trace2:data: add trace2 sub-process classificationJeff Hostetler via GitGitGadget, Feb 6, 2019
  106. 08/15 trace2:data: add trace2 hook classificationJeff Hostetler via GitGitGadget, Feb 6, 2019
  107. 11/15 trace2:data: add subverb to checkout commandJeff Hostetler via GitGitGadget, Feb 6, 2019
  108. 12/15 trace2:data: add subverb to reset commandJeff Hostetler via GitGitGadget, Feb 6, 2019
  109. 15/15 trace2: add for_each macros to clang-formatJeff Hostetler via GitGitGadget, Feb 6, 2019
  110. 02/15 trace2: create new combined trace facilityJeff Hostetler via GitGitGadget, Feb 6, 2019
  111. Ævar Arnfjörð BjarmasonFeb 15, 2019
  112. Jeff HostetlerFeb 15, 2019
  113. 14/15 trace2: t/helper/test-trace2, t0210.sh, t0211.sh, t0212.shJeff Hostetler via GitGitGadget, Feb 6, 2019
  114. 09/15 trace2:data: add trace2 instrumentation to index read/writeJeff Hostetler via GitGitGadget, Feb 6, 2019
  115. 13/15 trace2:data: add subverb for rebaseJeff Hostetler via GitGitGadget, Feb 6, 2019
  116. 05/15 trace2:data: add editor/pager child classificationJeff Hostetler via GitGitGadget, Feb 6, 2019
  117. 10/15 trace2:data: pack-objects: add trace2 regionsDerrick Stolee via GitGitGadget, Feb 6, 2019
  118. 03/15 trace2: collect Windows-specific process informationJeff Hostetler via GitGitGadget, Feb 6, 2019
  119. Ævar Arnfjörð BjarmasonFeb 14, 2019
  120. Jeff HostetlerFeb 15, 2019
  121. Ævar Arnfjörð BjarmasonMar 17, 2019
  122. Johannes SchindelinMar 21, 2019
  123. Ævar Arnfjörð BjarmasonMar 21, 2019
  124. Johannes SchindelinMar 22, 2019
  125. Jeff HostetlerMar 22, 2019
  126. Ævar Arnfjörð BjarmasonMar 22, 2019
  127. Jeff HostetlerMar 22, 2019
  128. 00/15 Trace2 tracing facilityJeff Hostetler via GitGitGadget, Feb 22, 2019
  129. 03/15 trace2: collect Windows-specific process informationJeff Hostetler via GitGitGadget, Feb 22, 2019
  130. 01/15 trace2: Documentation/technical/api-trace2.txtJeff Hostetler via GitGitGadget, Feb 22, 2019
  131. 07/15 trace2:data: add trace2 transport child classificationJeff Hostetler via GitGitGadget, Feb 22, 2019
  132. 08/15 trace2:data: add trace2 hook classificationJeff Hostetler via GitGitGadget, Feb 22, 2019
  133. 11/15 trace2:data: add subverb to checkout commandJeff Hostetler via GitGitGadget, Feb 22, 2019
  134. 13/15 trace2:data: add subverb for rebaseJeff Hostetler via GitGitGadget, Feb 22, 2019
  135. 15/15 trace2: add for_each macros to clang-formatJeff Hostetler via GitGitGadget, Feb 22, 2019
  136. 09/15 trace2:data: add trace2 instrumentation to index read/writeJeff Hostetler via GitGitGadget, Feb 22, 2019
  137. trace2: fix up a missing "leave" entry pointÆvar Arnfjörð Bjarmason, May 10, 2019
  138. Derrick StoleeMay 10, 2019
  139. Jeff HostetlerMay 20, 2019
  140. 14/15 trace2: t/helper/test-trace2, t0210.sh, t0211.sh, t0212.shJeff Hostetler via GitGitGadget, Feb 22, 2019
  141. 10/15 trace2:data: pack-objects: add trace2 regionsDerrick Stolee via GitGitGadget, Feb 22, 2019
  142. 12/15 trace2:data: add subverb to reset commandJeff Hostetler via GitGitGadget, Feb 22, 2019
  143. 02/15 trace2: create new combined trace facilityJeff Hostetler via GitGitGadget, Feb 22, 2019
  144. SZEDER GáborMay 10, 2019
  145. Derrick StoleeMay 10, 2019
  146. 06/15 trace2:data: add trace2 sub-process classificationJeff Hostetler via GitGitGadget, Feb 22, 2019
  147. 05/15 trace2:data: add editor/pager child classificationJeff Hostetler via GitGitGadget, Feb 22, 2019
  148. 04/15 trace2:data: add trace2 regions to wt-statusJeff Hostetler via GitGitGadget, Feb 22, 2019
  149. SZEDER GáborJan 31, 2019
  150. Jeff HostetlerJan 31, 2019
  151. Junio C HamanoJan 31, 2019
  152. Jeff HostetlerJan 31, 2019
  153. Jeff HostetlerJan 31, 2019
  154. Junio C HamanoJan 31, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.