From: Junio C Hamano Date: Thu, 13 Oct 2022 21:12:25 GMT Subject: Re: [PATCH v2 5/7] trace2: convert ctx.thread_name from strbuf to pointer Message-ID: In-Reply-To: <4bf78e356e23c947b8328a91ba435a357cd51f43.1665600750.git.gitgitgadget@gmail.com> "Jeff Hostetler via GitGitGadget" writes: > From: Jeff Hostetler > > Convert the `tr2tls_thread_ctx.thread_name` field from a `strbuf` > to a "const char*" pointer. > > The `thread_name` field is a constant string that is constructed when > the context is created. Using a (non-const) `strbuf` structure for it > caused some confusion in the past because it implied that someone > could rename a thread after it was created. That usage was not > intended. Change it to a const pointer to make the intent more clear. > > Signed-off-by: Jeff Hostetler > --- > trace2/tr2_tgt_event.c | 2 +- > trace2/tr2_tgt_perf.c | 2 +- > trace2/tr2_tls.c | 16 +++++++++------- > trace2/tr2_tls.h | 2 +- > 4 files changed, 12 insertions(+), 10 deletions(-) Looking good so far.