1. 10 6月, 2014 2 次提交
    • M
      perf probe: Improve an error message of perf probe --vars mode · 69e96eaa
      Masami Hiramatsu 提交于
      Fix an error message when failed to find given address in --vars
      mode.
      
      Without this fix, perf probe -V doesn't show the final "Error"
      message if it fails to find given source line. Moreover, it
      tells it fails to find "variables" instead of the source line.
        -----
        # perf probe -V foo@bar
        Failed to find variables at foo@bar (0)
        -----
      The result also shows mysterious error code. Actually the error
      returns 0 or -ENOENT means that it just fails to find the address
      of given source line. (0 means there is no matching address,
      and -ENOENT means there is an entry(DIE) but it has no instance,
      e.g. an empty inlined function)
      
      This fixes it to show what happened and the final error message
      as below.
        -----
        # perf probe -V foo@bar
        Failed to find the address of foo@bar
          Error: Failed to show vars.
        -----
      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/20140606071359.6788.84716.stgit@kbuild-fedora.novalocalSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      69e96eaa
    • M
      perf probe: Show error code and description in verbose mode · b4bf1130
      Masami Hiramatsu 提交于
      Show error code and description only in verbose mode if 'perf probe'
      command failed.
      
      Current 'perf probe' shows error code with final error message, and that
      is meaningless for many users.
      
      This changes error messages to show the error code and its description
      only in verbose mode (-v option).
      
      Without this patch:
        -----
        # perf probe -a do_execve@hoge
        Probe point 'do_execve@hoge' not found.
          Error: Failed to add events. (-2)
        -----
      
      With this patch, normally the message doesn't show the misterious error
      number:
        -----
        # perf probe -a do_execve@hoge
        Probe point 'do_execve@hoge' not found.
          Error: Failed to add events.
        -----
      
      And in verbose mode, it also shows additional error messages as below:
        -----
        # perf probe -va do_execve@hoge
        probe-definition(0): do_execve@hoge
        symbol:do_execve file:hoge line:0 offset:0 return:0 lazy:(null)
        0 arguments
        Looking at the vmlinux_path (6 entries long)
        Using /lib/modules/3.15.0-rc8+/build/vmlinux for symbols
        Open Debuginfo file: /lib/modules/3.15.0-rc8+/build/vmlinux
        Try to find probe point from debuginfo.
        Probe point 'do_execve@hoge' not found.
          Error: Failed to add events. Reason: No such file or directory (Code: -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@kernel.org>
      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/20140606071352.6788.76943.stgit@kbuild-fedora.novalocalSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      b4bf1130
  2. 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
  3. 06 6月, 2014 3 次提交
  4. 05 6月, 2014 16 次提交
  5. 04 6月, 2014 12 次提交
  6. 02 6月, 2014 4 次提交