Linux-Trace-Devel Archive on
 help / color / Atom feed
From: "Tzvetomir Stoyanov (VMware)" <>
Subject: [PATCH v3 4/5] trace-cmd: Suppress parsing warnings in tracefs_local_events() API
Date: Wed, 26 Feb 2020 18:31:58 +0200
Message-ID: <> (raw)
In-Reply-To: <>

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) <>
 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 = NULL;

  parent reply index

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:

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

  git send-email \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-Trace-Devel Archive on

Archives are clonable:
	git clone --mirror linux-trace-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-trace-devel linux-trace-devel/ \
	public-inbox-index linux-trace-devel

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone