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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 lib/tracefs/tracefs-events.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
-- 
2.24.1




[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux