09 Jan, 2012

1 commit

  • * 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (165 commits)
    reiserfs: Properly display mount options in /proc/mounts
    vfs: prevent remount read-only if pending removes
    vfs: count unlinked inodes
    vfs: protect remounting superblock read-only
    vfs: keep list of mounts for each superblock
    vfs: switch ->show_options() to struct dentry *
    vfs: switch ->show_path() to struct dentry *
    vfs: switch ->show_devname() to struct dentry *
    vfs: switch ->show_stats to struct dentry *
    switch security_path_chmod() to struct path *
    vfs: prefer ->dentry->d_sb to ->mnt->mnt_sb
    vfs: trim includes a bit
    switch mnt_namespace ->root to struct mount
    vfs: take /proc/*/mounts and friends to fs/proc_namespace.c
    vfs: opencode mntget() mnt_set_mountpoint()
    vfs: spread struct mount - remaining argument of next_mnt()
    vfs: move fsnotify junk to struct mount
    vfs: move mnt_devname
    vfs: move mnt_list to struct mount
    vfs: switch pnode.h macros to struct mount *
    ...

    Linus Torvalds
     

07 Jan, 2012

1 commit

  • * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (106 commits)
    perf kvm: Fix copy & paste error in description
    perf script: Kill script_spec__delete
    perf top: Fix a memory leak
    perf stat: Introduce get_ratio_color() helper
    perf session: Remove impossible condition check
    perf tools: Fix feature-bits rework fallout, remove unused variable
    perf script: Add generic perl handler to process events
    perf tools: Use for_each_set_bit() to iterate over feature flags
    perf tools: Unify handling of features when writing feature section
    perf report: Accept fifos as input file
    perf tools: Moving code in some files
    perf tools: Fix out-of-bound access to struct perf_session
    perf tools: Continue processing header on unknown features
    perf tools: Improve macros for struct feature_ops
    perf: builtin-record: Document and check that mmap_pages must be a power of two.
    perf: builtin-record: Provide advice if mmap'ing fails with EPERM.
    perf tools: Fix truncated annotation
    perf script: look up thread using tid instead of pid
    perf tools: Look up thread names for system wide profiling
    perf tools: Fix comm for processes with named threads
    ...

    Linus Torvalds
     

04 Jan, 2012

1 commit


12 Dec, 2011

1 commit


07 Dec, 2011

1 commit


06 Dec, 2011

5 commits

  • Merge reason: Add these cherry-picked commits so that future changes
    on perf/core don't conflict.

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • If the set_ftrace_filter is cleared by writing just whitespace to
    it, then the filter hash refcounts will be decremented but not
    updated. This causes two bugs:

    1) No functions will be enabled for tracing when they all should be

    2) If the users clears the set_ftrace_filter twice, it will crash ftrace:

    ------------[ cut here ]------------
    WARNING: at /home/rostedt/work/git/linux-trace.git/kernel/trace/ftrace.c:1384 __ftrace_hash_rec_update.part.27+0x157/0x1a7()
    Modules linked in:
    Pid: 2330, comm: bash Not tainted 3.1.0-test+ #32
    Call Trace:
    [] warn_slowpath_common+0x83/0x9b
    [] warn_slowpath_null+0x1a/0x1c
    [] __ftrace_hash_rec_update.part.27+0x157/0x1a7
    [] ? ftrace_regex_release+0xa7/0x10f
    [] ? kfree+0xe5/0x115
    [] ftrace_hash_move+0x2e/0x151
    [] ftrace_regex_release+0xba/0x10f
    [] fput+0xfd/0x1c2
    [] filp_close+0x6d/0x78
    [] sys_dup3+0x197/0x1c1
    [] sys_dup2+0x4f/0x54
    [] system_call_fastpath+0x16/0x1b
    ---[ end trace 77a3a7ee73794a02 ]---

    Link: http://lkml.kernel.org/r/20111101141420.GA4918@debian

    Reported-by: Rabin Vincent
    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • A forced undef of a config value was used for testing and was
    accidently left in during the final commit. This causes x86 to
    run slower than needed while running function tracing as well
    as causes the function graph selftest to fail when DYNMAIC_FTRACE
    is not set. This is because the code in MCOUNT expects the ftrace
    code to be processed with the config value set that happened to
    be forced not set.

    The forced config option was left in by:
    commit 6331c28c962561aee59e5a493b7556a4bb585957
    ftrace: Fix dynamic selftest failure on some archs

    Link: http://lkml.kernel.org/r/20111102150255.GA6973@debian

    Cc: stable@vger.kernel.org
    Reported-by: Rabin Vincent
    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • Though not all events have field 'prev_pid', it was allowed to do this:

    # echo 'prev_pid == 100' > events/sched/filter

    but commit 75b8e98263fdb0bfbdeba60d4db463259f1fe8a2 (tracing/filter: Swap
    entire filter of events) broke it without any reason.

    Link: http://lkml.kernel.org/r/4EAF46CF.8040408@cn.fujitsu.com

    Signed-off-by: Li Zefan
    Signed-off-by: Steven Rostedt

    Li Zefan
     
  • Fix a bug introduced by e9dbfae5, which prevents event_subsystem from
    ever being released.

    Ref_count was added to keep track of subsystem users, not for counting
    events. Subsystem is created with ref_count = 1, so there is no need to
    increment it for every event, we have nr_events for that. Fix this by
    touching ref_count only when we actually have a new user -
    subsystem_open().

    Cc: stable@vger.kernel.org
    Signed-off-by: Ilya Dryomov
    Link: http://lkml.kernel.org/r/1320052062-7846-1-git-send-email-idryomov@gmail.com
    Signed-off-by: Steven Rostedt

    Ilya Dryomov
     

02 Dec, 2011

1 commit

  • ftrace_event_call->filter is sched RCU protected but didn't use
    rcu_assign_pointer(). Use it.

    TODO: Add proper __rcu annotation to call->filter and all its users.

    -v2: Use RCU_INIT_POINTER() for %NULL clearing as suggested by Eric.

    Link: http://lkml.kernel.org/r/20111123164949.GA29639@google.com

    Cc: Eric Dumazet
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: stable@kernel.org # (2.6.39+)
    Signed-off-by: Tejun Heo
    Signed-off-by: Steven Rostedt

    Tejun Heo
     

18 Nov, 2011

1 commit

  • Knowing the number of event entries in the ring buffer compared
    to the total number that were written is useful information. The
    latency format gives this information and there's no reason that the
    default format does not.

    This information is now added to the default header, along with the
    number of online CPUs:

    # tracer: nop
    #
    # entries-in-buffer/entries-written: 159836/64690869 #P:4
    #
    # _-----=> irqs-off
    # / _----=> need-resched
    # | / _---=> hardirq/softirq
    # || / _--=> preempt-depth
    # ||| / delay
    # TASK-PID CPU# |||| TIMESTAMP FUNCTION
    # | | | |||| | |
    -0 [000] ...2 49.442971: local_touch_nmi -0 [000] d..2 49.442973: enter_idle -0 [000] d..2 49.442974: atomic_notifier_call_chain -0 [000] d..2 49.442976: __atomic_notifier_call_chain

    Steven Rostedt
     

17 Nov, 2011

1 commit

  • People keep asking how to get the preempt count, irq, and need resched info
    and we keep telling them to enable the latency format. Some developers think
    that traces without this info is completely useless, and for a lot of tasks
    it is useless.

    The first option was to enable the latency trace as the default format, but
    the header for the latency format is pretty useless for most tracers and
    it also does the timestamp in straight microseconds from the time the trace
    started. This is sometimes more difficult to read as the default trace is
    seconds from the start of boot up.

    Latency format:

    # tracer: nop
    #
    # nop latency trace v1.1.5 on 3.2.0-rc1-test+
    # --------------------------------------------------------------------
    # latency: 0 us, #159771/64234230, CPU#1 | (M:preempt 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
    # \ / ||||| \ | /
    migratio-6 0...2 41778231us+: rcu_note_context_switch irqs-off
    # / _----=> need-resched
    # | / _---=> hardirq/softirq
    # || / _--=> preempt-depth
    # ||| / delay
    # TASK-PID CPU# |||| TIMESTAMP FUNCTION
    # | | | |||| | |
    -0 [000] d..2 49.309305: cpuidle_get_driver -0 [000] d..2 49.309307: mwait_idle -0 [000] d..2 49.309309: need_resched -0 [000] d..2 49.309310: test_ti_thread_flag -0 [000] d..2 49.309312: trace_power_start.constprop.13 -0 [000] d..2 49.309313: trace_cpu_idle -0 [000] d..2 49.309315: need_resched -0 [000] 49.309305: cpuidle_get_driver -0 [000] 49.309307: mwait_idle -0 [000] 49.309309: need_resched -0 [000] 49.309310: test_ti_thread_flag -0 [000] 49.309312: trace_power_start.constprop.13 -0 [000] 49.309313: trace_cpu_idle -0 [000] 49.309315: need_resched
    Signed-off-by: Steven Rostedt

    Steven Rostedt
     

11 Nov, 2011

1 commit


08 Nov, 2011

3 commits

  • In case the the graph tracer (CONFIG_FUNCTION_GRAPH_TRACER) or even the
    function tracer (CONFIG_FUNCTION_TRACER) are not set, the latency tracers
    do not display proper latency header.

    The involved/fixed latency tracers are:
    wakeup_rt
    wakeup
    preemptirqsoff
    preemptoff
    irqsoff

    The patch adds proper handling of tracer configuration options for latency
    tracers, and displaying correct header info accordingly.

    * The current output (for wakeup tracer) with both graph and function
    tracers disabled is:

    # tracer: wakeup
    #
    -0 0d.h5 1us+: 0:120:R + [000] 7: 0:R watchdog/0
    -0 0d.h5 3us+: ttwu_do_activate.clone.1 CPU#
    # / _-----=> irqs-off
    # | / _----=> need-resched
    # || / _---=> hardirq/softirq
    # ||| / _--=> preempt-depth
    # |||| / delay
    # cmd pid ||||| time | caller
    # \ / ||||| \ | /
    cat-1129 0d..4 1us : 1129:120:R + [000] 6: 0:R migration/0
    cat-1129 0d..4 2us+: ttwu_do_activate.clone.1 CPU#
    # / _-----=> irqs-off
    # | / _----=> need-resched
    # || / _---=> hardirq/softirq
    # ||| / _--=> preempt-depth
    # |||| / delay
    # cmd pid ||||| time | caller
    # \ / ||||| \ | /
    -0 1d.h5 1us+: 0:120:R + [001] 12: 0:R watchdog/1
    -0 1d.h5 3us : ttwu_do_activate.clone.1
    Cc: Ingo Molnar
    Signed-off-by: Jiri Olsa
    Signed-off-by: Steven Rostedt

    Jiri Olsa
     
  • If the set_ftrace_filter is cleared by writing just whitespace to
    it, then the filter hash refcounts will be decremented but not
    updated. This causes two bugs:

    1) No functions will be enabled for tracing when they all should be

    2) If the users clears the set_ftrace_filter twice, it will crash ftrace:

    ------------[ cut here ]------------
    WARNING: at /home/rostedt/work/git/linux-trace.git/kernel/trace/ftrace.c:1384 __ftrace_hash_rec_update.part.27+0x157/0x1a7()
    Modules linked in:
    Pid: 2330, comm: bash Not tainted 3.1.0-test+ #32
    Call Trace:
    [] warn_slowpath_common+0x83/0x9b
    [] warn_slowpath_null+0x1a/0x1c
    [] __ftrace_hash_rec_update.part.27+0x157/0x1a7
    [] ? ftrace_regex_release+0xa7/0x10f
    [] ? kfree+0xe5/0x115
    [] ftrace_hash_move+0x2e/0x151
    [] ftrace_regex_release+0xba/0x10f
    [] fput+0xfd/0x1c2
    [] filp_close+0x6d/0x78
    [] sys_dup3+0x197/0x1c1
    [] sys_dup2+0x4f/0x54
    [] system_call_fastpath+0x16/0x1b
    ---[ end trace 77a3a7ee73794a02 ]---

    Link: http://lkml.kernel.org/r/20111101141420.GA4918@debian

    Reported-by: Rabin Vincent
    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • A forced undef of a config value was used for testing and was
    accidently left in during the final commit. This causes x86 to
    run slower than needed while running function tracing as well
    as causes the function graph selftest to fail when DYNMAIC_FTRACE
    is not set. This is because the code in MCOUNT expects the ftrace
    code to be processed with the config value set that happened to
    be forced not set.

    The forced config option was left in by:
    commit 6331c28c962561aee59e5a493b7556a4bb585957
    ftrace: Fix dynamic selftest failure on some archs

    Link: http://lkml.kernel.org/r/20111102150255.GA6973@debian

    Cc: stable@vger.kernel.org
    Reported-by: Rabin Vincent
    Signed-off-by: Steven Rostedt

    Steven Rostedt
     

05 Nov, 2011

1 commit

  • The system filter can be used to set multiple event filters that
    exist within the system. But currently it displays the last filter
    written that does not necessarily correspond to the filters within
    the system. The system filter itself is not used to filter any events.
    The system filter is just a means to set filters of the events within
    it.

    Because this causes an ambiguous state when the system filter reads
    a filter string but the events within the system have different strings
    it is best to just show a boiler plate:

    ### global filter ###
    # Use this to set filters for multiple events.
    # Only events with the given fields will be affected.
    # If no events are modified, an error message will be displayed here.

    If an error occurs while writing to the system filter, the system
    filter will replace the boiler plate with the error message as it
    currently does.

    Signed-off-by: Steven Rostedt

    Steven Rostedt
     

03 Nov, 2011

1 commit

  • Though not all events have field 'prev_pid', it was allowed to do this:

    # echo 'prev_pid == 100' > events/sched/filter

    but commit 75b8e98263fdb0bfbdeba60d4db463259f1fe8a2 (tracing/filter: Swap
    entire filter of events) broke it without any reason.

    Link: http://lkml.kernel.org/r/4EAF46CF.8040408@cn.fujitsu.com

    Signed-off-by: Li Zefan
    Signed-off-by: Steven Rostedt

    Li Zefan
     

01 Nov, 2011

2 commits

  • These files were getting via an implicit non-obvious
    path, but we want to crush those out of existence since they cost
    time during compiles of processing thousands of lines of headers
    for no reason. Give them the lightweight header that just contains
    the EXPORT_SYMBOL infrastructure.

    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     
  • Fix a bug introduced by e9dbfae5, which prevents event_subsystem from
    ever being released.

    Ref_count was added to keep track of subsystem users, not for counting
    events. Subsystem is created with ref_count = 1, so there is no need to
    increment it for every event, we have nr_events for that. Fix this by
    touching ref_count only when we actually have a new user -
    subsystem_open().

    Cc: stable@vger.kernel.org
    Signed-off-by: Ilya Dryomov
    Link: http://lkml.kernel.org/r/1320052062-7846-1-git-send-email-idryomov@gmail.com
    Signed-off-by: Steven Rostedt

    Ilya Dryomov
     

31 Oct, 2011

1 commit


26 Oct, 2011

2 commits

  • * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (121 commits)
    perf symbols: Increase symbol KSYM_NAME_LEN size
    perf hists browser: Refuse 'a' hotkey on non symbolic views
    perf ui browser: Use libslang to read keys
    perf tools: Fix tracing info recording
    perf hists browser: Elide DSO column when it is set to just one DSO, ditto for threads
    perf hists: Don't consider filtered entries when calculating column widths
    perf hists: Don't decay total_period for filtered entries
    perf hists browser: Honour symbol_conf.show_{nr_samples,total_period}
    perf hists browser: Do not exit on tab key with single event
    perf annotate browser: Don't change selection line when returning from callq
    perf tools: handle endianness of feature bitmap
    perf tools: Add prelink suggestion to dso update message
    perf script: Fix unknown feature comment
    perf hists browser: Apply the dso and thread filters when merging new batches
    perf hists: Move the dso and thread filters from hist_browser
    perf ui browser: Honour the xterm colors
    perf top tui: Give color hints just on the percentage, like on --stdio
    perf ui browser: Make the colors configurable and change the defaults
    perf tui: Remove unneeded call to newtCls on startup
    perf hists: Don't format the percentage on hist_entry__snprintf
    ...

    Fix up conflicts in arch/x86/kernel/kprobes.c manually.

    Ingo's tree did the insane "add volatile to const array", which just
    doesn't make sense ("volatile const"?). But we could remove the const
    *and* make the array volatile to make doubly sure that gcc doesn't
    optimize it away..

    Also fix up kernel/trace/ring_buffer.c non-data-conflicts manually: the
    reader_lock has been turned into a raw lock by the core locking merge,
    and there was a new user of it introduced in this perf core merge. Make
    sure that new use also uses the raw accessor functions.

    Linus Torvalds
     
  • * 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (27 commits)
    rtmutex: Add missing rcu_read_unlock() in debug_rt_mutex_print_deadlock()
    lockdep: Comment all warnings
    lib: atomic64: Change the type of local lock to raw_spinlock_t
    locking, lib/atomic64: Annotate atomic64_lock::lock as raw
    locking, x86, iommu: Annotate qi->q_lock as raw
    locking, x86, iommu: Annotate irq_2_ir_lock as raw
    locking, x86, iommu: Annotate iommu->register_lock as raw
    locking, dma, ipu: Annotate bank_lock as raw
    locking, ARM: Annotate low level hw locks as raw
    locking, drivers/dca: Annotate dca_lock as raw
    locking, powerpc: Annotate uic->lock as raw
    locking, x86: mce: Annotate cmci_discover_lock as raw
    locking, ACPI: Annotate c3_lock as raw
    locking, oprofile: Annotate oprofilefs lock as raw
    locking, video: Annotate vga console lock as raw
    locking, latencytop: Annotate latency_lock as raw
    locking, timer_stats: Annotate table_lock as raw
    locking, rwsem: Annotate inner lock as raw
    locking, semaphores: Annotate inner lock as raw
    locking, sched: Annotate thread_group_cputimer as raw
    ...

    Fix up conflicts in kernel/posix-cpu-timers.c manually: making
    cputimer->cputime a raw lock conflicted with the ABBA fix in commit
    bcd5cff7216f ("cputimer: Cure lock inversion").

    Linus Torvalds
     

14 Oct, 2011

2 commits

  • The trace_pipe_raw handler holds a cached page from the time the file
    is opened to the time it is closed. The cached page is used to handle
    the case of the user space buffer being smaller than what was read from
    the ring buffer. The left over buffer is held in the cache so that the
    next read will continue where the data left off.

    After EOF is returned (no more data in the buffer), the index of
    the cached page is set to zero. If a user app reads the page again
    after EOF, the check in the buffer will see that the cached page
    is less than page size and will return the cached page again. This
    will cause reading the trace_pipe_raw again after EOF to return
    duplicate data, making the output look like the time went backwards
    but instead data is just repeated.

    The fix is to not reset the index right after all data is read
    from the cache, but to reset it after all data is read and more
    data exists in the ring buffer.

    Cc: stable
    Reported-by: Jeremy Eder
    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • tracing_enabled option is deprecated.
    To start/stop tracing, write to /sys/kernel/debug/tracing/tracing_on
    without tracing_enabled. This patch is based on Linux 3.1.0-rc1

    Signed-off-by: Geunsik Lim
    Link: http://lkml.kernel.org/r/1313127022-23830-1-git-send-email-leemgs1@gmail.com
    Signed-off-by: Steven Rostedt

    Geunsik Lim
     

12 Oct, 2011

1 commit


11 Oct, 2011

3 commits

  • When doing intense tracing, the kmalloc inside trace_marker can
    introduce side effects to what is being traced.

    As trace_marker() is used by userspace to inject data into the
    kernel ring buffer, it needs to do so with the least amount
    of intrusion to the operations of the kernel or the user space
    application.

    As the ring buffer is designed to write directly into the buffer
    without the need to make a temporary buffer, and userspace already
    went through the hassle of knowing how big the write will be,
    we can simply pin the userspace pages and write the data directly
    into the buffer. This improves the impact of tracing via trace_marker
    tremendously!

    Thanks to Peter Zijlstra and Thomas Gleixner for pointing out the
    use of get_user_pages_fast() and kmap_atomic().

    Suggested-by: Thomas Gleixner
    Suggested-by: Peter Zijlstra
    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • As the function tracer is very intrusive, lots of self checks are
    performed on the tracer and if something is found to be strange
    it will shut itself down keeping it from corrupting the rest of the
    kernel. This shutdown may still allow functions to be traced, as the
    tracing only stops new modifications from happening. Trying to stop
    the function tracer itself can cause more harm as it requires code
    modification.

    Although a WARN_ON() is executed, a user may not notice it. To help
    the user see that something isn't right with the tracing of the system
    a big warning is added to the output of the tracer that lets the user
    know that their data may be incomplete.

    Reported-by: Thomas Gleixner
    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • Fix kprobe-tracer not to delete a probe if the probe is in use.
    In that case, delete operation will return -EBUSY.

    This bug can cause a kernel panic if enabled probes are deleted
    during perf record.

    (Add some probes on functions)
    sh-4.2# perf probe --del probe:\*
    sh-4.2# exit
    (kernel panic)

    This is originally reported on the fedora bugzilla:

    https://bugzilla.redhat.com/show_bug.cgi?id=742383

    I've also checked that this problem doesn't happen on
    tracepoints when module removing because perf event
    locks target module.

    $ sudo ./perf record -e xfs:\* -aR sh
    sh-4.2# rmmod xfs
    ERROR: Module xfs is in use
    sh-4.2# exit
    [ perf record: Woken up 1 times to write data ]
    [ perf record: Captured and wrote 0.203 MB perf.data (~8862 samples) ]

    Signed-off-by: Masami Hiramatsu
    Cc: Arnaldo Carvalho de Melo
    Cc: Ingo Molnar
    Cc: Frederic Weisbecker
    Cc: Frank Ch. Eigler
    Cc: stable@kernel.org
    Link: http://lkml.kernel.org/r/20111004104438.14591.6553.stgit@fedora15
    Signed-off-by: Steven Rostedt

    Masami Hiramatsu
     

08 Oct, 2011

1 commit

  • * pm-runtime:
    PM / Tracing: build rpm-traces.c only if CONFIG_PM_RUNTIME is set
    PM / Runtime: Replace dev_dbg() with trace_rpm_*()
    PM / Runtime: Introduce trace points for tracing rpm_* functions
    PM / Runtime: Don't run callbacks under lock for power.irq_safe set
    USB: Add wakeup info to debugging messages
    PM / Runtime: pm_runtime_idle() can be called in atomic context
    PM / Runtime: Add macro to test for runtime PM events
    PM / Runtime: Add might_sleep() to runtime PM functions

    Rafael J. Wysocki
     

30 Sep, 2011

1 commit


28 Sep, 2011

1 commit


22 Sep, 2011

1 commit


19 Sep, 2011

1 commit

  • When debugging tight race conditions, it can be helpful to have a
    synchronized tracing method. Although in most cases the global clock
    provides this functionality, if timings is not the issue, it is more
    comforting to know that the order of events really happened in a precise
    order.

    Instead of using a clock, add a "counter" that is simply an incrementing
    atomic 64bit counter that orders the events as they are perceived to
    happen.

    The trace_clock_counter() is added from the attempt by Peter Zijlstra
    trying to convert the trace_clock_global() to it. I took Peter's counter
    code and made trace_clock_counter() instead, and added it to the choice
    of clocks. Just echo counter > /debug/tracing/trace_clock to activate
    it.

    Requested-by: Thomas Gleixner
    Requested-by: Peter Zijlstra
    Reviewed-By: Valdis Kletnieks
    Signed-off-by: Steven Rostedt

    Steven Rostedt
     

13 Sep, 2011

1 commit

  • The tracing locks can be taken in atomic context and therefore
    cannot be preempted on -rt - annotate it.

    In mainline this change documents the low level nature of
    the lock - otherwise there's no functional difference. Lockdep
    and Sparse checking will work as usual.

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

    Thomas Gleixner
     

31 Aug, 2011

3 commits

  • The stats file under per_cpu folder provides the number of entries,
    overruns and other statistics about the CPU ring buffer. However, the
    numbers do not provide any indication of how full the ring buffer is in
    bytes compared to the overall size in bytes. Also, it is helpful to know
    the rate at which the cpu buffer is filling up.

    This patch adds an entry "bytes: " in printed stats for per_cpu ring
    buffer which provides the actual bytes consumed in the ring buffer. This
    field includes the number of bytes used by recorded events and the
    padding bytes added when moving the tail pointer to next page.

    It also adds the following time stamps:
    "oldest event ts:" - the oldest timestamp in the ring buffer
    "now ts:" - the timestamp at the time of reading

    The field "now ts" provides a consistent time snapshot to the userspace
    when being read. This is read from the same trace clock used by tracing
    event timestamps.

    Together, these values provide the rate at which the buffer is filling
    up, from the formula:
    bytes / (now_ts - oldest_event_ts)

    Signed-off-by: Vaibhav Nagarnaik
    Cc: Michael Rubin
    Cc: David Sharp
    Link: http://lkml.kernel.org/r/1313531179-9323-3-git-send-email-vnagarnaik@google.com
    Signed-off-by: Steven Rostedt

    Vaibhav Nagarnaik
     
  • The current file "buffer_size_kb" reports the size of per-cpu buffer and
    not the overall memory allocated which could be misleading. A new file
    "buffer_total_size_kb" adds up all the enabled CPU buffer sizes and
    reports it. This is only a readonly entry.

    Signed-off-by: Vaibhav Nagarnaik
    Cc: Michael Rubin
    Cc: David Sharp
    Link: http://lkml.kernel.org/r/1313531179-9323-2-git-send-email-vnagarnaik@google.com
    Signed-off-by: Steven Rostedt

    Vaibhav Nagarnaik
     
  • The self testing for event filters does not really need preemption
    disabled as there are no races at the time of testing, but the functions
    it calls uses rcu_dereference_sched() which will complain if preemption
    is not disabled.

    Cc: Jiri Olsa
    Signed-off-by: Steven Rostedt

    Steven Rostedt
     

20 Aug, 2011

1 commit

  • Adding automated tests running as late_initcall. Tests are
    compiled in with CONFIG_FTRACE_STARTUP_TEST option.

    Adding test event "ftrace_test_filter" used to simulate
    filter processing during event occurance.

    String filters are compiled and tested against several
    test events with different values.

    Also testing that evaluation of explicit predicates is ommited
    due to the lazy filter evaluation.

    Signed-off-by: Jiri Olsa
    Link: http://lkml.kernel.org/r/1313072754-4620-11-git-send-email-jolsa@redhat.com
    Signed-off-by: Steven Rostedt

    Jiri Olsa