1. 09 6月, 2014 3 次提交
    • M
      perf probe: Improve error message for unknown member of data structure · 36d789a4
      Masami Hiramatsu 提交于
      Improve the error message if we can not find given member in the given
      structure. Currently perf probe shows a wrong error message as below.
      
        -----
        # perf probe getname_flags:65 "result->BOGUS"
        result(type:filename) has no member BOGUS.
        Failed to find 'result' in this function.
          Error: Failed to add events. (-22)
        -----
      
      The first message is correct, but the second one is not, since we didn't
      fail to find a variable but fails to find the member of given variable.
      
        -----
        # perf probe getname_flags:65 "result->BOGUS"
        result(type:filename) has no member BOGUS.
          Error: Failed to add events. (-22)
        -----
      
      With this patch, the error message shows only the first one.  And if we
      really failed to find given variable, it tells us so.
      
        -----
        # perf probe getname_flags:65 "BOGUS"
        Failed to find 'BOGUS' in this function.
          Error: Failed to add events. (-2)
        -----
      Reported-by: NArnaldo Carvalho de Melo <acme@kernel.org>
      Signed-off-by: NMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@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/20140606071345.6788.23744.stgit@kbuild-fedora.novalocalSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      36d789a4
    • A
      perf tests: Show the inner make output when an error happens · a5c5009f
      Arnaldo Carvalho de Melo 提交于
      Before:
      
        [acme@zoo linux]$ make -C tools/perf -f tests/make make_static
        make: Entering directory `/home/git/linux/tools/perf'
        - make_static: cd . && make -f Makefile DESTDIR=/tmp/tmp.JcWuM4Zu9f LDFLAGS=-static
        make: *** [make_static] Error 1
        make: Leaving directory `/home/git/linux/tools/perf'
        [acme@zoo linux]$
      
      After:
      
        [acme@zoo linux]$ make -C tools/perf -f tests/make make_static
        make: Entering directory `/home/git/linux/tools/perf'
        - make_static: cd . && make -f Makefile DESTDIR=/tmp/tmp.X3su83i14u LDFLAGS=-static
        cd . && make -f Makefile DESTDIR=/tmp/tmp.X3su83i14u LDFLAGS=-static
          BUILD:   Doing 'make -j4' parallel build
        config/Makefile:303: *** No static glibc found, please install glibc-static.  Stop.
        make[1]: *** [all] Error 2
          test: test -x ./perf
        make: Leaving directory `/home/git/linux/tools/perf'
        [acme@zoo linux]$
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Don Zickus <dzickus@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Namhyung Kim <namhyung@kernel.org>
      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-h4kby5wyp6nfev3882rzm3r9@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      a5c5009f
    • A
      perf tools: Emit more precise message for missing glibc static library · f9ca2d89
      Arnaldo Carvalho de Melo 提交于
      When the user does:
      
        make -C tools/perf LDFLAGS=-static
      
      asking for a static build, and the glibc-static (or equivalent) is not
      found, the message wasn't clear, stating that one of glibc-devel or
      glibc-static wasn't installed, clarify it checking if -static is
      present in LDFLAGS.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Don Zickus <dzickus@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Namhyung Kim <namhyung@kernel.org>
      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-7e0sfobbzgeydzi9gsz8ss3m@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      f9ca2d89
  2. 06 6月, 2014 3 次提交
  3. 05 6月, 2014 16 次提交
  4. 04 6月, 2014 12 次提交
  5. 02 6月, 2014 6 次提交
    • O
      uprobes: Teach copy_insn() to support tmpfs · 45e0a79a
      Oleg Nesterov 提交于
      tmpfs is widely used but as Denys reports shmem_aops doesn't have
      ->readpage() and thus you can't probe a binary on this filesystem.
      
      As Hugh suggested we can use shmem_read_mapping_page() in this case,
      just we need to check shmem_mapping() if ->readpage == NULL.
      Reported-by: NDenys Vlasenko <dvlasenk@redhat.com>
      Suggested-by: NHugh Dickins <hughd@google.com>
      Acked-by: NSrikar Dronamraju <srikar@linux.vnet.ibm.com>
      Signed-off-by: NOleg Nesterov <oleg@redhat.com>
      45e0a79a
    • O
      uprobes: Shift ->readpage check from __copy_insn() to uprobe_register() · 7fa31348
      Oleg Nesterov 提交于
      copy_insn() fails with -EIO if ->readpage == NULL, but this error
      is not propagated unless uprobe_register() path finds ->mm which
      already mmaps this file. In this case (say) "perf record" does not
      actually install the probe, but the user can't know about this.
      
      Move this check into uprobe_register() so that this problem can be
      detected earlier and reported to user.
      
      Note: this is still not perfect,
      
      	- copy_insn() and arch_uprobe_analyze_insn() should be called
      	  by uprobe_register() but this is not simple, we need vm_file
      	  for read_mapping_page() (although perhaps we can pass NULL),
      	  and we need ->mm for is_64bit_mm() (although this logic is
      	  broken anyway).
      
      	- uprobe_register() should be called by create_trace_uprobe(),
      	  not by probe_event_enable(), so that an error can be detected
      	  at "perf probe -x" time. This also needs more changes in the
      	  core uprobe code, uprobe register/unregister interface was
      	  poorly designed from the very beginning.
      Reported-by: NDenys Vlasenko <dvlasenk@redhat.com>
      Acked-by: NSrikar Dronamraju <srikar@linux.vnet.ibm.com>
      Signed-off-by: NOleg Nesterov <oleg@redhat.com>
      7fa31348
    • L
      Linux 3.15-rc8 · fad01e86
      Linus Torvalds 提交于
      fad01e86
    • L
      Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc · 204fe038
      Linus Torvalds 提交于
      Pull powerpc fix from Ben Herrenschmidt:
       "Here's just one trivial patch to wire up sys_renameat2 which I seem to
        have completely missed so far.
      
        (My test build scripts fwd me warnings but miss the ones generated for
        missing syscalls)"
      
      * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
        powerpc: Wire renameat2() syscall
      204fe038
    • L
      Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus · 568180a5
      Linus Torvalds 提交于
      Pull MIPS fixes from Ralf Baechle:
       "A fair number of fixes across the field.  Nothing terribly
        complicated; the one liners in below changelog should be fairly
        descriptive.
      
        Noteworthy is the SB1 change which the result of changes to binutils
        resulting in one big gas warning for most files being assembled as
        well as the asid_cache and branch emulation fixes which fix corruption
        or possible uninteded behaviour of kernel or application code.  The
        remainder of fixes are more platforms or subsystem specific"
      
      * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
        MIPS: R46000: Fix Micro-assembler field overflow for R4600 V2
        MIPS: ptrace: Avoid smp_processor_id() in preemptible code
        MIPS: Lemote 2F: cs5536: mfgpt: use raw locks
        MIPS: SB1: Fix excessive kernel warnings.
        MIPS: RC32434: fix broken PCI resource initialization
        MIPS: malta: memory.c: Initialize the 'memsize' variable
        MIPS: Fix typo when reporting cache and ftlb errors for ImgTec cores
        MIPS: Fix inconsistancy of __NR_Linux_syscalls value
        MIPS: Fix branch emulation of branch likely instructions.
        MIPS: Fix a typo error in AUDIT_ARCH definition
        MIPS: Change type of asid_cache to unsigned long
      568180a5
    • L
      Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 32439700
      Linus Torvalds 提交于
      Pull scheduler fixes from Ingo Molnar:
       "Various fixlets, mostly related to the (root-only) SCHED_DEADLINE
        policy, but also a hotplug bug fix and a fix for a NR_CPUS related
        overallocation bug causing a suspend/resume regression"
      
      * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched: Fix hotplug vs. set_cpus_allowed_ptr()
        sched/cpupri: Replace NR_CPUS arrays
        sched/deadline: Replace NR_CPUS arrays
        sched/deadline: Restrict user params max value to 2^63 ns
        sched/deadline: Change sched_getparam() behaviour vs SCHED_DEADLINE
        sched: Disallow sched_attr::sched_policy < 0
        sched: Make sched_setattr() correctly return -EFBIG
      32439700