linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tracing/synthetic: Print out u64 values properly
@ 2023-09-11 14:17 Tero Kristo
  2023-09-15  6:01 ` Masami Hiramatsu
  0 siblings, 1 reply; 5+ messages in thread
From: Tero Kristo @ 2023-09-11 14:17 UTC (permalink / raw)
  To: rostedt, mhiramat
  Cc: artem.bityutskiy, linux-trace-kernel, linux-kernel, stable

The synth traces incorrectly print pointer to the synthetic event values
instead of the actual value when using u64 type. Fix by addressing the
contents of the union properly.

Fixes: ddeea494a16f ("tracing/synthetic: Use union instead of casts")
Cc: stable@vger.kernel.org
Signed-off-by: Tero Kristo <tero.kristo@linux.intel.com>
---
 kernel/trace/trace_events_synth.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/trace/trace_events_synth.c b/kernel/trace/trace_events_synth.c
index 7fff8235075f..070365959c0a 100644
--- a/kernel/trace/trace_events_synth.c
+++ b/kernel/trace/trace_events_synth.c
@@ -337,7 +337,7 @@ static void print_synth_event_num_val(struct trace_seq *s,
 		break;
 
 	default:
-		trace_seq_printf(s, print_fmt, name, val, space);
+		trace_seq_printf(s, print_fmt, name, val->as_u64, space);
 		break;
 	}
 }
-- 
2.40.1


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

end of thread, other threads:[~2023-09-15 14:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-11 14:17 [PATCH] tracing/synthetic: Print out u64 values properly Tero Kristo
2023-09-15  6:01 ` Masami Hiramatsu
2023-09-15 10:46   ` Tero Kristo
2023-09-15 14:16     ` Masami Hiramatsu
2023-09-15 14:38       ` 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).