1. 02 6月, 2011 3 次提交
  2. 29 5月, 2011 9 次提交
  3. 28 5月, 2011 6 次提交
  4. 27 5月, 2011 2 次提交
  5. 26 5月, 2011 20 次提交
    • A
      perf tools: Fix build on older systems · 75911c9b
      Arnaldo Carvalho de Melo 提交于
      Where /usr/include/linux/const.h is not present, e.g. RHEL5.
      Reported-by: NSrikar Dronamraju <srikar@linux.vnet.ibm.com>
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      Link: http://lkml.kernel.org/n/tip-ypcw2mu0w7dl1rrc6ncz3pee@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      75911c9b
    • A
      perf symbols: Handle /proc/sys/kernel/kptr_restrict · ec80fde7
      Arnaldo Carvalho de Melo 提交于
      Perf uses /proc/modules to figure out where kernel modules are loaded.
      
      With the advent of kptr_restrict, non root users get zeroes for all module
      start addresses.
      
      So check if kptr_restrict is non zero and don't generate the syntethic
      PERF_RECORD_MMAP events for them.
      
      Warn the user about it in perf record and in perf report.
      
      In perf report the reference relocation symbol being zero means that
      kptr_restrict was set, thus /proc/kallsyms has only zeroed addresses, so don't
      use it to fixup symbol addresses when using a valid kallsyms (in the buildid
      cache) or vmlinux (in the vmlinux path) build-id located automatically or
      specified by the user.
      
      Provide an explanation about it in 'perf report' if kernel samples were taken,
      checking if a suitable vmlinux or kallsyms was found/specified.
      
      Restricted /proc/kallsyms don't go to the buildid cache anymore.
      
      Example:
      
       [acme@emilia ~]$ perf record -F 100000 sleep 1
      
       WARNING: Kernel address maps (/proc/{kallsyms,modules}) are restricted, check
       /proc/sys/kernel/kptr_restrict.
      
       Samples in kernel functions may not be resolved if a suitable vmlinux file is
       not found in the buildid cache or in the vmlinux path.
      
       Samples in kernel modules won't be resolved at all.
      
       If some relocation was applied (e.g. kexec) symbols may be misresolved even
       with a suitable vmlinux or kallsyms file.
      
       [ perf record: Woken up 1 times to write data ]
       [ perf record: Captured and wrote 0.005 MB perf.data (~231 samples) ]
       [acme@emilia ~]$
      
       [acme@emilia ~]$ perf report --stdio
       Kernel address maps (/proc/{kallsyms,modules}) were restricted,
       check /proc/sys/kernel/kptr_restrict before running 'perf record'.
      
       If some relocation was applied (e.g. kexec) symbols may be misresolved.
      
       Samples in kernel modules can't be resolved as well.
      
       # Events: 13  cycles
       #
       # Overhead  Command      Shared Object                 Symbol
       # ........  .......  .................  .....................
       #
          20.24%    sleep  [kernel.kallsyms]  [k] page_fault
          20.04%    sleep  [kernel.kallsyms]  [k] filemap_fault
          19.78%    sleep  [kernel.kallsyms]  [k] __lru_cache_add
          19.69%    sleep  ld-2.12.so         [.] memcpy
          14.71%    sleep  [kernel.kallsyms]  [k] dput
           4.70%    sleep  [kernel.kallsyms]  [k] flush_signal_handlers
           0.73%    sleep  [kernel.kallsyms]  [k] perf_event_comm
           0.11%    sleep  [kernel.kallsyms]  [k] native_write_msr_safe
      
       #
       # (For a higher level overview, try: perf report --sort comm,dso)
       #
       [acme@emilia ~]$
      
      This is because it found a suitable vmlinux (build-id checked) in
      /lib/modules/2.6.39-rc7+/build/vmlinux (use -v in perf report to see the long
      file name).
      
      If we remove that file from the vmlinux path:
      
       [root@emilia ~]# mv /lib/modules/2.6.39-rc7+/build/vmlinux \
      		     /lib/modules/2.6.39-rc7+/build/vmlinux.OFF
       [acme@emilia ~]$ perf report --stdio
       [kernel.kallsyms] with build id 57298cdbe0131f6871667ec0eaab4804dcf6f562
       not found, continuing without symbols
      
       Kernel address maps (/proc/{kallsyms,modules}) were restricted, check
       /proc/sys/kernel/kptr_restrict before running 'perf record'.
      
       As no suitable kallsyms nor vmlinux was found, kernel samples can't be
       resolved.
      
       Samples in kernel modules can't be resolved as well.
      
       # Events: 13  cycles
       #
       # Overhead  Command      Shared Object  Symbol
       # ........  .......  .................  ......
       #
          80.31%    sleep  [kernel.kallsyms]  [k] 0xffffffff8103425a
          19.69%    sleep  ld-2.12.so         [.] memcpy
      
       #
       # (For a higher level overview, try: perf report --sort comm,dso)
       #
       [acme@emilia ~]$
      Reported-by: NStephane Eranian <eranian@google.com>
      Suggested-by: NDavid Miller <davem@davemloft.net>
      Cc: Dave Jones <davej@redhat.com>
      Cc: David Miller <davem@davemloft.net>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Kees Cook <kees.cook@canonical.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Pekka Enberg <penberg@cs.helsinki.fi>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      Link: http://lkml.kernel.org/n/tip-mt512joaxxbhhp1odop04yit@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      ec80fde7
    • J
      perf: Remove duplicate headers · ea7659fb
      Jesper Juhl 提交于
      Signed-off-by: NJesper Juhl <jj@chaosbits.net>
      Cc: Tom Zanussi <tom.zanussi@linux.intel.com>
      Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
      Cc: trivial@kernel.org
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Link: http://lkml.kernel.org/r/alpine.LNX.2.00.1105261011290.17400@swampdragon.chaosbits.netSigned-off-by: NIngo Molnar <mingo@elte.hu>
      ea7659fb
    • I
      Merge branch 'linus' into perf/urgent · 1102c660
      Ingo Molnar 提交于
      Merge reason: Linus applied an overlapping commit:
      
        5f2e8e2b: kernel/watchdog.c: Use proper ANSI C prototypes
      
      So merge it in to make sure we can iterate the file without conflicts.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      1102c660
    • E
      tmpfs: fix XATTR N overriding POSIX_ACL Y · 4db70f73
      Eric Paris 提交于
      Choosing TMPFS_XATTR default N was switching off TMPFS_POSIX_ACL,
      even if it had been Y in oldconfig; and Linus reports that PulseAudio
      goes subtly wrong unless it can use ACLs on /dev/shm.
      
      Make TMPFS_POSIX_ACL select TMPFS_XATTR (and depend upon TMPFS),
      and move the TMPFS_POSIX_ACL entry before the TMPFS_XATTR entry,
      to avoid asking unnecessary questions then ignoring their answers.
      Signed-off-by: NHugh Dickins <hughd@google.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4db70f73
    • S
      ftrace: Add internal recursive checks · b1cff0ad
      Steven Rostedt 提交于
      Witold reported a reboot caused by the selftests of the dynamic function
      tracer. He sent me a config and I used ktest to do a config_bisect on it
      (as my config did not cause the crash). It pointed out that the problem
      config was CONFIG_PROVE_RCU.
      
      What happened was that if multiple callbacks are attached to the
      function tracer, we iterate a list of callbacks. Because the list is
      managed by synchronize_sched() and preempt_disable, the access to the
      pointers uses rcu_dereference_raw().
      
      When PROVE_RCU is enabled, the rcu_dereference_raw() calls some
      debugging functions, which happen to be traced. The tracing of the debug
      function would then call rcu_dereference_raw() which would then call the
      debug function and then... well you get the idea.
      
      I first wrote two different patches to solve this bug.
      
      1) add a __rcu_dereference_raw() that would not do any checks.
      2) add notrace to the offending debug functions.
      
      Both of these patches worked.
      
      Talking with Paul McKenney on IRC, he suggested to add recursion
      detection instead. This seemed to be a better solution, so I decided to
      implement it. As the task_struct already has a trace_recursion to detect
      recursion in the ring buffer, and that has a very small number it
      allows, I decided to use that same variable to add flags that can detect
      the recursion inside the infrastructure of the function tracer.
      
      I plan to change it so that the task struct bit can be checked in
      mcount, but as that requires changes to all archs, I will hold that off
      to the next merge window.
      
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Link: http://lkml.kernel.org/r/1306348063.1465.116.camel@gandalf.stny.rr.comReported-by: NWitold Baryluk <baryluk@smp.if.uj.edu.pl>
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      b1cff0ad
    • L
      tracing: Update btrfs's tracepoints to use u64 interface · 7f34b746
      liubo 提交于
      To avoid 64->32 truncating WARNING, update btrfs's tracepoints.
      Signed-off-by: NLiu Bo <liubo2009@cn.fujitsu.com>
      Link: http://lkml.kernel.org/r/4DACE6E3.8080200@cn.fujitsu.comSigned-off-by: NSteven Rostedt <rostedt@goodmis.org>
      7f34b746
    • L
      tracing: Add __print_symbolic_u64 to avoid warnings on 32bit machine · 2fc1b6f0
      liubo 提交于
      Filesystem, like Btrfs, has some "ULL" macros, and when these macros are passed
      to tracepoints'__print_symbolic(), there will be 64->32 truncate WARNINGS during
      compiling on 32bit box.
      Signed-off-by: NLiu Bo <liubo2009@cn.fujitsu.com>
      Link: http://lkml.kernel.org/r/4DACE6E0.7000507@cn.fujitsu.comSigned-off-by: NSteven Rostedt <rostedt@goodmis.org>
      2fc1b6f0
    • S
      ftrace: Set ops->flag to enabled even on static function tracing · 3b6cfdb1
      Steven Rostedt 提交于
      When dynamic ftrace is not configured, the ops->flags still needs
      to have its FTRACE_OPS_FL_ENABLED bit set in ftrace_startup().
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      3b6cfdb1
    • S
      tracing: Have event with function tracer check error return · 17bb615a
      Steven Rostedt 提交于
      The self tests for event tracer does not check if the function
      tracing was successfully activated. It needs to before it continues
      the tests, otherwise the wrong errors may be reported.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      17bb615a
    • S
      ftrace: Have ftrace_startup() return failure code · a1cd6173
      Steven Rostedt 提交于
      The register_ftrace_function() returns an error code on failure
      except if the call to ftrace_startup() fails. Add a error return to
      ftrace_startup() if it fails to start, allowing register_ftrace_funtion()
      to return a proper error value.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      a1cd6173
    • S
      video: mb862xx: udelay need linux/delay.h · 520fd845
      Stephen Rothwell 提交于
      Fix this:
      
        drivers/video/mb862xx/mb862xx-i2c.c: In function 'mb862xx_i2c_wait_event':
        drivers/video/mb862xx/mb862xx-i2c.c:25: error: implicit declaration of function 'udelay'
      
      caused by commit f8a6b1f4 ("video: mb862xx: add support for
      controller's I2C bus adapter").
      Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      520fd845
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/linux-2.6-nsfd · 14d74e0c
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/linux-2.6-nsfd:
        net: fix get_net_ns_by_fd for !CONFIG_NET_NS
        ns proc: Return -ENOENT for a nonexistent /proc/self/ns/ entry.
        ns: Declare sys_setns in syscalls.h
        net: Allow setting the network namespace by fd
        ns proc: Add support for the ipc namespace
        ns proc: Add support for the uts namespace
        ns proc: Add support for the network namespace.
        ns: Introduce the setns syscall
        ns: proc files for namespace naming policy.
      14d74e0c
    • L
      slub: remove no-longer used 'unlock_out' label · 49a78d08
      Linus Torvalds 提交于
      Commit a71ae47a ("slub: Fix double bit unlock in debug mode")
      removed the only goto to this label, resulting in
      
        mm/slub.c: In function '__slab_alloc':
        mm/slub.c:1834: warning: label 'unlock_out' defined but not used
      
      fixed trivially by the removal of the label itself too.
      Reported-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Cc: Christoph Lameter <cl@linux.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      49a78d08
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 · 3f5785ec
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (89 commits)
        bonding: documentation and code cleanup for resend_igmp
        bonding: prevent deadlock on slave store with alb mode (v3)
        net: hold rtnl again in dump callbacks
        Add Fujitsu 1000base-SX PCI ID to tg3
        bnx2x: protect sequence increment with mutex
        sch_sfq: fix peek() implementation
        isdn: netjet - blacklist Digium TDM400P
        via-velocity: don't annotate MAC registers as packed
        xen: netfront: hold RTNL when updating features.
        sctp: fix memory leak of the ASCONF queue when free asoc
        net: make dev_disable_lro use physical device if passed a vlan dev (v2)
        net: move is_vlan_dev into public header file (v2)
        bug.h: Fix build with CONFIG_PRINTK disabled.
        wireless: fix fatal kernel-doc error + warning in mac80211.h
        wireless: fix cfg80211.h new kernel-doc warnings
        iwlagn: dbg_fixed_rate only used when CONFIG_MAC80211_DEBUGFS enabled
        dst: catch uninitialized metrics
        be2net: hash key for rss-config cmd not set
        bridge: initialize fake_rtable metrics
        net: fix __dst_destroy_metrics_generic()
        ...
      
      Fix up trivial conflicts in drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c
      3f5785ec
    • J
      jump_label: Check entries limit in __jump_label_update · 7cbc5b8d
      Jiri Olsa 提交于
      When iterating the jump_label entries array (core or modules),
      the __jump_label_update function peeks over the last entry.
      
      The reason is that the end of the for loop depends on the key
      value of the processed entry. Thus when going through the
      last array entry, we will touch the memory behind the array
      limit.
      
      This bug probably will never be triggered, since most likely the
      memory behind the jump_label entries will be accesable and the
      entry->key will be different than the expected value.
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Acked-by: NJason Baron <jbaron@redhat.com>
      Link: http://lkml.kernel.org/r/20110510104346.GC1899@jolsa.brq.redhat.comSigned-off-by: NSteven Rostedt <rostedt@goodmis.org>
      7cbc5b8d
    • R
      ftrace/recordmcount: Avoid STT_FUNC symbols as base on ARM · 9905ce8a
      Rabin Vincent 提交于
      While find_secsym_ndx often finds the unamed local STT_SECTION, if a
      section has only one function in it, the ARM toolchain generates the
      STT_FUNC symbol before the STT_SECTION, and recordmcount finds this
      instead.
      
      This is problematic on ARM because in ARM ELFs, "if a [STT_FUNC] symbol
      addresses a Thumb instruction, its value is the address of the
      instruction with bit zero set (in a relocatable object, the section
      offset with bit zero set)".  This leads to incorrect mcount addresses
      being recorded.
      
      Fix this by not using STT_FUNC symbols as the base on ARM.
      Signed-off-by: NRabin Vincent <rabin@rab.in>
      Link: http://lkml.kernel.org/r/1305134631-31617-1-git-send-email-rabin@rab.inSigned-off-by: NSteven Rostedt <rostedt@goodmis.org>
      9905ce8a
    • S
      scripts/tags.sh: Add magic for trace-events for etags too · 4d7a2fa8
      Steven Rostedt 提交于
      Seems that Peter Zijlstra treats us emacs users as second class
      citizens and the commit:
      
       commit 15664125
       Author: Peter Zijlstra <peterz@infradead.org>
       scripts/tags.sh: Add magic for trace-events
      
      only updated ctags (for vim) and did not do the work to let us
      lowly emacs users benefit from such a change.
      
      Cc: Peter Zijlstra <peterz@infradead.org>
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      4d7a2fa8
    • S
      scripts/tags.sh: Fix ctags for DEFINE_EVENT() · 50d6828e
      Steven Rostedt 提交于
      The regex to handle DEFINE_EVENT() should not be the same as
      the TRACE_EVENT() as the first parameter in DEFINE_EVENT is the
      template name, not the event name. We need the second parameter
      as that is what the trace_... will use.
      Tested-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      50d6828e
    • R
      x86/ftrace: Fix compiler warning in ftrace.c · 0d098a7d
      Rakib Mullick 提交于
       Due to commit dc326fca (x86, cpu: Clean up and unify the NOP selection infrastructure), we get the following warning:
      
      arch/x86/kernel/ftrace.c: In function ‘ftrace_make_nop’:
      arch/x86/kernel/ftrace.c:308:6: warning: assignment discards qualifiers from pointer target type
      arch/x86/kernel/ftrace.c: In function ‘ftrace_make_call’:
      arch/x86/kernel/ftrace.c:318:6: warning: assignment discards qualifiers from pointer target type
      
      ftrace_nop_replace() now returns const unsigned char *, so change its associated function/variable to its compatible type to keep compiler clam.
      Signed-off-by: NRakib Mullick <rakib.mullick@gmail.com>
      Link: http://lkml.kernel.org/r/1305221620.7986.4.camel@localhost.localdomain
      
      [ updated for change of const void *src in probe_kernel_write() ]
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      0d098a7d