diff options
| author | Kefeng Wang <[email protected]> | 2017-03-17 16:16:32 +0800 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2017-03-21 10:45:02 -0300 |
| commit | 70946723eeb859466f026274b29c6196e39149c4 (patch) | |
| tree | e6e529e129e7a7831bd4d0c9ec905fe098334fb7 /tools/perf/scripts/python/bin | |
| parent | 2e1f8f7895731a8592d483a7364a23855843af17 (diff) | |
perf probe: Return errno when not hitting any event
On old perf, when using 'perf probe -d' to delete an inexistent event,
it returns errno, eg,
-bash-4.3# perf probe -d xxx || echo $?
Info: Event "*:xxx" does not exist.
Error: Failed to delete events.
255
But now perf_del_probe_events() will always set ret = 0, different from
previous del_perf_probe_events(). After this, it returns errno again,
eg,
-bash-4.3# ./perf probe -d xxx || echo $?
"xxx" does not hit any event.
Error: Failed to delete events.
254
And it is more appropriate to return -ENOENT instead of -EPERM.
Signed-off-by: Kefeng Wang <[email protected]>
Acked-by: Masami Hiramatsu <[email protected]>
Cc: Hanjun Guo <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Wang Nan <[email protected]>
Fixes: dddc7ee32fa1 ("perf probe: Fix an error when deleting probes successfully")
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions