1. 10 10月, 2015 2 次提交
  2. 12 9月, 2015 1 次提交
  3. 11 9月, 2015 13 次提交
  4. 09 9月, 2015 1 次提交
  5. 05 9月, 2015 6 次提交
  6. 04 9月, 2015 3 次提交
  7. 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
  8. 27 8月, 2015 1 次提交
  9. 26 8月, 2015 1 次提交
  10. 24 8月, 2015 3 次提交
  11. 20 8月, 2015 5 次提交
    • M
      genksyms: Regenerate parser · 5b733fac
      Michal Marek 提交于
      Rebuild the parser after commit 1c722503 (genksyms: Duplicate
      function pointer type definitions segfault), using bison 2.7.
      Signed-off-by: NMichal Marek <mmarek@suse.com>
      5b733fac
    • R
      genksyms: Duplicate function pointer type definitions segfault · 1c722503
      Richard Yao 提交于
      I noticed that genksyms will segfault when it sees duplicate function
      pointer type declaration when I placed the same function pointer
      definition in two separate headers in a local branch as an intermediate
      step of some refactoring. This can be reproduced by piping the following
      minimal test case into `genksyms -r /dev/null` or alternatively, putting
      it into a C file attempting a build:
      
      typedef int (*f)();
      typedef int (*f)();
      
      Attaching gdb to genksyms to understand this failure is useless without
      changing CFLAGS to emit debuginfo. Once you have debuginfo, you will
      find that the failure is that `char *s` was NULL and the program
      executed `while(*s)`. At which point, further debugging requires
      familiarity with compiler front end / parser development.
      
      What happens is that flex identifies the first instance of the token "f"
      as IDENT and the yacc parser adds it to the symbol table. On the second
      instance, flex will identify "f" as TYPE, which triggers an error case
      in the yacc parser. Given that TYPE would have been IDENT had it not
      been in the symbol table, the the segmentaion fault could be avoided by
      treating TYPE as IDENT in the affected rule.
      
      Some might consider placing identical function pointer type declarations
      in different headers to be poor style might consider a failure to be
      beneficial. However, failing through a segmentation fault makes the
      cause non-obvious and can waste the time of anyone who encounters it.
      Signed-off-by: NRichard Yao <richard.yao@clusterhq.com>
      Acked-by: NMadhuri Yechuri <madhuriyechuri@clusterhq.com>
      Signed-off-by: NMichal Marek <mmarek@suse.com>
      1c722503
    • P
      Avoid conflict with host definitions when cross-compiling · 3c0561e0
      Pavel Fedin 提交于
      Certain platforms (e. g. BSD-based ones) define some ELF constants
      according to host. This patch fixes problems with cross-building
      Linux kernel on these platforms (e. g. building ARM 32-bit version
      on x86-64 host).
      Signed-off-by: NPavel Fedin <p.fedin@samsung.com>
      Signed-off-by: NMichal Marek <mmarek@suse.com>
      3c0561e0
    • S
      merge_config.sh: exit on missing input files · 78a6854e
      Sam Bobroff 提交于
      Add a check for the existence of input files and exit (with failure)
      if they are missing.
      
      Without this additional check, missing files produce error messages
      but still result in an output file being generated and a successful
      exit code.
      Signed-off-by: NSam Bobroff <sam.bobroff@au1.ibm.com>
      Signed-off-by: NMichal Marek <mmarek@suse.com>
      78a6854e
    • 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
  12. 19 8月, 2015 2 次提交