Searched hist:51433 (Results 1 - 1 of 1) sorted by relevance

/linux-master/tools/perf/
H A Dbuiltin-stat.cdiff 51433ead Mon Dec 10 09:00:04 MST 2018 Michael Petlan <mpetlan@redhat.com> perf stat: Avoid segfaults caused by negated options

Some 'perf stat' options do not make sense to be negated (event,
cgroup), some do not have negated path implemented (metrics). Due to
that, it is better to disable the "no-" prefix for them, since
otherwise, the later opt-parsing segfaults.

Before:

$ perf stat --no-metrics -- ls
Segmentation fault (core dumped)

After:

$ perf stat --no-metrics -- ls
Error: option `no-metrics' isn't available
Usage: perf stat [<options>] [<command>]

Signed-off-by: Michael Petlan <mpetlan@redhat.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
LPU-Reference: 1485912065.62416880.1544457604340.JavaMail.zimbra@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

Completed in 361 milliseconds