From: Steven Rostedt <rostedt@goodmis.org>
To: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Cc: Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
Valentin Schneider <vschneid@redhat.com>,
K Prateek Nayak <kprateek.nayak@amd.com>,
Boris Brezillon <boris.brezillon@collabora.com>,
Steven Price <steven.price@arm.com>,
Liviu Dudau <liviu.dudau@arm.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Grant Likely <grant.likely@linaro.org>,
Heiko Stuebner <heiko@sntech.de>,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
kernel@collabora.com
Subject: Re: [PATCH 3/3] drm/panthor: Add tracepoints for cache flushing
Date: Wed, 29 Jul 2026 13:10:15 -0400 [thread overview]
Message-ID: <20260729131015.394eaf4e@gandalf.local.home> (raw)
In-Reply-To: <20260729-panthor-cache-flush-fix-v1-3-205921ed3c81@collabora.com>
On Wed, 29 Jul 2026 08:19:51 +0200
Nicolas Frattaroli <nicolas.frattaroli@collabora.com> wrote:
> diff --git a/drivers/gpu/drm/panthor/panthor_trace.h b/drivers/gpu/drm/panthor/panthor_trace.h
> index 6ffeb4fe6599..5e2a9b8d0481 100644
> --- a/drivers/gpu/drm/panthor/panthor_trace.h
> +++ b/drivers/gpu/drm/panthor/panthor_trace.h
> @@ -76,6 +76,64 @@ TRACE_EVENT(gpu_job_irq,
> __entry->events, __entry->duration_ns)
> );
>
> +/**
> + * gpu_cache_flush_start - called after cache flush locks taken, before flush
> + * @dev: pointer to the &struct device, for printing the device name
> + * @l2: "l2" flush flags
> + * @lsc: "lsc" flush flags
> + * @other: "other" flush flags
> + *
> + * Fires after any initial lock contention around the locks needed for flushing
> + * caches, but before the actual cache flush is requested.
> + */
> +TRACE_EVENT(gpu_cache_flush_start,
> + TP_PROTO(const struct device *dev, u32 l2, u32 lsc, u32 other),
> + TP_ARGS(dev, l2, lsc, other),
> + TP_STRUCT__entry(
> + __string(dev_name, dev_name(dev))
> + __field(u32, l2)
> + __field(u32, lsc)
> + __field(u32, other)
> + ),
> + TP_fast_assign(
> + __assign_str(dev_name);
> + __entry->l2 = l2;
> + __entry->lsc = lsc;
> + __entry->other = other;
> + ),
> + TP_printk("%s: l2=0x%x lsc=0x%x other=0x%x", __get_str(dev_name),
> + __entry->l2, __entry->lsc, __entry->other)
> +);
> +
> +/**
> + * gpu_cache_flush_end - called after cache flush
> + * @dev: pointer to the &struct device, for printing the device name
> + * @l2: "l2" flush flags
> + * @lsc: "lsc" flush flags
> + * @other: "other" flush flags
> + *
> + * Fires after either the cache flush is complete, or has failed. Can be used
> + * together with gpu_cache_flush_start to get how long the flush has taken.
> + */
> +TRACE_EVENT(gpu_cache_flush_end,
> + TP_PROTO(const struct device *dev, u32 l2, u32 lsc, u32 other),
> + TP_ARGS(dev, l2, lsc, other),
> + TP_STRUCT__entry(
> + __string(dev_name, dev_name(dev))
> + __field(u32, l2)
> + __field(u32, lsc)
> + __field(u32, other)
> + ),
> + TP_fast_assign(
> + __assign_str(dev_name);
> + __entry->l2 = l2;
> + __entry->lsc = lsc;
> + __entry->other = other;
> + ),
> + TP_printk("%s: l2=0x%x lsc=0x%x other=0x%x", __get_str(dev_name),
> + __entry->l2, __entry->lsc, __entry->other)
> +);
> +
> #endif /* __PANTHOR_TRACE_H__ */
The above two are identical. You'll save memory by using a template instead:
DECLARE_EVENT_CLASS(gpu_cache_flush_template,
TP_PROTO(const struct device *dev, u32 l2, u32 lsc, u32 other),
TP_ARGS(dev, l2, lsc, other),
TP_STRUCT__entry(
__string(dev_name, dev_name(dev))
__field(u32, l2)
__field(u32, lsc)
__field(u32, other)
),
TP_fast_assign(
__assign_str(dev_name);
__entry->l2 = l2;
__entry->lsc = lsc;
__entry->other = other;
),
TP_printk("%s: l2=0x%x lsc=0x%x other=0x%x", __get_str(dev_name),
__entry->l2, __entry->lsc, __entry->other)
);
DEFINE_EVENT(gpu_cache_flush_template, gpu_cache_flush_start,
TP_PROTO(const struct device *dev, u32 l2, u32 lsc, u32 other),
TP_ARGS(dev, l2, lsc, other)
);
DEFINE_EVENT(gpu_cache_flush_template, gpu_cache_flush_end,
TP_PROTO(const struct device *dev, u32 l2, u32 lsc, u32 other),
TP_ARGS(dev, l2, lsc, other)
);
-- Steve
prev parent reply other threads:[~2026-07-29 17:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-29 6:19 [PATCH 0/3] Rework panthor's cache flush and soft reset locking Nicolas Frattaroli
2026-07-29 6:19 ` [PATCH 1/3] wait: Introduce non-irq variants of wait_event_lock_timeout Nicolas Frattaroli
2026-07-29 10:10 ` Peter Zijlstra
2026-07-29 6:19 ` [PATCH 2/3] drm/panthor: Revisit reqs_lock handling in flush/reset paths Nicolas Frattaroli
2026-07-29 6:19 ` [PATCH 3/3] drm/panthor: Add tracepoints for cache flushing Nicolas Frattaroli
2026-07-29 17:10 ` Steven Rostedt [this message]
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=20260729131015.394eaf4e@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=airlied@gmail.com \
--cc=boris.brezillon@collabora.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=grant.likely@linaro.org \
--cc=heiko@sntech.de \
--cc=juri.lelli@redhat.com \
--cc=kernel@collabora.com \
--cc=kprateek.nayak@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=liviu.dudau@arm.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=mripard@kernel.org \
--cc=nicolas.frattaroli@collabora.com \
--cc=peterz@infradead.org \
--cc=simona@ffwll.ch \
--cc=steven.price@arm.com \
--cc=tzimmermann@suse.de \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.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®