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

[PATCH v2 4/6] trace2: emit cmd_ancestry data for Windows

From
Matthew John Cheetham via GitGitGadget <gitgitgadget@gmail.com>
Date
Feb 13, 2026, 19:54 UTC
Message-ID
<6b9054115eddeb08d0e429f1ec45093691dd84d3.1771012500.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.2040.v2.git.1771012500.gitgitgadget@gmail.com>
From: Matthew John Cheetham <mjcheetham@outlook.com>

Since 2f732bf15e (tr2: log parent process name, 2021-07-21) it is now now possible to emit a specific process ancestry event in TRACE2. We should emit the Windows process ancestry data with the correct event type.

To not break existing consumers of the data_json "windows/ancestry" event, we continue to emit the ancestry data as a JSON event.

Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
---
 compat/win32/trace2_win32_process_info.c | 8 ++++++++
 1 file changed, 8 insertions(+)
diff --git a/compat/win32/trace2_win32_process_info.c b/compat/win32/trace2_win32_process_info.c
index aceea05430..6a6a396078 100644
--- a/compat/win32/trace2_win32_process_info.c
+++ b/compat/win32/trace2_win32_process_info.c
@@ -172,6 +172,11 @@ void trace2_collect_process_info(enum trace2_process_info_reason reason)
 		get_is_being_debugged();
 		get_ancestry(&names);
 		if (names.nr) {
+			/*
+			  Emit the ancestry data as a data_json event to
+			  maintain compatibility for consumers of the older
+			  "windows/ancestry" event.
+			 */
 			struct json_writer jw = JSON_WRITER_INIT;
 			jw_array_begin(&jw, 0);
 			for (size_t i = 0; i < names.nr; i++)
@@ -180,6 +185,9 @@ void trace2_collect_process_info(enum trace2_process_info_reason reason)
 			trace2_data_json("process", the_repository,
 					 "windows/ancestry", &jw);
 			jw_release(&jw);
+
+			/* Emit the ancestry data with the new event. */
+			trace2_cmd_ancestry(names.v);
 		}
 
 		strvec_clear(&names);
-- 
gitgitgadget
Previous: Junio C HamanoNext: Junio C Hamano
Message 21 of 25 in “trace2: add macOS and Windows process ancestry tracing”
  1. 0/4 trace2: add macOS and Windows process ancestry tracingMatthew John Cheetham via GitGitGadget, Feb 5, 2026
  2. 2/4 build: include procinfo.c impl for macOSMatthew John Cheetham via GitGitGadget, Feb 5, 2026
  3. Derrick StoleeFeb 9, 2026
  4. 1/4 trace2: add macOS process ancestry tracingMatthew John Cheetham via GitGitGadget, Feb 5, 2026
  5. Derrick StoleeFeb 9, 2026
  6. Matthew John CheethamFeb 9, 2026
  7. Derrick StoleeFeb 10, 2026
  8. 3/4 trace2: refactor Windows process ancestry trace2 eventMatthew John Cheetham via GitGitGadget, Feb 5, 2026
  9. Derrick StoleeFeb 9, 2026
  10. 4/4 trace2: emit cmd_ancestry data for WindowsMatthew John Cheetham via GitGitGadget, Feb 5, 2026
  11. Kristoffer HaugsbakkFeb 5, 2026
  12. Derrick StoleeFeb 9, 2026
  13. Derrick StoleeFeb 9, 2026
  14. Junio C HamanoFeb 9, 2026
  15. 0/6 trace2: add macOS and Windows process ancestry tracingMatthew John Cheetham via GitGitGadget, Feb 13, 2026
  16. 1/6 trace2: add macOS process ancestry tracingMatthew John Cheetham via GitGitGadget, Feb 13, 2026
  17. 2/6 build: include procinfo.c impl for macOSMatthew John Cheetham via GitGitGadget, Feb 13, 2026
  18. Junio C HamanoFeb 13, 2026
  19. 3/6 trace2: refactor Windows process ancestry trace2 eventMatthew John Cheetham via GitGitGadget, Feb 13, 2026
  20. Junio C HamanoFeb 13, 2026
  21. 4/6 trace2: emit cmd_ancestry data for WindowsMatthew John Cheetham via GitGitGadget, Feb 13, 2026
  22. Junio C HamanoFeb 13, 2026
  23. 5/6 test-tool: extend trace2 helper with 400ancestryMatthew John Cheetham via GitGitGadget, Feb 13, 2026
  24. 6/6 t0213: add trace2 cmd_ancestry testsMatthew John Cheetham via GitGitGadget, Feb 13, 2026
  25. Derrick StoleeFeb 14, 2026

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.