diff options
author | Adhemerval Zanella Netto <adhemerval.zanella@linaro.org> | 2023-03-23 10:13:51 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2023-03-29 14:33:06 -0300 |
commit | 33237fe83d553dff111915024c9670adc3f06048 (patch) | |
tree | 610ddd2195dca3c3901cfcc74f76e4ab6eb6c0e7 /elf/dl-tunables.h | |
parent | 6384171fa0cef59b738ce8d0499fcea4f5009411 (diff) | |
download | glibc-33237fe83d553dff111915024c9670adc3f06048.tar glibc-33237fe83d553dff111915024c9670adc3f06048.tar.gz glibc-33237fe83d553dff111915024c9670adc3f06048.tar.bz2 glibc-33237fe83d553dff111915024c9670adc3f06048.zip |
Remove --enable-tunables configure option
And make always supported. The configure option was added on glibc 2.25
and some features require it (such as hwcap mask, huge pages support, and
lock elisition tuning). It also simplifies the build permutations.
Changes from v1:
* Remove glibc.rtld.dynamic_sort changes, it is orthogonal and needs
more discussion.
* Cleanup more code.
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Diffstat (limited to 'elf/dl-tunables.h')
-rw-r--r-- | elf/dl-tunables.h | 35 |
1 files changed, 11 insertions, 24 deletions
diff --git a/elf/dl-tunables.h b/elf/dl-tunables.h index ae6e014b95..45c191e021 100644 --- a/elf/dl-tunables.h +++ b/elf/dl-tunables.h @@ -21,17 +21,9 @@ #ifndef _TUNABLES_H_ #define _TUNABLES_H_ -#if !HAVE_TUNABLES -static inline void -__always_inline -__tunables_init (char **unused __attribute__ ((unused))) -{ - /* This is optimized out if tunables are not enabled. */ -} -#else -# include <stdbool.h> -# include <stddef.h> -# include <stdint.h> +#include <stdbool.h> +#include <stddef.h> +#include <stdint.h> typedef intmax_t tunable_num_t; @@ -44,12 +36,12 @@ typedef union typedef void (*tunable_callback_t) (tunable_val_t *); /* Full name for a tunable is top_ns.tunable_ns.id. */ -# define TUNABLE_NAME_S(top,ns,id) #top "." #ns "." #id +#define TUNABLE_NAME_S(top,ns,id) #top "." #ns "." #id -# define TUNABLE_ENUM_NAME(__top,__ns,__id) TUNABLE_ENUM_NAME1 (__top,__ns,__id) -# define TUNABLE_ENUM_NAME1(__top,__ns,__id) __top ## _ ## __ns ## _ ## __id +#define TUNABLE_ENUM_NAME(__top,__ns,__id) TUNABLE_ENUM_NAME1 (__top,__ns,__id) +#define TUNABLE_ENUM_NAME1(__top,__ns,__id) __top ## _ ## __ns ## _ ## __id -# include "dl-tunable-list.h" +#include "dl-tunable-list.h" extern void __tunables_init (char **); extern void __tunables_print (void); @@ -83,7 +75,7 @@ rtld_hidden_proto (__tunable_set_val) /* Get and return a tunable value. If the tunable was set externally and __CB is defined then call __CB before returning the value. */ -# define TUNABLE_GET_FULL(__top, __ns, __id, __type, __cb) \ +#define TUNABLE_GET_FULL(__top, __ns, __id, __type, __cb) \ ({ \ tunable_id_t id = TUNABLE_ENUM_NAME (__top, __ns, __id); \ __type ret; \ @@ -92,14 +84,14 @@ rtld_hidden_proto (__tunable_set_val) }) /* Set a tunable value. */ -# define TUNABLE_SET_FULL(__top, __ns, __id, __val) \ +#define TUNABLE_SET_FULL(__top, __ns, __id, __val) \ ({ \ __tunable_set_val (TUNABLE_ENUM_NAME (__top, __ns, __id), \ & (tunable_val_t) {.numval = __val}, NULL, NULL); \ }) /* Set a tunable value together with min/max values. */ -# define TUNABLE_SET_WITH_BOUNDS_FULL(__top, __ns, __id,__val, __min, __max) \ +#define TUNABLE_SET_WITH_BOUNDS_FULL(__top, __ns, __id,__val, __min, __max) \ ({ \ __tunable_set_val (TUNABLE_ENUM_NAME (__top, __ns, __id), \ & (tunable_val_t) {.numval = __val}, \ @@ -109,11 +101,7 @@ rtld_hidden_proto (__tunable_set_val) /* Namespace sanity for callback functions. Use this macro to keep the namespace of the modules clean. */ -# define TUNABLE_CALLBACK(__name) _dl_tunable_ ## __name - -# define TUNABLES_FRONTEND_valstring 1 -/* The default value for TUNABLES_FRONTEND. */ -# define TUNABLES_FRONTEND_yes TUNABLES_FRONTEND_valstring +#define TUNABLE_CALLBACK(__name) _dl_tunable_ ## __name static __always_inline bool tunable_val_lt (tunable_num_t lhs, tunable_num_t rhs, bool unsigned_cmp) @@ -149,4 +137,3 @@ tunable_is_name (const char *orig, const char *envname) } #endif -#endif |