]> Kevux Git Server - rit/commit
trace2: add macOS process ancestry tracing
authorMatthew John Cheetham <mjcheetham@outlook.com>
Fri, 13 Feb 2026 19:54:55 +0000 (19:54 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 13 Feb 2026 20:18:31 +0000 (12:18 -0800)
commitfd104ef15deb16fae9ed48ad548f1d7a40e17222
tree6fc2090bb7a16f35f2b0aa859df2ab84ffed49de
parent9a2fb147f2c61d0cab52c883e7e26f5b7948e3ed
trace2: add macOS process ancestry tracing

In 353d3d77f4 (trace2: collect Windows-specific process information,
2019-02-22) Windows-specific process ancestry information was added as
a data_json event to TRACE2. Furthermore in 2f732bf15e (tr2: log
parent process name, 2021-07-21) similar functionality was added for
Linux-based systems, using procfs.

Teach Git to also log process ancestry on macOS using the sysctl with
KERN_PROC to get process information (PPID and process name).
Like the Linux implementation, we use the cmd_ancestry TRACE2 event
rather than using a data_json event and creating another custom data
point.

Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat/darwin/procinfo.c [new file with mode: 0644]