Messages in this thread | | | Date | Mon, 9 Aug 2021 17:02:24 -0300 | From | Arnaldo Carvalho de Melo <> | Subject | Re: [PATCH v5 9/9] tools: Remove feature-sync-compare-and-swap feature detection |
| |
Em Mon, Aug 09, 2021 at 07:14:07PM +0800, Leo Yan escreveu: > Since the __sync functions have been removed from perf, it's needless > for perf tool to test the feature sync-compare-and-swap. > > The feature test is not used by any other components, remove it.
Thanks, applied to perf/core.
- Arnaldo
> Signed-off-by: Leo Yan <leo.yan@linaro.org> > --- > tools/build/Makefile.feature | 1 - > tools/build/feature/Makefile | 4 ---- > tools/build/feature/test-all.c | 4 ---- > tools/build/feature/test-sync-compare-and-swap.c | 15 --------------- > 4 files changed, 24 deletions(-) > delete mode 100644 tools/build/feature/test-sync-compare-and-swap.c > > diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature > index 04a8e3db8a54..3dd2f68366f9 100644 > --- a/tools/build/Makefile.feature > +++ b/tools/build/Makefile.feature > @@ -34,7 +34,6 @@ FEATURE_TESTS_BASIC := \ > dwarf_getlocations \ > eventfd \ > fortify-source \ > - sync-compare-and-swap \ > get_current_dir_name \ > gettid \ > glibc \ > diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile > index ec203e28407f..eff55d287db1 100644 > --- a/tools/build/feature/Makefile > +++ b/tools/build/feature/Makefile > @@ -9,7 +9,6 @@ FILES= \ > test-dwarf_getlocations.bin \ > test-eventfd.bin \ > test-fortify-source.bin \ > - test-sync-compare-and-swap.bin \ > test-get_current_dir_name.bin \ > test-glibc.bin \ > test-gtk2.bin \ > @@ -260,9 +259,6 @@ $(OUTPUT)test-libdw-dwarf-unwind.bin: > $(OUTPUT)test-libbabeltrace.bin: > $(BUILD) # -lbabeltrace provided by $(FEATURE_CHECK_LDFLAGS-libbabeltrace) > > -$(OUTPUT)test-sync-compare-and-swap.bin: > - $(BUILD) > - > $(OUTPUT)test-compile-32.bin: > $(CC) -m32 -o $@ test-compile.c > > diff --git a/tools/build/feature/test-all.c b/tools/build/feature/test-all.c > index 464873883396..920439527291 100644 > --- a/tools/build/feature/test-all.c > +++ b/tools/build/feature/test-all.c > @@ -106,10 +106,6 @@ > # include "test-libdw-dwarf-unwind.c" > #undef main > > -#define main main_test_sync_compare_and_swap > -# include "test-sync-compare-and-swap.c" > -#undef main > - > #define main main_test_zlib > # include "test-zlib.c" > #undef main > diff --git a/tools/build/feature/test-sync-compare-and-swap.c b/tools/build/feature/test-sync-compare-and-swap.c > deleted file mode 100644 > index 3bc6b0768a53..000000000000 > --- a/tools/build/feature/test-sync-compare-and-swap.c > +++ /dev/null > @@ -1,15 +0,0 @@ > -// SPDX-License-Identifier: GPL-2.0 > -#include <stdint.h> > - > -volatile uint64_t x; > - > -int main(int argc, char *argv[]) > -{ > - uint64_t old, new = argc; > - > - (void)argv; > - do { > - old = __sync_val_compare_and_swap(&x, 0, 0); > - } while (!__sync_bool_compare_and_swap(&x, old, new)); > - return old == new; > -} > -- > 2.25.1 >
--
- Arnaldo
| |