From: Sergey Bugaev <bugaevc@gmail.com>
To: libc-alpha@sourceware.org
Subject: [RFC PATCH 2/6] mcheck: Microoptimize
Date: Mon, 15 May 2023 17:48:11 +0300 [thread overview]
Message-ID: <20230515144815.3939017-3-bugaevc@gmail.com> (raw)
In-Reply-To: <20230515144815.3939017-1-bugaevc@gmail.com>
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(-)
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);
--
2.40.1
next prev parent reply other threads:[~2023-05-15 14:48 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-15 14:48 [RFC PATCH 0/6] .text.subsections for some questionable benefit Sergey Bugaev
2023-05-15 14:48 ` [RFC PATCH 1/6] Mark more functions as __COLD Sergey Bugaev
2023-05-15 15:22 ` Andreas Schwab
2023-05-15 15:27 ` Sergey Bugaev
2023-05-18 17:06 ` [PATCH v2] " Sergey Bugaev
2023-05-18 19:43 ` Adhemerval Zanella Netto
2023-05-19 10:35 ` Sergey Bugaev
2023-05-22 20:41 ` Adhemerval Zanella Netto
2023-05-15 14:48 ` Sergey Bugaev [this message]
2023-05-15 14:48 ` [RFC PATCH 3/6] sys/cdefs.h: Define __TEXT_STARTUP & __TEXT_EXIT Sergey Bugaev
2023-05-15 14:48 ` [RFC PATCH 4/6] Mark various functions as __TEXT_STARTUP and __TEXT_EXIT Sergey Bugaev
2023-05-15 14:48 ` [RFC PATCH 5/6] Also place entry points into .text.startup Sergey Bugaev
2023-05-15 14:48 ` [RFC PATCH 6/6] mach: In rtld, mark MIG routines as __TEXT_STARTUP Sergey Bugaev
2023-05-15 15:33 ` [RFC PATCH 0/6] .text.subsections for some questionable benefit Cristian Rodríguez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230515144815.3939017-3-bugaevc@gmail.com \
--to=bugaevc@gmail.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).