diff options
author | Dima Kogan <dima@secretsauce.net> | 2024-04-16 07:55:11 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2024-04-19 04:22:51 +0300 |
commit | c15ed4442981ccf8e7e0d885f5cb500400dde9d7 (patch) | |
tree | 746ef751274908e016dcc8b5a6b77f85ed95da1d /tools/perf/util/probe-event.c | |
parent | a529bec023d7d14d9fb7d5b456921630e63edc6b (diff) | |
download | linux-c15ed4442981ccf8e7e0d885f5cb500400dde9d7.tar.xz |
perf probe-event: Better error message for a too-long probe name
This is a common failure mode when probing userspace C++ code (where the
mangling adds significant length to the symbol names).
Prior to this patch, only a very generic error message is produced,
making the user guess at what the issue is.
Signed-off-by: Dima Kogan <dima@secretsauce.net>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Link: https://lore.kernel.org/r/20240416045533.162692-3-dima@secretsauce.net
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/probe-event.c')
-rw-r--r-- | tools/perf/util/probe-event.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c index c1dbad8a83dc..8a73c9464b70 100644 --- a/tools/perf/util/probe-event.c +++ b/tools/perf/util/probe-event.c @@ -2758,7 +2758,7 @@ static int get_new_event_name(char *buf, size_t len, const char *base, /* Try no suffix number */ ret = e_snprintf(buf, len, "%s%s", nbase, ret_event ? "__return" : ""); if (ret < 0) { - pr_debug("snprintf() failed: %d\n", ret); + pr_warning("snprintf() failed: %d; the event name nbase='%s' is too long\n", ret, nbase); goto out; } if (!strlist__has_entry(namelist, buf)) |