[libc-commits] [libc] [libc] Use best-fit binary trie to make malloc logarithmic (PR #106259)
LLVM Continuous Integration via libc-commits
libc-commits at lists.llvm.org
Wed Nov 20 13:56:41 PST 2024
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `libc-x86_64-debian-gcc-fullbuild-dbg` running on `libc-x86_64-debian-fullbuild` while building `libc` at step 4 "annotate".
Full details are available at: https://lab.llvm.org/buildbot/#/builders/131/builds/10797
<details>
<summary>Here is the relevant piece of the build log for the reference</summary>
```
Step 4 (annotate) failure: 'python ../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py ...' (failure)
...
Ran 5 tests. PASS: 5 FAIL: 0
[119/1111] Building CXX object projects/libc/src/__support/CMakeFiles/libc.src.__support.freelist.dir/freelist.cpp.o
[120/1111] Running unit test libc.test.src.math.nextafterf_test.__unit__
[==========] Running 2 tests from 1 test suite.
[ RUN ] LlvmLibcNextAfterTest.TestNaN
[ OK ] LlvmLibcNextAfterTest.TestNaN (4 us)
[ RUN ] LlvmLibcNextAfterTest.TestBoundaries
[ OK ] LlvmLibcNextAfterTest.TestBoundaries (16 us)
Ran 2 tests. PASS: 2 FAIL: 0
[121/1111] Building CXX object projects/libc/src/__support/CMakeFiles/libc.src.__support.freetrie.dir/freetrie.cpp.o
FAILED: projects/libc/src/__support/CMakeFiles/libc.src.__support.freetrie.dir/freetrie.cpp.o
/usr/bin/g++ -DLIBC_NAMESPACE=__llvm_libc_19_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/src/__support -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS -fpie -ffreestanding -DLIBC_FULL_BUILD -isystem/usr/lib/gcc/x86_64-linux-gnu/12//include -nostdinc -idirafter/usr/include -fno-builtin -fno-exceptions -fno-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -fext-numeric-literals -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -std=c++17 -MD -MT projects/libc/src/__support/CMakeFiles/libc.src.__support.freetrie.dir/freetrie.cpp.o -MF projects/libc/src/__support/CMakeFiles/libc.src.__support.freetrie.dir/freetrie.cpp.o.d -o projects/libc/src/__support/CMakeFiles/libc.src.__support.freetrie.dir/freetrie.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/freetrie.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/big_int.h:19,
from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/integer_to_string.h:70,
from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/libc_assert.h:26,
from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/block.h:19,
from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/freelist.h:12,
from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/freetrie.h:12,
from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/freetrie.cpp:9:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/freetrie.h: In member function ‘__llvm_libc_19_0_0_git::FreeTrie::Node* __llvm_libc_19_0_0_git::FreeTrie::find_best_fit(size_t)’:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/freetrie.h:185:55: error: suggest parentheses around ‘&&’ within ‘||’ [-Werror=parentheses]
185 | deferred_upper_range.min > best_fit->size() &&
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
186 | "deferred upper subtrie should be outclassed by new best fit");
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/macros/optimization.h:29:51: note: in definition of macro ‘LIBC_UNLIKELY’
29 | LIBC_NAMESPACE::details::expects_bool_condition(x, false)
| ^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/freetrie.h:183:7: note: in expansion of macro ‘LIBC_ASSERT’
183 | LIBC_ASSERT(
| ^~~~~~~~~~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/freetrie.h:225:70: error: suggest parentheses around ‘&&’ within ‘||’ [-Werror=parentheses]
225 | cur_range.upper().max() < deferred_upper_range.min &&
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
226 | "old deferred upper subtrie should be outclassed by new");
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/macros/optimization.h:29:51: note: in definition of macro ‘LIBC_UNLIKELY’
29 | LIBC_NAMESPACE::details::expects_bool_condition(x, false)
| ^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/freetrie.h:224:7: note: in expansion of macro ‘LIBC_ASSERT’
224 | LIBC_ASSERT(!deferred_upper_trie ||
| ^~~~~~~~~~~
cc1plus: all warnings being treated as errors
[122/1111] Running unit test libc.test.src.math.fminf_test.__unit__.__NO_FMA_OPT
[==========] Running 5 tests from 1 test suite.
[ RUN ] LlvmLibcFMinTest.NaN
[ OK ] LlvmLibcFMinTest.NaN (6 us)
[ RUN ] LlvmLibcFMinTest.InfArg
[ OK ] LlvmLibcFMinTest.InfArg (5 us)
Step 8 (libc-unit-tests) failure: libc-unit-tests (failure)
...
Ran 5 tests. PASS: 5 FAIL: 0
[119/1111] Building CXX object projects/libc/src/__support/CMakeFiles/libc.src.__support.freelist.dir/freelist.cpp.o
[120/1111] Running unit test libc.test.src.math.nextafterf_test.__unit__
[==========] Running 2 tests from 1 test suite.
[ RUN ] LlvmLibcNextAfterTest.TestNaN
[ OK ] LlvmLibcNextAfterTest.TestNaN (4 us)
[ RUN ] LlvmLibcNextAfterTest.TestBoundaries
[ OK ] LlvmLibcNextAfterTest.TestBoundaries (16 us)
Ran 2 tests. PASS: 2 FAIL: 0
[121/1111] Building CXX object projects/libc/src/__support/CMakeFiles/libc.src.__support.freetrie.dir/freetrie.cpp.o
FAILED: projects/libc/src/__support/CMakeFiles/libc.src.__support.freetrie.dir/freetrie.cpp.o
/usr/bin/g++ -DLIBC_NAMESPACE=__llvm_libc_19_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/src/__support -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS -fpie -ffreestanding -DLIBC_FULL_BUILD -isystem/usr/lib/gcc/x86_64-linux-gnu/12//include -nostdinc -idirafter/usr/include -fno-builtin -fno-exceptions -fno-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -fext-numeric-literals -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -std=c++17 -MD -MT projects/libc/src/__support/CMakeFiles/libc.src.__support.freetrie.dir/freetrie.cpp.o -MF projects/libc/src/__support/CMakeFiles/libc.src.__support.freetrie.dir/freetrie.cpp.o.d -o projects/libc/src/__support/CMakeFiles/libc.src.__support.freetrie.dir/freetrie.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/freetrie.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/big_int.h:19,
from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/integer_to_string.h:70,
from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/libc_assert.h:26,
from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/block.h:19,
from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/freelist.h:12,
from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/freetrie.h:12,
from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/freetrie.cpp:9:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/freetrie.h: In member function ‘__llvm_libc_19_0_0_git::FreeTrie::Node* __llvm_libc_19_0_0_git::FreeTrie::find_best_fit(size_t)’:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/freetrie.h:185:55: error: suggest parentheses around ‘&&’ within ‘||’ [-Werror=parentheses]
185 | deferred_upper_range.min > best_fit->size() &&
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
186 | "deferred upper subtrie should be outclassed by new best fit");
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/macros/optimization.h:29:51: note: in definition of macro ‘LIBC_UNLIKELY’
29 | LIBC_NAMESPACE::details::expects_bool_condition(x, false)
| ^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/freetrie.h:183:7: note: in expansion of macro ‘LIBC_ASSERT’
183 | LIBC_ASSERT(
| ^~~~~~~~~~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/freetrie.h:225:70: error: suggest parentheses around ‘&&’ within ‘||’ [-Werror=parentheses]
225 | cur_range.upper().max() < deferred_upper_range.min &&
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
226 | "old deferred upper subtrie should be outclassed by new");
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/macros/optimization.h:29:51: note: in definition of macro ‘LIBC_UNLIKELY’
29 | LIBC_NAMESPACE::details::expects_bool_condition(x, false)
| ^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/freetrie.h:224:7: note: in expansion of macro ‘LIBC_ASSERT’
224 | LIBC_ASSERT(!deferred_upper_trie ||
| ^~~~~~~~~~~
cc1plus: all warnings being treated as errors
[122/1111] Running unit test libc.test.src.math.fminf_test.__unit__.__NO_FMA_OPT
[==========] Running 5 tests from 1 test suite.
[ RUN ] LlvmLibcFMinTest.NaN
[ OK ] LlvmLibcFMinTest.NaN (6 us)
[ RUN ] LlvmLibcFMinTest.InfArg
[ OK ] LlvmLibcFMinTest.InfArg (5 us)
```
</details>
https://github.com/llvm/llvm-project/pull/106259
More information about the libc-commits
mailing list