libstdc++: Fix incorrect branch prediction hint in std::stacktrace
authorJonathan Wakely <jwakely@redhat.com>
Mon, 11 Apr 2022 19:13:44 +0000 (20:13 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Mon, 11 Apr 2022 21:10:00 +0000 (22:10 +0100)
libstdc++-v3/ChangeLog:

* include/std/stacktrace (basic_stacktrace::_Impl::_M_allocate):
Change [[unlikely]] attribute to [[likely]].

libstdc++-v3/include/std/stacktrace

index dd78c71..79038e8 100644 (file)
@@ -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;