From patchwork Fri Oct 1 15:36:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 1535373 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=nIHOTCes; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HLZ5B4Zyvz9t0T for ; Sat, 2 Oct 2021 01:38:22 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7FAC03858025 for ; Fri, 1 Oct 2021 15:38:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7FAC03858025 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1633102700; bh=t6rKwcNgrPBDz3U/rYqNci7XGxsgGlVuN6ldABlt6DM=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=nIHOTCesKUykSep5g1Xp+gU4hk3DxDTSEtG76vt6e9IAJwpVDTHTXpBEHrToZlsXW MDDMVncKCNjiWjmqWrQWCCzFqa3JfDkk4bJxb5C4Fn9zX+FZxREFj5kV9TFLwaIvdB XHlqpHAMBmjmoEDQb6UWPIFjzNQPArJoLIe5/s9E= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by sourceware.org (Postfix) with ESMTPS id 670E6385780B for ; Fri, 1 Oct 2021 15:36:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 670E6385780B Received: by mail-pl1-x62f.google.com with SMTP id b22so6563235pls.1 for ; Fri, 01 Oct 2021 08:36:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=t6rKwcNgrPBDz3U/rYqNci7XGxsgGlVuN6ldABlt6DM=; b=6XzjsBZ5K8g6CXbkcWzILd1VTQUyOvIwIqOMquDyKMpqfow/8InlGaWBZVevn1bZoR 07/Wn9W9ISrrLdr6Tmy9qmobxaSKgXZpip1MmEVvAOHPPYNVWjgkOSMbmxPZb/P3TWk+ wWcWCSE/oGbvw+7a2uqlPDKX58UNsMUOvxSHy1Dhv33dj8a8N2vAS+YHL9ohmg1cwMyl RVnmxUG1Bp4CwHaYn45VUDEoC/MnjuyOJADDVd0SXIme/wlf9q7x14pJMOMVMzne0XUm B8Wl2XSAZfe+SVLWcKnfe43jEzv88XduHbHvN+6aohOTQlyxanLL/Bn4uF4WW+ELdZk8 ZsCA== X-Gm-Message-State: AOAM532YoNLYntQkg5PL14lvG293pYWJteWC57qSOE+TH3sdMKIbG4r3 Xt+0/isimkjaiAR3N75Y3JlNHMGX6BM= X-Google-Smtp-Source: ABdhPJzOkj1RMbO9SzY5A09MmfOfTAObNfkm8RJXbt49pm+Km+UrVg0ImEUxwLultzvOiuanAEo4LA== X-Received: by 2002:a17:903:1d1:b0:13c:897c:c04b with SMTP id e17-20020a17090301d100b0013c897cc04bmr10045106plh.76.1633102578236; Fri, 01 Oct 2021 08:36:18 -0700 (PDT) Received: from gnu-cfl-2.localdomain ([172.58.39.6]) by smtp.gmail.com with ESMTPSA id c9sm6235740pfi.212.2021.10.01.08.36.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Oct 2021 08:36:16 -0700 (PDT) Received: from gnu-cfl-2.. (localhost [IPv6:::1]) by gnu-cfl-2.localdomain (Postfix) with ESMTP id 532C6C04CC for ; Fri, 1 Oct 2021 08:36:15 -0700 (PDT) To: gcc-patches@gcc.gnu.org Subject: [PATCH 3/4] libsanitizer: Bump asan/tsan versions Date: Fri, 1 Oct 2021 08:36:14 -0700 Message-Id: <20211001153615.81857-4-hjl.tools@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211001153615.81857-1-hjl.tools@gmail.com> References: <20211001153615.81857-1-hjl.tools@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-3032.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: "H.J. Lu via Gcc-patches" From: "H.J. Lu" Reply-To: "H.J. Lu" Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" Bump asan/tsan versions for upstream commits: commit f1bb30a4956f83e46406d6082e5d376ce65391e0 Author: Vitaly Buka Date: Thu Aug 26 10:25:09 2021 -0700 [sanitizer] No THREADLOCAL in qsort and bsearch qsort can reuse qsort_r if available. bsearch always passes key as the first comparator argument, so we can use it to wrap the original comparator. Differential Revision: https://reviews.llvm.org/D108751 commit d77b476c1953bcb0a608b2d6a4f2dd9fe0b43967 Author: Dmitry Vyukov Date: Mon Aug 2 16:52:53 2021 +0200 tsan: avoid extra call indirection in unaligned access functions Currently unaligned access functions are defined in tsan_interface.cpp and do a real call to MemoryAccess. This means we have a real call and no read/write constant propagation. Unaligned memory access can be quite hot for some programs (observed on some compression algorithms with ~90% of unaligned accesses). Move them to tsan_interface_inl.h to avoid the additional call and enable constant propagation. Also reorder the actual store and memory access handling for __sanitizer_unaligned_store callbacks to enable tail calling in MemoryAccess. Depends on D107282. Reviewed By: vitalybuka, melver commit 97795be22f634667ce7a022398c59ccc9f7440eb Author: Dmitry Vyukov Date: Fri Jul 30 08:35:11 2021 +0200 tsan: optimize test-only barrier The updated lots_of_threads.c test with 300 threads started running for too long on machines with low hardware parallelism (e.g. taskset -c 0-1). On lots of CPUs it finishes in ~2 secs. But with taskset -c 0-1 it runs for hundreds of seconds effectively spinning in the barrier in the sleep loop. We now have the handy futex API in sanitizer_common. Use it instead of the passive spin loop. It makes the test run only faster with taskset -c 0-1, it runs for ~1.5 secs, while with full parallelism it still runs for ~2 secs (but consumes less CPU time). Depends on D107131. Reviewed By: vitalybuka --- libsanitizer/asan/libtool-version | 2 +- libsanitizer/tsan/libtool-version | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libsanitizer/asan/libtool-version b/libsanitizer/asan/libtool-version index 2cd4546d1b9..7a2a23f2b56 100644 --- a/libsanitizer/asan/libtool-version +++ b/libsanitizer/asan/libtool-version @@ -3,4 +3,4 @@ # a separate file so that version updates don't involve re-running # automake. # CURRENT:REVISION:AGE -7:0:0 +8:0:0 diff --git a/libsanitizer/tsan/libtool-version b/libsanitizer/tsan/libtool-version index 79dfeeea15f..6fa8162dd20 100644 --- a/libsanitizer/tsan/libtool-version +++ b/libsanitizer/tsan/libtool-version @@ -3,4 +3,4 @@ # a separate file so that version updates don't involve re-running # automake. # CURRENT:REVISION:AGE -1:0:0 +2:0:0