linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] trace-cmd: Suppress trace library warnings
@ 2021-04-15  8:03 Tzvetomir Stoyanov (VMware)
  2021-04-15 13:34 ` Steven Rostedt
  0 siblings, 1 reply; 8+ messages in thread
From: Tzvetomir Stoyanov (VMware) @ 2021-04-15  8:03 UTC (permalink / raw)
  To: rostedt; +Cc: linux-trace-devel

Suppress all warnings from libtraceevent, libtracefs and libtracecmd if
the trace-cmd application does not run in debug mode.

Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
---
 tracecmd/trace-cmd.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/tracecmd/trace-cmd.c b/tracecmd/trace-cmd.c
index 7376c5a5..7de0671e 100644
--- a/tracecmd/trace-cmd.c
+++ b/tracecmd/trace-cmd.c
@@ -35,6 +35,23 @@ void warning(const char *fmt, ...)
 	fprintf(stderr, "\n");
 }
 
+int tep_vwarning(const char *name, const char *fmt, va_list ap)
+{
+	int ret = errno;
+
+	if (!tracecmd_get_debug())
+		return ret;
+
+	if (errno)
+		perror(name);
+
+	fprintf(stderr, "  ");
+	vfprintf(stderr, fmt, ap);
+	fprintf(stderr, "\n");
+
+	return ret;
+}
+
 void pr_stat(const char *fmt, ...)
 {
 	va_list ap;
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [PATCH 0/3] Fix overflow when applying tsc2nsec calculations
@ 2021-04-15  8:15 Tzvetomir Stoyanov (VMware)
  2021-04-15  8:15 ` [PATCH] trace-cmd: Suppress trace library warnings Tzvetomir Stoyanov (VMware)
  0 siblings, 1 reply; 8+ messages in thread
From: Tzvetomir Stoyanov (VMware) @ 2021-04-15  8:15 UTC (permalink / raw)
  To: rostedt; +Cc: linux-trace-devel

Verify that applying tsc2nsec corrections on the recorded timestamps will not
cause an overflow. When recording the trace, in case of tsc2nsec clock, get
the first TSC timestamp as offset to be used in tsc2nsec conversion.


Tzvetomir Stoyanov (VMware) (3):
  trace-cmd library: Add new trace-cmd library APIs for guest ts
    corrections
  trace-cmd library: Add check before applying tsc2nsec offset
  trace-cmd: Get the timestamp of the first recorded event as TSC offset

 .../include/private/trace-cmd-private.h       |  18 ++-
 lib/trace-cmd/trace-input.c                   | 116 ++------------
 lib/trace-cmd/trace-timesync.c                | 113 +++++++++++---
 tracecmd/include/trace-local.h                |   1 +
 tracecmd/trace-record.c                       | 146 ++++++++++++++----
 5 files changed, 240 insertions(+), 154 deletions(-)

-- 
2.30.2


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-04-28  7:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-15  8:03 [PATCH] trace-cmd: Suppress trace library warnings Tzvetomir Stoyanov (VMware)
2021-04-15 13:34 ` Steven Rostedt
2021-04-16 10:14   ` Tzvetomir Stoyanov
2021-04-16 13:59     ` Steven Rostedt
2021-04-16 14:01       ` Steven Rostedt
2021-04-22 20:25         ` Steven Rostedt
2021-04-28  7:51           ` Tzvetomir Stoyanov
2021-04-15  8:15 [PATCH 0/3] Fix overflow when applying tsc2nsec calculations Tzvetomir Stoyanov (VMware)
2021-04-15  8:15 ` [PATCH] trace-cmd: Suppress trace library warnings Tzvetomir Stoyanov (VMware)

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