Re: [PATCH 0/4] trace2: add macOS and Windows process ancestry tracing
- From
Derrick Stolee <stolee@gmail.com>
- Date
- Feb 9, 2026, 14:48 UTC
- Message-ID
- <56c1a7eb-a645-4453-8024-b320c1ebd55e@gmail.com>
- In-Reply-To
- <pull.2040.git.1770307510.gitgitgadget@gmail.com>
On 2/5/2026 11:05 AM, Matthew John Cheetham via GitGitGadget wrote:
Show 7 quoted lines
> In 353d3d77 (trace2: collect Windows-specific process information) > Windows-specific process ancestry information was added as a data_json event > to TRACE2. Furthermore in 2f732bf1 (tr2: log parent process name) similar > functionality was added for Linux-based systems, using procfs. > > Let's teach Git on macOS to also gather process ancestry information, and > emit it as a cmd_ancestry TRACE2 event.
This is done in patches 1-2. I notice that there are no tests validating that this works.
I see that in t/t0210-trace2-normal.sh there is a scrub_normal() helper that removes the cmd_ancestry event due to compatibility reasons.
I'd be interested to see if we could enable these tests to demonstrate your changes here. Of course, Windows, Linux, and macOS are not the _only_ platforms we support. They are the only ones we check in CI, though.
Show 5 quoted lines
> Furthermore, let's refactor the Windows implementation to align with the > Linux and macOS versions - by emitting the ancestry information as a > cmd_ancestry event. We keep the older, custom data_json event type on > Windows for compatibility for consumers of the TRACE2 data that use the > older event.
I appreciate this compatibility approach. I mention in my patch-by-patch review that we should eventually drop the old mechanism, say in two major versions.
The code looks good to me, just a question about the testing and some very minor nitpicks around recursion and strvecs.
Thanks, -Stolee