1. 12 10月, 2016 14 次提交
  2. 08 10月, 2016 2 次提交
  3. 29 9月, 2016 1 次提交
  4. 23 9月, 2016 1 次提交
  5. 22 9月, 2016 1 次提交
    • S
      ftrace/scripts: Add helper script to bisect function tracing problem functions · 951dbf50
      Steven Rostedt (Red Hat) 提交于
      Every so often, with a special config or a architecture change, running
      function or function_graph tracing can cause the machien to hard reboot,
      crash, or simply hard lockup. There's some functions in the function graph
      tracer that can not be traced otherwise it causes the function tracer to
      recurse before the recursion protection mechanisms are in place.
      
      When this occurs, using the dynamic ftrace featuer that allows limiting what
      actually gets traced can be used to bisect down to the problem function.
      This adds a script that helps with this process in the scripts/tracing
      directory, called ftrace-bisect.sh
      
      The set up is to read all the functions that can be traced from
      available_filter_functions into a file (full_file). Then run this script
      passing it the full_file and a "test_file" and "non_test_file", where the
      test_file will be add to set_ftrace_filter. What ftarce_bisect.sh does, is
      to copy half of the functions in full_file into the test_file and the other
      half into the non_test_file. This way, one can cat the test_file into the
      set_ftrace_filter functions and only test the functions that are in that
      file. If it works, then we run the process again after copying non_test_file
      to full_file and repeating the process. If the system crashed, then the bad
      function is in the test_file and after a reboot, the test_file becomes the
      new full_file in the next iteration.
      
      When we get down to a single function in the full_file, then
      ftrace_bisect.sh will report that as the bad function.
      
      Full documentation of how to use this simple script is within the script
      file itself.
      
      Link: http://lkml.kernel.org/r/20160920100716.131d3647@gandalf.local.homeSigned-off-by: NSteven Rostedt <rostedt@goodmis.org>
      951dbf50
  6. 20 9月, 2016 3 次提交
  7. 09 9月, 2016 2 次提交
    • N
      kbuild: add arch specific post-link Makefile · fbe6e37d
      Nicholas Piggin 提交于
      Allow architectures to create arch/xxx/Makefile.postlink with targets
      for vmlinux, modules.ko, and clean, which will be invoked after final
      linking of vmlinux and modules.
      
      powerpc will use this to check vmlinux linker relocations for sanity,
      and may use it to fix up alternate instruction patch branch addresses.
      Signed-off-by: NNicholas Piggin <npiggin@gmail.com>
      Signed-off-by: NMichal Marek <mmarek@suse.com>
      fbe6e37d
    • S
      kbuild: allow architectures to use thin archives instead of ld -r · a5967db9
      Stephen Rothwell 提交于
      ld -r is an incremental link used to create built-in.o files in build
      subdirectories. It produces relocatable object files containing all
      its input files, and these are are then pulled together and relocated
      in the final link. Aside from the bloat, this constrains the final
      link relocations, which has bitten large powerpc builds with
      unresolvable relocations in the final link.
      
      Alan Modra has recommended the kernel use thin archives for linking.
      This is an alternative and means that the linker has more information
      available to it when it links the kernel.
      
      This patch enables a config option architectures can select, which
      causes all built-in.o files to be built as thin archives. built-in.o
      files in subdirectories do not get symbol table or index attached,
      which improves speed and size. The final link pass creates a
      built-in.o archive in the root output directory which includes the
      symbol table and index. The linker then uses takes this file to link.
      
      The --whole-archive linker option is required, because the linker now
      has visibility to every individual object file, and it will otherwise
      just completely avoid including those without external references
      (consider a file with EXPORT_SYMBOL or initcall or hardware exceptions
      as its only entry points). The traditional built works "by luck" as
      built-in.o files are large enough that they're going to get external
      references. However this optimisation is unpredictable for the kernel
      (due to above external references), ineffective at culling unused, and
      costly because the .o files have to be searched for references.
      Superior alternatives for link-time culling should be used instead.
      
      Build characteristics for inclink vs thinarc, on a small powerpc64le
      pseries VM with a modest .config:
      
                                        inclink       thinarc
      sizes
      vmlinux                        15 618 680    15 625 028
      sum of all built-in.o          56 091 808     1 054 334
      sum excluding root built-in.o                   151 430
      
      find -name built-in.o | xargs rm ; time make vmlinux
      real                              22.772s       21.143s
      user                              13.280s       13.430s
      sys                                4.310s        2.750s
      
      - Final kernel pulled in only about 6K more, which shows how
        ineffective the object file culling is.
      - Build performance looks improved due to less pagecache activity.
        On IO constrained systems it could be a bigger win.
      - Build size saving is significant.
      
      Side note, the toochain understands archives, so there's some tricks,
      $ ar t built-in.o          # list all files you linked with
      $ size built-in.o          # and their sizes
      $ objdump -d built-in.o    # disassembly (unrelocated) with filenames
      
      Implementation by sfr, minor tweaks by npiggin.
      Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NNicholas Piggin <npiggin@gmail.com>
      Signed-off-by: NMichal Marek <mmarek@suse.com>
      a5967db9
  8. 06 9月, 2016 2 次提交
  9. 02 9月, 2016 1 次提交
  10. 01 9月, 2016 2 次提交
    • M
      docs-rst: kernel-doc: fix typedef output in RST format · 82801d06
      Mauro Carvalho Chehab 提交于
      When using a typedef function like this one:
      	typedef bool v4l2_check_dv_timings_fnc (const struct v4l2_dv_timings * t, void * handle);
      
      The Sphinx C domain expects it to create a c:type: reference,
      as that's the way it creates the type references when parsing
      a c:function:: declaration.
      
      So, a declaration like:
      
      	.. c:function:: bool v4l2_valid_dv_timings (const struct v4l2_dv_timings * t, const struct v4l2_dv_timings_cap * cap, v4l2_check_dv_timings_fnc fnc, void * fnc_handle)
      
      Will create a cross reference for :c:type:`v4l2_check_dv_timings_fnc`.
      
      So, when outputting such typedefs in RST format, we need to handle
      this special case, as otherwise it will produce those warnings:
      
      	./include/media/v4l2-dv-timings.h:43: WARNING: c:type reference target not found: v4l2_check_dv_timings_fnc
      	./include/media/v4l2-dv-timings.h:60: WARNING: c:type reference target not found: v4l2_check_dv_timings_fnc
      	./include/media/v4l2-dv-timings.h:81: WARNING: c:type reference target not found: v4l2_check_dv_timings_fnc
      
      So, change the kernel-doc script to produce a RST output for the
      above typedef as:
      	.. c:type:: v4l2_check_dv_timings_fnc
      
      	   **Typedef**: timings check callback
      
      	**Syntax**
      
      	  ``bool v4l2_check_dv_timings_fnc (const struct v4l2_dv_timings * t, void * handle);``
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      Signed-off-by: NJonathan Corbet <corbet@lwn.net>
      82801d06
    • M
      docs-rst: improve typedef parser · d37c43ce
      Mauro Carvalho Chehab 提交于
      Improve the parser to handle typedefs like:
      
      	typedef bool v4l2_check_dv_timings_fnc(const struct v4l2_dv_timings *t, void *handle);
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      Signed-off-by: NJonathan Corbet <corbet@lwn.net>
      d37c43ce
  11. 31 8月, 2016 3 次提交
  12. 28 8月, 2016 5 次提交
  13. 27 8月, 2016 2 次提交
  14. 26 8月, 2016 1 次提交