tracing/probes: Fix to set arg size and fmt after setting type from BTF
authorMasami Hiramatsu (Google) <mhiramat@kernel.org>
Tue, 23 Jan 2024 15:03:02 +0000 (00:03 +0900)
committerMasami Hiramatsu (Google) <mhiramat@kernel.org>
Thu, 8 Feb 2024 14:26:25 +0000 (23:26 +0900)
commit9a571c1e275cedacd48c66a6bddd0c23f1dffdbf
tree35ad2a45ca09aac4f328586cc24d4921fe6472fa
parent8c427cc2fa73684ea140999e121b7b6c1c717632
tracing/probes: Fix to set arg size and fmt after setting type from BTF

Since the BTF type setting updates probe_arg::type, the type size
calculation and setting print-fmt should be done after that.
Without this fix, the argument size and print-fmt can be wrong.

Link: https://lore.kernel.org/all/170602218196.215583.6417859469540955777.stgit@devnote2/
Fixes: b576e09701c7 ("tracing/probes: Support function parameters if BTF is available")
Cc: stable@vger.kernel.org
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
kernel/trace/trace_probe.c