1. 04 9月, 2015 1 次提交
  2. 28 8月, 2015 2 次提交
    • R
      scripts: add stackdelta script · 5bbb9f75
      Rasmus Villemoes 提交于
      This adds a simple perl script for reading two files as produced by
      the stackusage script and computing the changes in stack usage. For
      example:
      
      $ scripts/stackusage -o /tmp/old.su CC=gcc-4.7 -j8 fs/ext4/
      $ scripts/stackusage -o /tmp/new.su CC=gcc-5.0 -j8 fs/ext4/
      $ scripts/stackdelta /tmp/{old,new}.su | sort -k5,5g
      
      shows that gcc 5.0 generally produces less stack-hungry code than gcc
      4.7. Obviously, the script can also be used for measuring the effect
      of commits, .config tweaks or whatnot.
      Signed-off-by: NRasmus Villemoes <linux@rasmusvillemoes.dk>
      Signed-off-by: NMichal Marek <mmarek@suse.com>
      5bbb9f75
    • R
      scripts: add stackusage script · 56d4a381
      Rasmus Villemoes 提交于
      The current checkstack.pl script has a few problems, stemming from the
      overly simplistic attempt at parsing objdump output with regular
      expressions: For example, on x86_64 it doesn't take the push
      instruction into account, making it consistently underestimate the
      real stack use, and it also doesn't capture stack pointer adjustments
      of exactly 128 bytes [1].
      
      Since newer gcc (>= 4.6) knows about -fstack-usage, we might as well
      take the information straight from the horse's mouth. This patch
      introduces scripts/stackusage, which is a simple wrapper for running
      make with KCFLAGS set to -fstack-usage. Example use is
      
      scripts/stackusage -o out.su -j8 lib/
      
      The script understands "-o foo" for writing to 'foo' and -h for a
      trivial help text; anything else is passed to make.
      
      Afterwards, we find all newly created .su files, massage them a
      little, sort by stack use and write the result to a single output
      file.
      
      Note that the function names printed by (at least) gcc 4.7 are
      sometimes useless. For example, the first three lines of out.su
      generated above are
      
      ./lib/decompress_bunzip2.c:155  get_next_block  448     static
      ./lib/decompress_unlzma.c:537   unlzma  336     static
      ./lib/vsprintf.c:616    8       304     static
      
      That function '8' is really the static symbol_string(), but it has
      been subject to 'interprocedural scalar replacement of aggregates', so
      its name in the object file is 'symbol_string.isra.8'. gcc 5.0 doesn't
      have this problem; it uses the full name as seen in the object file.
      
      [1] Since gcc encodes that by
      
      48 83 c4 80             add    $0xffffffffffffff80,%rsp
      
      and not
      
      48 81 ec 80 00 00 00    sub    $0x80,%rsp
      
      since -128 fits in an imm8.
      Signed-off-by: NRasmus Villemoes <linux@rasmusvillemoes.dk>
      Signed-off-by: NMichal Marek <mmarek@suse.com>
      56d4a381
  3. 26 8月, 2015 1 次提交
  4. 20 8月, 2015 1 次提交
    • C
      fallback to hostname in scripts/package/builddeb · bea107b1
      Christian Kujau 提交于
      I happened to build a kernel with "make deb-pkg" on a machine with no
      network connectivity, but this failed with:
      
      [...]
        INSTALL debian/headertmp/usr/include/asm/ (65 files)
      hostname: Name or service not known
      ../scripts/package/Makefile:90: recipe for target 'deb-pkg' failed
      make[2]: *** [deb-pkg] Error 1
      
      In scripts/package/builddeb it tries to construct an email address (that
      can be queried in /proc/version later on) but with no network,
      the "hostname -f" fails. The following patch falls back to just use the
      shortname if we cannot determine our FQDN.
      Signed-off-by: NChristian Kujau <lists@nerdbynature.de>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      bea107b1
  5. 19 8月, 2015 3 次提交
  6. 15 6月, 2015 1 次提交
    • J
      scripts/package/Makefile: rpmbuild is needed for rpm targets · 21a59991
      Jim Davis 提交于
      Before rpm release 4.1, in 2002, either the rpm command or the
      rpmbuild command could be used in the rpm-pkg or binrpm-pkg targets,
      and the Makefile chose the rpm command if the rpmbuild command wasn't
      found.
      
      After release 4.1, however, the rpm command could no longer be used in
      place of the rpmbuild command.  As the rpmbuild command is not
      installed by default, this can lead to failures with the rpm-pkg and
      binrpm-pkg targets:
      
      rpm --define "_builddir ." --target \
          x86_64 -bb ./binkernel.spec
          rpm --target: unknown option
          scripts/package/Makefile:60: recipe for target 'binrpm-pkg' failed
      
      Change the Makefile to use rpmbuild unconditionally to avoid this.
      Signed-off-by: NJim Davis <jim.epost@gmail.com>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      21a59991
  7. 03 6月, 2015 1 次提交
  8. 25 5月, 2015 1 次提交
  9. 21 5月, 2015 3 次提交
  10. 20 5月, 2015 5 次提交
  11. 06 5月, 2015 1 次提交
    • A
      builddeb: fix stripped module signatures if CONFIG_DEBUG_INFO and CONFIG_MODULE_SIG_ALL are set · 64178cb6
      Andrey Skvortsov 提交于
      If CONFIG_MODULE_SIG_ALL is set, then user expects that all modules are
      automatically signed in the result package, as it's for rpm-pkg, binrpm-pkg,
      tar, tar-*. For deb-pkg this is correct only if CONFIG_DEBUG_INFO
      is NOT set. In that case deb-package contains signed modules.
      
      But if CONFIG_DEBUG_INFO is set, builddeb creates separate package with
      debug information. To do that, debug information from all modules
      is copied into separate files by objcopy. And loadable kernel modules are
      stripped afterwards. Stripping removes previously (during modules_install)
      added signatures from loadable kernel modules. Therefore final deb-package
      contains unsigned modules despite of set option CONFIG_MODULE_SIG_ALL.
      
      This patch resigns all stripped modules if CONFIG_MODULE_SIG_ALL is set
      to solve this problem.
      Signed-off-by: NAndrey Skvortsov <andrej.skvortzov@gmail.com>
      Acked-by: Nmaximilian attems <max@stro.at>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      64178cb6
  12. 27 4月, 2015 2 次提交
  13. 22 4月, 2015 7 次提交
  14. 17 4月, 2015 11 次提交