1. 04 11月, 2015 1 次提交
  2. 21 10月, 2015 1 次提交
  3. 06 8月, 2015 1 次提交
  4. 21 7月, 2015 1 次提交
  5. 14 5月, 2015 1 次提交
  6. 10 2月, 2015 1 次提交
  7. 04 12月, 2014 1 次提交
    • B
      tracing: Add additional marks to signal very large time deltas · 8e1e1df2
      Byungchul Park 提交于
      Currently, function graph tracer prints "!" or "+" just before
      function execution time to signal a function overhead, depending
      on the time. And some tracers tracing latency also print "!" or
      "+" just after time to signal overhead, depending on the interval
      between events. Even it is usually enough to do that, we sometimes
      need to signal for bigger execution time than 100 micro seconds.
      
      For example, I used function graph tracer to detect if there is
      any case that exit_mm() takes too much time. I did following steps
      in /sys/kernel/debug/tracing. It was easier to detect very large
      excution time with patched kernel than with original kernel.
      
      $ echo exit_mm > set_graph_function
      $ echo function_graph > current_tracer
      $ echo > trace
      $ cat trace_pipe > $LOGFILE
       ... (do something and terminate logging)
      $ grep "\\$" $LOGFILE
       3) $ 22082032 us |                      } /* kernel_map_pages */
       3) $ 22082040 us |                    } /* free_pages_prepare */
       3) $ 22082113 us |                  } /* free_hot_cold_page */
       3) $ 22083455 us |                } /* free_hot_cold_page_list */
       3) $ 22083895 us |              } /* release_pages */
       3) $ 22177873 us |            } /* free_pages_and_swap_cache */
       3) $ 22178929 us |          } /* unmap_single_vma */
       3) $ 22198885 us |        } /* unmap_vmas */
       3) $ 22206949 us |      } /* exit_mmap */
       3) $ 22207659 us |    } /* mmput */
       3) $ 22207793 us |  } /* exit_mm */
      
      And then, it was easy to find out that a schedule-out occured by
      sub_preempt_count() within kernel_map_pages().
      
      To detect very large function exection time caused by either problematic
      function implementation or scheduling issues, this patch can be useful.
      
      Link: http://lkml.kernel.org/r/1416789259-24038-1-git-send-email-byungchul.park@lge.comSigned-off-by: NByungchul Park <byungchul.park@lge.com>
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      8e1e1df2
  8. 22 11月, 2014 1 次提交
    • M
      ftrace, kprobes: Support IPMODIFY flag to find IP modify conflict · f8b8be8a
      Masami Hiramatsu 提交于
      Introduce FTRACE_OPS_FL_IPMODIFY to avoid conflict among
      ftrace users who may modify regs->ip to change the execution
      path. If two or more users modify the regs->ip on the same
      function entry, one of them will be broken. So they must add
      IPMODIFY flag and make sure that ftrace_set_filter_ip() succeeds.
      
      Note that ftrace doesn't allow ftrace_ops which has IPMODIFY
      flag to have notrace hash, and the ftrace_ops must have a
      filter hash (so that the ftrace_ops can hook only specific
      entries), because it strongly depends on the address and
      must be allowed for only few selected functions.
      
      Link: http://lkml.kernel.org/r/20141121102516.11844.27829.stgit@localhost.localdomain
      
      Cc: Jiri Kosina <jkosina@suse.cz>
      Cc: Seth Jennings <sjenning@redhat.com>
      Cc: Petr Mladek <pmladek@suse.cz>
      Cc: Vojtech Pavlik <vojtech@suse.cz>
      Cc: Miroslav Benes <mbenes@suse.cz>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Josh Poimboeuf <jpoimboe@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Signed-off-by: NMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      [ fixed up some of the comments ]
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      f8b8be8a
  9. 16 7月, 2014 1 次提交
    • K
      sched: Transform resched_task() into resched_curr() · 8875125e
      Kirill Tkhai 提交于
      We always use resched_task() with rq->curr argument.
      It's not possible to reschedule any task but rq's current.
      
      The patch introduces resched_curr(struct rq *) to
      replace all of the repeating patterns. The main aim
      is cleanup, but there is a little size profit too:
      
        (before)
      	$ size kernel/sched/built-in.o
      	   text	   data	    bss	    dec	    hex	filename
      	155274	  16445	   7042	 178761	  2ba49	kernel/sched/built-in.o
      
      	$ size vmlinux
      	   text	   data	    bss	    dec	    hex	filename
      	7411490	1178376	 991232	9581098	 92322a	vmlinux
      
        (after)
      	$ size kernel/sched/built-in.o
      	   text	   data	    bss	    dec	    hex	filename
      	155130	  16445	   7042	 178617	  2b9b9	kernel/sched/built-in.o
      
      	$ size vmlinux
      	   text	   data	    bss	    dec	    hex	filename
      	7411362	1178376	 991232	9580970	 9231aa	vmlinux
      
      	I was choosing between resched_curr() and resched_rq(),
      	and the first name looks better for me.
      
      A little lie in Documentation/trace/ftrace.txt. I have not
      actually collected the tracing again. With a hope the patch
      won't make execution times much worse :)
      Signed-off-by: NKirill Tkhai <tkhai@yandex.ru>
      Signed-off-by: NPeter Zijlstra <peterz@infradead.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Link: http://lkml.kernel.org/r/20140628200219.1778.18735.stgit@localhostSigned-off-by: NIngo Molnar <mingo@kernel.org>
      8875125e
  10. 21 5月, 2014 1 次提交
  11. 11 11月, 2013 1 次提交
  12. 20 8月, 2013 1 次提交
  13. 12 6月, 2013 2 次提交
    • S
      tracing: Add function probe to trigger a ftrace dump of current CPU trace · 90e3c03c
      Steven Rostedt (Red Hat) 提交于
      Add the "cpudump" command to have the current CPU ftrace buffer dumped
      to console if a function is hit. This is useful when debugging a
      tripple fault, where you have an idea of a function that is called
      just before the tripple fault occurs, and can tell ftrace to dump its
      content out to the console before it continues.
      
      This differs from the "dump" command as it only dumps the content of
      the ring buffer for the currently executing CPU, and does not show
      the contents of the other CPUs.
      
      Format is:
      
        <function>:cpudump
      
      echo 'bad_address:cpudump' > /debug/tracing/set_ftrace_filter
      
      To remove this:
      
      echo '!bad_address:cpudump' > /debug/tracing/set_ftrace_filter
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      90e3c03c
    • S
      tracing: Add function probe to trigger a ftrace dump to console · ad71d889
      Steven Rostedt (Red Hat) 提交于
      Add the "dump" command to have the ftrace buffer dumped to console if
      a function is hit. This is useful when debugging a tripple fault,
      where you have an idea of a function that is called just before the
      tripple fault occurs, and can tell ftrace to dump its content out
      to the console before it continues.
      
      Format is:
      
        <function>:dump
      
      echo 'bad_address:dump' > /debug/tracing/set_ftrace_filter
      
      To remove this:
      
      echo '!bad_address:dump' > /debug/tracing/set_ftrace_filter
      Requested-by: NLuis Claudio R. Goncalves <lclaudio@uudg.org>
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      ad71d889
  14. 15 3月, 2013 1 次提交
  15. 08 3月, 2013 1 次提交
  16. 31 1月, 2013 1 次提交
  17. 13 2月, 2012 1 次提交
  18. 10 3月, 2011 1 次提交
    • D
      tracing: Add an 'overwrite' trace_option. · 750912fa
      David Sharp 提交于
      Add an "overwrite" trace_option for ftrace to control whether the buffer should
      be overwritten on overflow or not. The default remains to overwrite old events
      when the buffer is full. This patch adds the option to instead discard newest
      events when the buffer is full. This is useful to get a snapshot of traces just
      after enabling traces. Dropping the current event is also a simpler code path.
      Signed-off-by: NDavid Sharp <dhsharp@google.com>
      LKML-Reference: <1291844807-15481-1-git-send-email-dhsharp@google.com>
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      750912fa
  19. 09 2月, 2011 2 次提交
  20. 28 4月, 2010 1 次提交
  21. 22 4月, 2010 1 次提交
    • F
      tracing: Dump either the oops's cpu source or all cpus buffers · cecbca96
      Frederic Weisbecker 提交于
      The ftrace_dump_on_oops kernel parameter, sysctl and sysrq let one
      dump every cpu buffers when an oops or panic happens.
      
      It's nice when you have few cpus but it may take ages if have many,
      plus you miss the real origin of the problem in all the cpu traces.
      
      Sometimes, all you need is to dump the cpu buffer that triggered the
      opps, most of the time it is our main interest.
      
      This patch modifies ftrace_dump_on_oops to handle this choice.
      
      The ftrace_dump_on_oops kernel parameter, when it comes alone, has
      the same behaviour than before. But ftrace_dump_on_oops=orig_cpu
      will only dump the buffer of the cpu that oops'ed.
      
      Similarly, sysctl kernel.ftrace_dump_on_oops=1 and
      echo 1 > /proc/sys/kernel/ftrace_dump_on_oops keep their previous
      behaviour. But setting 2 jumps into cpu origin dump mode.
      
      v2: Fix double setup
      v3: Fix spelling issues reported by Randy Dunlap
      v4: Also update __ftrace_dump in the selftests
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      Acked-by: NSteven Rostedt <rostedt@goodmis.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Li Zefan <lizf@cn.fujitsu.com>
      Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
      cecbca96
  22. 09 2月, 2010 1 次提交
  23. 27 1月, 2010 1 次提交
  24. 24 10月, 2009 1 次提交
  25. 21 9月, 2009 1 次提交
  26. 15 9月, 2009 1 次提交
  27. 05 9月, 2009 1 次提交
  28. 16 6月, 2009 1 次提交
    • G
      debugfs: Fix terminology inconsistency of dir name to mount debugfs filesystem. · 156f5a78
      GeunSik Lim 提交于
      Many developers use "/debug/" or "/debugfs/" or "/sys/kernel/debug/"
      directory name to mount debugfs filesystem for ftrace according to
      ./Documentation/tracers/ftrace.txt file.
      
      And, three directory names(ex:/debug/, /debugfs/, /sys/kernel/debug/) is
      existed in kernel source like ftrace, DRM, Wireless, Documentation,
      Network[sky2]files to mount debugfs filesystem.
      
      debugfs means debug filesystem for debugging easy to use by greg kroah
      hartman. "/sys/kernel/debug/" name is suitable as directory name
      of debugfs filesystem.
      - debugfs related reference: http://lwn.net/Articles/334546/
      
      Fix inconsistency of directory name to mount debugfs filesystem.
      
      * From Steven Rostedt
        - find_debugfs() and tracing_files() in this patch.
      Signed-off-by: NGeunSik Lim <geunsik.lim@samsung.com>
      Acked-by     : Inaky Perez-Gonzalez <inaky@linux.intel.com>
      Reviewed-by  : Steven Rostedt <rostedt@goodmis.org>
      Reviewed-by  : James Smart <james.smart@emulex.com>
      CC: Jiri Kosina <trivial@kernel.org>
      CC: David Airlie <airlied@linux.ie>
      CC: Peter Osterlund <petero2@telia.com>
      CC: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      CC: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
      CC: Masami Hiramatsu <mhiramat@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      156f5a78
  29. 13 6月, 2009 1 次提交
  30. 11 6月, 2009 1 次提交
  31. 29 5月, 2009 1 次提交
  32. 09 4月, 2009 1 次提交
    • L
      tracing: consolidate documents · 66bb7488
      Li Zefan 提交于
      Move kmemtrace.txt, tracepoints.txt, ftrace.txt and mmiotrace.txt to
      the new trace/ directory.
      
      I didnt find any references to those documents in both source
      files and documents, so no extra work needs to be done.
      Signed-off-by: NLi Zefan <lizf@cn.fujitsu.com>
      Acked-by: NPekka Paalanen <pq@iki.fi>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
      LKML-Reference: <49DD6E2B.6090200@cn.fujitsu.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      66bb7488
  33. 08 3月, 2009 1 次提交
  34. 05 3月, 2009 1 次提交
  35. 19 2月, 2009 2 次提交
  36. 20 1月, 2009 1 次提交
  37. 28 11月, 2008 1 次提交
    • W
      ftrace: improve documentation · c072c249
      walimis 提交于
      Impact: extend documentation with notice of using wild cards correctly
      
      We know that we can use wild cards to set set_ftrace_filter, but there's
      problem when using them naively such as:
      
         echo h* > /debug/tracing/set_ftrace_filter
      
      If there are files named with "h" prefix in current directory,
      echo "h*" will echo these filenames to set_ftrace_filter, not the
      intended "h*".
      
      For example:
      
        $ cat /debug/tracing/available_filter_functions |grep ^hr |wc -l
        23
        $ ls
        $ touch hraa hrdd
        $ ls
        hraa  hrdd
        $ echo hr* > /debug/tracing/set_ftrace_filter
        $ cat /debug/tracing/set_ftrace_filter
      
      No output in /debug/tracing/set_ftrace_filter!
      
      If we use '' to escape wild cards, it works:
      
        $ ls
        hraa  hrdd
        $ echo "hr*" > /debug/tracing/set_ftrace_filter
        $ cat /debug/tracing/set_ftrace_filter |wc -l
        23
      
      This problem can lead to unexpected result if current directory has a
      lot of files.
      Signed-off-by: Nwalimis <walimisdev@gmail.com>
      Acked-by: NSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      c072c249