linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@gmail.com>
To: rostedt@goodmis.org
Cc: linux-trace-devel@vger.kernel.org
Subject: [PATCH v3 4/5] trace-cmd: Suppress parsing warnings in tracefs_local_events() API
Date: Wed, 26 Feb 2020 18:31:58 +0200	[thread overview]
Message-ID: <20200226163159.20232-5-tz.stoyanov@gmail.com> (raw)
In-Reply-To: <20200226163159.20232-1-tz.stoyanov@gmail.com>

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


  parent reply	other threads:[~2020-02-26 16:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-26 16:31 [PATCH v3 0/5] trace-cmd: SQL-like syntax for ftrace histograms configuration Tzvetomir Stoyanov (VMware)
2020-02-26 16:31 ` [PATCH v3 1/5] trace-cmd: Add new libtracefs API tracefs_instance_file_append() Tzvetomir Stoyanov (VMware)
2020-02-26 16:31 ` [PATCH v3 2/5] trace-cmd: Unit test for tracefs_instance_file_append() API Tzvetomir Stoyanov (VMware)
2020-02-26 16:31 ` [PATCH v3 3/5] trace-cmd: Add new libtraceevent flag to suppress parsing warnings Tzvetomir Stoyanov (VMware)
2020-02-26 16:31 ` Tzvetomir Stoyanov (VMware) [this message]
2020-02-26 16:31 ` [PATCH v3 5/5] trace-cmd: Add "--sql" option to trace-cmd start and record sub commands Tzvetomir Stoyanov (VMware)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200226163159.20232-5-tz.stoyanov@gmail.com \
    --to=tz.stoyanov@gmail.com \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).