1. 14 10月, 2008 5 次提交
    • F
      ftrace: fix some mistakes in error messages · 98a983aa
      Frédéric Weisbecker 提交于
      This patch fixes some mistakes on the tracer in warning messages when
      debugfs fails to create tracing files.
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: srostedt@redhat.com
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      98a983aa
    • S
      ftrace: dump out ftrace buffers to console on panic · 3f5a54e3
      Steven Rostedt 提交于
      At OLS I had a lot of interest to be able to have the ftrace buffers
      dumped on panic.  Usually one would expect to uses kexec and examine
      the buffers after a new kernel is loaded. But sometimes the resources
      do not permit kdump and kexec, so having an option to still see the
      sequence of events up to the crash is very advantageous.
      
      This patch adds the option to have the ftrace buffers dumped to the
      console in the latency_trace format on a panic. When the option is set,
      the default entries per CPU buffer are lowered to 16384, since the writing
      to the serial (if that is the console) may take an awful long time
      otherwise.
      
      [
       Changes since -v1:
        Got alpine to send correctly (as well as spell check working).
        Removed config option.
        Moved the static variables into ftrace_dump itself.
        Gave printk a log level.
      ]
      Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      3f5a54e3
    • S
      ftrace: ftrace_printk doc moved · 2f2c99db
      Steven Rostedt 提交于
      Based on Randy Dunlap's suggestion, the ftrace_printk kernel-doc belongs
      with the ftrace_printk macro that should be used. Not with the
      __ftrace_printk internal function.
      Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
      Acked-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      2f2c99db
    • S
      ftrace: printk formatting infrastructure · dd0e545f
      Steven Rostedt 提交于
      This patch adds a feature that can help kernel developers debug their
      code using ftrace.
      
        int ftrace_printk(const char *fmt, ...);
      
      This records into the ftrace buffer using printf formatting. The entry
      size in the buffers are still a fixed length. A new type has been added
      that allows for more entries to be used for a single recording.
      
      The start of the print is still the same as the other entries.
      
      It returns the number of characters written to the ftrace buffer.
      
      For example:
      
      Having a module with the following code:
      
      static int __init ftrace_print_test(void)
      {
              ftrace_printk("jiffies are %ld\n", jiffies);
              return 0;
      }
      
      Gives me:
      
        insmod-5441  3...1 7569us : ftrace_print_test: jiffies are 4296626666
      
      for the latency_trace file and:
      
                insmod-5441  [03]  1959.370498: ftrace_print_test jiffies are 4296626666
      
      for the trace file.
      
      Note: Only the infrastructure should go into the kernel. It is to help
      facilitate debugging for other kernel developers. Calls to ftrace_printk
      is not intended to be left in the kernel, and should be frowned upon just
      like scattering printks around in the code.
      
      But having this easily at your fingertips helps the debugging go faster
      and bugs be solved quicker.
      
      Maybe later on, we can hook this with markers and have their printf format
      be sucked into ftrace output.
      Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      dd0e545f
    • S
      ftrace: new continue entry - separate out from trace_entry · 2e2ca155
      Steven Rostedt 提交于
      Some tracers will need to work with more than one entry. In order to do this
      the trace_entry structure was split into two fields. One for the start of
      all entries, and one to continue an existing entry.
      
      The trace_entry structure now has a "field" entry that consists of the previous
      content of the trace_entry, and a "cont" entry that is just a string buffer
      the size of the "field" entry.
      
      Thanks to Andrew Morton for suggesting this idea.
      Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      2e2ca155
  2. 28 7月, 2008 1 次提交
  3. 24 7月, 2008 1 次提交
  4. 11 7月, 2008 2 次提交
  5. 24 6月, 2008 1 次提交
    • A
      ftrace: freeze kprobe'd records · ecea656d
      Abhishek Sagar 提交于
      Let records identified as being kprobe'd be marked as "frozen". The trouble
      with records which have a kprobe installed on their mcount call-site is
      that they don't get updated. So if such a function which is currently being
      traced gets its tracing disabled due to a new filter rule (or because it
      was added to the notrace list) then it won't be updated and continue being
      traced. This patch allows scanning of all frozen records during tracing to
      check if they should be traced.
      Signed-off-by: NAbhishek Sagar <sagar.abhishek@gmail.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      ecea656d
  6. 12 6月, 2008 1 次提交
  7. 10 6月, 2008 1 次提交
  8. 02 6月, 2008 1 次提交
    • A
      ftrace: distinguish kretprobe'd functions in trace logs · 76094a2c
      Abhishek Sagar 提交于
      Tracing functions via ftrace which have a kretprobe installed on them, can produce misleading output in their trace logs. E.g, consider the correct trace of the following sequence:
      
      do_IRQ()
      {
      ~
        irq_enter();
      ~
      }
      
      Trace log (sample):
      <idle>-0     [00] 4154504455.781616: irq_enter <- do_IRQ
      
      But if irq_enter() has a kretprobe installed on it, the return value stored on the stack at each invocation is modified to divert the return to a kprobe trampoline function called kretprobe_trampoline(). So with this the trace would (currently) look like:
      
      <idle>-0     [00] 4154504455.781616: irq_enter <- kretprobe_trampoline
      
      Now this is quite misleading to the end user, as it suggests something that didn't actually happen. So just to avoid such misinterpretations, the inlined patch aims to output such a log as:
      
      <idle>-0     [00] 4154504455.781616: irq_enter <- [unknown/kretprobe'd]
      Signed-off-by: NAbhishek Sagar <sagar.abhishek@gmail.com>
      Acked-by: NSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      76094a2c
  9. 27 5月, 2008 3 次提交
  10. 24 5月, 2008 24 次提交