1. 09 10月, 2013 9 次提交
  2. 08 10月, 2013 2 次提交
  3. 05 10月, 2013 6 次提交
    • N
      perf session: Fix infinite loop on invalid perf.data file · b314e5cf
      Namhyung Kim 提交于
      perf-record updates the header in the perf.data file at termination.
      Without this update perf-report (and other processing built-ins) it
      caused an infinite loop when perf report (or something like) called.
      
      This is because the algorithm in __perf_session__process_events()
      depends on the data_size which is read from file header.  Use file size
      directly instead in this case to do the best-effort processing.
      Signed-off-by: NNamhyung Kim <namhyung@kernel.org>
      Tested-by: NDavid Ahern <dsahern@gmail.com>
      Tested-by: NSonny Rao <sonnyrao@chromium.org>
      Acked-by: NIngo Molnar <mingo@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Sonny Rao <sonnyrao@chromium.org>
      Link: http://lkml.kernel.org/r/1380529188-27193-1-git-send-email-namhyung@kernel.orgSigned-off-by: NDavid Ahern <dsahern@gmail.com>
      [ Reworded warning as per Ingo Molnar suggestion, replaces 'perf.data'
        with session->filename, to precisely identify the data file involved ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      b314e5cf
    • A
      perf tools: Fix installation of libexec components · 027a7e86
      Arnaldo Carvalho de Melo 提交于
      Doing a fresh install on a user home directory needs to first make sure
      that the ~/libexec/perf-core/ directory is present so that
      'perf-archive' like scripts, 'perf test' attr config files and 'perf
      script' scripts can be installed.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      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: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-z7ryi3r1b9dn9smbfnab0fdc@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      027a7e86
    • M
      perf probe: Fix to find line information for probe list · e08cfd4b
      Masami Hiramatsu 提交于
      Fix to find the correct (as much as possible) line information for
      listing probes. Without this fix, perf probe --list action will show
      incorrect line information as below;
      
        probe:getname_flags  (on getname_flags@ksrc/linux-3/fs/namei.c)
        probe:getname_flags_1 (on getname:-89@x86/include/asm/current.h)
        probe:getname_flags_2 (on user_path_at_empty:-2054@x86/include/asm/current.h)
      
      The minus line number is obviously wrong, and current.h is not related
      to the probe point. Deeper investigation discovered that there were 2
      issues related to this bug, and minor typos too.
      
      The 1st issue is the rack of considering about nested inlined functions,
      which causes the wrong (relative) line number.
      
      The 2nd issue is that the dwarf line info is not correct at those
      points. It points 14th line of current.h.
      
      Since it seems that the line info includes somewhat unreliable
      information, this fixes perf to try to find correct line information
      from both of debuginfo and line info as below.
      
      1) Probe address is the entry of a function instance
      
        In this case, the line is set as the function declared line.
      
      2) Probe address is the entry of an expanded inline function block
      
        In this case, the line is set as the function call-site line.
        This means that the line number is relative from the entry line
        of caller function (which can be an inlined function if nested)
      
      3) Probe address is inside a function instance or an expanded
         inline function block
      
        In this case, perf probe queries the line number from lineinfo
        and verify the function declared file is same as the file name
        queried from lineinfo.
      
        If the file name is different, it is a failure case. The probe
        address is shown as symbol+offset.
      
      4) Probe address is not in the any function instance
      
        This is a failure case, the probe address is shown as
        symbol+offset.
      
      With this fix, perf probe -l shows correct probe lines as below;
      
        probe:getname_flags  (on getname_flags@ksrc/linux-3/fs/namei.c)
        probe:getname_flags_1 (on getname:2@ksrc/linux-3/fs/namei.c)
        probe:getname_flags_2 (on user_path_at_empty:4@ksrc/linux-3/fs/namei.c)
      
      Changes at v2:
       - Fix typos in the function comments. (Thanks to Namhyung Kim)
       - Use die_find_top_inlinefunc instead of die_find_inlinefunc_next.
      Signed-off-by: NMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/20130930092144.1693.11058.stgit@udc4-manage.rcp.hitachi.co.jpSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      e08cfd4b
    • A
      perf tools: Fix libaudit test · 47a92b82
      Arnaldo Carvalho de Melo 提交于
      In ubuntu systems the libaudit test was always failing due to the
      newline in the printf call not being escaped, which somehow didn't
      prevented the test from working as expected on other systems, such
      as fedora18.
      
      Fix it by removing the newline, as this is just a test, that program is
      just a compile test.
      
      The error messages, obtained using 'make V=1':
      
          CHK libaudit
      <stdin>: In function ‘main’:
      <stdin>:5:9: error: missing terminating " character [-Werror]
      <stdin>:5:2: error: missing terminating " character
      <stdin>:6:1: error: missing terminating " character [-Werror]
      <stdin>:6:1: error: missing terminating " character
      <stdin>:7:2: error: expected expression before ‘return’
      <stdin>:8:1: error: expected ‘;’ before ‘}’ token
      cc1: all warnings being treated as errors
      config/Makefile:241: No libaudit.h found, disables 'trace' tool, please install audit-libs-devel or libaudit-dev
      
      After this change the test works as expected in all systems tested and the
      'trace' tool is built when the needed devel packages are installed.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      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: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-0trw8qs9hafeopc0vj1sicay@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      47a92b82
    • N
      perf stat: Set child_pid after perf_evlist__prepare_workload() · d20a47e7
      Namhyung Kim 提交于
      The commit acf28922 ("perf stat: Use perf_evlist__prepare/
      start_workload()") converted to use the function but forgot to update
      child_pid.  Fix it.
      Signed-off-by: NNamhyung Kim <namhyung@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/r/1380531671-28076-1-git-send-email-namhyung@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      d20a47e7
    • D
      perf tools: Add default handler for mmap2 events · 6adb0b0a
      David Ahern 提交于
      Commands that do not implement an mmap2 handler should at least not die
      with a segfault when processing files with MMAP2 events.
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Link: http://lkml.kernel.org/r/1379900700-5186-5-git-send-email-dsahern@gmail.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      6adb0b0a
  4. 04 10月, 2013 12 次提交
  5. 30 9月, 2013 2 次提交
    • L
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · cac66535
      Linus Torvalds 提交于
      Pull perf revert from Ingo Molnar:
       "This fixes the 'perf top' regression Markus Trippelsdorf reported"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        Revert "perf symbols: Demangle cloned functions"
      cac66535
    • L
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · b97b869a
      Linus Torvalds 提交于
      Pull drm fixes from Dave Airlie:
       "Nothing too major, radeon still has some dpm changes for off by
        default.
      
        Radeon, intel, msm:
         - radeon: a few more dpm fixes (still off by default), uvd fixes
         - i915: runtime warn backtrace and regression fix
         - msm: iommu changes fallout"
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (27 commits)
        drm/msm: use drm_gem_dumb_destroy helper
        drm/msm: deal with mach/iommu.h removal
        drm/msm: Remove iommu include from mdp4_kms.c
        drm/msm: Odd PTR_ERR usage
        drm/i915: Fix up usage of SHRINK_STOP
        drm/radeon: fix hdmi audio on DCE3.0/3.1 asics
        drm/i915: preserve pipe A quirk in i9xx_set_pipeconf
        drm/i915/tv: clear adjusted_mode.flags
        drm/i915/dp: increase i2c-over-aux retry interval on AUX DEFER
        drm/radeon/cik: fix overflow in vram fetch
        drm/radeon: add missing hdmi callbacks for rv6xx
        drm/i915: Use a temporary va_list for two-pass string handling
        drm/radeon/uvd: lower msg&fb buffer requirements on UVD3
        drm/radeon: disable tests/benchmarks if accel is disabled
        drm/radeon: don't set default clocks for SI when DPM is disabled
        drm/radeon/dpm/ci: filter clocks based on voltage/clk dep tables
        drm/radeon/dpm/si: filter clocks based on voltage/clk dep tables
        drm/radeon/dpm/ni: filter clocks based on voltage/clk dep tables
        drm/radeon/dpm/btc: filter clocks based on voltage/clk dep tables
        drm/radeon/dpm: fetch the max clk from voltage dep tables helper
        ...
      b97b869a
  6. 29 9月, 2013 9 次提交
    • I
      Revert "perf symbols: Demangle cloned functions" · 14951f22
      Ingo Molnar 提交于
      This reverts commit de95ab53.
      
      Markus Trippelsdorf reported that this commit broke 'perf top':
      
       > I just see a gray screen with no text at all. Sometimes the
       > following error messages are printed:
       >
       >  *** Error in `perf': invalid fastbin entry (free): 0x00000000029b18c0
       >  ***
       >  *** Error in `perf': malloc(): memory corruption (fast): 0x0000000000ee0b10 ***
      
      While this code is fixable, the commit itself fails on several levels:
      
       - it should have been a separate helper function
       - why the heck does it do strchr() twice
       - it casts a const char * over into char *
       - sloppy style
       - it's not even a regression fix!
      
      So lets revert it and re-try the patch in v3.13.
      Reported-by: NMarkus Trippelsdorf <markus@trippelsdorf.de>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      14951f22
    • D
      Merge branch 'msm-fixes-3.12-rc2' of git://people.freedesktop.org/~robclark/linux into drm-fixes · 66544179
      Dave Airlie 提交于
      A small fix + deal with fallout of iommu changes + use new
      drm_gem_dumb_destroy helper.
      
      * 'msm-fixes-3.12-rc2' of git://people.freedesktop.org/~robclark/linux:
        drm/msm: use drm_gem_dumb_destroy helper
        drm/msm: deal with mach/iommu.h removal
        drm/msm: Remove iommu include from mdp4_kms.c
        drm/msm: Odd PTR_ERR usage
      66544179
    • L
      Merge branches 'sched-urgent-for-linus', 'timers-urgent-for-linus' and... · 669fc2f0
      Linus Torvalds 提交于
      Merge branches 'sched-urgent-for-linus', 'timers-urgent-for-linus' and 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
      
      Pull scheduler, timer and x86 fixes from Ingo Molnar:
       - A context tracking ARM build and functional fix
       - A handful of ARM clocksource/clockevent driver fixes
       - An AMD microcode patch level sysfs reporting fixlet
      
      * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        arm: Fix build error with context tracking calls
      
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        clocksource: em_sti: Set cpu_possible_mask to fix SMP broadcast
        clocksource: of: Respect device tree node status
        clocksource: exynos_mct: Set IRQ affinity when the CPU goes online
        arm: clocksource: mvebu: Use the main timer as clock source from DT
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/microcode/AMD: Fix patch level reporting for family 15h
      669fc2f0
    • L
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 9b565a80
      Linus Torvalds 提交于
      Pull perf fixes from Ingo Molnar:
       "A couple of tooling fixlets and a PMU detection printout fix"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf/x86: Fix PMU detection printout when no PMU is detected
        perf symbols: Demangle cloned functions
        perf machine: Fix path unpopulated in machine__create_modules()
        perf tools: Explicitly add libdl dependency
        perf probe: Fix probing symbols with optimization suffix
        perf trace: Add mmap2 handler
        perf kmem: Make it work again on non NUMA machines
      9b565a80
    • L
      Merge tag 'xfs-for-linus-v3.12-rc3' of git://oss.sgi.com/xfs/xfs · ddd23eb1
      Linus Torvalds 提交于
      Pull xfs bugfixes from Ben Myers:
       - fix for directory node collapse regression
       - fix for recovery over stale on disk structures
       - fix for eofblocks ioctl
       - fix asserts in xfs_inode_free
       - lock the ail before removing an item from it
      
      * tag 'xfs-for-linus-v3.12-rc3' of git://oss.sgi.com/xfs/xfs:
        xfs: fix node forward in xfs_node_toosmall
        xfs: log recovery lsn ordering needs uuid check
        xfs: fix XFS_IOC_FREE_EOFBLOCKS definition
        xfs: asserting lock not held during freeing not valid
        xfs: lock the AIL before removing the buffer item
      ddd23eb1
    • L
      Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · 057d5e98
      Linus Torvalds 提交于
      Pull i2c fixes from Wolfram Sang:
       "Some driver bugfixes for the I2C subsystem"
      
      * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        i2c: ismt: initialize DMA buffer
        i2c: designware: 10-bit addressing mode enabling if I2C_DYNAMIC_TAR_UPDATE is set
        i2c: mv64xxx: Do not use writel_relaxed()
        i2c: mv64xxx: Fix some build warnings
        i2c: s3c2410: fix clk_disable/clk_unprepare WARNings
      057d5e98
    • L
      Merge tag 'pm+acpi-3.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · ec220be7
      Linus Torvalds 提交于
      Pull ACPI and power management fixes from Rafael Wysocki:
       "These fix one recent cpufreq regression, a few older bugs that may
        harm users and a kerneldoc typo.
      
        Specifics:
      
         1) After the recent locking changes in the cpufreq core it is
            possible to trigger BUG_ON(!policy) in lock_policy_rwsem_read() if
            cpufreq_get() is called before registering a cpufreq driver.  Fix
            from Viresh Kumar.
      
         2) If intel_pstate has been loaded already, it doesn't make sense to
            do anything in acpi_cpufreq_init() and moreover doing something in
            there in that case may be harmful, so make that function return
            immediately if another cpufreq driver is already present.  From
            Yinghai Lu.
      
         3) The ACPI IPMI driver sometimes attempts to acquire a mutex from
            interrupt context, which can be avoided by replacing that mutex
            with a spinlock.  From Lv Zheng.
      
         4) A NULL pointer may be dereferenced by the exynos5440 cpufreq
            driver if a memory allocation made by it fails.  Fix from Sachin
            Kamat.
      
         5) Hanjun Guo's commit fixes a typo in the kerneldoc comment
            documenting acpi_bus_unregister_driver()"
      
      * tag 'pm+acpi-3.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI / scan: fix typo in comments of acpi_bus_unregister_driver()
        cpufreq: exynos5440: Fix potential NULL pointer dereference
        cpufreq: check cpufreq driver is valid and cpufreq isn't disabled in cpufreq_get()
        acpi-cpufreq: skip loading acpi_cpufreq after intel_pstate
        ACPI / IPMI: Fix atomic context requirement of ipmi_msg_handler()
      ec220be7
    • Y
      PCI: Workaround missing pci_set_master in pci drivers · f41f064c
      Yinghai Lu 提交于
      Ben Herrenschmidt found that commit 928bea96 ("PCI: Delay enabling
      bridges until they're needed") breaks PCI in some powerpc environments.
      
      The reason is that the PCIe port driver will call pci_enable_device() on
      the bridge, so the device is enabled, but skips pci_set_master because
      pcie_port_auto and no acpi on powerpc.
      
      Because of that, pci_enable_bridge() later on (called as a result of the
      child device driver doing pci_enable_device) will see the bridge as
      already enabled and will not call pci_set_master() on it.
      
      Fixed by add checking in pci_enable_bridge, and call pci_set_master
      if driver skip that.
      
      That will make the code more robot and wade off problem for missing
      pci_set_master in drivers.
      Reported-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f41f064c
    • L
      Merge branch 'lockref' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · aeebc264
      Linus Torvalds 提交于
      Pull s390 lockref enablement from Heiko Carstens:
       "Enabling the new lockless lockref variant on s390 would have been
        trivial until Tony Luck added a cpu_relax() call into the
        CMPXCHG_LOOP(), with commit d472d9d9 ("lockref: Relax in cmpxchg
        loop")
      
        As already mentioned cpu_relax() is very expensive on s390 since it
        yields() the current virtual cpu.  So we are talking of several
        thousand cycles.  Considering this enabling the lockless lockref
        variant would contradict the intention of the new semantics.  And also
        some quick measurements show performance regressions of 50% and more.
      
        Simply removing the cpu_relax() call again seems also not very
        desireable since Waiman Long reported that for some workloads the call
        improved performance by 5%."
      
      * 'lockref' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390: enable ARCH_USE_CMPXCHG_LOCKREF
        lockref: use arch_mutex_cpu_relax() in CMPXCHG_LOOP()
        mutex: replace CONFIG_HAVE_ARCH_MUTEX_CPU_RELAX with simple ifdef
      aeebc264