public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Matthew John Cheetham via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org,  stolee@gmail.com,
	 johannes.schindelin@gmx.de,
	Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com>,
	 Matthew John Cheetham <mjcheetham@outlook.com>
Subject: Re: [PATCH v2 4/6] trace2: emit cmd_ancestry data for Windows
Date: Fri, 13 Feb 2026 12:52:22 -0800	[thread overview]
Message-ID: <xmqqpl68l62h.fsf@gitster.g> (raw)
In-Reply-To: <6b9054115eddeb08d0e429f1ec45093691dd84d3.1771012500.git.gitgitgadget@gmail.com> (Matthew John Cheetham via GitGitGadget's message of "Fri, 13 Feb 2026 19:54:58 +0000")

"Matthew John Cheetham via GitGitGadget" <gitgitgadget@gmail.com>
writes:

> 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(+)

Quite straight-forward.  Given the way json event readers are
organized, I suppose that existing readers will not choke on seeing
the same data twice?  Are we officially deprecating the "old way",
or keeping both to serve two different audiences (i.e., those who
have been in the ecosystem long before this change and want to keep
reading in the format they are used to, and those who are writing
cross platform data analyzers that want to stick to a single
format)?  I do not think we need to decide it now, and if I were
asked, I would probably vote for the latter, but just thinking
aloud.

Thanks.

> 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);

  reply	other threads:[~2026-02-13 20:52 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-05 16:05 [PATCH 0/4] trace2: add macOS and Windows process ancestry tracing Matthew John Cheetham via GitGitGadget
2026-02-05 16:05 ` [PATCH 1/4] trace2: add macOS " Matthew John Cheetham via GitGitGadget
2026-02-09 14:36   ` Derrick Stolee
2026-02-09 15:13     ` Matthew John Cheetham
2026-02-10  4:15       ` Derrick Stolee
2026-02-05 16:05 ` [PATCH 2/4] build: include procinfo.c impl for macOS Matthew John Cheetham via GitGitGadget
2026-02-09 14:37   ` Derrick Stolee
2026-02-05 16:05 ` [PATCH 3/4] trace2: refactor Windows process ancestry trace2 event Matthew John Cheetham via GitGitGadget
2026-02-09 14:41   ` Derrick Stolee
2026-02-05 16:05 ` [PATCH 4/4] trace2: emit cmd_ancestry data for Windows Matthew John Cheetham via GitGitGadget
2026-02-05 16:19   ` Kristoffer Haugsbakk
2026-02-09 14:42   ` Derrick Stolee
2026-02-09 14:48 ` [PATCH 0/4] trace2: add macOS and Windows process ancestry tracing Derrick Stolee
2026-02-09 17:05   ` Junio C Hamano
2026-02-13 19:54 ` [PATCH v2 0/6] " Matthew John Cheetham via GitGitGadget
2026-02-13 19:54   ` [PATCH v2 1/6] trace2: add macOS " Matthew John Cheetham via GitGitGadget
2026-02-13 19:54   ` [PATCH v2 2/6] build: include procinfo.c impl for macOS Matthew John Cheetham via GitGitGadget
2026-02-13 20:34     ` Junio C Hamano
2026-02-13 19:54   ` [PATCH v2 3/6] trace2: refactor Windows process ancestry trace2 event Matthew John Cheetham via GitGitGadget
2026-02-13 20:36     ` Junio C Hamano
2026-02-13 19:54   ` [PATCH v2 4/6] trace2: emit cmd_ancestry data for Windows Matthew John Cheetham via GitGitGadget
2026-02-13 20:52     ` Junio C Hamano [this message]
2026-02-13 19:54   ` [PATCH v2 5/6] test-tool: extend trace2 helper with 400ancestry Matthew John Cheetham via GitGitGadget
2026-02-13 19:55   ` [PATCH v2 6/6] t0213: add trace2 cmd_ancestry tests Matthew John Cheetham via GitGitGadget
2026-02-14  0:30   ` [PATCH v2 0/6] trace2: add macOS and Windows process ancestry tracing Derrick Stolee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqpl68l62h.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=johannes.schindelin@gmx.de \
    --cc=kristofferhaugsbakk@fastmail.com \
    --cc=mjcheetham@outlook.com \
    --cc=stolee@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox