23 Mar, 2011

1 commit


19 Jun, 2009

1 commit

  • Enable the use of GCC's coverage testing tool gcov [1] with the Linux
    kernel. gcov may be useful for:

    * debugging (has this code been reached at all?)
    * test improvement (how do I change my test to cover these lines?)
    * minimizing kernel configurations (do I need this option if the
    associated code is never run?)

    The profiling patch incorporates the following changes:

    * change kbuild to include profiling flags
    * provide functions needed by profiling code
    * present profiling data as files in debugfs

    Note that on some architectures, enabling gcc's profiling option
    "-fprofile-arcs" for the entire kernel may trigger compile/link/
    run-time problems, some of which are caused by toolchain bugs and
    others which require adjustment of architecture code.

    For this reason profiling the entire kernel is initially restricted
    to those architectures for which it is known to work without changes.
    This restriction can be lifted once an architecture has been tested
    and found compatible with gcc's profiling. Profiling of single files
    or directories is still available on all platforms (see config help
    text).

    [1] http://gcc.gnu.org/onlinedocs/gcc/Gcov.html

    Signed-off-by: Peter Oberparleiter
    Cc: Andi Kleen
    Cc: Huang Ying
    Cc: Li Wei
    Cc: Michael Ellerman
    Cc: Ingo Molnar
    Cc: Heiko Carstens
    Cc: Martin Schwidefsky
    Cc: Rusty Russell
    Cc: WANG Cong
    Cc: Sam Ravnborg
    Cc: Jeff Dike
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Oberparleiter
     

03 Jan, 2009

2 commits

  • GCC 3.0 and 3.1 are too old to build a working kernel.

    Signed-off-by: Ingo Molnar
    [ This check got dropped as obsolete when I simplified the gcc header
    inclusion mess in f153b82121b0366fe0e5f9553545cce237335175, but Willy
    Tarreau reports actually having those old versions still.. -Linus ]
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     
  • - include the gcc version-dependent header files from the generic gcc
    header file, rather than the other way around (iow: don't make the
    non-gcc header file have to know about gcc versions)

    - don't include compiler-gcc4.h for gcc 5 (for whenever it gets
    released). That's just confusing and made us do odd things in the
    gcc4 header file (testing that we really had version 4!)

    - generate the name from the __GNUC__ version directly, rather than
    having a mess of #if conditionals.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

29 Jan, 2008

1 commit


17 Oct, 2007

1 commit


10 May, 2007

1 commit

  • __used is defined to be __attribute__((unused)) for all pre-3.3 gcc
    compilers to suppress warnings for unused functions because perhaps they
    are referenced only in inline assembly. It is defined to be
    __attribute__((used)) for gcc 3.3 and later so that the code is still
    emitted for such functions.

    __maybe_unused is defined to be __attribute__((unused)) for both function
    and variable use if it could possibly be unreferenced due to the evaluation
    of preprocessor macros. Function prototypes shall be marked with
    __maybe_unused if the actual definition of the function is dependant on
    preprocessor macros.

    No update to compiler-intel.h is necessary because ICC supports both
    __attribute__((used)) and __attribute__((unused)) as specified by the gcc
    manual.

    __attribute_used__ is deprecated and will be removed once all current
    code is converted to using __used.

    Cc: Rusty Russell
    Cc: Adrian Bunk
    Signed-off-by: David Rientjes
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Rientjes
     

08 May, 2007

1 commit

  • Introduce a macro for suppressing gcc from generating a warning about a
    probable uninitialized state of a variable.

    Example:

    - spinlock_t *ptl;
    + spinlock_t *uninitialized_var(ptl);

    Not a happy solution, but those warnings are obnoxious.

    - Using the usual pointlessly-set-it-to-zero approach wastes several
    bytes of text.

    - Using a macro means we can (hopefully) do something else if gcc changes
    cause the `x = x' hack to stop working

    - Using a macro means that people who are worried about hiding true bugs
    can easily turn it off.

    Signed-off-by: Borislav Petkov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Borislav Petkov
     

15 Jan, 2006

1 commit

  • This patch is the first in a series that tries to optimize the kernel in terms
    of size (and thus cache behavior, both cpu and pagecache).

    This first patch changes __always_inline to be a forced inline instead of the
    "regular" inline it was on everything except alpha. This forced inline
    matches the intention of the define better as a matter of documentation.
    There is no change in behavior by this patch, since "inline" currently is
    mapped to a forced inline anyway.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     

09 Jan, 2006

1 commit

  • Remove various things which were checking for gcc-1.x and gcc-2.x compilers.

    From: Adrian Bunk

    Some documentation updates and removes some code paths for gcc < 3.2.

    Acked-by: Russell King
    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds