Thread (7 messages) 7 messages, 3 authors, 2023-03-20

Re: [PATCH] trace/events/sched: Remove unit on printing vruntime value

From: Gildong Hong <hidden>
Date: 2023-03-20 11:41:55
Subsystem: the rest, tracing · Maintainers: Linus Torvalds, Steven Rostedt, Masami Hiramatsu

On Sun, Mar 19, 2023 at 02:07:38PM -0400, Steven Rostedt wrote:
On Sun, 19 Mar 2023 12:05:20 +0900
Gildong Hong [off-list ref] wrote:
quoted
quoted
quoted
-	TP_printk("comm=%s pid=%d runtime=%Lu [ns] vruntime=%Lu [ns]",
+	TP_printk("comm=%s pid=%d runtime=%Lu [ns] vruntime=%Lu",  
quoted
"vns" sounds nice.
But some people may hard to understand the meaning.
"ns" is a global standard time unit where "vns" is not.
So I still prefer to remove the unit.
Really? You have "runtime" (which most people understand) and labeled
"ns", but then you have "vruntime" which some people may find hard to
understand the meaning of. If they do understand the meaning of
"vruntime" then they should have the means to understand "vns".

Otherwise, no label is meaningless too!

-- Steve
I agree with your opinion.
People can understand "vns" if they understand "vruntime".
Followings are the modified patch.
I add your name on "Suggested-by"
I or you could remove the line if you mind it.

Thanks,
Gildong

------------
From 8a8d1f08a2f217151f26f04795d6c1483eb1c48f Mon Sep 17 00:00:00 2001
From: Gildong Hong <redacted>
Date: Thu, 16 Mar 2023 20:05:48 +0900
Subject: [PATCH] trace/events/sched: Change unit on printing vruntime value

vruntime is not actual time so change unit on printing
from "ns" to "vns" which denotes "virtual nanosecond"

Suggested-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Gildong Hong <redacted>
---
 include/trace/events/sched.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h
index fbb99a61f714..993986c6c3f6 100644
--- a/include/trace/events/sched.h
+++ b/include/trace/events/sched.h
@@ -511,7 +511,7 @@ DECLARE_EVENT_CLASS(sched_stat_runtime,
 		__entry->vruntime	= vruntime;
 	),
 
-	TP_printk("comm=%s pid=%d runtime=%Lu [ns] vruntime=%Lu [ns]",
+	TP_printk("comm=%s pid=%d runtime=%Lu [ns] vruntime=%Lu [vns]",
 			__entry->comm, __entry->pid,
 			(unsigned long long)__entry->runtime,
 			(unsigned long long)__entry->vruntime)
-- 
2.25.1

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help