* [PATCH] libtraceevent: Warn when kallsyms exits due to parsing error
@ 2022-06-28 15:21 Steven Rostedt
0 siblings, 0 replies; only message in thread
From: Steven Rostedt @ 2022-06-28 15:21 UTC (permalink / raw)
To: Linux Trace Devel; +Cc: Chuck Lever III
From: "Steven Rostedt (Google)" <rostedt@goodmis.org>
If the kallsyms has a corrupted line, it will exit the parsing. This can
be confusing to users that expect to see function address converted into
names.
Add a tep_warning() when this happens. At least the library will warn
about it (although trace-cmd requires --verbose to see it).
Link: https://lore.kernel.org/all/355D2478-33D3-4046-8422-E512F42C51BC@oracle.com/
Reported-by: Chuck Lever III <chuck.lever@oracle.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
src/event-parse.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/event-parse.c b/src/event-parse.c
index 4bbf29727e9f..823333a3bde4 100644
--- a/src/event-parse.c
+++ b/src/event-parse.c
@@ -739,8 +739,11 @@ int tep_parse_kallsyms(struct tep_handle *tep, const char *kallsyms)
if (errno)
goto out;
- if (n != 2 || !func_end)
+ if (n != 2 || !func_end) {
+ tep_warning("Failed to parse kallsyms n=%d func_end=%d",
+ n, func_end);
goto out;
+ }
func = line + func_start;
/*
--
2.35.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-06-28 15:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-28 15:21 [PATCH] libtraceevent: Warn when kallsyms exits due to parsing error Steven Rostedt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).