From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id 98C0B3858C27; Mon, 11 Apr 2022 21:11:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 98C0B3858C27 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jonathan Wakely To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r12-8092] libstdc++: Fix incorrect branch prediction hint in std::stacktrace X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/master X-Git-Oldrev: 0508f0b810985f4a8543ce44701ec7330ef29796 X-Git-Newrev: b1124648ff8f655307f264d7b353fd68e3b03e9c Message-Id: <20220411211148.98C0B3858C27@sourceware.org> Date: Mon, 11 Apr 2022 21:11:48 +0000 (GMT) X-BeenThere: libstdc++-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2022 21:11:48 -0000 https://gcc.gnu.org/g:b1124648ff8f655307f264d7b353fd68e3b03e9c commit r12-8092-gb1124648ff8f655307f264d7b353fd68e3b03e9c Author: Jonathan Wakely Date: Mon Apr 11 20:13:44 2022 +0100 libstdc++: Fix incorrect branch prediction hint in std::stacktrace libstdc++-v3/ChangeLog: * include/std/stacktrace (basic_stacktrace::_Impl::_M_allocate): Change [[unlikely]] attribute to [[likely]]. Diff: --- libstdc++-v3/include/std/stacktrace | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libstdc++-v3/include/std/stacktrace b/libstdc++-v3/include/std/stacktrace index dd78c71c5dc..79038e803f2 100644 --- a/libstdc++-v3/include/std/stacktrace +++ b/libstdc++-v3/include/std/stacktrace @@ -579,7 +579,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { __try { - if (0 < __n && __n <= _S_max_size(__alloc)) [[unlikely]] + if (0 < __n && __n <= _S_max_size(__alloc)) [[likely]] { _M_frames = __alloc.allocate(__n); _M_capacity = __n;