1. 15 1月, 2010 1 次提交
  2. 14 12月, 2009 3 次提交
  3. 23 11月, 2009 1 次提交
    • I
      tracing, function tracer: Clean up strstrip() usage · 457dc928
      Ingo Molnar 提交于
      Clean up strstrip() usage - which also addresses this build warning:
      
        kernel/trace/ftrace.c: In function 'ftrace_pid_write':
        kernel/trace/ftrace.c:3004: warning: ignoring return value of 'strstrip', declared with attribute warn_unused_result
      
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      457dc928
  4. 18 11月, 2009 1 次提交
  5. 04 11月, 2009 1 次提交
  6. 24 10月, 2009 1 次提交
  7. 15 10月, 2009 1 次提交
  8. 14 10月, 2009 2 次提交
    • J
      tracing: Enable records during the module load · 5cb084bb
      Jiri Olsa 提交于
      I was debuging some module using "function" and "function_graph"
      tracers and noticed, that if you load module after you enabled
      tracing, the module's hooks will convert only to NOP instructions.
      
      The attached patch enables modules' hooks if there's function trace
      allready on, thus allowing to trace module functions.
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      LKML-Reference: <20091013203425.896285120@goodmis.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      5cb084bb
    • J
      tracing: Support multiple pids in set_pid_ftrace file · 756d17ee
      jolsa@redhat.com 提交于
      Adding the possibility to set more than 1 pid in the set_pid_ftrace
      file, thus allowing to trace more than 1 independent processes.
      
      Usage:
      
       sh-4.0# echo 284 > ./set_ftrace_pid
       sh-4.0# cat ./set_ftrace_pid
       284
       sh-4.0# echo 1 >> ./set_ftrace_pid
       sh-4.0# echo 0 >> ./set_ftrace_pid
       sh-4.0# cat ./set_ftrace_pid
       swapper tasks
       1
       284
       sh-4.0# echo 4 > ./set_ftrace_pid
       sh-4.0# cat ./set_ftrace_pid
       4
       sh-4.0# echo > ./set_ftrace_pid
       sh-4.0# cat ./set_ftrace_pid
       no pid
       sh-4.0#
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <20091013203425.565454612@goodmis.org>
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      756d17ee
  9. 13 10月, 2009 1 次提交
  10. 08 10月, 2009 2 次提交
  11. 01 10月, 2009 1 次提交
    • M
      tracing: Fix infinite recursion in ftrace_update_pid_func() · 33974093
      Matt Fleming 提交于
      When CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST is enabled
      __ftrace_trace_function contains the current trace function, not
      ftrace_trace_function.
      
      In ftrace_update_pid_func() we currently incorrectly assign the
      value of ftrace_trace_function to __ftrace_trace_funcion before
      returning.
      
      Without this patch it is possible to execute an infinite recursion
      whereby ftrace_test_stop_func() calls __ftrace_trace_function,
      which was assigned ftrace_test_stop_func() in
      ftrace_update_pid_func().
      Signed-off-by: NMatt Fleming <matthew.fleming@imgtec.com>
      Acked-by: NSteven Rostedt <rostedt@goodmis.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <1254152581-18347-1-git-send-email-matt@console-pimps.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      33974093
  12. 25 9月, 2009 1 次提交
    • F
      tracing/filters: Unify the regex parsing helpers · 3f6fe06d
      Frederic Weisbecker 提交于
      The filter code has stolen the regex parsing function from ftrace to
      get the regex support.
      We have duplicated this code, so factorize it in the filter area and
      make it generally available, as the filter code is the most suited to
      host this feature.
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      Cc: Li Zefan <lizf@cn.fujitsu.com>
      3f6fe06d
  13. 24 9月, 2009 1 次提交
  14. 23 9月, 2009 1 次提交
  15. 22 9月, 2009 3 次提交
  16. 19 9月, 2009 1 次提交
  17. 18 9月, 2009 1 次提交
  18. 16 9月, 2009 1 次提交
  19. 12 9月, 2009 1 次提交
  20. 19 8月, 2009 1 次提交
    • J
      tracing: handle broken names in ftrace filter · eda1e328
      Jiri Olsa 提交于
      If one filter item (for set_ftrace_filter and set_ftrace_notrace) is being
      setup by more than 1 consecutive writes (FTRACE_ITER_CONT flag), it won't
      be handled corretly.
      
      I used following program to test/verify:
      
      [snip]
      #include <stdio.h>
      #include <sys/types.h>
      #include <sys/stat.h>
      #include <fcntl.h>
      #include <string.h>
      
      int main(int argc, char **argv)
      {
              int fd, i;
              char *file = argv[1];
      
              if (-1 == (fd = open(file, O_WRONLY))) {
                      perror("open failed");
                      return -1;
              }
      
              for(i = 0; i < (argc - 2); i++) {
                      int len = strlen(argv[2+i]);
                      int cnt, off = 0;
      
                      while(len) {
                              cnt = write(fd, argv[2+i] + off, len);
                              len -= cnt;
                              off += cnt;
                      }
              }
      
              close(fd);
              return 0;
      }
      [snip]
      
      before change:
      sh-4.0# echo > ./set_ftrace_filter
      sh-4.0# /test ./set_ftrace_filter "sys" "_open "
      sh-4.0# cat ./set_ftrace_filter
      #### all functions enabled ####
      sh-4.0#
      
      after change:
      sh-4.0# echo > ./set_ftrace_notrace
      sh-4.0# test ./set_ftrace_notrace "sys" "_open "
      sh-4.0# cat ./set_ftrace_notrace
      sys_open
      sh-4.0#
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      LKML-Reference: <20090811152904.GA26065@jolsa.lab.eng.brq.redhat.com>
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      eda1e328
  21. 17 8月, 2009 1 次提交
  22. 23 7月, 2009 2 次提交
  23. 18 7月, 2009 1 次提交
  24. 17 7月, 2009 2 次提交
  25. 13 7月, 2009 1 次提交
  26. 27 6月, 2009 1 次提交
    • L
      tracing: Fix stack tracer sysctl handling · a32c7765
      Li Zefan 提交于
      This made my machine completely frozen:
      
        # echo 1 > /proc/sys/kernel/stack_tracer_enabled
        # echo 2 > /proc/sys/kernel/stack_tracer_enabled
      
      The cause is register_ftrace_function() was called twice.
      
      Also fix ftrace_enabled sysctl, though seems nothing bad happened
      as I tested it.
      Signed-off-by: NLi Zefan <lizf@cn.fujitsu.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <4A448D17.9010305@cn.fujitsu.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      a32c7765
  27. 26 6月, 2009 1 次提交
  28. 24 6月, 2009 3 次提交
    • L
      ftrace: Fix t_hash_start() · d82d6244
      Li Zefan 提交于
      When the output of set_ftrace_filter is larger than PAGE_SIZE,
      t_hash_start() will be called the 2nd time, and then we start
      from the head of a hlist, which is wrong and causes some entries
      to be outputed twice.
      
      The worse is, if the hlist is large enough, reading set_ftrace_filter
      won't stop but in a dead loop.
      Reviewed-by: NLiming Wang <liming.wang@windriver.com>
      Signed-off-by: NLi Zefan <lizf@cn.fujitsu.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <4A41876E.2060407@cn.fujitsu.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      d82d6244
    • L
      ftrace: Don't manipulate @pos in t_start() · 694ce0a5
      Li Zefan 提交于
      It's rather confusing that in t_start(), in some cases @pos is
      incremented, and in some cases it's decremented and then incremented.
      
      This patch rewrites t_start() in a much more general way.
      
      Thus we fix a bug that if ftrace_filtered == 1, functions have tracer
      hooks won't be printed, because the branch is always unreachable:
      
      static void *t_start(...)
      {
      	...
      	if (!p)
      		return t_hash_start(m, pos);
      	return p;
      }
      
      Before:
        # echo 'sys_open' > /mnt/tracing/set_ftrace_filter
        # echo 'sys_write:traceon:4' >> /mnt/tracing/set_ftrace_filter
        sys_open
      
      After:
        # echo 'sys_open' > /mnt/tracing/set_ftrace_filter
        # echo 'sys_write:traceon:4' >> /mnt/tracing/set_ftrace_filter
        sys_open
        sys_write:traceon:count=4
      Reviewed-by: NLiming Wang <liming.wang@windriver.com>
      Signed-off-by: NLi Zefan <lizf@cn.fujitsu.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <4A41874B.4090507@cn.fujitsu.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      694ce0a5
    • L
      ftrace: Don't increment @pos in g_start() · 85951842
      Li Zefan 提交于
      It's wrong to increment @pos in g_start(). It causes some entries
      lost when reading set_graph_function, if the output of the file
      is larger than PAGE_SIZE.
      Reviewed-by: NLiming Wang <liming.wang@windriver.com>
      Signed-off-by: NLi Zefan <lizf@cn.fujitsu.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <4A418738.7090401@cn.fujitsu.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      85951842
  29. 20 6月, 2009 1 次提交
  30. 03 6月, 2009 1 次提交
    • S
      function-graph: always initialize task ret_stack · 84047e36
      Steven Rostedt 提交于
      On creating a new task while running the function graph tracer, if
      we fail to allocate the ret_stack, and then fail the fork, the
      code will free the parent ret_stack. This is because the child
      duplicated the parent and currently points to the parent's ret_stack.
      
      This patch always initializes the task's ret_stack to NULL.
      
      [ Impact: prevent crash of parent on low memory during fork ]
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      84047e36