1. 22 Oct, 2012 4 commits
    • Luigi Semenzato's avatar
      perf tools: do not flush maps on COMM for perf report · 9fdbf671
      Luigi Semenzato authored
      This fixes a long-standing bug caused by the lack of separate COMM and EXEC
      record types, which makes "perf report" lose track of symbols when a process
      renames itself.
      
      With this fix (suggested by Stephane Eranian), a COMM (rename) no longer
      flushes the maps, which is the correct behavior.  An EXEC also no longer
      flushes the maps, but this doesn't matter because as new mappings are created
      (for the executable and the libraries) the old mappings are automatically
      removed.  This is not by accident: the functionality is necessary because DLLs
      can be explicitly loaded at any time with dlopen(), possibly on top of existing
      text, so "perf report" handles correctly the clobbering of new mappings on top
      of old ones.
      
      An alternative patch (which I proposed earlier) would be to introduce a
      separate PERF_RECORD_EXEC type, but it is a much larger change (about 300
      lines) and is not necessary.
      Signed-off-by: default avatarLuigi Semenzato <semenzato@chromium.org>
      Tested-by: default avatarStephane Eranian <eranian@google.com>
      Acked-by: default avatarStephane Eranian <eranian@google.com>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi>
      Cc: Namhyung Kim <namhyung@gmail.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Olof Johansson <olofj@chromium.org>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Robert Richter <robert.richter@amd.com>
      Cc: Sonny Rao <sonnyrao@chromium.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Stephen Wilson <wilsons@start.ca>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Vasiliy Kulikov <segoon@openwall.com>
      Link: http://lkml.kernel.org/r/1345585940-6497-1-git-send-email-semenzato@chromium.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      9fdbf671
    • Namhyung Kim's avatar
      perf help: Fix --help for builtins · 670ab5d2
      Namhyung Kim authored
      It seems that commit cc584821 ("perf help: Remove use of die and
      handle errors") caused the problem - it changed the initial value of
      'help_format' from HELP_FORMAT_MAN to HELP_FORMAT_NONE.
      
      This broke the --help option for all builtins, that would produce no
      output, while 'man perf-top' would work it MANPATH is properly setup.
      Reported-by: default avatarStephane Eranian <eranian@google.com>
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Tested-by: default avatarDavid Ahern <dsahern@gmail.com>
      Acked-by: default avatarDavid Ahern <dsahern@gmail.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/r/87r4orj7zc.fsf@sejong.aot.lge.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      670ab5d2
    • Arnaldo Carvalho de Melo's avatar
      perf trace: Check if sample raw_data field is set · fc551f8d
      Arnaldo Carvalho de Melo authored
      Sometimes we're segfaulting because we were expecting that the
      perf_sample.raw_data field was set as requested, but in some cases
      that needs further investigation, that field can be NULL, leading
      to segfaults.
      
      Make the tool more robust by checking that before calling any per event
      handlers that may try to use that field.
      
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Namhyung Kim <namhyung@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-g1fmodl6ys4lq8honbj1igoi@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      fc551f8d
    • Arnaldo Carvalho de Melo's avatar
      perf trace: Validate syscall id before growing syscall table · 3a531260
      Arnaldo Carvalho de Melo authored
      In some cases the ID for a syscall read thru the raw_syscalls tracepoint
      is bogus, still needs to be investigated why, but to make the tool more
      robust first try to resolve the ID to a name via libaudit and if it
      fails, don't grow the table.
      
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Namhyung Kim <namhyung@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-0lsokw3xor7c4ijo45u6bauh@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      3a531260
  2. 21 Oct, 2012 3 commits
  3. 20 Oct, 2012 7 commits
    • Yan, Zheng's avatar
      perf/x86: Disable uncore on virtualized CPUs · a05123bd
      Yan, Zheng authored
      Initializing uncore PMU on virtualized CPU may hang the kernel.
      This is because kvm does not emulate the entire hardware. Thers
      are lots of uncore related MSRs, making kvm enumerate them all
      is a non-trival task. So just disable uncore on virtualized CPU.
      Signed-off-by: default avatarYan, Zheng <zheng.z.yan@intel.com>
      Tested-by: default avatarPekka Enberg <penberg@kernel.org>
      Cc: a.p.zijlstra@chello.nl
      Cc: eranian@google.com
      Cc: andi@firstfloor.org
      Cc: avi@redhat.com
      Link: http://lkml.kernel.org/r/1345540117-14164-1-git-send-email-zheng.z.yan@intel.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      a05123bd
    • Kees Cook's avatar
      use clamp_t in UNAME26 fix · 31fd84b9
      Kees Cook authored
      The min/max call needed to have explicit types on some architectures
      (e.g. mn10300). Use clamp_t instead to avoid the warning:
      
        kernel/sys.c: In function 'override_release':
        kernel/sys.c:1287:10: warning: comparison of distinct pointer types lacks a cast [enabled by default]
      Reported-by: default avatarFengguang Wu <fengguang.wu@intel.com>
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      31fd84b9
    • Linus Torvalds's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 8c1bee68
      Linus Torvalds authored
      Pull perf fixes from Ingo Molnar:
       "Assorted small fixes"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf python: Properly link with libtraceevent
        perf hists browser: Add back callchain folding symbol
        perf tools: Fix build on sparc.
        perf python: Link with libtraceevent
        perf python: Initialize 'page_size' variable
        tools lib traceevent: Fix missed freeing of subargs in free_arg() in filter
        lib tools traceevent: Add back pevent assignment in __pevent_parse_format()
        perf hists browser: Fix off-by-two bug on the first column
        perf tools: Remove warnings on JIT samples for srcline sort key
        perf tools: Fix segfault when using srcline sort key
        perf: Require exclude_guest to use PEBS - kernel side enforcement
        perf tool: Precise mode requires exclude_guest
      8c1bee68
    • Arnaldo Carvalho de Melo's avatar
      perf python: Properly link with libtraceevent · 45bff41a
      Arnaldo Carvalho de Melo authored
      Namhyung Kim reported that the build fails with:
      
        GEN python/perf.so
        gcc: error: python_ext_build/tmp//../../libtraceevent.a: No such file or directory
        error: command 'gcc' failed with exit status 1
        cp: cannot stat `python_ext_build/lib/perf.so': No such file or directory
        make: *** [python/perf.so] Error 1
      
      We need to propagate the TE_PATH variable to the setup.py file.
      Reported-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Link: http://lkml.kernel.org/n/tip-8umiPbm4sxpknKivbjgykhut@git.kernel.org
      [ Fixed superfluous variable build error. ]
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      45bff41a
    • Ingo Molnar's avatar
      Merge tag 'perf-urgent-for-mingo' of... · a448a031
      Ingo Molnar authored
      Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
      
      Pull perf/urgent fixes from Arnaldo Carvalho de Melo:
      
      * The python binding needs to link with libtraceevent and to initialize
        the 'page_size' variable so that mmaping works again.
      
      * The callchain folding character that appears on the TUI just before
        the overhead had disappeared due to recent changes, add it back.
      
      * Intel PEBS in VT-x context uses the DS address as a guest linear address,
        even though its programmed by the host as a host linear address. This either
        results in guest memory corruption and or the hardware faulting and 'crashing'
        the virtual machine.  Therefore we have to disable PEBS on VT-x enter and
        re-enable on VT-x exit, enforcing a strict exclude_guest.
      
        Kernel side enforcement fix by Peter Zijlstra, tooling side fix by David Ahern.
      
      * Fix build on sparc due to UAPI, fix from David Miller.
      
      * Fixes for the srclike sort key for unresolved symbols and when processing
        samples in JITted code, where we don't have an ELF file, just an special
        symbol table, fixes from Namhyung Kim.
      
      * Fix some leaks in libtraceevent, from Steven Rostedt.
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      a448a031
    • Linus Torvalds's avatar
      Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 37820108
      Linus Torvalds authored
      Pull ARM soc fixes from Olof Johansson:
       "A set of fixes and some minor cleanups for -rc2:
      
         - A series from Arnd that fixes warnings in drivers and other code
           included by ARM defconfigs.  Most have been acked by corresponding
           maintainers (and seem quite hard to argue not picking up anyway in
           the few exception cases).
         - A few misc patches from the list for integrator/vt8500/i.MX
         - A batch of fixes to OMAP platforms, fixing:
           - boot problems on beaglebone,
           - regression fixes for local timers
           - clockdomain locking fixes
           - a few boot/sparse warnings
         - For Tegra:
           - Clock rate calculation overflow fix
           - Revert a change that removed timer clocks and a fix for symbol
             name clashes
         - For Renesas:
           - IO accessor / annotation cleanups to remove warnings
         - For Kirkwood/Dove/mvebu:
           - Fixes for device trees for Dove (some minor cleanups, some fixes)
           - Fixes for the mvebu gpio driver
           - Fix build problem for Feroceon due to missing ifdefs
           - Fix lsxl DTS files"
      
      * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (31 commits)
        ARM: kirkwood: fix buttons on lsxl boards
        ARM: kirkwood: fix LEDs names for lsxl boards
        ARM: Kirkwood: fix disabling CACHE_FEROCEON_L2
        gpio: mvebu: Add missing breaks in mvebu_gpio_irq_set_type
        ARM: dove: Add crypto engine to DT
        ARM: dove: Remove watchdog from DT
        ARM: dove: Restructure SoC device tree descriptor
        ARM: dove: Fix clock names of sata and gbe
        ARM: dove: Fix tauros2 device tree init
        ARM: dove: Add pcie clock support
        ARM: OMAP2+: Allow kernel to boot even if GPMC fails to reserve memory
        ARM: OMAP: clockdomain: Fix locking on _clkdm_clk_hwmod_enable / disable
        ARM: s3c: mark s3c2440_clk_add as __init_refok
        spi/s3c64xx: use correct dma_transfer_direction type
        ARM: OMAP4: devices: fixup OMAP4 DMIC platform device error message
        ARM: OMAP2+: clock data: Add dev-id for the omap-gpmc dummy fck
        ARM: OMAP: resolve sparse warning concerning debug_card_init()
        ARM: OMAP4: Fix twd_local_timer_register regression
        ARM: tegra: add tegra_timer clock
        ARM: tegra: rename tegra system timer
        ...
      37820108
    • David Howells's avatar
      MODSIGN: Move the magic string to the end of a module and eliminate the search · caabe240
      David Howells authored
      Emit the magic string that indicates a module has a signature after the
      signature data instead of before it.  This allows module_sig_check() to
      be made simpler and faster by the elimination of the search for the
      magic string.  Instead we just need to do a single memcmp().
      
      This works because at the end of the signature data there is the
      fixed-length signature information block.  This block then falls
      immediately prior to the magic number.
      
      From the contents of the information block, it is trivial to calculate
      the size of the signature data and thus the size of the actual module
      data.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      caabe240
  4. 19 Oct, 2012 26 commits