Message ID | 20230515144815.3939017-3-bugaevc@gmail.com |
---|---|
State | New |
Headers | show
Return-Path: <libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=<UNKNOWN>) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=dNIXBqkz; dkim-atps=neutral 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 ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QKj124b6mz20dc for <incoming@patchwork.ozlabs.org>; Tue, 16 May 2023 00:48:38 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A4FF53854166 for <incoming@patchwork.ozlabs.org>; Mon, 15 May 2023 14:48:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A4FF53854166 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1684162116; bh=fN6lxnhh+WW9ta4f2BSq1/HYHyazM7yZgft1lg4MqJ4=; 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=dNIXBqkz5ID0sqUNRPHS4UfLHirdyWzaBrWCxrUEXCV1oTu0lA1weg8OWBzpDuvqL GG16gr8r2YtW+EvujiQjTmxf6Kt2r+dyfAtGDDjdQ3tVyhzZDcTX/FzKjqx29SQDAd wSBH7EqXQ6iVSICQtInPuj/q6nY1uj+1IAttbU1M= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by sourceware.org (Postfix) with ESMTPS id D1C733858C3A for <libc-alpha@sourceware.org>; Mon, 15 May 2023 14:48:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D1C733858C3A Received: by mail-lj1-x233.google.com with SMTP id 38308e7fff4ca-2ac7462d9f1so138875981fa.2 for <libc-alpha@sourceware.org>; Mon, 15 May 2023 07:48:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684162099; x=1686754099; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fN6lxnhh+WW9ta4f2BSq1/HYHyazM7yZgft1lg4MqJ4=; b=GK3OYd2A7AJqMPM2xHO1z45GTzCdkqwbkWCIOBhEeS6SyreqQIQ83lKMdrjZDQ4HZI L424Xy9VT0ZSea322rO6w++N34eTF2S3L1A9NqT3rNV3FYUyF2s88dOV8oiv5oibGFQn S0h80MSQgNIXQJn9U2OXmFMiFZEkQx9vmhgFR6Exy/WUXkDzETSDKJlc81DfNLJaHxHw lmfRyY7JsbDJ5sSN1rwwU/NW69xLngDkAWBRJAYiArWb3CNu8mBJ5K7UIntuuSzUsJt8 wgerb5x877tl8JXxJd+TCrEroUQIEMHdvM64Z88cfBok8SLTuenLZKNzUOSVOlhNQVqc BTag== X-Gm-Message-State: AC+VfDw8RF/D1vRU7PtM0/bwOXqqo64s5SFiuTrgA/n1TVZq3AmI4i+j pPr12+zGT9/lsvkfFAA+h56OYPwJfsw= X-Google-Smtp-Source: ACHHUZ4ZGHMBcKeguqBn8xSPw85M3sTDUrC2Gq0kKH96rwYVah4zM8xFCVJn46QAnWJGgSD5bsv1dw== X-Received: by 2002:ac2:59dc:0:b0:4f3:8196:80cb with SMTP id x28-20020ac259dc000000b004f3819680cbmr1247243lfn.41.1684162098895; Mon, 15 May 2023 07:48:18 -0700 (PDT) Received: from surface-pro-6.. ([194.190.106.50]) by smtp.gmail.com with ESMTPSA id w9-20020a056512098900b004f11e965308sm2643336lft.20.2023.05.15.07.48.18 for <libc-alpha@sourceware.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 May 2023 07:48:18 -0700 (PDT) To: libc-alpha@sourceware.org Subject: [RFC PATCH 2/6] mcheck: Microoptimize Date: Mon, 15 May 2023 17:48:11 +0300 Message-Id: <20230515144815.3939017-3-bugaevc@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230515144815.3939017-1-bugaevc@gmail.com> References: <20230515144815.3939017-1-bugaevc@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.1 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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list <libc-alpha.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> From: Sergey Bugaev via Libc-alpha <libc-alpha@sourceware.org> Reply-To: Sergey Bugaev <bugaevc@gmail.com> Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" <libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org> |
Series |
.text.subsections for some questionable benefit
|
expand
|
diff --git a/malloc/mcheck-impl.c b/malloc/mcheck-impl.c index 1625e63f..fe35873c 100644 --- a/malloc/mcheck-impl.c +++ b/malloc/mcheck-impl.c @@ -91,7 +91,7 @@ checkhdr (const struct hdr *hdr) status = MCHECK_OK; break; } - if (status != MCHECK_OK) + if (__glibc_unlikely (status != MCHECK_OK)) { mcheck_used = 0; (*abortfunc) (status);
We can't mark the abortfunc pointer as __COLD, so instead just tell the compiler that this branch is unlikely to be taken. Signed-off-by: Sergey Bugaev <bugaevc@gmail.com> --- malloc/mcheck-impl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)