libtraceevent: Warn when kallsyms exits due to parsing error
PATCH 1/1 libtraceevent: Warn when kallsyms exits due to parsing error
From: "Steven Rostedt (Google)" <[email protected]>
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).
Reported-by Chuck Lever III <[email protected]>
Signed-off-by Steven Rostedt (Google) <[email protected]>
--- src/event-parse.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
src/event-parse.c +4 -1
@@ -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;/*
Signature · 1 line
2.35.1