Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mm: uninline kstrdup()

gcc inlines kstrdup into kstrdup_const() but it can very efficiently tail
call into it instead:

$ ./scripts/bloat-o-meter ../vmlinux-000 ../obj/vmlinux
add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-84 (-84)
Function old new delta
kstrdup_const 119 35 -84

Link: https://lkml.kernel.org/r/Y/4fDlbIhTLNLFHz@p183
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Alexey Dobriyan and committed by
Andrew Morton
2a6772eb 6d51363d

+1
+1
mm/util.c
··· 49 49 * 50 50 * Return: newly allocated copy of @s or %NULL in case of error 51 51 */ 52 + noinline 52 53 char *kstrdup(const char *s, gfp_t gfp) 53 54 { 54 55 size_t len;