From patchwork Fri May 22 16:07:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Foley X-Patchwork-Id: 187184 Delivered-To: patch@linaro.org Received: by 2002:a92:5b0a:0:0:0:0:0 with SMTP id p10csp2651431ilb; Fri, 22 May 2020 09:24:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyr1ivZHoFlr5NwY0znDMmVoGISP8wPNpWA++kyokPJPZhw3Fn+MWuq/CgpguM2Ev9ReVMQ X-Received: by 2002:a37:61d8:: with SMTP id v207mr16412148qkb.146.1590164682093; Fri, 22 May 2020 09:24:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590164682; cv=none; d=google.com; s=arc-20160816; b=WhwLcp4HlUGVkbYLBcgDcl9Yn0KOjfnQN1ztXOGLTWcZmKEX8fjqQHGIRYxAAIjw4f MZikUyHwbc1BozcOg11PFooZ6pKZdPegOshfW0AMhdTr5c5MVlv8Yts5uWqBK5KYRC3f 3WAfgnaOQVvBaGd/j2h+tvI7C2HkeT29ThffRa0vcJOsMFjUW8SxqaCOAaraHPsrZlRa 0yqY96ZWXm9tgiGM4Lytq/BFnPesaieAC3g1ED2aX4GHQnqtvt19BSPBBn6ji278zXee ZH84vWRFcZi1uWTdXVD2b7aJl8uyu1WClozUwVsfR2WWdcPcLV0xTrsYLYO7ekGewQUP yj2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:references:in-reply-to :message-id:date:subject:to:from:dkim-signature; bh=A/nKw6Isa4Oy51HOhG9UE8FR/bJbLBceggcTqOyEfB0=; b=i2AZg0pf5qfk0BmFszBtsW4Mid9SIQJvBM7TExaOKLs4+lWXm7+diEzmda8EM/AI4E 35ukJ2quBSrGcSex+Ztdf/uLQMd7cCTDbi+jXZ6bnZ+N8nxzTVNBZSSVIxTrqEvBZXA/ /Jhj47eAsKO/13jQoSBt0WnlpcsE8DY4GcqyU/8kV6d1/+V3uYvDEXlOoSuIoZSvboab OlMDy0reWCp/QDemHYQdB813f7cCzW/mA2rHEEFRm/ogdlwQXbwAQAsbWxMMvM434Ztc maf19IrvEfeeFQcIF/GKgxhKRvs8ajiFSSvfepVSNAdPmQ1zd8m+bJafiipNRXKYkCct pIAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=GNUp0U1n; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id az9si992290qvb.167.2020.05.22.09.24.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 22 May 2020 09:24:42 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=GNUp0U1n; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:57732 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jcATR-0004nI-KD for patch@linaro.org; Fri, 22 May 2020 12:24:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40490) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jcAKe-0003Rm-6P for qemu-devel@nongnu.org; Fri, 22 May 2020 12:15:36 -0400 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]:43099) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jcAKd-0006I8-86 for qemu-devel@nongnu.org; Fri, 22 May 2020 12:15:35 -0400 Received: by mail-pl1-x643.google.com with SMTP id k22so4567170pls.10 for ; Fri, 22 May 2020 09:15:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=A/nKw6Isa4Oy51HOhG9UE8FR/bJbLBceggcTqOyEfB0=; b=GNUp0U1nhxuxngkyDMTNsnpGA/d53w6KxMd8KlP/3m7zeATcCIG7xrrSyIBqYMFBuM aghOEnTh/k82NwcDMLQXbC+5HkJXN45Q3QxXbOVGGrC6jJFIx7Y2dUXaS/ookwmGRP/X qMGatvSQU975cg4iXHgLIS+nzHufl63e2b2u/xkMSBR+GZ1kx0Niewnir32DD0vyzwTv AaqKHdmAfU/7BHHpTPtfOAJUO0TXonPl+mkGHAPJkmGDhgUcEPFjjqOD0aRrtwFiaJho mriiQYnJbmC88D0wQzawIRCulCUwxhNNCU6YmIHEF4A1bLrJz/315PYXyojL5xrrwQjl ac6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=A/nKw6Isa4Oy51HOhG9UE8FR/bJbLBceggcTqOyEfB0=; b=A+F/KXf5RhaOSBV5e5OejE7EPgVgf3BFwiIIfEAIV+FSUVpnCMB/Z7J4iSiZ3oYNa4 ks1HtUxCYDWb4lGt2ReymI2oRam9AbRCgELLJ5m7YgZ0wZpa/COVd01MTIb//f39NB4V OQPi8Y12ZW2H7NPHed3GT0cN9uw4hXnO/LlxUDACe70G34fLbl6hb9Q2JQyW8/FkDv4m EZXnxfWm7LCOqrRZnNJ16B4AQwe7gKZvYnMsDk8m7iJ0vUn+9VBcniRY9aNjxkLDyLdA dtkzciaajO+95LyxL0TiNOpgFKcTg++Ke+Hac0cpV/hPPqxkumErgcKp553m2Qxl4Ag0 rgfg== X-Gm-Message-State: AOAM531E/J8zeewGkPBolYzrrQaLnjtEarh8qc5nvgLBumhHKp63WUlV Db7UnwdBdvMtvxq5HnKNzyyEXlkl6OTbrA== X-Received: by 2002:a17:902:8d8d:: with SMTP id v13mr15554071plo.67.1590164133603; Fri, 22 May 2020 09:15:33 -0700 (PDT) Received: from Rfoley-MA01.hsd1.ma.comcast.net ([2601:199:4480:60c0:f1d9:5fce:c451:d2e2]) by smtp.gmail.com with ESMTPSA id y75sm7255428pfb.212.2020.05.22.09.15.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 May 2020 09:15:33 -0700 (PDT) From: Robert Foley To: qemu-devel@nongnu.org Subject: [PATCH 17/19] util: Added tsan annotate for thread name. Date: Fri, 22 May 2020 12:07:53 -0400 Message-Id: <20200522160755.886-18-robert.foley@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200522160755.886-1-robert.foley@linaro.org> References: <20200522160755.886-1-robert.foley@linaro.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::643; envelope-from=robert.foley@linaro.org; helo=mail-pl1-x643.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.puhov@linaro.org, cota@braap.org, alex.bennee@linaro.org, robert.foley@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This allows us to see the name of the thread in tsan warning reports such as this: Thread T7 'CPU 1/TCG' (tid=24317, running) created by main thread at: Signed-off-by: Robert Foley --- util/qemu-thread-posix.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.17.1 Reviewed-by: Emilio G. Cota diff --git a/util/qemu-thread-posix.c b/util/qemu-thread-posix.c index 838980aaa5..dcbc82d80f 100644 --- a/util/qemu-thread-posix.c +++ b/util/qemu-thread-posix.c @@ -15,6 +15,7 @@ #include "qemu/atomic.h" #include "qemu/notify.h" #include "qemu-thread-common.h" +#include "qemu/tsan.h" static bool name_threads; @@ -513,6 +514,7 @@ static void *qemu_thread_start(void *args) # endif } #endif + TSAN_ANNOTATE_THREAD_NAME(qemu_thread_args->name); g_free(qemu_thread_args->name); g_free(qemu_thread_args); pthread_cleanup_push(qemu_thread_atexit_notify, NULL);