From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: Tero Kristo <tero.kristo@linux.intel.com>
Cc: rostedt@goodmis.org, artem.bityutskiy@linux.intel.com,
linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH] tracing/synthetic: Print out u64 values properly
Date: Fri, 15 Sep 2023 15:01:01 +0900 [thread overview]
Message-ID: <20230915150101.ef50c4774ab85aa2ff7431ec@kernel.org> (raw)
In-Reply-To: <20230911141704.3585965-1-tero.kristo@linux.intel.com>
Hi Tero,
On Mon, 11 Sep 2023 17:17:04 +0300
Tero Kristo <tero.kristo@linux.intel.com> wrote:
> 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.
Thanks for pointing it out.
But I would like to see a new "case 8:" print code instead of changing
"default". Can you keep the default as it is and add "case 8:" case there?
Thanks,
>
> 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
>
--
Masami Hiramatsu (Google) <mhiramat@kernel.org>
next prev parent reply other threads:[~2023-09-15 6:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-11 14:17 [PATCH] tracing/synthetic: Print out u64 values properly Tero Kristo
2023-09-15 6:01 ` Masami Hiramatsu [this message]
2023-09-15 10:46 ` Tero Kristo
2023-09-15 14:16 ` Masami Hiramatsu
2023-09-15 14:38 ` Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230915150101.ef50c4774ab85aa2ff7431ec@kernel.org \
--to=mhiramat@kernel.org \
--cc=artem.bityutskiy@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=stable@vger.kernel.org \
--cc=tero.kristo@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).