1. 08 Feb, 2011 2 commits
  2. 27 Apr, 2010 1 commit
  3. 21 Apr, 2010 1 commit
    • Frederic Weisbecker's avatar
      tracing: Dump either the oops's cpu source or all cpus buffers · cecbca96
      Frederic Weisbecker authored
      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: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
      Acked-by: default avatarSteven 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>
  4. 09 Feb, 2010 1 commit
  5. 26 Jan, 2010 1 commit
  6. 24 Oct, 2009 1 commit
  7. 21 Sep, 2009 1 commit
  8. 15 Sep, 2009 1 commit
  9. 04 Sep, 2009 1 commit
  10. 16 Jun, 2009 1 commit
    • GeunSik Lim's avatar
      debugfs: Fix terminology inconsistency of dir name to mount debugfs filesystem. · 156f5a78
      GeunSik Lim authored
      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: default avatarGeunSik 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: default avatarGreg Kroah-Hartman <gregkh@suse.de>
  11. 12 Jun, 2009 1 commit
  12. 10 Jun, 2009 1 commit
  13. 29 May, 2009 1 commit
  14. 09 Apr, 2009 1 commit
    • Li Zefan's avatar
      tracing: consolidate documents · 66bb7488
      Li Zefan authored
      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: default avatarLi Zefan <lizf@cn.fujitsu.com>
      Acked-by: default avatarPekka 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: default avatarIngo Molnar <mingo@elte.hu>
  15. 08 Mar, 2009 1 commit
  16. 05 Mar, 2009 1 commit
  17. 19 Feb, 2009 2 commits
  18. 20 Jan, 2009 1 commit
  19. 28 Nov, 2008 1 commit
    • walimis's avatar
      ftrace: improve documentation · c072c249
      walimis authored
      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
        $ 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
      This problem can lead to unexpected result if current directory has a
      lot of files.
      Signed-off-by: default avatarwalimis <walimisdev@gmail.com>
      Acked-by: default avatarSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
  20. 26 Nov, 2008 1 commit
    • Steven Rostedt's avatar
      ftrace: add function tracing to single thread · df4fc315
      Steven Rostedt authored
      Impact: feature to function trace a single thread
      This patch adds the ability to function trace a single thread.
      The file:
      contains the pid to trace. Valid pids are any positive integer.
      Writing any negative number to this file will disable the pid
      tracing and the function tracer will go back to tracing all of
      This feature works with both static and dynamic function tracing.
      Signed-off-by: default avatarSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
  21. 23 Nov, 2008 2 commits
    • Török Edwin's avatar
      tracing: identify which executable object the userspace address belongs to · b54d3de9
      Török Edwin authored
      Impact: modify+improve the userstacktrace tracing visualization feature
      Store thread group leader id, and use it to lookup the address in the
      process's map. We could have looked up the address on thread's map,
      but the thread might not exist by the time we are called. The process
      might not exist either, but if you are reading trace_pipe, that is
      Example usage:
       mount -t debugfs nodev /sys/kernel/debug
       cd /sys/kernel/debug/tracing
       echo userstacktrace >iter_ctrl
       echo sym-userobj >iter_ctrl
       echo sched_switch >current_tracer
       echo 1 >tracing_enabled
       cat trace_pipe >/tmp/trace&
       .... run application ...
       echo 0 >tracing_enabled
       cat /tmp/trace
      You'll see stack entries like:
      You can convert them to function/line using:
         addr2line -fie /lib/libpthread-2.7.so 0xd370
         addr2line -fie /usr/lib/debug/libpthread-2.7.so 0xd370
      For non-PIC/PIE executables this won't work:
      You need to run the following: addr2line -fie a.out 0x40073b
      (where 0x400000 is the default load address of a.out)
      Signed-off-by: default avatarTörök Edwin <edwintorok@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    • Török Edwin's avatar
      tracing: add support for userspace stacktraces in tracing/iter_ctrl · 02b67518
      Török Edwin authored
      Impact: add new (default-off) tracing visualization feature
      Usage example:
       mount -t debugfs nodev /sys/kernel/debug
       cd /sys/kernel/debug/tracing
       echo userstacktrace >iter_ctrl
       echo sched_switch >current_tracer
       echo 1 >tracing_enabled
       .... run application ...
       echo 0 >tracing_enabled
      Then read one of 'trace','latency_trace','trace_pipe'.
      To get the best output you can compile your userspace programs with
      frame pointers (at least glibc + the app you are tracing).
      Signed-off-by: default avatarTörök Edwin <edwintorok@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
  22. 13 Nov, 2008 3 commits
    • Steven Rostedt's avatar
      ftrace: rename iter_ctrl to trace_options · ee6bce52
      Steven Rostedt authored
      Impact: rename file /debug/tracing/iter_ctrl to /debug/tracing/trace_options
      The original ftrace had a file called "iter_ctrl" that would control
      the way the output was iterated. But this file grew into a catch all
      for different trace options. This patch renames the file from iter_ctrl
      to trace_options to reflect this change.
      Signed-off-by: default avatarSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    • Steven Rostedt's avatar
      ftrace: show buffer size in kilobytes · 1696b2b0
      Steven Rostedt authored
      Impact: change the units of buffer_size_kb to kilobytes
      This patch changes the units of the buffer_size_kb file to kilobytes.
      Reading and writing to the file uses kilobytes as units. To help
      users to know what units are used, the output of the file now
      looks like:
        # cat /debug/tracing/buffer_size_kb
      Signed-off-by: default avatarSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    • Steven Rostedt's avatar
      ftrace: rename trace_entries to buffer_size_kb · a94c80e7
      Steven Rostedt authored
      Impact: rename of debugfs file trace_entries to buffer_size_kb
      The original ftrace had fixed size entries, and the number of entries
      was shown and modified via the file called trace_entries. By converting
      to the unified trace buffer, we now allow for variable size entries
      which makes the meaning of trace_entries pointless.
      Since trace_size might be confused to the size of the trace, this patch
      names it "buffer_size_kb" (thanks to Arjan van de Ven for this idea).
      [ mingo@elte.hu: changed from buffer_size to buffer_size_kb ]
      ( Note, the units are still bytes - the next patch changes that,
        to keep the wide rename patch separate from the unit-change patch. )
      Signed-off-by: default avatarSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
  23. 04 Nov, 2008 2 commits
  24. 30 Oct, 2008 1 commit
    • Steven Rostedt's avatar
      ftrace: handle archs that do not support irqs_disabled_flags · 9244489a
      Steven Rostedt authored
      Impact: build fix on non-lockdep architectures
      Some architectures do not support a way to read the irq flags that
      is set from "local_irq_save(flags)" to determine if interrupts were
      disabled or enabled. Ftrace uses this information to display to the user
      if the trace occurred with interrupts enabled or disabled.
      Besides the fact that those archs that do not support this will fail to
      compile, unless they fix it, we do not want to have the trace simply
      say interrupts were not disabled or they were enabled, without knowing
      the real answer.
      This patch adds a 'X' in the output to let the user know that the
      architecture they are running on does not support a way for the tracer
      to determine if interrupts were enabled or disabled. It also lets those
      same archs compile with tracing enabled.
      Signed-off-by: default avatarSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
  25. 01 Aug, 2008 1 commit
  26. 16 Jul, 2008 1 commit
  27. 14 Jul, 2008 1 commit
  28. 10 Jul, 2008 1 commit