19 Dec, 2008

1 commit


16 Nov, 2008

1 commit

  • Impact: extend the ->init() method with the ability to fail

    This bring a way to know if the initialization of a tracer successed.
    A tracer must return 0 on success and a traditional error (ie:
    -ENOMEM) if it fails.

    If a tracer fails to init, it is free to print a detailed warn. The
    tracing api will not and switch to a new tracer will just return the
    error from the init callback.

    Note: this will be used for the return tracer.

    Signed-off-by: Frederic Weisbecker
    Signed-off-by: Ingo Molnar

    Frederic Weisbecker
     

08 Nov, 2008

2 commits


06 Nov, 2008

1 commit

  • Impact: change where tracing is started up and stopped

    Currently, when a new tracer is selected via echo'ing a tracer name into
    the current_tracer file, the startup is only done if tracing_enabled is
    set to one. If tracing_enabled is changed to zero (by echo'ing 0 into
    the tracing_enabled file) a full shutdown is performed.

    The full startup and shutdown of a tracer can be expensive and the
    user can lose out traces when echo'ing in 0 to the tracing_enabled file,
    because the process takes too long. There can also be places that
    the user would like to start and stop the tracer several times and
    doing the full startup and shutdown of a tracer might be too expensive.

    This patch performs the full startup and shutdown when a tracer is
    selected. It also adds a way to do a quick start or stop of a tracer.
    The quick version is just a flag that prevents the tracing from
    taking place, but the overhead of the code is still there.

    For example, the startup of a tracer may enable tracepoints, or enable
    the function tracer. The stop and start will just set a flag to
    have the tracer ignore the calls when the tracepoint or function trace
    is called. The overhead of the tracer may still be present when
    the tracer is stopped, but no tracing will occur. Setting the tracer
    to the 'nop' tracer (or any other tracer) will perform the shutdown
    of the tracer which will disable the tracepoint or disable the
    function tracer.

    The tracing_enabled file will simply start or stop tracing.

    This change is all internal. The end result for the user should be the same
    as before. If tracing_enabled is not set, no trace will happen.
    If tracing_enabled is set, then the trace will happen. The tracing_enabled
    variable is static between tracers. Enabling tracing_enabled and
    going to another tracer will keep tracing_enabled enabled. Same
    is true with disabling tracing_enabled.

    This patch will now provide a fast start/stop method to the users
    for enabling or disabling tracing.

    Note: There were two methods to the struct tracer that were never
    used: The methods start and stop. These were to be used as a hook
    to the reading of the trace output, but ended up not being
    necessary. These two methods are now used to enable the start
    and stop of each tracer, in case the tracer needs to do more than
    just not write into the buffer. For example, the irqsoff tracer
    must stop recording max latencies when tracing is stopped.

    Signed-off-by: Steven Rostedt
    Signed-off-by: Ingo Molnar

    Steven Rostedt
     

21 Oct, 2008

1 commit

  • To avoid further confusion between the ftrace infrastructure and the
    function tracer. This patch renames the "ftrace" function tracer
    to "function".

    Now in available_tracers, instead of "ftrace" there will be "function".

    This makes more sense, since people will not know exactly what the
    "ftrace" tracer does.

    Signed-off-by: Steven Rostedt
    Signed-off-by: Ingo Molnar

    Steven Rostedt
     

14 Oct, 2008

1 commit


11 Jul, 2008

1 commit

  • This is more of a clean up. Currently the function tracer initializes the
    tracer with which ever CPU was last used for tracing. This value isn't
    realy useful for function tracing, but at least it should be something other
    than a random number.

    Signed-off-by: Steven Rostedt
    Cc: Steven Rostedt
    Cc: Peter Zijlstra
    Cc: Andrew Morton
    Signed-off-by: Ingo Molnar

    Steven Rostedt
     

27 May, 2008

1 commit

  • The new work with converting the trace hooks over to markers broke the
    command line recording of ftrace. This patch fixes it again.

    Signed-off-by: Steven Rostedt
    Cc: Peter Zijlstra
    Cc: Mathieu Desnoyers
    Signed-off-by: Thomas Gleixner

    Steven Rostedt
     

24 May, 2008

6 commits

  • In cleaning up of the sched_switch code, the function trace recording
    of task comms was removed. This patch adds back the recording of comms
    for function trace. The output of ftrace now has the task comm instead
    of .

    Signed-off-by: Steven Rostedt
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Steven Rostedt
     
  • now that we have a kbuild method for notrace, no need to pollute the
    C code with the annotations.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Ingo Molnar
     
  • Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Ingo Molnar
     
  • rename and uninline now() to ftrace_now().

    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Ingo Molnar
     
  • Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Steven Rostedt
     
  • This is a simple trace that uses the ftrace infrastructure. It is
    designed to be fast and small, and easy to use. It is useful to
    record things that happen over a very short period of time, and
    not to analyze the system in general.

    Updates:

    available_tracers
    "function" is added to this file.

    current_tracer
    To enable the function tracer:

    echo function > /debugfs/tracing/current_tracer

    To disable the tracer:

    echo disable > /debugfs/tracing/current_tracer

    The output of the function_trace file is as follows

    "echo noverbose > /debugfs/tracing/iter_ctrl"

    preemption latency trace v1.1.5 on 2.6.24-rc7-tst
    Signed-off-by: Ingo Molnar
    --------------------------------------------------------------------
    latency: 0 us, #419428/4361791, CPU#1 | (M:desktop VP:0, KP:0, SP:0 HP:0 #P:4)
    -----------------
    | task: -0 (uid:0 nice:0 policy:0 rt_prio:0)
    -----------------

    _------=> CPU#
    / _-----=> irqs-off
    | / _----=> need-resched
    || / _---=> hardirq/softirq
    ||| / _--=> preempt-depth
    |||| /
    ||||| delay
    cmd pid ||||| time | caller
    \ / ||||| \ | /
    swapper-0 0d.h. 1595128us+: set_normalized_timespec+0x8/0x2d (ktime_get_ts+0x4a/0x4e )
    swapper-0 0d.h. 1595131us+: _spin_lock+0x8/0x18 (hrtimer_interrupt+0x6e/0x1b0 )

    Or with verbose turned on:

    "echo verbose > /debugfs/tracing/iter_ctrl"

    preemption latency trace v1.1.5 on 2.6.24-rc7-tst
    --------------------------------------------------------------------
    latency: 0 us, #419428/4361791, CPU#1 | (M:desktop VP:0, KP:0, SP:0 HP:0 #P:4)
    -----------------
    | task: -0 (uid:0 nice:0 policy:0 rt_prio:0)
    -----------------

    swapper 0 0 9 00000000 00000000 [f3675f41] 1595.128ms (+0.003ms): set_normalized_timespec+0x8/0x2d (ktime_get_ts+0x4a/0x4e )
    swapper 0 0 9 00000000 00000001 [f3675f45] 1595.131ms (+0.003ms): _spin_lock+0x8/0x18 (hrtimer_interrupt+0x6e/0x1b0 )
    swapper 0 0 9 00000000 00000002 [f3675f48] 1595.135ms (+0.003ms): _spin_lock+0x8/0x18 (hrtimer_interrupt+0x6e/0x1b0 )

    The "trace" file is not affected by the verbose mode, but is by the symonly.

    echo "nosymonly" > /debugfs/tracing/iter_ctrl

    tracer:
    [ 81.479967] CPU 0: bash:3154 register_ftrace_function+0x5f/0x66
    [ 81.479967] CPU 0: bash:3154 _spin_unlock_irqrestore+0x3e/0x5a
    [ 81.479968] CPU 0: bash:3154 sub_preempt_count+0x30/0x7a
    [ 81.479968] CPU 0: bash:3154 vfs_write+0x11d/0x155
    [ 81.479968] CPU 0: bash:3154 dnotify_parent+0x2d/0x78
    [ 81.479969] CPU 0: bash:3154 _spin_lock+0x1b/0x70
    [ 81.479969] CPU 0: bash:3154 add_preempt_count+0x3e/0x77

    echo "symonly" > /debugfs/tracing/iter_ctrl

    tracer:
    [ 81.479913] CPU 0: bash:3154 register_ftrace_function+0x5f/0x66
    Signed-off-by: Arnaldo Carvalho de Melo
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Steven Rostedt