1. 08 3月, 2018 1 次提交
  2. 08 5月, 2014 1 次提交
    • S
      tracing: Add trace_<tracepoint>_enabled() function · 7c65bbc7
      Steven Rostedt (Red Hat) 提交于
      There are some code paths in the kernel that need to do some preparations
      before it calls a tracepoint. As that code is worthless overhead when
      the tracepoint is not enabled, it would be prudent to have that code
      only run when the tracepoint is active. To accomplish this, all tracepoints
      now get a static inline function called "trace_<tracepoint-name>_enabled()"
      which returns true when the tracepoint is enabled and false otherwise.
      
      As an added bonus, that function uses the static_key of the tracepoint
      such that no branch is needed.
      
        if (trace_mytracepoint_enabled()) {
      	arg = process_tp_arg();
      	trace_mytracepoint(arg);
        }
      
      Will keep the "process_tp_arg()" (which may be expensive to run) from
      being executed when the tracepoint isn't enabled.
      
      It's best to encapsulate the tracepoint itself in the if statement
      just to keep races. For example, if you had:
      
        if (trace_mytracepoint_enabled())
      	arg = process_tp_arg();
        trace_mytracepoint(arg);
      
      There's a chance that the tracepoint could be enabled just after the
      if statement, and arg will be undefined when calling the tracepoint.
      
      Link: http://lkml.kernel.org/r/20140506094407.507b6435@gandalf.local.homeAcked-by: NMathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      7c65bbc7
  3. 02 12月, 2013 1 次提交
  4. 13 11月, 2013 1 次提交
  5. 27 8月, 2013 1 次提交
  6. 21 3月, 2013 1 次提交
  7. 09 4月, 2009 1 次提交
    • L
      tracing: consolidate documents · 66bb7488
      Li Zefan 提交于
      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: NLi Zefan <lizf@cn.fujitsu.com>
      Acked-by: NPekka 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: NIngo Molnar <mingo@elte.hu>
      66bb7488
  8. 25 3月, 2009 1 次提交
  9. 10 3月, 2009 1 次提交
  10. 29 11月, 2008 1 次提交
  11. 16 11月, 2008 4 次提交
  12. 14 10月, 2008 1 次提交