1. 23 3月, 2009 3 次提交
    • T
      tracing: add per-event filtering · 7ce7e424
      Tom Zanussi 提交于
      This patch adds per-event filtering to the event tracing subsystem.
      
      It adds a 'filter' debugfs file to each event directory.  This file can
      be written to to set filters; reading from it will display the current
      set of filters set for that event.
      
      Basically, any field listed in the 'format' file for an event can be
      filtered on (including strings, but not yet other array types) using
      either matching ('==') or non-matching ('!=') 'predicates'.  A
      'predicate' can be either a single expression:
      
       # echo pid != 0 > filter
      
       # cat filter
       pid != 0
      
      or a compound expression of up to 8 sub-expressions combined using '&&'
      or '||':
      
       # echo comm == Xorg > filter
       # echo "&& sig != 29" > filter
      
       # cat filter
       comm == Xorg
       && sig != 29
      
      Only events having field values matching an expression will be available
      in the trace output; non-matching events are discarded.
      
      Note that a compound expression is built up by echoing each
      sub-expression separately - it's not the most efficient way to do
      things, but it keeps the parser simple and assumes that compound
      expressions will be relatively uncommon.  In any case, a subsequent
      patch introducing a way to set filters for entire subsystems should
      mitigate any need to do this for lots of events.
      
      Setting a filter without an '&&' or '||' clears the previous filter
      completely and sets the filter to the new expression:
      
       # cat filter
       comm == Xorg
       && sig != 29
      
       # echo comm != Xorg
      
       # cat filter
       comm != Xorg
      
      To clear a filter, echo 0 to the filter file:
      
       # echo 0 > filter
       # cat filter
       none
      
      The limit of 8 predicates for a compound expression is arbitrary - for
      efficiency, it's implemented as an array of pointers to predicates, and
      8 seemed more than enough for any filter...
      Signed-off-by: NTom Zanussi <tzanussi@gmail.com>
      Acked-by: NFrederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <1237710665.7703.48.camel@charm-linux>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      7ce7e424
    • T
      tracing: add ring_buffer_event_discard() to ring buffer · 2d622719
      Tom Zanussi 提交于
      This patch overloads RINGBUF_TYPE_PADDING to provide a way to discard
      events from the ring buffer, for the event-filtering mechanism
      introduced in a subsequent patch.
      
      I did the initial version but thanks to Steven Rostedt for adding
      the parts that actually made it work. ;-)
      Signed-off-by: NTom Zanussi <tzanussi@gmail.com>
      Acked-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      2d622719
    • T
      tracing: add run-time field descriptions for event filtering · cf027f64
      Tom Zanussi 提交于
      This patch makes the field descriptions defined for event tracing
      available at run-time, for the event-filtering mechanism introduced
      in a subsequent patch.
      
      The common event fields are prepended with 'common_' in the format
      display, allowing them to be distinguished from the other fields
      that might internally have same name and can therefore be
      unambiguously used in filters.
      Signed-off-by: NTom Zanussi <tzanussi@gmail.com>
      Acked-by: NFrederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <1237710639.7703.46.camel@charm-linux>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      cf027f64
  2. 22 3月, 2009 2 次提交
  3. 20 3月, 2009 17 次提交
  4. 19 3月, 2009 11 次提交
    • F
      tracing/ring-buffer: fix non cpu hotplug case · 3bf832ce
      Frederic Weisbecker 提交于
      Impact: fix warning with irqsoff tracer
      
      The ring buffer allocates its buffers on pre-smp time (early_initcall).
      It means that, at first, only the boot cpu buffer is allocated and
      the ring-buffer cpumask only has the boot cpu set (cpu_online_mask).
      
      Later, the secondary cpu will show up and the ring-buffer will be notified
      about this event: the appropriate buffer will be allocated and the cpumask
      will be updated.
      
      Unfortunately, if !CONFIG_CPU_HOTPLUG, the ring-buffer will not be
      notified about the secondary cpus, meaning that the cpumask will have
      only the cpu boot set, and only one cpu buffer allocated.
      
      We fix that by using cpu_possible_mask if !CONFIG_CPU_HOTPLUG.
      
      This patch fixes the following warning with irqsoff tracer running:
      
      [  169.317794] WARNING: at kernel/trace/trace.c:466 update_max_tr_single+0xcc/0xf3()
      [  169.318002] Hardware name: AMILO Li 2727
      [  169.318002] Modules linked in:
      [  169.318002] Pid: 5624, comm: bash Not tainted 2.6.29-rc8-tip-02636-g6aafa6c #11
      [  169.318002] Call Trace:
      [  169.318002]  [<ffffffff81036182>] warn_slowpath+0xea/0x13d
      [  169.318002]  [<ffffffff8100b9d6>] ? ftrace_call+0x5/0x2b
      [  169.318002]  [<ffffffff8100b9d6>] ? ftrace_call+0x5/0x2b
      [  169.318002]  [<ffffffff8100b9d1>] ? ftrace_call+0x0/0x2b
      [  169.318002]  [<ffffffff8101ef10>] ? ftrace_modify_code+0xa9/0x108
      [  169.318002]  [<ffffffff8106e27f>] ? trace_hardirqs_off+0x25/0x27
      [  169.318002]  [<ffffffff8149afe7>] ? _spin_unlock_irqrestore+0x1f/0x2d
      [  169.318002]  [<ffffffff81064f52>] ? ring_buffer_reset_cpu+0xf6/0xfb
      [  169.318002]  [<ffffffff8106637c>] ? ring_buffer_reset+0x36/0x48
      [  169.318002]  [<ffffffff8106aeda>] update_max_tr_single+0xcc/0xf3
      [  169.318002]  [<ffffffff8100bc17>] ? sysret_check+0x22/0x5d
      [  169.318002]  [<ffffffff8106e3ea>] stop_critical_timing+0x142/0x204
      [  169.318002]  [<ffffffff8106e4cf>] trace_hardirqs_on_caller+0x23/0x25
      [  169.318002]  [<ffffffff8149ac28>] trace_hardirqs_on_thunk+0x3a/0x3c
      [  169.318002]  [<ffffffff8100bc17>] ? sysret_check+0x22/0x5d
      [  169.318002] ---[ end trace db76cbf775a750cf ]---
      
      Because this tracer may try to swap two cpu ring buffers for an
      unregistered cpu on the ring buffer.
      
      This patch might also fix a fair loss of traces due to unallocated buffers
      for secondary cpus.
      Reported-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Acked-b: Steven Rostedt <rostedt@goodmis.org>
      LKML-Reference: <1237470453-5427-1-git-send-email-fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      3bf832ce
    • S
      function-graph: consolidate prologues for output · ac5f6c96
      Steven Rostedt 提交于
      Impact: clean up
      
      The prologue of the function graph entry, return and comments all
      start out pretty much the same. Each of these duplicate code and
      do so slightly differently.
      
      This patch consolidates the printing of the pid, absolute time,
      cpu and proc (and for entry, the interrupt).
      Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
      ac5f6c96
    • L
      ftrace: protect running nmi (V3) · e9d9df44
      Lai Jiangshan 提交于
      When I review the sensitive code ftrace_nmi_enter(), I found
      the atomic variable nmi_running does protect NMI VS do_ftrace_mod_code(),
      but it can not protects NMI(entered nmi) VS NMI(ftrace_nmi_enter()).
      
      cpu#1                   | cpu#2                 | cpu#3
      ftrace_nmi_enter()      | do_ftrace_mod_code()  |
        not modify            |                       |
      ------------------------|-----------------------|--
      executing               | set mod_code_write = 1|
      executing             --|-----------------------|--------------------
      executing               |                       | ftrace_nmi_enter()
      executing               |                       |    do modify
      ------------------------|-----------------------|-----------------
      ftrace_nmi_exit()       |                       |
      
      cpu#3 may be being modified the code which is still being executed on cpu#1,
      it will have undefined results and possibly take a GPF, this patch
      prevents it occurred.
      Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
      LKML-Reference: <49C0B411.30003@cn.fujitsu.com>
      Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
      e9d9df44
    • I
      tracepoints: dont update zero-sized tracepoint sections · ec625cb2
      Ingo Molnar 提交于
      Zero-sized tracepoint sections can occur if tracing is enabled but
      no tracepoint is defined. Do not emit a warning in that case.
      
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
      LKML-Reference: <1237394936.3132.1.camel@localhost.localdomain>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      ec625cb2
    • J
      tracing: fix oops in tracepoint_update_probe_range() · 09933a10
      Jaswinder Singh Rajput 提交于
      Change this crash:
      
       BUG: unable to handle kernel NULL pointer dereference at (null)
       IP: [<ffffffff8107d4de>] tracepoint_update_probe_range+0x1f/0x9b
       PGD 13d5fb067 PUD 13d688067 PMD 0
       Oops: 0000 [#1] SMP
      
      To a more debuggable WARN_ONCE().
      Signed-off-by: NJaswinder Singh Rajput <jaswinderrajput@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      LKML-Reference: <1237394936.3132.1.camel@localhost.localdomain>
      [ moved the check outside the lock and added a WARN_ON(). ]
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      09933a10
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 · a1e4ee22
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6:
        Staging: benet: remove driver now that it is merged in drivers/net/
      a1e4ee22
    • L
      Merge branch 'for-2.6.29' of git://linux-nfs.org/~bfields/linux · 85bff885
      Linus Torvalds 提交于
      * 'for-2.6.29' of git://linux-nfs.org/~bfields/linux:
        nfsd: nfsd should drop CAP_MKNOD for non-root
        NFSD: provide encode routine for OP_OPENATTR
      85bff885
    • G
      Staging: benet: remove driver now that it is merged in drivers/net/ · d0573fac
      Greg Kroah-Hartman 提交于
      The benet driver is now in the proper place in drivers/net/benet, so we
      can remove the staging version.
      Acked-by: NSathya Perla <sathyap@serverengines.com>
      Cc: David S. Miller <davem@davemloft.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      d0573fac
    • L
      Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc · d941d0ed
      Linus Torvalds 提交于
      * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
        powerpc/ps3: ps3_defconfig updates
        powerpc/mm: Respect _PAGE_COHERENT on classic ppc32 SW
        powerpc/5200: Enable CPU_FTR_NEED_COHERENT for MPC52xx
        ps3/block: Replace mtd/ps3vram by block/ps3vram
      d941d0ed
    • L
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6 · 99dbe109
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
        USB: storage: Unusual USB device Prolific 2507 variation added
        USB: Add device id for Option GTM380 to option driver
        USB: Add Vendor/Product ID for new CDMA U727 to option driver
        USB: Updated unusual-devs entry for USB mass storage on Nokia 6233
        USB: Option: let cdc-acm handle Sony Ericsson F3507g / Dell 5530
        USB: EHCI: expedite unlinks when the root hub is suspended
        USB: EHCI: Fix isochronous URB leak
        USB: option.c: add ZTE 622 modem device
        USB: wusbcore/wa-xfer, fix lock imbalance
        USB: misc/vstusb, fix lock imbalance
        USB: misc/adutux, fix lock imbalance
        USB: image/mdc800, fix lock imbalance
        USB: atm/cxacru, fix lock imbalance
        USB: unusual_devs: Add support for GI 0431 SD-Card interface
        USB: serial: new cp2101 device id
        USB: serial: ftdi: enable UART detection on gnICE JTAG adaptors blacklist interface0
        USB: serial: add FTDI USB/Serial converter devices
        USB: usbfs: keep async URBs until the device file is closed
        USB: usbtmc: add protocol 1 support
        USB: usbtmc: fix stupid bug in open()
      99dbe109
  5. 18 3月, 2009 7 次提交