diff mbox series

[v3,4/5] trace-cmd: Suppress parsing warnings in tracefs_local_events() API

Message ID 20200226163159.20232-5-tz.stoyanov@gmail.com (mailing list archive)
State New
Headers show
Series trace-cmd: SQL-like syntax for ftrace histograms configuration | expand

Commit Message

Tzvetomir Stoyanov (VMware) Feb. 26, 2020, 4:31 p.m. UTC
The tracefs_local_events() API allocates new tep handler and initializes it
with the events from the local system. However, at that moment no traceevent plugins
are loaded. Part of events loading is parsing the event's format file, but
successful parsing of print format string from this file depends of traceevent
plugins. That's why a lot of parsing could be printed.
To suppress the warnings, the TEP_NO_PARSING_WARNINGS flag is set on the newly
allocated tep handler.

Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
---
 lib/tracefs/tracefs-events.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/lib/tracefs/tracefs-events.c b/lib/tracefs/tracefs-events.c
index 8e825f50..0875e665 100644
--- a/lib/tracefs/tracefs-events.c
+++ b/lib/tracefs/tracefs-events.c
@@ -590,7 +590,7 @@  struct tep_handle *tracefs_local_events_system(const char *tracing_dir,
 	tep = tep_alloc();
 	if (!tep)
 		return NULL;
-
+	tep_set_flag(tep, TEP_NO_PARSING_WARNINGS);
 	if (fill_local_events_system(tracing_dir, tep, sys_names, NULL)) {
 		tep_free(tep);
 		tep = NULL;