From: Melissa Wen <mwen@igalia.com>
To: airlied@gmail.com, alexander.deucher@amd.com,
aurabindo.pillai@amd.com, Aurabindo.Pillai@amd.com,
christian.koenig@amd.com, David.Francis@amd.com,
harry.wentland@amd.com, simona@ffwll.ch, siqueira@igalia.com,
sunpeng.li@amd.com
Cc: amd-gfx@lists.freedesktop.org, Harry.Wentland@amd.com,
kernel-dev@igalia.com, linux-kernel@vger.kernel.org
Subject: [PATCH 7/8] drm/amd/display: copy function name into dcn_fpu trace event
Date: Thu, 24 Sep 2026 23:10:10 +0200 [thread overview]
Message-ID: <20260924211410.867686-8-mwen@igalia.com> (raw)
In-Reply-To: <20260924211410.867686-1-mwen@igalia.com>
Userspace trace tools that use libtraceevent to read binary buffer only
see a kernel address when printing const char *. Use string macros in
dcn_fpu to copy the function name into the trace event.
Fixes: 96ee63730fa3 ("drm/amd/display: Add control mechanism for FPU")
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Melissa Wen <mwen@igalia.com>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_trace.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_trace.h b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_trace.h
index 7de4fe355c5d..b2f38654e489 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_trace.h
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_trace.h
@@ -637,20 +637,20 @@ TRACE_EVENT(dcn_fpu,
TP_STRUCT__entry(
__field(bool, begin)
- __field(const char *, function)
+ __string(function, function)
__field(int, line)
__field(int, recursion_depth)
),
TP_fast_assign(
__entry->begin = begin;
- __entry->function = function;
+ __assign_str(function);
__entry->line = line;
__entry->recursion_depth = recursion_depth;
),
TP_printk("%s: recursion_depth: %d: %s()+%d:",
__entry->begin ? "begin" : "end",
__entry->recursion_depth,
- __entry->function,
+ __get_str(function),
__entry->line
)
);
--
2.53.0
next prev parent reply other threads:[~2026-09-24 21:14 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-24 21:10 [PATCH 0/8] drm/amd/display: DM trace event cleanups Melissa Wen
2026-09-24 21:10 ` [PATCH 1/8] drm/amd/display: assign missing trace entry in amdgpu_dm_dc_clocks_state Melissa Wen
2026-09-25 9:45 ` Tvrtko Ursulin
2026-09-24 21:10 ` [PATCH 2/8] drm/amd/display: remove duplicated prev_p_state_change_support assignment Melissa Wen
2026-09-25 9:45 ` Tvrtko Ursulin
2026-09-24 21:10 ` [PATCH 3/8] drm/amd/display: fix vready offset assignment in dcn_optc_lock_unlock_state Melissa Wen
2026-09-25 9:47 ` Tvrtko Ursulin
2026-09-24 21:10 ` [PATCH 4/8] drm/amd/display: declare amdgpu_dm_atomic_state_template as an event class Melissa Wen
2026-09-25 9:55 ` Tvrtko Ursulin
2026-09-24 21:10 ` [PATCH 5/8] drm/amd/display: use right type for amdgpu_dc_performance event entries Melissa Wen
2026-09-25 10:03 ` Tvrtko Ursulin
2026-09-24 21:10 ` [PATCH 6/8] drm/amd/display: remove redundant cast on amdgpu_dc_reg_template printk Melissa Wen
2026-09-25 10:05 ` Tvrtko Ursulin
2026-09-24 21:10 ` Melissa Wen [this message]
2026-09-25 10:17 ` [PATCH 7/8] drm/amd/display: copy function name into dcn_fpu trace event Tvrtko Ursulin
2026-09-24 21:10 ` [PATCH 8/8] drm/amd/display: copy function name into dcn_optc_lock_unlock_state " Melissa Wen
2026-09-25 10:23 ` Tvrtko Ursulin
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=20260924211410.867686-8-mwen@igalia.com \
--to=mwen@igalia.com \
--cc=David.Francis@amd.com \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=aurabindo.pillai@amd.com \
--cc=christian.koenig@amd.com \
--cc=harry.wentland@amd.com \
--cc=kernel-dev@igalia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=simona@ffwll.ch \
--cc=siqueira@igalia.com \
--cc=sunpeng.li@amd.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
all inboxes | Powered by JetHome®