From patchwork Tue Oct 4 16:19:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Hostetler X-Patchwork-Id: 12998551 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F3502C4167B for ; Tue, 4 Oct 2022 16:20:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229847AbiJDQUQ (ORCPT ); Tue, 4 Oct 2022 12:20:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229832AbiJDQUM (ORCPT ); Tue, 4 Oct 2022 12:20:12 -0400 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6371315FDA for ; Tue, 4 Oct 2022 09:20:11 -0700 (PDT) Received: by mail-wr1-x42b.google.com with SMTP id u10so22013391wrq.2 for ; Tue, 04 Oct 2022 09:20:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:from:to:cc:subject:date; bh=+1rAY0GN/bT2z9a1WjLDfsxiqq2/WV2ktnylJJE6aWE=; b=TPbO9CKzMaTcpbxOYKYA9shhLESe3tPmx+aNq1O6lvPlTkTj3pfuxau9mceycMQEz3 9MwDN6btzLqEJugS8ZRqsHqvDxo3Yt8lwV5K0d6FVU2EkBDAFaa5oo5AUWLeJMcBiww4 Lqi2WUEMnFmiWY/WWlhvkMhrC7yuFkcPZBuaZugd60USyiBbylqzrEnpHXKJMXnXDMHp CQjx5aiGLurZwkrtBM/JT8946O5GmKANmx8VLsUZn6Ja3GgVSZeLz7tiXbdr9e5RANVs eNBFkWPSraloEXoP0TpUmpnU/XgAaxvgA/4xEsbgBsFjb/5+IB0imMxHz0mgB89EtFbi nXPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:x-gm-message-state:from:to:cc :subject:date; bh=+1rAY0GN/bT2z9a1WjLDfsxiqq2/WV2ktnylJJE6aWE=; b=mV1XPdrb01pUuDj94hfWNMGwHUN5drb9bnMUnf5xeimQfbj5PHqt9/l/3hDasO5eAb Ktm8EYRk/IWux2y1Q/cBfGKz64g/q+T87i23vew3fsDLF047CwYi/ip+Onc9JjKCTY8o Y81gX3Es5CVunM6o6HBQ9krFZRiVtSQHkNS636oSJCL5KlNNlI3Tn3By2Yyfh4AKfBhv xEKxqsNDa6zTwp/HdmLu6Br9f+jecIF3x5rPlnExcPmb7KDm2GlIEt21V16C01iHKPDR VMocsICKnsx3L88pOI+Cmc9ps7lTi5fgrhyoVk0VxA2durqTZ5pYRa0HcaDrVE1zRBeL ZVaA== X-Gm-Message-State: ACrzQf2WyhwNYANsjVTMQNrJ8ZCrlhp+fBTvRTrFGXIFYGU3T+yGCr8k 0sAKMyJl4WGHAMYVZV3cqA4ADurYvPE= X-Google-Smtp-Source: AMsMyM7BW3jwvM5eNh+VDCLsrIN1xDFpfAW0V/Bdebyg64/csYS09dsyF4rCP1sSvVV1wJqLeLNKRw== X-Received: by 2002:a5d:44c4:0:b0:22e:31cd:afe7 with SMTP id z4-20020a5d44c4000000b0022e31cdafe7mr9824137wrr.246.1664900409696; Tue, 04 Oct 2022 09:20:09 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id s15-20020a5d424f000000b0022afe4fb459sm2261742wrr.51.2022.10.04.09.20.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Oct 2022 09:20:09 -0700 (PDT) Message-Id: <870f29166ea5d5c73bd724c862a59d9702a6fe26.1664900407.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Tue, 04 Oct 2022 16:19:59 +0000 Subject: [PATCH 1/9] builtin/merge-file: fix compiler warning on MacOS with clang 11.0.0 Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Jeff Hostetler , Jeff Hostetler Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Jeff Hostetler From: Jeff Hostetler Signed-off-by: Jeff Hostetler --- builtin/merge-file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/merge-file.c b/builtin/merge-file.c index c923bbf2abb..607c3d3f9e1 100644 --- a/builtin/merge-file.c +++ b/builtin/merge-file.c @@ -26,9 +26,9 @@ static int label_cb(const struct option *opt, const char *arg, int unset) int cmd_merge_file(int argc, const char **argv, const char *prefix) { const char *names[3] = { 0 }; - mmfile_t mmfs[3] = { 0 }; + mmfile_t mmfs[3] = { { 0 } }; mmbuffer_t result = { 0 }; - xmparam_t xmp = { 0 }; + xmparam_t xmp = { { 0 } }; int ret = 0, i = 0, to_stdout = 0; int quiet = 0; struct option options[] = { From patchwork Tue Oct 4 16:20:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Hostetler X-Patchwork-Id: 12998552 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8E55AC433F5 for ; Tue, 4 Oct 2022 16:20:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229909AbiJDQUT (ORCPT ); Tue, 4 Oct 2022 12:20:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229841AbiJDQUN (ORCPT ); Tue, 4 Oct 2022 12:20:13 -0400 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1DF7537F85 for ; Tue, 4 Oct 2022 09:20:12 -0700 (PDT) Received: by mail-wm1-x332.google.com with SMTP id y23-20020a1c4b17000000b003bd336914f9so1125594wma.4 for ; Tue, 04 Oct 2022 09:20:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:from:to:cc:subject:date; bh=Q470/AW/fzJLALcfpXWcJESIG0LEmZ5xOneOpJj2PFw=; b=bYTJGzIUw9tXFBBGxGIaB88Vl2asNXVjFP6edy3XY5ymWi/QNP/xlskUBYB05MUD7M LzTiRzaomIKZSGLYBjsChxA9B5E/chGutz7P8SXIOp9Y+XQMn/cPTaSA8tVAwAm9MYBZ qkE34sLTAWSI2eZSrNn2P/W0Co1Y5m01yYyaUZD3lFM3o+x90wxp8pxUT0rhhNZguJLI pPIXABQakvXkfIog1tLZSn132dHQSD3c1AFyyjv0kbTS96ke+sbTz3D7fV98nGqNFTPe JscZbbEr6twABm8f3P6PlCA6nHZ/Z7fjWwrwpd2CrfXebEzQ+C3xxykFISi7YTieflTN Bfsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:x-gm-message-state:from:to:cc :subject:date; bh=Q470/AW/fzJLALcfpXWcJESIG0LEmZ5xOneOpJj2PFw=; b=NVfKdUy9rCwj9ca0rkXdW043Fw/W3wpatPd271P2dc6pilwTjwkC3W3sjYBvrhLEvL /z8tI81kWjDcOm7soJ+Pm3C6tC8Jc2ky7E0nYOqX55vJuLlqTov0b67uQ4/6EslPXDqJ 25vo2fTO55KsBDcSi52J2Ug26k23RdkOXCuHW5QViqPFiwtUQxKyG2bAlPMX3Cedm/0D xyM60GGP7P6tDesvXFxYrRgVMFd4eW4lUWjRtYjc1WlK0hbDNA0RhiIs06ztC/NVMZgq JD+CJjrXPioDRl4E4GABwMeAqNjzLb+rGYWyy+/HnnFNissG9AHUr5XTv2TIZd7CECUh 3Uag== X-Gm-Message-State: ACrzQf0D6tafgyqLbhZ0plTdk8yqDju0XZnZKAT1zKFcQDeRfsrot7g3 xQHYYb955eTzaS3LQMOJrMmf8jwzWnE= X-Google-Smtp-Source: AMsMyM7P1XgbO3ektuOo+HC7homgkN4oTc68USXJ09sirktuAd+aUQFIyruFPLs9Debf+6GhEj3xTQ== X-Received: by 2002:a7b:c845:0:b0:3b5:5e45:b266 with SMTP id c5-20020a7bc845000000b003b55e45b266mr409172wml.82.1664900410542; Tue, 04 Oct 2022 09:20:10 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id l4-20020a7bc444000000b003b339438733sm14722702wmi.19.2022.10.04.09.20.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Oct 2022 09:20:10 -0700 (PDT) Message-Id: <43c41f7035d6f5d1f34d847da833ba8f5a6a13be.1664900407.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Tue, 04 Oct 2022 16:20:00 +0000 Subject: [PATCH 2/9] builtin/unpack-objects.c: fix compiler warning on MacOS with clang 11.0.0 Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Jeff Hostetler , Jeff Hostetler Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Jeff Hostetler From: Jeff Hostetler Signed-off-by: Jeff Hostetler --- builtin/unpack-objects.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/unpack-objects.c b/builtin/unpack-objects.c index 43789b8ef29..4b16f1592ba 100644 --- a/builtin/unpack-objects.c +++ b/builtin/unpack-objects.c @@ -385,7 +385,7 @@ static const void *feed_input_zstream(struct input_stream *in_stream, static void stream_blob(unsigned long size, unsigned nr) { - git_zstream zstream = { 0 }; + git_zstream zstream = { { 0 } }; struct input_zstream_data data = { 0 }; struct input_stream in_stream = { .read = feed_input_zstream, From patchwork Tue Oct 4 16:20:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Hostetler X-Patchwork-Id: 12998553 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5649EC433FE for ; Tue, 4 Oct 2022 16:20:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229919AbiJDQUV (ORCPT ); Tue, 4 Oct 2022 12:20:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229854AbiJDQUO (ORCPT ); Tue, 4 Oct 2022 12:20:14 -0400 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA92039B98 for ; Tue, 4 Oct 2022 09:20:12 -0700 (PDT) Received: by mail-wm1-x329.google.com with SMTP id n40-20020a05600c3ba800b003b49aefc35fso7851069wms.5 for ; Tue, 04 Oct 2022 09:20:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:from:to:cc:subject:date; bh=cTLoZaZ6n+Wz/7kdysCOtNZST9K2cELlvFYvnhYh5CM=; b=LYq0eRkPslL1DEq8nRE/qK0V3HPizLXAwQPceq0Zkz5eZrQuIEfFYDrDNsfes8BziY S1n0/Z7gXrIe7RDZlDw28/rsBhwBcGrt7ob5AThMed4by3J142gv7+0dPit+50rhlNiZ y30FoRj9fg1W/DqKjwiYjls6WJUziNRKtQ8k99MkT3yls2Pd+JmJUQTQZNDhdW9bgFI8 NOd95iYmSXwoL9ylNmZOXO3AxgWSGaoY8B7hurLnQTQekgXbtRXn+5Vpgdv6gW3hpwkp BbikAhdSeJt4kr8G/4LAsB4YvpRLbGnw/TAHCFss6PuoXM7r7AtmFaOOondzw549AnJv RiQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:x-gm-message-state:from:to:cc :subject:date; bh=cTLoZaZ6n+Wz/7kdysCOtNZST9K2cELlvFYvnhYh5CM=; b=7n2ufiLyFJq1QO+C9H7GQ4gkvmJ7goewGy3HmVxsMm3Rx0Cb6G2fUqBcyx+TgKgIBS a0wZNdwFww6bZ67HCdOH06vnPC4mXLSIuIWOIe1iMZDgtpOrMBd03WKca0zPzriJQx0V N3N9lYTqY3kM4W/vbHL62fLhupypeKTZqRJ/hGR22b+gPgQC2ZMSpNCLSLhMTXxs0jwF ixUODSpwlMwMjKQUPrBXbokRfKlm2zgZDZuvnn1RTt19xH8r3m9rTWTja1NdPvFPO6Xe yDiFk39Py1Qvyhm0SZcRfEeK5JAZ05IPQrB4/OM7DQzYCByLpUngG5ov6/U39bG9CKRy iEhw== X-Gm-Message-State: ACrzQf3/pgk0f8NB6VowWwb3WlsfZSXCb7VDdfhNy2WY0Ml3SK5qsniH WBX2wQT03DoTLUoGL+81wTGV6pwbiBc= X-Google-Smtp-Source: AMsMyM7iADQVLv0izopCNftr8GHKPOWDUSvsHx6YLaAHnM888P/8Gk0qa5WoO4NGWk/kEm7nihJIfA== X-Received: by 2002:a05:600c:4352:b0:3b4:84c0:2006 with SMTP id r18-20020a05600c435200b003b484c02006mr372730wme.205.1664900411240; Tue, 04 Oct 2022 09:20:11 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id n41-20020a05600c3ba900b003b3401f1e24sm2247326wms.28.2022.10.04.09.20.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Oct 2022 09:20:10 -0700 (PDT) Message-Id: <73704b6f66055fbaf8c11696be9f579c06b471dd.1664900407.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Tue, 04 Oct 2022 16:20:01 +0000 Subject: [PATCH 3/9] trace2: use size_t alloc,nr_open_regions in tr2tls_thread_ctx Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Jeff Hostetler , Jeff Hostetler Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Jeff Hostetler From: Jeff Hostetler Use "size_t" rather than "int" for the "alloc" and "nr_open_regions" fields in the "tr2tls_thread_ctx". These are used by ALLOC_GROW(). Signed-off-by: Jeff Hostetler --- trace2/tr2_tls.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trace2/tr2_tls.h b/trace2/tr2_tls.h index b1e327a928e..a90bd639d48 100644 --- a/trace2/tr2_tls.h +++ b/trace2/tr2_tls.h @@ -11,8 +11,8 @@ struct tr2tls_thread_ctx { struct strbuf thread_name; uint64_t *array_us_start; - int alloc; - int nr_open_regions; /* plays role of "nr" in ALLOC_GROW */ + size_t alloc; + size_t nr_open_regions; /* plays role of "nr" in ALLOC_GROW */ int thread_id; }; From patchwork Tue Oct 4 16:20:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Hostetler X-Patchwork-Id: 12998554 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E3247C4332F for ; Tue, 4 Oct 2022 16:20:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229934AbiJDQUX (ORCPT ); Tue, 4 Oct 2022 12:20:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229817AbiJDQUQ (ORCPT ); Tue, 4 Oct 2022 12:20:16 -0400 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3311B32BAB for ; Tue, 4 Oct 2022 09:20:13 -0700 (PDT) Received: by mail-wm1-x335.google.com with SMTP id z13-20020a7bc7cd000000b003b5054c6f9bso11159108wmk.2 for ; Tue, 04 Oct 2022 09:20:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:from:to:cc:subject:date; bh=iACA4FL6FLxqM8Gf+IfWNEBZzWlEQwVqQ42PnqkGRwo=; b=ZFIwGsmqR9olVk0VfDrwkQhlfwOi8vpZHACeeMNWWHG40FMCmYWu5DOO+F0spDCFup rf8aUvykunVB6kupVZA/OUmagAm1gCxOpKY2cjBHUi5fI5Ri77LxhfTNUDRfoluYTr13 ZMwHjx4lnD1m9xeOgnEONMqMGLw0pVlFE0k1b1HptopId5J5E2De2aNlHlbTehj7k6KT vjK4JKRDv+wTv24BqrZY9bdlK9nwmln+rGzDPG8bpa0/puoESQtCw/4BQxqmAhqQR+rP toXm9O4geDHvzcC07vPNVLZkgE3Af8V2QTvKBa2UGu1zBbhvk+W+bOQ8iUagYfJIwmyY kb4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:x-gm-message-state:from:to:cc :subject:date; bh=iACA4FL6FLxqM8Gf+IfWNEBZzWlEQwVqQ42PnqkGRwo=; b=0a+ewA4tvtQphN1HePITLI4LoNaG72b9U1/aiFkMEwY/H7Dxo9TVrrLRIMLp/8Q/DH OncpaUnxEVL+IZnXpJFELZfoTjBHyOHv9U6d6FjuEXbiyPd9IrdvLWZcm/HYPre49K3X J8hGHDUmP+vGXba77tPf9YrMAuDfQWcqf8ErB/BMamuoPy3OUfxLB2o9GSgQ4DFO+sQ3 9T8fgzRgi7+CO9OXJoRRcPylYtu2DiYlxqeSFQS80YNE9WG0c7mQrAlieJ+PCQGkLY0O KooZbhaqnQ7I7vbVDCWtLPd8MUrYlxU+2pmsH8tzYZVwv2pLFF9uVY8Rmh7RiJ109MTM yJzw== X-Gm-Message-State: ACrzQf1+RVsE4PhrtcDuGZMM66QKlm8uzMYCFeRMdaXMIgIxBcvPcrns wgrEoxtFX9poudM41Mccjz0iehfFs6g= X-Google-Smtp-Source: AMsMyM5lE5U4UKtxEBFtDLd2cKzmA0Weg85s4Yst2aiFoMOHDDFEHD+CsSMVSY/2gHdoFqWPkLhEtw== X-Received: by 2002:a05:600c:500d:b0:3b5:234:d7e9 with SMTP id n13-20020a05600c500d00b003b50234d7e9mr388332wmr.57.1664900411993; Tue, 04 Oct 2022 09:20:11 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id x12-20020a05600c2d0c00b003b51369fbbbsm20288761wmf.4.2022.10.04.09.20.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Oct 2022 09:20:11 -0700 (PDT) Message-Id: <7123886a804bfd5bfac1f0fd6deb907e1635d0e5.1664900407.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Tue, 04 Oct 2022 16:20:02 +0000 Subject: [PATCH 4/9] tr2tls: clarify TLS terminology Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Jeff Hostetler , Jeff Hostetler Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Jeff Hostetler From: Jeff Hostetler Reduce or eliminate use of the term "TLS" in the Trace2 code. The term "TLS" has two popular meanings: "thread-local storage" and "transport layer security". In the Trace2 source, the term is associated with the former. There was concern on the mailing list about it refering to the latter. Update the source and documentation to eliminate the use of the "TLS" term or replace it with the phrase "thread-local storage" to reduce ambiguity. Signed-off-by: Jeff Hostetler --- Documentation/technical/api-trace2.txt | 8 ++++---- trace2.c | 2 +- trace2.h | 10 +++++----- trace2/tr2_tls.c | 6 +++--- trace2/tr2_tls.h | 18 +++++++++++------- 5 files changed, 24 insertions(+), 20 deletions(-) diff --git a/Documentation/technical/api-trace2.txt b/Documentation/technical/api-trace2.txt index 2afa28bb5aa..431d424f9d5 100644 --- a/Documentation/technical/api-trace2.txt +++ b/Documentation/technical/api-trace2.txt @@ -685,8 +685,8 @@ The "exec_id" field is a command-unique id and is only useful if the `"thread_start"`:: This event is generated when a thread is started. It is - generated from *within* the new thread's thread-proc (for TLS - reasons). + generated from *within* the new thread's thread-proc (because + it needs to access data in the thread's thread-local storage). + ------------ { @@ -698,7 +698,7 @@ The "exec_id" field is a command-unique id and is only useful if the `"thread_exit"`:: This event is generated when a thread exits. It is generated - from *within* the thread's thread-proc (for TLS reasons). + from *within* the thread's thread-proc. + ------------ { @@ -1206,7 +1206,7 @@ worked on 508 items at offset 2032. Thread "th04" worked on 508 items at offset 508. + This example also shows that thread names are assigned in a racy manner -as each thread starts and allocates TLS storage. +as each thread starts. Config (def param) Events:: diff --git a/trace2.c b/trace2.c index 0c0a11e07d5..c1244e45ace 100644 --- a/trace2.c +++ b/trace2.c @@ -52,7 +52,7 @@ static struct tr2_tgt *tr2_tgt_builtins[] = * Force (rather than lazily) initialize any of the requested * builtin TRACE2 targets at startup (and before we've seen an * actual TRACE2 event call) so we can see if we need to setup - * the TR2 and TLS machinery. + * private data structures and thread-local storage. * * Return the number of builtin targets enabled. */ diff --git a/trace2.h b/trace2.h index 88d906ea830..af3c11694cc 100644 --- a/trace2.h +++ b/trace2.h @@ -73,8 +73,7 @@ void trace2_initialize_clock(void); /* * Initialize TRACE2 tracing facility if any of the builtin TRACE2 * targets are enabled in the system config or the environment. - * This includes setting up the Trace2 thread local storage (TLS). - * Emits a 'version' message containing the version of git + * This emits a 'version' message containing the version of git * and the Trace2 protocol. * * This function should be called from `main()` as early as possible in @@ -302,7 +301,8 @@ void trace2_exec_result_fl(const char *file, int line, int exec_id, int code); /* * Emit a 'thread_start' event. This must be called from inside the - * thread-proc to set up the trace2 TLS data for the thread. + * thread-proc to allow the thread to create its own thread-local + * storage. * * Thread names should be descriptive, like "preload_index". * Thread names will be decorated with an instance number automatically. @@ -315,8 +315,8 @@ void trace2_thread_start_fl(const char *file, int line, /* * Emit a 'thread_exit' event. This must be called from inside the - * thread-proc to report thread-specific data and cleanup TLS data - * for the thread. + * thread-proc so that the thread can access and clean up its + * thread-local storage. */ void trace2_thread_exit_fl(const char *file, int line); diff --git a/trace2/tr2_tls.c b/trace2/tr2_tls.c index 7da94aba522..8d2182fbdbb 100644 --- a/trace2/tr2_tls.c +++ b/trace2/tr2_tls.c @@ -69,9 +69,9 @@ struct tr2tls_thread_ctx *tr2tls_get_self(void) ctx = pthread_getspecific(tr2tls_key); /* - * If the thread-proc did not call trace2_thread_start(), we won't - * have any TLS data associated with the current thread. Fix it - * here and silently continue. + * If the current thread's thread-proc did not call + * trace2_thread_start(), then the thread will not have any + * thread-local storage. Create it now and silently continue. */ if (!ctx) ctx = tr2tls_create_self("unknown", getnanotime() / 1000); diff --git a/trace2/tr2_tls.h b/trace2/tr2_tls.h index a90bd639d48..1297509fd23 100644 --- a/trace2/tr2_tls.h +++ b/trace2/tr2_tls.h @@ -3,6 +3,12 @@ #include "strbuf.h" +/* + * Notice: the term "TLS" refers to "thread-local storage" in the + * Trace2 source files. This usage is borrowed from GCC and Windows. + * There is NO relation to "transport layer security". + */ + /* * Arbitry limit for thread names for column alignment. */ @@ -17,9 +23,7 @@ struct tr2tls_thread_ctx { }; /* - * Create TLS data for the current thread. This gives us a place to - * put per-thread data, such as thread start time, function nesting - * and a per-thread label for our messages. + * Create thread-local storage for the current thread. * * We assume the first thread is "main". Other threads are given * non-zero thread-ids to help distinguish messages from concurrent @@ -35,7 +39,7 @@ struct tr2tls_thread_ctx *tr2tls_create_self(const char *thread_name, uint64_t us_thread_start); /* - * Get our TLS data. + * Get the thread-local storage pointer of the current thread. */ struct tr2tls_thread_ctx *tr2tls_get_self(void); @@ -45,7 +49,7 @@ struct tr2tls_thread_ctx *tr2tls_get_self(void); int tr2tls_is_main_thread(void); /* - * Free our TLS data. + * Free the current thread's thread-local storage. */ void tr2tls_unset_self(void); @@ -81,12 +85,12 @@ uint64_t tr2tls_region_elasped_self(uint64_t us); uint64_t tr2tls_absolute_elapsed(uint64_t us); /* - * Initialize the tr2 TLS system. + * Initialize thread-local storage for Trace2. */ void tr2tls_init(void); /* - * Free all tr2 TLS resources. + * Free all Trace2 thread-local storage resources. */ void tr2tls_release(void); From patchwork Tue Oct 4 16:20:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Hostetler X-Patchwork-Id: 12998555 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E270BC433F5 for ; Tue, 4 Oct 2022 16:20:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230034AbiJDQUa (ORCPT ); Tue, 4 Oct 2022 12:20:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229538AbiJDQUQ (ORCPT ); Tue, 4 Oct 2022 12:20:16 -0400 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE2193AB1B for ; Tue, 4 Oct 2022 09:20:14 -0700 (PDT) Received: by mail-wm1-x32e.google.com with SMTP id i83-20020a1c3b56000000b003bd44dc526fso1112227wma.3 for ; Tue, 04 Oct 2022 09:20:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:from:to:cc:subject:date; bh=hxtLIS/x5S5M+vKHrv/OI64Re4gc9i3o/wSBOO+OBuM=; b=EaZLuDGZR6VgYoB442BmRdmzdNucG+0akCxMRTZd477eVvExLKypeQ1tWgL5PDpC3c ujXrhhDJC/zjegHDAAW6fHAVnDDnoX6bxASJfxoKHigtfpfYGm5tkifqNgKuo34e62o4 tJmD8W8foE1CEUKw6V42OdJVxZoXQh+vLlDrv0BZB08/nSNafdxApudx1yBNhGlvV51s YKbUsiXLNokuqV658iHO1mSjmv2eQTyrL771uYemARWQ4gi7sj0+hXfPWmpWKRmtQMTd bTx65JCKf/zMCG+3RkbW5WYfLKo8VrQBklWFoJ7n6Zvzv5AFFToRBhYM0qpkg2+jLhaq q3Pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:x-gm-message-state:from:to:cc :subject:date; bh=hxtLIS/x5S5M+vKHrv/OI64Re4gc9i3o/wSBOO+OBuM=; b=jawXEfmdTcvIGtyd67CKkm2tA444Q/nTVo+bNZlW/RD/JEP8gD6UuDJvH+neOnPZFO EQovINqQKnZcLuIaDvzPBwBCfzX7JsfawqnViSFkxkdycZlDxAk0Hlrzpyjgu0qX0okI uQILKMNPdTtBw15tiQjsqUa8u1i/ByP94GCrIE4MfcKWUAmgDDyL0/oNrMP4dYskD7p3 hiTZpZvxvPoZhDVPPzXFdAaQqH4xcV3495pVr3N15Gldsyv17VzQ066ly8PEsm3Z2XCm TB5J83rCTXCXRAR4x7i8SCfhcXTT1YKgSvpOmkCJz4k8v/uN9f6uqx2NMxZ0fJqDxYGQ e9hg== X-Gm-Message-State: ACrzQf2lGe0iTUYsAEC/oLqv2niJYyMOf62r0a4pAP930mUTROlgh0Bv NsmzUfZ2AhH4HJuOP9xecyAW4VCmD64= X-Google-Smtp-Source: AMsMyM4zM2OB5r2Wf0M2GLXGny0w7dThC8MKP6v+Bvkox2SGSrx8p9uS0iulaqMiC9v2P2G7dHiXiA== X-Received: by 2002:a05:600c:4186:b0:3b4:a660:1d29 with SMTP id p6-20020a05600c418600b003b4a6601d29mr405996wmh.120.1664900412828; Tue, 04 Oct 2022 09:20:12 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id a14-20020adfed0e000000b002258235bda3sm12694559wro.61.2022.10.04.09.20.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Oct 2022 09:20:12 -0700 (PDT) Message-Id: <82f1672e180afcd876505a4354bd9952f70db49e.1664900407.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Tue, 04 Oct 2022 16:20:03 +0000 Subject: [PATCH 5/9] trace2: rename trace2 thread_name argument as name_hint Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Jeff Hostetler , Jeff Hostetler Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Jeff Hostetler From: Jeff Hostetler Rename the `thread_name` argument in `tr2tls_create_self()` and `trace2_thread_start()` to be `name_hint` to make it clear that the passed argument is a hint that will be used to create the actual `struct tr2tls_thread_ctx.thread_name` variable. This should make it clearer in the API that the trace2 layer does not borrow the caller's string pointer/buffer, but rather that it will use that hint in formatting the actual thread's name. Previous discussion on the mailing list indicated that there was confusion about this point. This commit does not change how the `thread_name` field is allocated or stored within the `tr2tls_thread_ctx` structure. Signed-off-by: Jeff Hostetler --- Documentation/technical/api-trace2.txt | 2 +- trace2.c | 6 +++--- trace2.h | 11 ++++++----- trace2/tr2_tls.c | 4 ++-- trace2/tr2_tls.h | 17 ++++++++++------- 5 files changed, 22 insertions(+), 18 deletions(-) diff --git a/Documentation/technical/api-trace2.txt b/Documentation/technical/api-trace2.txt index 431d424f9d5..4fe2d6992ab 100644 --- a/Documentation/technical/api-trace2.txt +++ b/Documentation/technical/api-trace2.txt @@ -209,7 +209,7 @@ e.g: `void trace2_child_start(struct child_process *cmd)`. These messages are concerned with Git thread usage. -e.g: `void trace2_thread_start(const char *thread_name)`. +e.g: `void trace2_thread_start(const char *name_hint)`. === Region and Data Messages diff --git a/trace2.c b/trace2.c index c1244e45ace..c8e5acced2a 100644 --- a/trace2.c +++ b/trace2.c @@ -466,7 +466,7 @@ void trace2_exec_result_fl(const char *file, int line, int exec_id, int code) file, line, us_elapsed_absolute, exec_id, code); } -void trace2_thread_start_fl(const char *file, int line, const char *thread_name) +void trace2_thread_start_fl(const char *file, int line, const char *name_hint) { struct tr2_tgt *tgt_j; int j; @@ -488,14 +488,14 @@ void trace2_thread_start_fl(const char *file, int line, const char *thread_name) */ trace2_region_enter_printf_fl(file, line, NULL, NULL, NULL, "thread-proc on main: %s", - thread_name); + name_hint); return; } us_now = getnanotime() / 1000; us_elapsed_absolute = tr2tls_absolute_elapsed(us_now); - tr2tls_create_self(thread_name, us_now); + tr2tls_create_self(name_hint, us_now); for_each_wanted_builtin (j, tgt_j) if (tgt_j->pfn_thread_start_fl) diff --git a/trace2.h b/trace2.h index af3c11694cc..fe39dcb5849 100644 --- a/trace2.h +++ b/trace2.h @@ -304,14 +304,15 @@ void trace2_exec_result_fl(const char *file, int line, int exec_id, int code); * thread-proc to allow the thread to create its own thread-local * storage. * - * Thread names should be descriptive, like "preload_index". - * Thread names will be decorated with an instance number automatically. + * The thread name hint should be descriptive, like "preload_index" or + * taken from the thread-proc function. A unique thread name will be + * created from the hint and the thread id automatically. */ void trace2_thread_start_fl(const char *file, int line, - const char *thread_name); + const char *name_hint); -#define trace2_thread_start(thread_name) \ - trace2_thread_start_fl(__FILE__, __LINE__, (thread_name)) +#define trace2_thread_start(name_hint) \ + trace2_thread_start_fl(__FILE__, __LINE__, (name_hint)) /* * Emit a 'thread_exit' event. This must be called from inside the diff --git a/trace2/tr2_tls.c b/trace2/tr2_tls.c index 8d2182fbdbb..39b41fd2487 100644 --- a/trace2/tr2_tls.c +++ b/trace2/tr2_tls.c @@ -31,7 +31,7 @@ void tr2tls_start_process_clock(void) tr2tls_us_start_process = getnanotime() / 1000; } -struct tr2tls_thread_ctx *tr2tls_create_self(const char *thread_name, +struct tr2tls_thread_ctx *tr2tls_create_self(const char *name_hint, uint64_t us_thread_start) { struct tr2tls_thread_ctx *ctx = xcalloc(1, sizeof(*ctx)); @@ -50,7 +50,7 @@ struct tr2tls_thread_ctx *tr2tls_create_self(const char *thread_name, strbuf_init(&ctx->thread_name, 0); if (ctx->thread_id) strbuf_addf(&ctx->thread_name, "th%02d:", ctx->thread_id); - strbuf_addstr(&ctx->thread_name, thread_name); + strbuf_addstr(&ctx->thread_name, name_hint); if (ctx->thread_name.len > TR2_MAX_THREAD_NAME) strbuf_setlen(&ctx->thread_name, TR2_MAX_THREAD_NAME); diff --git a/trace2/tr2_tls.h b/trace2/tr2_tls.h index 1297509fd23..f1ee58305d6 100644 --- a/trace2/tr2_tls.h +++ b/trace2/tr2_tls.h @@ -25,17 +25,20 @@ struct tr2tls_thread_ctx { /* * Create thread-local storage for the current thread. * - * We assume the first thread is "main". Other threads are given - * non-zero thread-ids to help distinguish messages from concurrent - * threads. - * - * Truncate the thread name if necessary to help with column alignment - * in printf-style messages. + * The first thread in the process will have: + * { .thread_id=0, .thread_name="main" } + * Subsequent threads are given a non-zero thread_id and a thread_name + * constructed from the id and a "name hint" (which is usually based + * upon the name of the thread-proc function). For example: + * { .thread_id=10, .thread_name="th10fsm-listen" } + * This helps to identify and distinguish messages from concurrent threads. + * The ctx.thread_name field is truncated if necessary to help with column + * alignment in printf-style messages. * * In this and all following functions the term "self" refers to the * current thread. */ -struct tr2tls_thread_ctx *tr2tls_create_self(const char *thread_name, +struct tr2tls_thread_ctx *tr2tls_create_self(const char *name_hint, uint64_t us_thread_start); /* From patchwork Tue Oct 4 16:20:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Hostetler X-Patchwork-Id: 12998556 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0435DC433FE for ; Tue, 4 Oct 2022 16:20:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229988AbiJDQUc (ORCPT ); Tue, 4 Oct 2022 12:20:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229755AbiJDQUQ (ORCPT ); Tue, 4 Oct 2022 12:20:16 -0400 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B910402E3 for ; Tue, 4 Oct 2022 09:20:15 -0700 (PDT) Received: by mail-wm1-x32a.google.com with SMTP id o5so9255220wms.1 for ; Tue, 04 Oct 2022 09:20:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:from:to:cc:subject:date; bh=o2ispt3iRKRIfJEw6xvAmp2DiIRviuvQfEr6Qu/yjNE=; b=U2ccTE6GyFkgXKbtp7CL1LpzT80/2BkEmulvU2abuRWhR5Y38d9JnBSz2eiCrFM3v+ iS1dQJAqefgN5MgzXlPnoPLkZ/g1guhtvmsSDYu1NkCj3ZZ4L5i349CUEpkdOZoMNL89 AUq4WDAklxUZuvE1aCXjho86S92ffQ4Et2xFSj+zfvvM7tfhSsSZZAr1oJgE0zSbCC+w e9aVJtbthWYekqXEfX9+WsG1jgWi6yq4xTIv2SILIBBGx5SWmvip3QT0lLglKQqMHIwH LZw1R5BRygkt4vg1s8OwR8qEunDNn4wInyIuRgqrawPQ4qhHXH7xbeobnw/EGQMy6IQO cAhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:x-gm-message-state:from:to:cc :subject:date; bh=o2ispt3iRKRIfJEw6xvAmp2DiIRviuvQfEr6Qu/yjNE=; b=wyJFwM+7asYQjnSpuyLEl7SErgJkgIo+4vL9IEUh6yvwM2WU7TE7lkXMDCgpNCRqa7 n+QIUdbcskjQTAGRMuzBm1tkasKu6T76aDW6fkhzBuMLktLfo3KJQYL9QoxFvO7ree9a RPI5C6GZ4JGhn0Fka9uh1yXDnqx0AHshtdspTGrTVKubrIfy+ahM8CSjk2SRCVONlVI2 VT1vFEAssKRAsbt6ZGyDae/MRlB3wsGWbl0u+kwg60ZSlvTIJhExetpOcqbgnoAHaWgQ m+3BrpBxqrJAS7KCUoP3Uk8nhN/KL4KAiEheaNrfwV6eY7IAzAzql0qhtucPAhgErYwN ez6A== X-Gm-Message-State: ACrzQf3/NRJzZ7Z/DNs/J+5JDhuxUst2RttRlBtwvk7l96pe4U1YzomI Z3OMxWzoXhXzpACH96pyptlT8yftAdU= X-Google-Smtp-Source: AMsMyM7VKH6kidoJR2/WmXD2c3f+VNVdQ7CUH08XVAdUYwC9Sp3XzVhf8eZ4Ol1rqiba7V+rPVjuHA== X-Received: by 2002:a05:600c:3d8e:b0:3b4:a61c:52cc with SMTP id bi14-20020a05600c3d8e00b003b4a61c52ccmr403946wmb.7.1664900413678; Tue, 04 Oct 2022 09:20:13 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id i7-20020a05600011c700b0021e51c039c5sm7791346wrx.80.2022.10.04.09.20.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Oct 2022 09:20:13 -0700 (PDT) Message-Id: <6492b6d2b989e08bb539fff3ffe5bdf50fa0a195.1664900407.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Tue, 04 Oct 2022 16:20:04 +0000 Subject: [PATCH 6/9] trace2: convert ctx.thread_name to flex array Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Jeff Hostetler , Jeff Hostetler Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Jeff Hostetler From: Jeff Hostetler Convert the `tr2tls_thread_ctx.thread_name` field from a `strbuf` to a "flex array" at the end of the context structure. 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. Changing it to a "flex array" will hopefully make the intent more clear. Also, move the maximum thread_name truncation to tr2_tgt_perf.c because it is the only target that needs to worry about output column alignment. Signed-off-by: Jeff Hostetler --- trace2/tr2_tgt_event.c | 2 +- trace2/tr2_tgt_perf.c | 8 ++++++-- trace2/tr2_tls.c | 25 +++++++++++++------------ trace2/tr2_tls.h | 9 +-------- 4 files changed, 21 insertions(+), 23 deletions(-) diff --git a/trace2/tr2_tgt_event.c b/trace2/tr2_tgt_event.c index 37a3163be12..52f9356c695 100644 --- a/trace2/tr2_tgt_event.c +++ b/trace2/tr2_tgt_event.c @@ -90,7 +90,7 @@ static void event_fmt_prepare(const char *event_name, const char *file, jw_object_string(jw, "event", event_name); jw_object_string(jw, "sid", tr2_sid_get()); - jw_object_string(jw, "thread", ctx->thread_name.buf); + jw_object_string(jw, "thread", ctx->thread_name); /* * In brief mode, only emit