1. 16 3月, 2009 1 次提交
    • F
      tracing/syscalls: fix missing release of tracing · ac99c58c
      Frederic Weisbecker 提交于
      Impact: fix 'stuck' syscall tracer
      
      The syscall tracer uses a refcounter to enable several users
      simultaneously.
      
      But the refcounter did not behave correctly and always restored
      its value to 0 after calling start_syscall_tracing(). Therefore,
      stop_syscall_tracing() couldn't release correctly the tasks from
      tracing.
      
      Also the tracer forgot to reset the buffer when it is released.
      
      Drop the pointless refcount decrement on start_syscall_tracing()
      and reset the buffer when we release the tracer.
      
      This fixes two reported issue:
      
      - when we switch from syscall tracer to another tracer, syscall
        tracing continued.
      
      - incorrect use of the refcount.
      Reported-by: NAndrew Morton <akpm@linux-foundation.org>
      Reported-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <1237151439-6755-1-git-send-email-fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      ac99c58c
  2. 13 3月, 2009 2 次提交
    • F
      tracing/syscalls: core infrastructure for syscalls tracing, enhancements · bed1ffca
      Frederic Weisbecker 提交于
      Impact: new feature
      
      This adds the generic support for syscalls tracing. This is
      currently exploited through a devoted tracer but other tracing
      engines can use it. (They just have to play with
      {start,stop}_ftrace_syscalls() and use the display callbacks
      unless they want to override them.)
      
      The syscalls prototypes definitions are abused here to steal
      some metadata informations:
      
      - syscall name, param types, param names, number of params
      
      The syscall addr is not directly saved during this definition
      because we don't know if its prototype is available in the
      namespace. But we don't really need it. The arch has just to
      build a function able to resolve the syscall number to its
      metadata struct.
      
      The current tracer prints the syscall names, parameters names
      and values (and their types optionally). Currently the value is
      a raw hex but higher level values diplaying is on my TODO list.
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <1236955332-10133-2-git-send-email-fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      bed1ffca
    • F
      tracing/ftrace: syscall tracing infrastructure, basics · ee08c6ec
      Frederic Weisbecker 提交于
      Provide basic callbacks to do syscall tracing.
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Acked-by: NSteven Rostedt <rostedt@goodmis.org>
      Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
      LKML-Reference: <1236401580-5758-2-git-send-email-fweisbec@gmail.com>
      [ simplified it to a trace_printk() for now. ]
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      ee08c6ec