1. 10 Jun, 2014 1 commit
    • Masami Hiramatsu's avatar
      perf probe: Improve error messages in --line option · 5ee05b88
      Masami Hiramatsu authored
      Improve error messages of 'perf probe --line' mode.
      
      Currently 'perf probe' shows the "Debuginfo analysis failed" message with
      an error code when the given symbol is not found:
      
        -----
        # perf probe -L page_cgroup_init_flatmem
        Debuginfo analysis failed. (-2)
          Error: Failed to show lines.
        -----
      
      But -2 (-ENOENT) means that the given source line or function was not
      found. With this patch, 'perf probe' shows the correct error message:
      
        -----
        # perf probe -L page_cgroup_init_flatmem
        Specified source line is not found.
          Error: Failed to show lines.
        -----
      
      There is also another debug error code is shown in the same function
      after get_real_path(). This removes that too.
      Signed-off-by: default avatarMasami 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/20140606071406.6788.47850.stgit@kbuild-fedora.novalocalSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      5ee05b88
  2. 09 Jun, 2014 5 commits
    • Masami Hiramatsu's avatar
      perf probe: Improve an error message of perf probe --vars mode · 69e96eaa
      Masami Hiramatsu authored
      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: default avatarMasami 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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      69e96eaa
    • Masami Hiramatsu's avatar
      perf probe: Show error code and description in verbose mode · b4bf1130
      Masami Hiramatsu authored
      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: default avatarArnaldo Carvalho de Melo <acme@kernel.org>
      Signed-off-by: default avatarMasami 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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      b4bf1130
    • Masami Hiramatsu's avatar
      perf probe: Improve error message for unknown member of data structure · 36d789a4
      Masami Hiramatsu authored
      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: default avatarArnaldo Carvalho de Melo <acme@kernel.org>
      Signed-off-by: default avatarMasami 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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      36d789a4
    • Arnaldo Carvalho de Melo's avatar
      perf tests: Show the inner make output when an error happens · a5c5009f
      Arnaldo Carvalho de Melo authored
      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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      a5c5009f
    • Arnaldo Carvalho de Melo's avatar
      perf tools: Emit more precise message for missing glibc static library · f9ca2d89
      Arnaldo Carvalho de Melo authored
      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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f9ca2d89
  3. 06 Jun, 2014 3 commits
  4. 05 Jun, 2014 16 commits
  5. 04 Jun, 2014 2 commits
  6. 03 Jun, 2014 10 commits
  7. 02 Jun, 2014 3 commits