perf trace: Warn the user when not available
authorArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 26 May 2014 19:02:29 +0000 (16:02 -0300)
committerJiri Olsa <jolsa@kernel.org>
Tue, 3 Jun 2014 19:34:00 +0000 (21:34 +0200)
commit1b5726220fe16ac38eb2db43e7bc82e69f449fca
tree10b0f7b5385bb2fc7017f94451ab9a672f4d744a
parent9b261365dd73a5014b49033327ad881708e81f33
perf trace: Warn the user when not available

When the audit-libs devel package is not found at build time we disable
the 'trace' command, as we are not able to map syscall numbers to
strings, but then the message the user is presented is cryptic:

  [root@zoo linux]# trace ls
  perf: 'ls' is not a perf-command. See 'perf --help'.

Fix it by presenting a more helpful message:

  [root@zoo linux]# trace l
  trace command not available: missing audit-libs devel package at build time.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
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: 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-uxeunqetd0sgxyibusapen9a@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
tools/perf/perf.c