]> git.baikalelectronics.ru Git - kernel.git/commit
perf tools: Use ui__error() for reporting --fields errors
authorArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 18 Jan 2018 13:28:14 +0000 (10:28 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 18 Jan 2018 13:28:14 +0000 (10:28 -0300)
commit1b6f2b14d00921f66ae9b98ebf21195fa6ad99ff
tree4c8faf7717dda651de409e2509df71dc75dd54c7
parent8eff7125dad4a7b66c23eff842435cf7cfda5bbe
perf tools: Use ui__error() for reporting --fields errors

So that we can get it working for TUI, where using just pr_err() would
end up making the message emitted to stderr to be erased by the TUI exit
routine restoring the terminal to its previous state.

Now we can see that trying to use a tracepoint field as one of the
--field entries isn't working:

  # perf top --stdio --no-children -e syscalls:sys_enter_write --fields pid,sym,count
  Error:
  Unknown --fields key: `count'
   Usage: perf top [<options>]

        --fields <key[,keys...]>
                          output field(s): overhead, period, sample plus all of sort keys
  #

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: https://lkml.kernel.org/n/tip-usy9hhy7umdd4bbblkn63t8w@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/sort.c