* [PATCH v2 0/2] benchtests: Building benchmarks as static executables @ 2021-08-09 14:16 H.J. Lu 2021-08-09 14:16 ` [PATCH v2 1/2] i686: Don't include multiarch memove in libc.a H.J. Lu 2021-08-09 14:16 ` [PATCH v2 2/2] benchtests: Building benchmarks as static executables H.J. Lu 0 siblings, 2 replies; 5+ messages in thread From: H.J. Lu @ 2021-08-09 14:16 UTC (permalink / raw) To: libc-alpha Changes in v2: On i686, there is no multiarch memove in libc.a, don't include multiarch memove in ifunc-impl-list.c in libc.a. Building benchmarks as static executables: ========================================= To build benchmarks as static executables, on the build system, run: $ make STATIC-BENCHTESTS=yes bench-build You can copy benchmark executables to another machine and run them without copying the source nor build directories. H.J. Lu (2): i686: Don't include multiarch memove in libc.a benchtests: Building benchmarks as static executables benchtests/Makefile | 26 ++++++++++++++----- benchtests/README | 10 +++++++ sysdeps/i386/i686/multiarch/ifunc-impl-list.c | 2 +- 3 files changed, 30 insertions(+), 8 deletions(-) -- 2.31.1 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 1/2] i686: Don't include multiarch memove in libc.a 2021-08-09 14:16 [PATCH v2 0/2] benchtests: Building benchmarks as static executables H.J. Lu @ 2021-08-09 14:16 ` H.J. Lu 2021-08-30 12:57 ` H.J. Lu 2021-08-09 14:16 ` [PATCH v2 2/2] benchtests: Building benchmarks as static executables H.J. Lu 1 sibling, 1 reply; 5+ messages in thread From: H.J. Lu @ 2021-08-09 14:16 UTC (permalink / raw) To: libc-alpha On i686, there is no multiarch memove in libc.a, don't include multiarch memove in ifunc-impl-list.c in libc.a. --- sysdeps/i386/i686/multiarch/ifunc-impl-list.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/i386/i686/multiarch/ifunc-impl-list.c b/sysdeps/i386/i686/multiarch/ifunc-impl-list.c index 4e3cc56fa3..d3365cdc9d 100644 --- a/sysdeps/i386/i686/multiarch/ifunc-impl-list.c +++ b/sysdeps/i386/i686/multiarch/ifunc-impl-list.c @@ -84,7 +84,6 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, __memmove_chk_sse2_unaligned) IFUNC_IMPL_ADD (array, i, __memmove_chk, 1, __memmove_chk_ia32)) -#endif /* Support sysdeps/i386/i686/multiarch/memmove.S. */ IFUNC_IMPL (i, name, memmove, @@ -95,6 +94,7 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, IFUNC_IMPL_ADD (array, i, memmove, CPU_FEATURE_USABLE (SSE2), __memmove_sse2_unaligned) IFUNC_IMPL_ADD (array, i, memmove, 1, __memmove_ia32)) +#endif /* Support sysdeps/i386/i686/multiarch/memrchr.S. */ IFUNC_IMPL (i, name, memrchr, -- 2.31.1 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 1/2] i686: Don't include multiarch memove in libc.a 2021-08-09 14:16 ` [PATCH v2 1/2] i686: Don't include multiarch memove in libc.a H.J. Lu @ 2021-08-30 12:57 ` H.J. Lu 0 siblings, 0 replies; 5+ messages in thread From: H.J. Lu @ 2021-08-30 12:57 UTC (permalink / raw) To: GNU C Library On Mon, Aug 9, 2021 at 7:17 AM H.J. Lu <hjl.tools@gmail.com> wrote: > > On i686, there is no multiarch memove in libc.a, don't include multiarch > memove in ifunc-impl-list.c in libc.a. > --- > sysdeps/i386/i686/multiarch/ifunc-impl-list.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sysdeps/i386/i686/multiarch/ifunc-impl-list.c b/sysdeps/i386/i686/multiarch/ifunc-impl-list.c > index 4e3cc56fa3..d3365cdc9d 100644 > --- a/sysdeps/i386/i686/multiarch/ifunc-impl-list.c > +++ b/sysdeps/i386/i686/multiarch/ifunc-impl-list.c > @@ -84,7 +84,6 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, > __memmove_chk_sse2_unaligned) > IFUNC_IMPL_ADD (array, i, __memmove_chk, 1, > __memmove_chk_ia32)) > -#endif > > /* Support sysdeps/i386/i686/multiarch/memmove.S. */ > IFUNC_IMPL (i, name, memmove, > @@ -95,6 +94,7 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, > IFUNC_IMPL_ADD (array, i, memmove, CPU_FEATURE_USABLE (SSE2), > __memmove_sse2_unaligned) > IFUNC_IMPL_ADD (array, i, memmove, 1, __memmove_ia32)) > +#endif > > /* Support sysdeps/i386/i686/multiarch/memrchr.S. */ > IFUNC_IMPL (i, name, memrchr, > -- > 2.31.1 > I am checking in this as an obvious fix. -- H.J. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 2/2] benchtests: Building benchmarks as static executables 2021-08-09 14:16 [PATCH v2 0/2] benchtests: Building benchmarks as static executables H.J. Lu 2021-08-09 14:16 ` [PATCH v2 1/2] i686: Don't include multiarch memove in libc.a H.J. Lu @ 2021-08-09 14:16 ` H.J. Lu 2021-10-04 14:32 ` H.J. Lu 1 sibling, 1 reply; 5+ messages in thread From: H.J. Lu @ 2021-08-09 14:16 UTC (permalink / raw) To: libc-alpha Building benchmarks as static executables: ========================================= To build benchmarks as static executables, on the build system, run: $ make STATIC-BENCHTESTS=yes bench-build You can copy benchmark executables to another machine and run them without copying the source nor build directories. --- benchtests/Makefile | 26 +++++++++++++++++++------- benchtests/README | 10 ++++++++++ 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/benchtests/Makefile b/benchtests/Makefile index 1530939a8c..4fcd73131a 100644 --- a/benchtests/Makefile +++ b/benchtests/Makefile @@ -110,11 +110,23 @@ else bench-malloc := $(filter malloc-%,${BENCHSET}) endif -$(addprefix $(objpfx)bench-,$(bench-math)): $(libm) -$(addprefix $(objpfx)bench-,$(math-benchset)): $(libm) -$(addprefix $(objpfx)bench-,$(bench-pthread)): $(shared-thread-library) -$(addprefix $(objpfx)bench-,$(bench-malloc)): $(shared-thread-library) -$(addprefix $(objpfx)bench-,pthread-locks): $(libm) +ifeq (${STATIC-BENCHTESTS},yes) ++link-benchtests = $(+link-static-tests) +link-libc-benchtests = $(link-libc-static) +libm-benchtests = $(common-objpfx)math/libm.a +thread-library-benchtests = $(static-thread-library) +else +link-libc-benchtests = $(link-libc) ++link-benchtests = $(+link-tests) +thread-library-benchtests = $(shared-thread-library) +libm-benchtests = $(libm) +endif + +$(addprefix $(objpfx)bench-,$(bench-math)): $(libm-benchtests) +$(addprefix $(objpfx)bench-,$(math-benchset)): $(libm-benchtests) +$(addprefix $(objpfx)bench-,$(bench-pthread)): $(thread-library-benchtests) +$(addprefix $(objpfx)bench-,$(bench-malloc)): $(thread-library-benchtests) +$(addprefix $(objpfx)bench-,pthread-locks): $(libm-benchtests) \f @@ -270,9 +282,9 @@ bench-link-targets = $(timing-type) $(binaries-bench) $(binaries-benchset) \ $(bench-link-targets): %: %.o $(objpfx)json-lib.o \ $(link-extra-libs-tests) \ - $(sort $(filter $(common-objpfx)lib%,$(link-libc))) \ + $(sort $(filter $(common-objpfx)lib%,$(link-libc-benchtests))) \ $(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit) - $(+link-tests) + $(+link-benchtests) $(bench-link-targets): LDFLAGS += $(link-bench-bind-now) diff --git a/benchtests/README b/benchtests/README index 44736d7e63..4d83a05b4b 100644 --- a/benchtests/README +++ b/benchtests/README @@ -62,6 +62,16 @@ otherwise the above command may try to build the benchmark again. Benchmarks that require generated code to be executed during the build are skipped when cross-building. +Building benchmarks as static executables: +========================================= + +To build benchmarks as static executables, on the build system, run: + + $ make STATIC-BENCHTESTS=yes bench-build + +You can copy benchmark executables to another machine and run them +without copying the source nor build directories. + Running subsets of benchmarks: ============================== -- 2.31.1 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 2/2] benchtests: Building benchmarks as static executables 2021-08-09 14:16 ` [PATCH v2 2/2] benchtests: Building benchmarks as static executables H.J. Lu @ 2021-10-04 14:32 ` H.J. Lu 0 siblings, 0 replies; 5+ messages in thread From: H.J. Lu @ 2021-10-04 14:32 UTC (permalink / raw) To: GNU C Library On Mon, Aug 9, 2021 at 7:17 AM H.J. Lu <hjl.tools@gmail.com> wrote: > > Building benchmarks as static executables: > ========================================= > > To build benchmarks as static executables, on the build system, run: > > $ make STATIC-BENCHTESTS=yes bench-build > > You can copy benchmark executables to another machine and run them > without copying the source nor build directories. > --- > benchtests/Makefile | 26 +++++++++++++++++++------- > benchtests/README | 10 ++++++++++ > 2 files changed, 29 insertions(+), 7 deletions(-) > > diff --git a/benchtests/Makefile b/benchtests/Makefile > index 1530939a8c..4fcd73131a 100644 > --- a/benchtests/Makefile > +++ b/benchtests/Makefile > @@ -110,11 +110,23 @@ else > bench-malloc := $(filter malloc-%,${BENCHSET}) > endif > > -$(addprefix $(objpfx)bench-,$(bench-math)): $(libm) > -$(addprefix $(objpfx)bench-,$(math-benchset)): $(libm) > -$(addprefix $(objpfx)bench-,$(bench-pthread)): $(shared-thread-library) > -$(addprefix $(objpfx)bench-,$(bench-malloc)): $(shared-thread-library) > -$(addprefix $(objpfx)bench-,pthread-locks): $(libm) > +ifeq (${STATIC-BENCHTESTS},yes) > ++link-benchtests = $(+link-static-tests) > +link-libc-benchtests = $(link-libc-static) > +libm-benchtests = $(common-objpfx)math/libm.a > +thread-library-benchtests = $(static-thread-library) > +else > +link-libc-benchtests = $(link-libc) > ++link-benchtests = $(+link-tests) > +thread-library-benchtests = $(shared-thread-library) > +libm-benchtests = $(libm) > +endif > + > +$(addprefix $(objpfx)bench-,$(bench-math)): $(libm-benchtests) > +$(addprefix $(objpfx)bench-,$(math-benchset)): $(libm-benchtests) > +$(addprefix $(objpfx)bench-,$(bench-pthread)): $(thread-library-benchtests) > +$(addprefix $(objpfx)bench-,$(bench-malloc)): $(thread-library-benchtests) > +$(addprefix $(objpfx)bench-,pthread-locks): $(libm-benchtests) > > > > @@ -270,9 +282,9 @@ bench-link-targets = $(timing-type) $(binaries-bench) $(binaries-benchset) \ > > $(bench-link-targets): %: %.o $(objpfx)json-lib.o \ > $(link-extra-libs-tests) \ > - $(sort $(filter $(common-objpfx)lib%,$(link-libc))) \ > + $(sort $(filter $(common-objpfx)lib%,$(link-libc-benchtests))) \ > $(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit) > - $(+link-tests) > + $(+link-benchtests) > > $(bench-link-targets): LDFLAGS += $(link-bench-bind-now) > > diff --git a/benchtests/README b/benchtests/README > index 44736d7e63..4d83a05b4b 100644 > --- a/benchtests/README > +++ b/benchtests/README > @@ -62,6 +62,16 @@ otherwise the above command may try to build the benchmark again. Benchmarks > that require generated code to be executed during the build are skipped when > cross-building. > > +Building benchmarks as static executables: > +========================================= > + > +To build benchmarks as static executables, on the build system, run: > + > + $ make STATIC-BENCHTESTS=yes bench-build > + > +You can copy benchmark executables to another machine and run them > +without copying the source nor build directories. > + > Running subsets of benchmarks: > ============================== > > -- > 2.31.1 > I am checking it if there are no comments. Thanks. -- H.J. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-10-04 14:33 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-08-09 14:16 [PATCH v2 0/2] benchtests: Building benchmarks as static executables H.J. Lu 2021-08-09 14:16 ` [PATCH v2 1/2] i686: Don't include multiarch memove in libc.a H.J. Lu 2021-08-30 12:57 ` H.J. Lu 2021-08-09 14:16 ` [PATCH v2 2/2] benchtests: Building benchmarks as static executables H.J. Lu 2021-10-04 14:32 ` H.J. Lu
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).