Message ID | 20211218200207.3034783-1-hjl.tools@gmail.com |
---|---|
State | Dropped |
Headers | show |
Series | elf: Inline do_tunable_update_val/tunable_initialize [BZ #28712] | expand |
Context | Check | Description |
---|---|---|
dj/TryBot-apply_patch | success | Patch applied to master at the time it was sent |
dj/TryBot-32bit | success | Build for i686 |
On Dez 18 2021, H.J. Lu via Libc-alpha wrote: > diff --git a/elf/dl-tunables.c b/elf/dl-tunables.c > index 497e948f1c..294ad81200 100644 > --- a/elf/dl-tunables.c > +++ b/elf/dl-tunables.c > @@ -92,7 +92,7 @@ get_next_env (char **envp, char **name, size_t *namelen, char **val, > return NULL; > } > > -static void > +static void inline > do_tunable_update_val (tunable_t *cur, const tunable_val_t *valp, > const tunable_num_t *minp, > const tunable_num_t *maxp) That shouldn't make a difference since static functions are already inlineable. If you want to force inlining you need to use always_inline.
On Sat, Dec 18, 2021 at 12:14 PM Andreas Schwab <schwab@linux-m68k.org> wrote: > > On Dez 18 2021, H.J. Lu via Libc-alpha wrote: > > > diff --git a/elf/dl-tunables.c b/elf/dl-tunables.c > > index 497e948f1c..294ad81200 100644 > > --- a/elf/dl-tunables.c > > +++ b/elf/dl-tunables.c > > @@ -92,7 +92,7 @@ get_next_env (char **envp, char **name, size_t *namelen, char **val, > > return NULL; > > } > > > > -static void > > +static void inline > > do_tunable_update_val (tunable_t *cur, const tunable_val_t *valp, > > const tunable_num_t *minp, > > const tunable_num_t *maxp) > > That shouldn't make a difference since static functions are already > inlineable. If you want to force inlining you need to use > always_inline. > Fixed in the v2 patch. Thanks.
diff --git a/elf/dl-tunables.c b/elf/dl-tunables.c index 497e948f1c..294ad81200 100644 --- a/elf/dl-tunables.c +++ b/elf/dl-tunables.c @@ -92,7 +92,7 @@ get_next_env (char **envp, char **name, size_t *namelen, char **val, return NULL; } -static void +static void inline do_tunable_update_val (tunable_t *cur, const tunable_val_t *valp, const tunable_num_t *minp, const tunable_num_t *maxp) @@ -139,7 +139,7 @@ do_tunable_update_val (tunable_t *cur, const tunable_val_t *valp, /* Validate range of the input value and initialize the tunable CUR if it looks good. */ -static void +static void inline tunable_initialize (tunable_t *cur, const char *strval) { tunable_val_t val;