Skip to content
  1. Oct 26, 2010
  2. Oct 18, 2010
    • Steven Rostedt's avatar
      ftrace: Remove recursion between recordmcount and scripts/mod/empty · d7b4d6de
      Steven Rostedt authored
      
      
      When DYNAMIC_FTRACE is enabled and we use the C version of recordmcount,
      all objects are run through the recordmcount program to create a
      separate section that stores all the callers of mcount.
      
      The build process has a special file: scripts/mod/empty.o. This is
      built from empty.c which is literally an empty file (except for a
      single comment). This file is used to find information about the target
      elf format, like endianness and word size.
      
      The problem comes up when we need to build recordmcount. The
      build process requires that empty.o is built first. The build rules
      for empty.o will try to execute recordmcount on the empty.o file.
      We get an error that recordmcount does not exist.
      
      To avoid this recursion, the build file will skip running recordmcount
      if the file that it is building is script/mod/empty.o.
      
      [ extra comment Suggested-by: Sam Ravnborg <sam@ravnborg.org> ]
      
      Reported-by: default avatarIngo Molnar <mingo@elte.hu>
      Tested-by: default avatarIngo Molnar <mingo@elte.hu>
      Cc: Michal Marek <mmarek@suse.cz>
      Cc: linux-kbuild@vger.kernel.org
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      d7b4d6de
  3. Oct 15, 2010
    • Steven Rostedt's avatar
      ftrace: Use objtree for C version of recordmcount · 85caa993
      Steven Rostedt authored
      
      
      The C version of recordmcount is compiled to a binary, which will
      end up located in the objtree. If the kernel is built with O=path,
      the srctree will not include the binary recordmcount caller.
      
      Cc: Michal Marek <mmarek@suse.cz>
      Cc: linux-kbuild@vger.kernel.org
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      85caa993
    • Steven Rostedt's avatar
      ftrace: Do not process kernel/trace/ftrace.o with C recordmcount program · 44475863
      Steven Rostedt authored
      
      
      The file kernel/trace/ftrace.c references the mcount() call to
      convert the mcount() callers to nops. But because it references
      mcount(), the mcount() address is placed in the relocation table.
      
      The C version of recordmcount reads the relocation table of all
      object files, and it will add all references to mcount to the
      __mcount_loc table that is used to find the places that call mcount()
      and change the call to a nop. When recordmcount finds the mcount reference
      in kernel/trace/ftrace.o, it saves that location even though the code
      is not a call, but references mcount as data.
      
      On boot up, when all calls are converted to nops, the code has a safety
      check to determine what op code it is actually replacing before it
      replaces it. If that op code at the address does not match, then
      a warning is printed and the function tracer is disabled.
      
      The reference to mcount in ftrace.c, causes this warning to trigger,
      since the reference is not a call to mcount(). The ftrace.c file is
      not compiled with the -pg flag, so no calls to mcount() should be
      expected.
      
      This patch simply makes recordmcount.c skip the kernel/trace/ftrace.c
      file. This was the same solution used by the perl version of
      recordmcount.
      
      Reported-by: default avatarIngo Molnar <mingo@elte.hu>
      Cc: John Reiser <jreiser@bitwagon.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      44475863
  4. Oct 14, 2010
    • Steven Rostedt's avatar
      ftrace: Remove duplicate code for 64 and 32 bit in recordmcount.c · c28d5077
      Steven Rostedt authored
      
      
      The elf reader for recordmcount.c had duplicate functions for both
      32 bit and 64 bit elf handling. This was due to the need of using
      the 32 and 64 bit elf structures.
      
      This patch consolidates the two by using macros to define the 32
      and 64 bit names in a recordmcount.h file, and then by just defining
      a RECORD_MCOUNT_64 macro and including recordmcount.h twice we
      create the funtions for both the 32 bit version as well as the
      64 bit version using one code source.
      
      Cc: John Reiser <jreiser@bitwagon.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      c28d5077
    • Steven Rostedt's avatar
      ftrace/x86: Add support for C version of recordmcount · 72441cb1
      Steven Rostedt authored
      
      
      This patch adds the support for the C version of recordmcount and
      compile times show ~ 12% improvement.
      
      After verifying this works, other archs can add:
      
       HAVE_C_MCOUNT_RECORD
      
      in its Kconfig and it will use the C version of recordmcount
      instead of the perl version.
      
      Cc: <linux-arch@vger.kernel.org>
      Cc: Michal Marek <mmarek@suse.cz>
      Cc: linux-kbuild@vger.kernel.org
      Cc: John Reiser <jreiser@bitwagon.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      72441cb1
    • John Reiser's avatar
      ftrace: Add C version of recordmcount compile time code · 81d3858d
      John Reiser authored
      
      
      Currently, the mcount callers are found with a perl script that does
      an objdump on every file in the kernel. This is a C version of that
      same code which should increase the performance time of compiling
      the kernel with dynamic ftrace enabled.
      
      Signed-off-by: default avatarJohn Reiser <jreiser@bitwagon.com>
      
      [ Updated the code to include .text.unlikely section as well as
        changing the format to follow Linux coding style. ]
      
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      81d3858d
  5. Oct 09, 2010
  6. Oct 04, 2010
  7. Sep 24, 2010
    • Ingo Molnar's avatar
      jump label: Fix GCC feature check when distcc is used · d6dad199
      Ingo Molnar authored
      
      
      The following build bug occurs on distcc builds:
      
         CC      arch/x86/kernel/asm-offsets.s
       In file included from include/linux/module.h:24,
                        from include/linux/crypto.h:22,
                        from arch/x86/kernel/asm-offsets_64.c:9,
                        from arch/x86/kernel/asm-offsets.c:5:
       include/trace/events/module.h: In function 'trace_module_load':
       include/trace/events/module.h:18: error: expected '(' before 'goto'
       include/trace/events/module.h:18: error: expected identifier or '*' before '(' token
      
      It triggers because distcc is invoked by turning $CC into "distcc gcc",
      but gcc-goto.sh check script was using $1 not $@ to expand parameters.
      
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      LKML-Reference: <20100923034910.867858597@goodmis.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      d6dad199
  8. Sep 22, 2010
  9. Sep 11, 2010
  10. Sep 02, 2010
  11. Aug 21, 2010
    • Michal Marek's avatar
      setlocalversion: Ignote SCMs above the linux source tree · 8558f59e
      Michal Marek authored
      
      
      Dan McGee <dpmcgee@gmail.com> writes:
      > Note that when in git, you get the appended "+" sign. If
      > LOCALVERSION_AUTO is set, you will get something like
      > "eee-gb01b08c-dirty" (whereas the copy of the tree in /tmp still
      > returns "eee"). It doesn't matter whether the working tree is dirty or
      > clean.
      >
      > Is there a way to disable this? I'm building from a clean tarball that
      > just happens to be unpacked inside a git repository. One would think
      > setting LOCALVERSION_AUTO to false would do it, but no such luck...
      
      Fix this by checking if the kernel source tree is the root of the git or
      hg repository. No fix for svn: If the kernel source is not tracked in
      the svn repository, it works as expected, otherwise determining the
      'repository root' is not really a defined task.
      
      Reported-and-tested-by: default avatarDan McGee <dpmcgee@gmail.com>
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      8558f59e
  12. Aug 17, 2010
  13. Aug 14, 2010
  14. Aug 12, 2010
Loading