perf probe: Update the exit error codes in function try_to_find_probe_trace_event
authorAthira Rajeev <atrajeev@linux.vnet.ibm.com>
Thu, 5 Jan 2023 12:17:41 +0000 (17:47 +0530)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 6 Feb 2023 18:00:05 +0000 (15:00 -0300)
commit67ef66bad42b32237a0ddc6bdb5cc2653c354fec
tree89b0c835cef59561273ec7392b7bf4161b107f64
parent4e846311a9be53999d9c52bba4ce76939d2b0e64
perf probe: Update the exit error codes in function try_to_find_probe_trace_event

try_to_find_probe_trace_events() uses return error code as ENOENT in two
places.

First place is after open_debuginfo() when opening debuginfo fails and
secondly, after when not finding the probe point.

This function is invoked during BPF load and there are other exit points
in this code path which returns ENOENT. This makes it difficult to
understand the exact reason for exit.

Patches changes the exit code from ENOENT to:

- ENODATA when it fails to find debuginfo

- ENODEV when it fails to find probe point

Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Disha Goel <disgoel@linux.ibm.com>
Cc: Ian Rogers <irogers@google.com>
Cc: James Clark <james.clark@arm.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kajol Jain <kjain@linux.ibm.com>
Cc: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Nageswara R Sastry <rnsastry@linux.ibm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: linuxppc-dev@lists.ozlabs.org
Link: https://lore.kernel.org/r/20230105121742.92249-1-atrajeev@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/probe-event.c