1. 28 May, 2011 7 commits
  2. 27 May, 2011 7 commits
  3. 26 May, 2011 15 commits
    • Arnaldo Carvalho de Melo's avatar
      perf tools: Fix build on older systems · 75911c9b
      Arnaldo Carvalho de Melo authored
      Where /usr/include/linux/const.h is not present, e.g. RHEL5.
      Reported-by: default avatarSrikar 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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      75911c9b
    • Arnaldo Carvalho de Melo's avatar
      perf symbols: Handle /proc/sys/kernel/kptr_restrict · ec80fde7
      Arnaldo Carvalho de Melo authored
      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: default avatarStephane Eranian <eranian@google.com>
      Suggested-by: default avatarDavid 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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ec80fde7
    • Jesper Juhl's avatar
      perf: Remove duplicate headers · ea7659fb
      Jesper Juhl authored
      Signed-off-by: default avatarJesper 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: default avatarIngo Molnar <mingo@elte.hu>
      ea7659fb
    • Ingo Molnar's avatar
      Merge branch 'linus' into perf/urgent · 1102c660
      Ingo Molnar authored
      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: default avatarIngo Molnar <mingo@elte.hu>
      1102c660
    • Eric Paris's avatar
      tmpfs: fix XATTR N overriding POSIX_ACL Y · 4db70f73
      Eric Paris authored
      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: default avatarHugh Dickins <hughd@google.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      4db70f73
    • Steven Rostedt's avatar
      ftrace: Add internal recursive checks · b1cff0ad
      Steven Rostedt authored
      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: default avatarWitold Baryluk <baryluk@smp.if.uj.edu.pl>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      b1cff0ad
    • liubo's avatar
      tracing: Update btrfs's tracepoints to use u64 interface · 7f34b746
      liubo authored
      To avoid 64->32 truncating WARNING, update btrfs's tracepoints.
      Signed-off-by: default avatarLiu Bo <liubo2009@cn.fujitsu.com>
      Link: http://lkml.kernel.org/r/4DACE6E3.8080200@cn.fujitsu.comSigned-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      7f34b746
    • liubo's avatar
      tracing: Add __print_symbolic_u64 to avoid warnings on 32bit machine · 2fc1b6f0
      liubo authored
      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: default avatarLiu Bo <liubo2009@cn.fujitsu.com>
      Link: http://lkml.kernel.org/r/4DACE6E0.7000507@cn.fujitsu.comSigned-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      2fc1b6f0
    • Steven Rostedt's avatar
      ftrace: Set ops->flag to enabled even on static function tracing · 3b6cfdb1
      Steven Rostedt authored
      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: default avatarSteven Rostedt <rostedt@goodmis.org>
      3b6cfdb1
    • Steven Rostedt's avatar
      tracing: Have event with function tracer check error return · 17bb615a
      Steven Rostedt authored
      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: default avatarSteven Rostedt <rostedt@goodmis.org>
      17bb615a
    • Steven Rostedt's avatar
      ftrace: Have ftrace_startup() return failure code · a1cd6173
      Steven Rostedt authored
      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: default avatarSteven Rostedt <rostedt@goodmis.org>
      a1cd6173
    • Stephen Rothwell's avatar
      video: mb862xx: udelay need linux/delay.h · 520fd845
      Stephen Rothwell authored
      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: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      520fd845
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/linux-2.6-nsfd · 14d74e0c
      Linus Torvalds authored
      * 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
    • Linus Torvalds's avatar
      slub: remove no-longer used 'unlock_out' label · 49a78d08
      Linus Torvalds authored
      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: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Cc: Christoph Lameter <cl@linux.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      49a78d08
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 · 3f5785ec
      Linus Torvalds authored
      * 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
  4. 25 May, 2011 11 commits