linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [for-linus][PATCH 1/6] rtla: Follow kernel version
       [not found] <20220210200509.089236997@goodmis.org>
@ 2022-02-10 20:05 ` Steven Rostedt
  2022-02-10 20:05 ` [for-linus][PATCH 2/6] rtla/utils: Fix session duration parsing Steven Rostedt
  2022-02-10 20:05 ` [for-linus][PATCH 3/6] rtla/trace: Error message fixup Steven Rostedt
  2 siblings, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2022-02-10 20:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ingo Molnar, Andrew Morton, Daniel Bristot de Oliveira,
	linux-trace-devel

From: Daniel Bristot de Oliveira <bristot@kernel.org>

To avoid having commits with new version, it is just easier to follow
kernel version.

Link: https://lkml.kernel.org/r/9c2df0d1de65cea96c7d731fe64781a2bb90c5b3.1643990447.git.bristot@kernel.org

Cc: Daniel Bristot de Oliveira <bristot@kernel.org>
Cc: linux-kernel@vger.kernel.org
Cc: linux-trace-devel@vger.kernel.org
Signed-off-by: Daniel Bristot de Oliveira <bristot@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 tools/tracing/rtla/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/tracing/rtla/Makefile b/tools/tracing/rtla/Makefile
index 7c39728d08de..5a1eda617992 100644
--- a/tools/tracing/rtla/Makefile
+++ b/tools/tracing/rtla/Makefile
@@ -1,5 +1,6 @@
 NAME	:=	rtla
-VERSION	:=	0.5
+# Follow the kernel version
+VERSION :=	$(shell cat VERSION 2> /dev/null || make -sC ../../.. kernelversion)
 
 # From libtracefs:
 # Makefiles suck: This macro sets a default value of $(2) for the
@@ -85,6 +86,7 @@ clean: doc_clean
 
 tarball: clean
 	rm -rf $(NAME)-$(VERSION) && mkdir $(NAME)-$(VERSION)
+	echo $(VERSION) > $(NAME)-$(VERSION)/VERSION
 	cp -r $(DIRS) $(FILES) $(NAME)-$(VERSION)
 	mkdir $(NAME)-$(VERSION)/Documentation/
 	cp -rp $(SRCTREE)/../../../Documentation/tools/rtla/* $(NAME)-$(VERSION)/Documentation/
-- 
2.34.1

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

* [for-linus][PATCH 2/6] rtla/utils: Fix session duration parsing
       [not found] <20220210200509.089236997@goodmis.org>
  2022-02-10 20:05 ` [for-linus][PATCH 1/6] rtla: Follow kernel version Steven Rostedt
@ 2022-02-10 20:05 ` Steven Rostedt
  2022-02-10 20:05 ` [for-linus][PATCH 3/6] rtla/trace: Error message fixup Steven Rostedt
  2 siblings, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2022-02-10 20:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ingo Molnar, Andrew Morton, Daniel Bristot de Oliveira,
	linux-trace-devel

From: Daniel Bristot de Oliveira <bristot@kernel.org>

Use gmtime to format the duration time. This avoids problems when the
system uses local time different of Pisa's Local Time.

Link: https://lkml.kernel.org/r/a2f0a37bc006c2561bb8ecd871cd70532b4a9f2d.1643990447.git.bristot@kernel.org

Fixes: b1696371d865 ("rtla: Helper functions for rtla")
Cc: Daniel Bristot de Oliveira <bristot@kernel.org>
Cc: linux-kernel@vger.kernel.org
Cc: linux-trace-devel@vger.kernel.org
Signed-off-by: Daniel Bristot de Oliveira <bristot@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 tools/tracing/rtla/src/utils.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/tracing/rtla/src/utils.c b/tools/tracing/rtla/src/utils.c
index 1c9f0eea6166..ffaf8ec84001 100644
--- a/tools/tracing/rtla/src/utils.c
+++ b/tools/tracing/rtla/src/utils.c
@@ -77,11 +77,11 @@ void get_duration(time_t start_time, char *output, int output_size)
 	time_t duration;
 
 	duration = difftime(now, start_time);
-	tm_info = localtime(&duration);
+	tm_info = gmtime(&duration);
 
 	snprintf(output, output_size, "%3d %02d:%02d:%02d",
 			tm_info->tm_yday,
-			tm_info->tm_hour - 1,
+			tm_info->tm_hour,
 			tm_info->tm_min,
 			tm_info->tm_sec);
 }
-- 
2.34.1

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

* [for-linus][PATCH 3/6] rtla/trace: Error message fixup
       [not found] <20220210200509.089236997@goodmis.org>
  2022-02-10 20:05 ` [for-linus][PATCH 1/6] rtla: Follow kernel version Steven Rostedt
  2022-02-10 20:05 ` [for-linus][PATCH 2/6] rtla/utils: Fix session duration parsing Steven Rostedt
@ 2022-02-10 20:05 ` Steven Rostedt
  2 siblings, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2022-02-10 20:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ingo Molnar, Andrew Morton, Daniel Bristot de Oliveira,
	linux-trace-devel

From: Daniel Bristot de Oliveira <bristot@kernel.org>

Use capital and change "tracer %s" to "%s tracer".

No functional change.

Link: https://lkml.kernel.org/r/361697d27431afefa64c67c323564205385c418d.1643990447.git.bristot@kernel.org

Fixes: b1696371d865 ("rtla: Helper functions for rtla")
Cc: Daniel Bristot de Oliveira <bristot@kernel.org>
Cc: linux-kernel@vger.kernel.org
Cc: linux-trace-devel@vger.kernel.org
Signed-off-by: Daniel Bristot de Oliveira <bristot@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 tools/tracing/rtla/src/trace.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tools/tracing/rtla/src/trace.c b/tools/tracing/rtla/src/trace.c
index 107a0c6387f7..83de259abcc1 100644
--- a/tools/tracing/rtla/src/trace.c
+++ b/tools/tracing/rtla/src/trace.c
@@ -20,14 +20,14 @@ int enable_tracer_by_name(struct tracefs_instance *inst, const char *tracer_name
 
 	tracer = TRACEFS_TRACER_CUSTOM;
 
-	debug_msg("enabling %s tracer\n", tracer_name);
+	debug_msg("Enabling %s tracer\n", tracer_name);
 
 	retval = tracefs_tracer_set(inst, tracer, tracer_name);
 	if (retval < 0) {
 		if (errno == ENODEV)
-			err_msg("tracer %s not found!\n", tracer_name);
+			err_msg("Tracer %s not found!\n", tracer_name);
 
-		err_msg("failed to enable the tracer %s\n", tracer_name);
+		err_msg("Failed to enable the %s tracer\n", tracer_name);
 		return -1;
 	}
 
@@ -44,7 +44,7 @@ void disable_tracer(struct tracefs_instance *inst)
 
 	retval = tracefs_tracer_set(inst, t);
 	if (retval < 0)
-		err_msg("oops, error disabling tracer\n");
+		err_msg("Oops, error disabling tracer\n");
 }
 
 /*
-- 
2.34.1

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

end of thread, other threads:[~2022-02-10 20:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20220210200509.089236997@goodmis.org>
2022-02-10 20:05 ` [for-linus][PATCH 1/6] rtla: Follow kernel version Steven Rostedt
2022-02-10 20:05 ` [for-linus][PATCH 2/6] rtla/utils: Fix session duration parsing Steven Rostedt
2022-02-10 20:05 ` [for-linus][PATCH 3/6] rtla/trace: Error message fixup Steven Rostedt

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