Skip to contentSkip to conversation

tracing/timer: Add missing hrtimer modes to decode_hrtimer_mode().

PATCH Applied Sebastian Andrzej Siewior 4 participants 7 messages Apr 18, 2023 – Jun 19, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tracing/timer: Add missing hrtimer modes to decode_hrtimer_mode().

The trace output for the HRTIMER_MODE_.*_HARD modes is seen as a number since these modes are not decoded. The author was not aware of the fancy decoding function which makes the life easier.

Extend decode_hrtimer_mode() with the additional HRTIMER_MODE_.*_HARD modes.

Fixes ae6683d815895 ("hrtimer: Introduce HARD expiry mode")
---
 include/trace/events/timer.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
include/trace/events/timer.h +5 -1
index 2e713a7d9aa3a..5d43751a766c6 100644
@@ -158,7 +158,11 @@ DEFINE_EVENT(timer_class, timer_cancel,
 		{ HRTIMER_MODE_ABS_SOFT,	"ABS|SOFT"	},	\
 		{ HRTIMER_MODE_REL_SOFT,	"REL|SOFT"	},	\
 		{ HRTIMER_MODE_ABS_PINNED_SOFT,	"ABS|PINNED|SOFT" },	\
-		{ HRTIMER_MODE_REL_PINNED_SOFT,	"REL|PINNED|SOFT" })
+		{ HRTIMER_MODE_REL_PINNED_SOFT,	"REL|PINNED|SOFT" },	\
+		{ HRTIMER_MODE_ABS_HARD,	"ABS|HARD" },		\
+		{ HRTIMER_MODE_REL_HARD,	"REL|HARD" },		\
+		{ HRTIMER_MODE_ABS_PINNED_HARD, "ABS|PINNED|HARD" },	\
+		{ HRTIMER_MODE_REL_PINNED_HARD,	"REL|PINNED|HARD" })
 
 /**
  * hrtimer_init - called when the hrtimer is initialized
Signature · 1 line
2.40.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Sebastian Andrzej Siewior

The trace output for the HRTIMER_MODE_.*_HARD modes is seen as a number since these modes are not decoded. The author was not aware of the fancy decoding function which makes the life easier.

Extend decode_hrtimer_mode() with the additional HRTIMER_MODE_.*_HARD modes.

Fixes ae6683d815895 ("hrtimer: Introduce HARD expiry mode")

Good catch.

-Mukesh

Quoted 21 lines
---
  include/trace/events/timer.h | 6 +++++-
  1 file changed, 5 insertions(+), 1 deletion(-)
include/trace/events/timer.h +5 -1
index 2e713a7d9aa3a..5d43751a766c6 100644
@@ -158,7 +158,11 @@ DEFINE_EVENT(timer_class, timer_cancel,
  		{ HRTIMER_MODE_ABS_SOFT,	"ABS|SOFT"	},	\
  		{ HRTIMER_MODE_REL_SOFT,	"REL|SOFT"	},	\
  		{ HRTIMER_MODE_ABS_PINNED_SOFT,	"ABS|PINNED|SOFT" },	\
-		{ HRTIMER_MODE_REL_PINNED_SOFT,	"REL|PINNED|SOFT" })
+		{ HRTIMER_MODE_REL_PINNED_SOFT,	"REL|PINNED|SOFT" },	\
+		{ HRTIMER_MODE_ABS_HARD,	"ABS|HARD" },		\
+		{ HRTIMER_MODE_REL_HARD,	"REL|HARD" },		\
+		{ HRTIMER_MODE_ABS_PINNED_HARD, "ABS|PINNED|HARD" },	\
+		{ HRTIMER_MODE_REL_PINNED_HARD,	"REL|PINNED|HARD" })
 
  /**
   * hrtimer_init - called when the hrtimer is initialized
maintainer Acked-by on v1 1/1
#2 lore raw
In reply to Sebastian Andrzej Siewior
Quoted 9 lines · On Tue, 18 Apr 2023 16:38:54 +0200 Sebastian Andrzej Siewior…

The trace output for the HRTIMER_MODE_.*_HARD modes is seen as a number since these modes are not decoded. The author was not aware of the fancy decoding function which makes the life easier.

Extend decode_hrtimer_mode() with the additional HRTIMER_MODE_.*_HARD modes.

Fixes ae6683d815895 ("hrtimer: Introduce HARD expiry mode")

-- Steve

#3 lore raw
Quoted 7 lines · Steven Rostedt
Quoted 4 lines · On Tue, 18 Apr 2023 16:38:54 +0200 Sebastian Andrzej Siewior…

The trace output for the HRTIMER_MODE_.*_HARD modes is seen as a number since these modes are not decoded. The author was not aware of the fancy decoding function which makes the life easier.

Quoted 7 lines
Quoted 5 lines

Extend decode_hrtimer_mode() with the additional HRTIMER_MODE_.*_HARD modes.

Fixes ae6683d815895 ("hrtimer: Introduce HARD expiry mode")

Could this be either routed via the tracing tree or the tip tree but please route this :)

Sebastian

maintainer
#4 lore raw
Quoted 11 lines · On Wed, 24 May 2023 17:39:28 +0200 Sebastian Andrzej Siewior…
Quoted 10 lines · Steven Rostedt
Quoted 7 lines · On Tue, 18 Apr 2023 16:38:54 +0200 Sebastian Andrzej Siewior…

The trace output for the HRTIMER_MODE_.*_HARD modes is seen as a number since these modes are not decoded. The author was not aware of the fancy decoding function which makes the life easier.

Extend decode_hrtimer_mode() with the additional HRTIMER_MODE_.*_HARD modes.

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
Fixes ae6683d815895 ("hrtimer: Introduce HARD expiry mode")

Could this be either routed via the tracing tree or the tip tree but please route this :)

Events are normally owned by the subsystem they are used in. So it should go through tip. But if I get an ack from the subsystem maintainer, I can route it through tracing.

-- Steve

maintainer
#5 lore raw
Quoted 3 lines · On Wed, 24 May 2023 20:25:26 -0400 Steven Rostedt <[email protected]> wrote:

Events are normally owned by the subsystem they are used in. So it should go through tip. But if I get an ack from the subsystem maintainer, I can route it through tracing.

Thomas, care to give me an ack? Or do you want to take it?

-- Steve

#6 lore raw
In reply to Sebastian Andrzej Siewior
The following commit has been merged into the timers/core branch of tip:

The following commit has been merged into the timers/core branch of tip:

Commit-ID:     2951580ba6adb082bb6b7154a5ecb24e7c1f7569
Gitweb:        https://git.kernel.org/tip/2951580ba6adb082bb6b7154a5ecb24e7c1f7569
Author:        Sebastian Andrzej Siewior <[email protected]>
AuthorDate:    Tue, 18 Apr 2023 16:38:54 +02:00
Committer:     Thomas Gleixner <[email protected]>
CommitterDate: Mon, 19 Jun 2023 09:09:14 +02:00

tracing/timer: Add missing hrtimer modes to decode_hrtimer_mode().

The trace output for the HRTIMER_MODE_.*_HARD modes is seen as a number since these modes are not decoded. The author was not aware of the fancy decoding function which makes the life easier.

Extend decode_hrtimer_mode() with the additional HRTIMER_MODE_.*_HARD modes.

---
 include/trace/events/timer.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
include/trace/events/timer.h +5 -1
index 3e8619c..b4bc282 100644
@@ -158,7 +158,11 @@ DEFINE_EVENT(timer_class, timer_cancel,
 		{ HRTIMER_MODE_ABS_SOFT,	"ABS|SOFT"	},	\
 		{ HRTIMER_MODE_REL_SOFT,	"REL|SOFT"	},	\
 		{ HRTIMER_MODE_ABS_PINNED_SOFT,	"ABS|PINNED|SOFT" },	\
-		{ HRTIMER_MODE_REL_PINNED_SOFT,	"REL|PINNED|SOFT" })
+		{ HRTIMER_MODE_REL_PINNED_SOFT,	"REL|PINNED|SOFT" },	\
+		{ HRTIMER_MODE_ABS_HARD,	"ABS|HARD" },		\
+		{ HRTIMER_MODE_REL_HARD,	"REL|HARD" },		\
+		{ HRTIMER_MODE_ABS_PINNED_HARD, "ABS|PINNED|HARD" },	\
+		{ HRTIMER_MODE_REL_PINNED_HARD,	"REL|PINNED|HARD" })
 
 /**
  * hrtimer_init - called when the hrtimer is initialized