mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Josef Bacik <jbacik@fb.com>
To: <rostedt@goodmis.org>, <kernel-team@fb.com>,
	<linux-kernel@vger.kernel.org>
Subject: [PATCH] trace-cmd: quiet some output when using libtracecmd
Date: Fri, 4 Dec 2015 10:37:30 -0500	[thread overview]
Message-ID: <1449243450-4280-1-git-send-email-jbacik@fb.com> (raw)

If you link against libtracecmd you get a few extraneous warnings and printf's
that aren't related to your tool.  So by default make the path to the events you
are tracing use pr_stat() so if it's not defined we don't get the output, and
make the weak warning() do nothing by default.  The trace-cmd stuff has this
defined so it'll continue to work normally, it just won't be noisy for consumers
of libtracecmd.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fb.com>
---
 parse-utils.c  | 5 -----
 trace-record.c | 2 +-
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/parse-utils.c b/parse-utils.c
index c5b0487..9f9c0e9 100644
--- a/parse-utils.c
+++ b/parse-utils.c
@@ -63,11 +63,6 @@ void __warning(const char *fmt, ...)
 
 void __weak warning(const char *fmt, ...)
 {
-	va_list ap;
-
-	va_start(ap, fmt);
-	__vwarning(fmt, ap);
-	va_end(ap);
 }
 
 void __vpr_stat(const char *fmt, va_list ap)
diff --git a/trace-record.c b/trace-record.c
index e4194b5..7d3ea37 100644
--- a/trace-record.c
+++ b/trace-record.c
@@ -2120,7 +2120,7 @@ static int expand_event_files(struct buffer_instance *instance,
 		path = globbuf.gl_pathv[i];
 
 		event = create_event(instance, path, old_event);
-		printf("%s\n", path);
+		pr_stat("%s\n", path);
 
 		len = strlen(path);
 
-- 
2.5.0


             reply	other threads:[~2015-12-04 15:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-04 15:37 Josef Bacik [this message]
2016-02-23 22:23 ` Steven Rostedt

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=1449243450-4280-1-git-send-email-jbacik@fb.com \
    --to=jbacik@fb.com \
    --cc=kernel-team@fb.com \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®