1. 29 Jun, 2010 2 commits
    • Steven Rostedt's avatar
      tracing: Use class->reg() for all registering of events · a1d0ce82
      Steven Rostedt authored
      Because kprobes and syscalls need special processing to register
      events, the class->reg() method was created to handle the differences.
      
      But instead of creating a default ->reg for perf and ftrace events,
      the code was scattered with:
      
      	if (class->reg)
      		class->reg();
      	else
      		default_reg();
      
      This is messy and can also lead to bugs.
      
      This patch cleans up this code and creates a default reg() entry for
      the events allowing for the code to directly call the class->reg()
      without the condition.
      Reported-by: default avatarPeter Zijlstra <peterz@infradead.org>
      Acked-by: default avatarPeter Zijlstra <peterz@infradead.org>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      a1d0ce82
    • Chase Douglas's avatar
      tracing/function-graph: Use correct string size for snprintf · d62f85d1
      Chase Douglas authored
      The nsecs_str string is a local variable defined as:
      
      char nsecs_str[5];
      
      It is possible for the snprintf call to use a size value larger than the
      size of the string. This should not cause a buffer overrun as it is
      written now due to the value for the string format "%03lu" can not be
      larger than 1000. However, this change makes it correct. By making the
      size correct we guard against potential future changes that could actually
      cause a buffer overrun.
      Signed-off-by: default avatarChase Douglas <chase.douglas@canonical.com>
      LKML-Reference: <1276619355-18116-1-git-send-email-chase.douglas@canonical.com>
      
      [ added 'UL' to number 8 to fix gcc warning comparing it to sizeof() ]
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      d62f85d1
  2. 28 Jun, 2010 21 commits
  3. 27 Jun, 2010 17 commits