kernel_optimize_test/scripts
Josh Poimboeuf 3f135e57a4 x86/build: Mostly disable '-maccumulate-outgoing-args'
The GCC '-maccumulate-outgoing-args' flag is enabled for most configs,
mostly because of issues which are no longer relevant.  For most
configs, and with most recent versions of GCC, it's no longer needed.

Clarify which cases need it, and only enable it for those cases.  Also
produce a compile-time error for the ftrace graph + mcount + '-Os' case,
which will otherwise cause runtime failures.

The main benefit of '-maccumulate-outgoing-args' is that it prevents an
ugly prologue for functions which have aligned stacks.  But removing the
option also has some benefits: more readable argument saves, smaller
text size, and (presumably) slightly improved performance.

Here are the object size savings for 32-bit and 64-bit defconfig
kernels:

      text	   data	    bss	     dec	    hex	filename
  10006710	3543328	1773568	15323606	 e9d1d6	vmlinux.x86-32.before
   9706358	3547424	1773568	15027350	 e54c96	vmlinux.x86-32.after

      text	   data	    bss	     dec	    hex	filename
  10652105	4537576	 843776	16033457	 f4a6b1	vmlinux.x86-64.before
  10639629	4537576	 843776	16020981	 f475f5	vmlinux.x86-64.after

That comes out to a 3% text size improvement on x86-32 and a 0.1% text
size improvement on x86-64.

Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Andrew Lutomirski <luto@kernel.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20170316193133.zrj6gug53766m6nn@treble
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2017-03-30 11:53:04 +02:00
..
basic
coccinelle Coccinelle: misc: Add support for devm variant in all modes 2016-12-11 12:08:26 +01:00
dtc scripts/dtc: Update to upstream version 0931cea3ba20 2017-01-04 10:47:53 -06:00
gcc-plugins Fixes a typo in sancov plugin, exposed in earlier compiler versions 2017-03-09 18:05:41 -08:00
gdb
genksyms kbuild: modversions: add infrastructure for emitting relative CRCs 2017-02-03 08:28:25 -08:00
kconfig Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2016-12-17 16:30:24 -08:00
ksymoops
mod objtool, modules: Discard objtool annotation sections for modules 2017-03-01 20:32:25 +01:00
package Merge branch 'kbuild/rc-fixes' into kbuild/misc 2016-12-11 21:20:34 +01:00
selinux selinux: use the kernel headers when building scripts/selinux 2016-12-21 10:39:25 -05:00
tracing
.gitignore
adjust_autoksyms.sh kbuild: fix scripts/adjust_autoksyms.sh* for the no modules case 2016-12-11 22:30:10 +01:00
analyze_suspend.py AnalyzeSuspend: fix drag and zoom bug in javascript 2017-02-16 00:52:35 +01:00
asn1_compiler.c
bloat-o-meter scripts/bloat-o-meter: compile .NUMBER regex 2016-12-12 18:55:06 -08:00
bootgraph.pl
check_00index.sh scripts: add a script to check if Documentation/00-INDEX is sane 2016-12-05 14:21:24 -07:00
check_extable.sh
check-lc_ctype.c
checkincludes.pl scripts/checkincludes.pl: add exit message for no duplicates found 2017-02-22 16:41:26 -08:00
checkkconfigsymbols.py checkkconfigsymbols.py: support Kconfig's 'imply' statement 2017-02-03 11:49:06 +01:00
checkpatch.pl checkpatch: warn when formats use %Z and suggest %z 2017-02-27 18:43:48 -08:00
checkstack.pl OpenRISC updates for 4.11 2017-02-24 18:37:03 -08:00
checksyscalls.sh
checkversion.pl
cleanfile
cleanpatch
coccicheck scripts/coccicheck: Update reference for the corresponding documentation 2016-10-11 09:50:43 +02:00
config
conmakehash.c
const_structs.checkpatch const_structs.checkpatch: add frequently used from Julia Lawall's list 2016-10-11 15:06:30 -07:00
decode_stacktrace.sh scripts/decode_stacktrace.sh: Fix address line detection on x86 2016-11-29 14:19:50 +01:00
decodecode
depmod.sh
diffconfig
docproc.c
export_report.pl
extract_xc3028.pl
extract-cert.c
extract-ikconfig
extract-module-sig.pl
extract-sys-certs.pl
extract-vmlinux
faddr2line scripts/faddr2line: Fix "size mismatch" error 2016-10-25 18:40:37 +02:00
gcc-goto.sh
gcc-ld
gcc-plugin.sh
gcc-version.sh
gcc-x86_32-has-stack-protector.sh
gcc-x86_64-has-stack-protector.sh scripts/has-stack-protector: add -fno-PIE 2016-11-09 22:28:05 +01:00
gen_initramfs_list.sh
get_dvb_firmware
get_maintainer.pl get_maintainer: look for arbitrary letter prefixes in sections 2016-12-12 18:55:09 -08:00
gfp-translate
headerdep.pl
headers_check.pl
headers_install.sh
headers.sh
insert-sys-cert.c
kallsyms.c kbuild: modversions: add infrastructure for emitting relative CRCs 2017-02-03 08:28:25 -08:00
Kbuild.include x86/build: Mostly disable '-maccumulate-outgoing-args' 2017-03-30 11:53:04 +02:00
kernel-doc kernel-doc: Handle returning pointers to pointers 2017-01-26 15:20:10 -07:00
kernel-doc-xml-ref
ld-version.sh
Lindent scripts/Lindent: clean up and optimize 2017-02-22 16:41:26 -08:00
link-vmlinux.sh kbuild: minor improvement for thin archives build 2016-11-29 15:58:57 +01:00
Makefile
Makefile.asm-generic
Makefile.build kbuild: modversions: add infrastructure for emitting relative CRCs 2017-02-03 08:28:25 -08:00
Makefile.clean
Makefile.dtbinst
Makefile.extrawarn Kbuild: enable -Wmaybe-uninitialized warnings by default 2016-11-11 08:45:08 -08:00
Makefile.fwinst
Makefile.gcc-plugins powerpc updates for 4.11 part 1. 2017-02-22 10:30:38 -08:00
Makefile.headersinst
Makefile.help
Makefile.host
Makefile.kasan kasan: turn on -fsanitize-address-use-after-scope 2016-12-12 18:55:09 -08:00
Makefile.lib
Makefile.modbuiltin
Makefile.modinst
Makefile.modpost
Makefile.modsign
Makefile.ubsan Kbuild: enable -Wmaybe-uninitialized warning for "make W=1" 2016-11-11 08:45:08 -08:00
makelst
markup_oops.pl
mkcompile_h
mkmakefile
mksysmap
mkuboot.sh
mkversion
module-common.lds There was some breakage with the changes for jump labels in the 4.11 merge 2017-03-07 09:37:28 -08:00
namespace.pl
objdiff
patch-kernel
pnmtologo.c
profile2linkerlist.pl
prune-kernel
recordmcount.c recordmcount: arm: Implement make_nop 2016-11-14 16:43:00 -05:00
recordmcount.h
recordmcount.pl scripts/spelling.txt: add "swith" pattern and fix typo instances 2017-02-27 18:43:46 -08:00
setlocalversion
show_delta
sign-file.c sign-file: fix build error in sign-file.c with libressl 2017-02-10 12:43:47 +11:00
sortextable.c powerpc: Build-time sort the exception table 2016-11-14 11:11:51 +11:00
sortextable.h
spelling.txt scripts/spelling.txt: add "overide" pattern and fix typo instances 2017-03-09 17:01:09 -08:00
stackdelta
stackusage
tags.sh scripts/tags.sh: include arch/Kconfig* for tags generation 2017-02-22 16:41:26 -08:00
unifdef.c
ver_linux
xen-hypercalls.sh
xz_wrap.sh