1. 14 12月, 2009 1 次提交
    • L
      tracing: Extract duplicate ftrace_raw_init_event_foo() · 87d9b4e1
      Li Zefan 提交于
      Use a generic trace_event_raw_init() function for all event's raw_init
      callbacks (but kprobes) instead of defining the same version for each
      of these.
      This shrinks the kernel code:
      
         text    data     bss     dec     hex filename
      5355293 1961928 7103260 14420481         dc0a01 vmlinux.o.old
      5346802 1961864 7103260 14411926         dbe896 vmlinux.o
      
      raw_init can't be removed, because ftrace events and kprobe events
      use different raw_init callbacks. Though it's possible to totally
      remove raw_init, I choose to leave it as it is for now.
      Signed-off-by: NLi Zefan <lizf@cn.fujitsu.com>
      Acked-by: NSteven Rostedt <rostedt@goodmis.org>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      LKML-Reference: <4B1DC48C.7080603@cn.fujitsu.com>
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      87d9b4e1
  2. 13 12月, 2009 1 次提交
  3. 11 12月, 2009 3 次提交
    • S
      ring-buffer: Move resize integrity check under reader lock · dd7f5943
      Steven Rostedt 提交于
      While using an application that does splice on the ftrace ring
      buffer at start up, I triggered an integrity check failure.
      
      Looking into this, I discovered that resizing the buffer performs
      an integrity check after the buffer is resized. This check unfortunately
      is preformed after it releases the reader lock. If a reader is
      reading the buffer it may cause the integrity check to trigger a
      false failure.
      
      This patch simply moves the integrity checker under the protection
      of the ring buffer reader lock.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      dd7f5943
    • S
      ring-buffer: Use sync sched protection on ring buffer resizing · 18421015
      Steven Rostedt 提交于
      There was a comment in the ring buffer code that says the calling
      layers should prevent tracing or reading of the ring buffer while
      resizing. I have discovered that the tracers do not honor this
      arrangement.
      
      This patch moves the disabling and synchronizing the ring buffer to
      a higher layer during resizing. This guarantees that no writes
      are occurring while the resize takes place.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      18421015
    • T
      tracing: Fix wrong usage of strstrip in trace_ksyms · d954fbf0
      Thomas Gleixner 提交于
      strstrip returns a pointer to the first non space character, but the
      code in parse_ksym_trace_str() ignores that.
      
      strstrip is now must_check and therefor we get the correct warning:
      kernel/trace/trace_ksym.c:294: warning:
      ignoring return value of ‘strstrip’, declared with attribute warn_unused_result
      
      We are really not interested in leading whitespace here.
      
      Fix that and cleanup the dozen kfree() exit pathes.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      d954fbf0
  4. 10 12月, 2009 6 次提交
    • I
      Merge branch 'tip/tracing/core3' of... · 788d70dc
      Ingo Molnar 提交于
      Merge branch 'tip/tracing/core3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into tracing/core
      788d70dc
    • C
      tracing: Remove comparing of NULL to va_list in trace_array_vprintk() · f2942487
      Carsten Emde 提交于
      Olof Johansson stated the following:
      
        Comparing a va_list with NULL is bogus. It's supposed to be treated like
        an opaque type and only be manipulated with va_* accessors.
      
      Olof noticed that this code broke the ARM builds:
      
          kernel/trace/trace.c: In function 'trace_array_vprintk':
          kernel/trace/trace.c:1364: error: invalid operands to binary == (have 'va_list' and 'void *')
          kernel/trace/trace.c: In function 'tracing_mark_write':
          kernel/trace/trace.c:3349: error: incompatible type for argument 3 of 'trace_vprintk'
      
      This patch partly reverts c13d2f7c and
      re-installs the original mark_printk() mechanism.
      Reported-by: NOlof Johansson <olof@lixom.net>
      Signed-off-by: NCarsten Emde <C.Emde@osadl.org>
      LKML-Reference: <4B1BAB74.104@osadl.org>
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      f2942487
    • J
      tracing: Fix function graph trace_pipe to properly display failed entries · be1eca39
      Jiri Olsa 提交于
      There is a case where the graph tracer might get confused and omits
      displaying of a single record.  This applies mostly with the trace_pipe
      since it is unlikely that the trace_seq buffer will overflow with the
      trace file.
      
      As the function_graph tracer goes through the trace entries keeping a
      pointer to the current record:
      
      current ->  func1 ENTRY
                  func2 ENTRY
                  func2 RETURN
                  func1 RETURN
      
      When an function ENTRY is encountered, it moves the pointer to the
      next entry to check if the function is a nested or leaf function.
      
                  func1 ENTRY
      current ->  func2 ENTRY
                  func2 RETURN
                  func1 RETURN
      
      If the rest of the writing of the function fills the trace_seq buffer,
      then the trace_pipe read will ignore this entry. The next read will
      Now start at the current location, but the first entry (func1) will
      be discarded.
      
      This patch keeps a copy of the current entry in the iterator private
      storage and will keep track of when the trace_seq buffer fills. When
      the trace_seq buffer fills, it will reuse the copy of the entry in the
      next iteration.
      
      [
        This patch has been largely modified by Steven Rostedt in order to
        clean it up and simplify it. The original idea and concept was from
        Jirka and for that, this patch will go under his name to give him
        the credit he deserves. But because this was modify by Steven Rostedt
        anything wrong with the patch should be blamed on Steven.
      ]
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <1259067458-27143-1-git-send-email-jolsa@redhat.com>
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      be1eca39
    • J
      tracing: Add full state to trace_seq · d184b31c
      Johannes Berg 提交于
      The trace_seq buffer might fill up, and right now one needs to check the
      return value of each printf into the buffer to check for that.
      
      Instead, have the buffer keep track of whether it is full or not, and
      reject more input if it is full or would have overflowed with an input
      that wasn't added.
      
      Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      d184b31c
    • S
      tracing: Buffer the output of seq_file in case of filled buffer · a63ce5b3
      Steven Rostedt 提交于
      If the seq_read fills the buffer it will call s_start again on the next
      itertation with the same position. This causes a problem with the
      function_graph tracer because it consumes the iteration in order to
      determine leaf functions.
      
      What happens is that the iterator stores the entry, and the function
      graph plugin will look at the next entry. If that next entry is a return
      of the same function and task, then the function is a leaf and the
      function_graph plugin calls ring_buffer_read which moves the ring buffer
      iterator forward (the trace iterator still points to the function start
      entry).
      
      The copying of the trace_seq to the seq_file buffer will fail if the
      seq_file buffer is full. The seq_read will not show this entry.
      The next read by userspace will cause seq_read to again call s_start
      which will reuse the trace iterator entry (the function start entry).
      But the function return entry was already consumed. The function graph
      plugin will think that this entry is a nested function and not a leaf.
      
      To solve this, the trace code now checks the return status of the
      seq_printf (trace_print_seq). If the writing to the seq_file buffer
      fails, we set a flag in the iterator (leftover) and we do not reset
      the trace_seq buffer. On the next call to s_start, we check the leftover
      flag, and if it is set, we just reuse the trace_seq buffer and do not
      call into the plugin print functions.
      
      Before this patch:
      
       2)               |      fput() {
       2)               |        __fput() {
       2)   0.550 us    |          inotify_inode_queue_event();
       2)               |          __fsnotify_parent() {
       2)   0.540 us    |          inotify_dentry_parent_queue_event();
      
      After the patch:
      
       2)               |      fput() {
       2)               |        __fput() {
       2)   0.550 us    |          inotify_inode_queue_event();
       2)   0.548 us    |          __fsnotify_parent();
       2)   0.540 us    |          inotify_dentry_parent_queue_event();
      
      [
        Updated the patch to fix a missing return 0 from the trace_print_seq()
        stub when CONFIG_TRACING is disabled.
      Reported-by: NIngo Molnar <mingo@elte.hu>
      ]
      Reported-by: NJiri Olsa <jolsa@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      a63ce5b3
    • S
      tracing: Only call pipe_close if pipe_close is defined · 29bf4a5e
      Steven Rostedt 提交于
      This fixes a cut and paste error that had pipe_close get called
      if pipe_open was defined (not pipe_close).
      Reported-by: NKosaki Motohiro <kosaki.motohiro@jp.fujitsu.com>
      LKML-Reference: <20091209153204.F4CD.A69D9226@jp.fujitsu.com>
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      29bf4a5e
  5. 09 12月, 2009 27 次提交
  6. 08 12月, 2009 2 次提交
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6 · d7fc02c7
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1815 commits)
        mac80211: fix reorder buffer release
        iwmc3200wifi: Enable wimax core through module parameter
        iwmc3200wifi: Add wifi-wimax coexistence mode as a module parameter
        iwmc3200wifi: Coex table command does not expect a response
        iwmc3200wifi: Update wiwi priority table
        iwlwifi: driver version track kernel version
        iwlwifi: indicate uCode type when fail dump error/event log
        iwl3945: remove duplicated event logging code
        b43: fix two warnings
        ipw2100: fix rebooting hang with driver loaded
        cfg80211: indent regulatory messages with spaces
        iwmc3200wifi: fix NULL pointer dereference in pmkid update
        mac80211: Fix TX status reporting for injected data frames
        ath9k: enable 2GHz band only if the device supports it
        airo: Fix integer overflow warning
        rt2x00: Fix padding bug on L2PAD devices.
        WE: Fix set events not propagated
        b43legacy: avoid PPC fault during resume
        b43: avoid PPC fault during resume
        tcp: fix a timewait refcnt race
        ...
      
      Fix up conflicts due to sysctl cleanups (dead sysctl_check code and
      CTL_UNNUMBERED removed) in
      	kernel/sysctl_check.c
      	net/ipv4/sysctl_net_ipv4.c
      	net/ipv6/addrconf.c
      	net/sctp/sysctl.c
      d7fc02c7
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next-2.6 · ee1262db
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next-2.6:
        sparc: Set UTS_MACHINE correctly.
        sparc,leon: init_leon srmmu cleanup
        sparc32: Remove early interrupt enable.
        sparc, leon: Added Aeroflex Gaisler entry in manufacturer_info structure
        sparc64: Faster early-boot framebuffer console.
        Revert "sparc: Make atomic locks raw"
        sparc: remove unused nfsd #includes
        sparc: Fixup last users of irq_chip->typename
        Added sparc_leon3_snooping_enabled() and converted extern inline to static inline
        No auxio on LEON
        apbuart: Use of_find_node_by_path to find root node.
        sparc: Replace old style lock initializer
        sparc: Make atomic locks raw
        apbuart: Fix build and missing driver unregister.
        apbuart: Kill dependency on deprecated Sparc-only PROM interfaces.
        apbuart: Fix build warning.
        sparc: Support for GRLIB APBUART serial port
        watchdog: Remove BKL from rio watchdog driver
        sparc: Remove BKL from apc
        sparc,leon: Sparc-Leon SMP support
      ee1262db