Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1283947 > unrolled thread

[PATCH] trace-cmd: quiet some output when using libtracecmd

Started byJosef Bacik <jbacik@fb.com>
First post2015-12-04 16:40 +0100
Last post2015-12-04 16:40 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] trace-cmd: quiet some output when using libtracecmd Josef Bacik <jbacik@fb.com> - 2015-12-04 16:40 +0100

#1283947 — [PATCH] trace-cmd: quiet some output when using libtracecmd

FromJosef Bacik <jbacik@fb.com>
Date2015-12-04 16:40 +0100
Subject[PATCH] trace-cmd: quiet some output when using libtracecmd
Message-ID<qC0CK-4wp-35@gated-at.bofh.it>
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web