Skip to contentSkip to conversation

trace/events/sched: Remove unit on printing vruntime value

PATCH In review Gildong Hong 3 participants 7 messages Mar 16, 2023 – Mar 20, 2023 Tracing

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 trace/events/sched: Remove unit on printing vruntime value

vruntime is not actual time so remove unit on printing

---
 include/trace/events/sched.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/trace/events/sched.h +1 -1
index fbb99a61f714..26ef85a8d3cd 100644
@@ -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",
 			__entry->comm, __entry->pid,
 			(unsigned long long)__entry->runtime,
 			(unsigned long long)__entry->vruntime)
Signature · 1 line
2.25.1
maintainer
#1 lore raw
Quoted 12 lines · On Thu, 16 Mar 2023 20:56:55 +0900 Gildong Hong <[email protected]> wrote:

vruntime is not actual time so remove unit on printing

---
 include/trace/events/sched.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/trace/events/sched.h +0 -0
index fbb99a61f714..26ef85a8d3cd 100644

include/trace/events/sched.h DECLARE_EVENT_CLASS(sched_stat_runtime, · line 514

Quoted 5 lines
include/trace/events/sched.h +1 -1
@@ -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",

What about calling it "[vns]" for "virtual nanosecond" ?

;-)

-- Steve

Quoted 3 lines
include/trace/events/sched.h +0 -0
 			__entry->comm, __entry->pid,
 			(unsigned long long)__entry->runtime,
 			(unsigned long long)__entry->vruntime)
#2 lore raw
Quoted 18 lines · Steven Rostedt
Quoted 15 lines · On Thu, 16 Mar 2023 20:56:55 +0900 Gildong Hong <[email protected]> wrote:

vruntime is not actual time so remove unit on printing

---
 include/trace/events/sched.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/trace/events/sched.h +0 -0
index fbb99a61f714..26ef85a8d3cd 100644
@@ -511,7 +511,7 @@ DECLARE_EVENT_CLASS(sched_stat_runtime,
 		__entry->vruntime	= vruntime;
 	),
 
Quoted 13 lines

include/trace/events/sched.h DECLARE_EVENT_CLASS(sched_stat_runtime, · line 514

Quoted 2 lines
include/trace/events/sched.h +1 -1
-	TP_printk("comm=%s pid=%d runtime=%Lu [ns] vruntime=%Lu [ns]",
+	TP_printk("comm=%s pid=%d runtime=%Lu [ns] vruntime=%Lu",

What about calling it "[vns]" for "virtual nanosecond" ?

;-)

-- Steve

Quoted 3 lines
include/trace/events/sched.h +0 -0
 			__entry->comm, __entry->pid,
 			(unsigned long long)__entry->runtime,
 			(unsigned long long)__entry->vruntime)

Dear Steve

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

Thanks for your review.
Gildong

maintainer
#3 lore raw
Quoted 8 lines · On Sun, 19 Mar 2023 12:05:20 +0900 Gildong Hong <[email protected]> wrote:
Quoted 2 lines

include/trace/events/sched.h DECLARE_EVENT_CLASS(sched_stat_runtime, · line 514

Quoted 2 lines
include/trace/events/sched.h +1 -1
-	TP_printk("comm=%s pid=%d runtime=%Lu [ns] vruntime=%Lu [ns]",
+	TP_printk("comm=%s pid=%d runtime=%Lu [ns] vruntime=%Lu",  

"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

#4 lore raw
Quoted 12 lines · Steven Rostedt
Quoted 8 lines · On Sun, 19 Mar 2023 12:05:20 +0900 Gildong Hong <[email protected]> wrote:
Quoted 2 lines

Review

Quoted 2 lines
(quoted diff) +1 -1
-	TP_printk("comm=%s pid=%d runtime=%Lu [ns] vruntime=%Lu [ns]",
+	TP_printk("comm=%s pid=%d runtime=%Lu [ns] vruntime=%Lu",  

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

Quoted 8 lines

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 <[email protected]>
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"

---
 include/trace/events/sched.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/trace/events/sched.h +1 -1
index fbb99a61f714..993986c6c3f6 100644
@@ -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)
Signature · 1 line
2.25.1
#6 lore raw
In reply to Steven Rostedt
Quoted 12 lines · Steven Rostedt
Quoted 8 lines · On Sun, 19 Mar 2023 12:05:20 +0900 Gildong Hong <[email protected]> wrote:
Quoted 2 lines

include/trace/events/sched.h DECLARE_EVENT_CLASS(sched_stat_runtime, · line 514

Quoted 2 lines
include/trace/events/sched.h +1 -1
-	TP_printk("comm=%s pid=%d runtime=%Lu [ns] vruntime=%Lu [ns]",
+	TP_printk("comm=%s pid=%d runtime=%Lu [ns] vruntime=%Lu",  

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

Quoted 6 lines

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!

I'm with Steve, if you're down to consuming these here numbers, you'd better know wth you're doing.

maintainer
#5 lore raw
In reply to Gildong Hong
Quoted 5 lines · On Mon, 20 Mar 2023 20:41:39 +0900 Gildong Hong <[email protected]> wrote:

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.

I'm good.

Thanks,

-- Steve

Quoted 15 lines

Thanks,
Gildong

------------

Quoted 1 line

From 8a8d1f08a2f217151f26f04795d6c1483eb1c48f Mon Sep 17 00:00:00 2001

From: Gildong Hong <[email protected]>
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"