* [PATCH] Documentation: trace: histogram-design: fix bracket
@ 2026-09-02 15:10 Manuel Ebner
2026-09-02 17:17 ` Randy Dunlap
0 siblings, 1 reply; 3+ messages in thread
From: Manuel Ebner @ 2026-09-02 15:10 UTC (permalink / raw)
To: Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers,
Jonathan Corbet, Shuah Khan
Cc: Manuel Ebner, linux-kernel, linux-trace-kernel, linux-doc
Remove needless ')' from sentence.
Signed-off-by: Manuel Ebner <manuelebnerli@mailbox.org>
---
Documentation/trace/histogram-design.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/trace/histogram-design.rst b/Documentation/trace/histogram-design.rst
index 41a726cd3..b757afa22 100644
--- a/Documentation/trace/histogram-design.rst
+++ b/Documentation/trace/histogram-design.rst
@@ -876,7 +876,7 @@ next_pid field on this sched_switch event, we retrieve the
variables specified in the wakeup_latency() trace action, and use
them to generate a new wakeup_latency event into the trace stream.
-Note that the way the trace handlers such as wakeup_latency() (which
+Note that the way the trace handlers such as wakeup_latency() which
could equivalently be written trace(wakeup_latency,$wakeup_lat,next_pid)
are implemented, the parameters specified to the trace handler must be
variables. In this case, $wakeup_lat is obviously a variable, but
--
2.54.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Documentation: trace: histogram-design: fix bracket
2026-09-02 15:10 [PATCH] Documentation: trace: histogram-design: fix bracket Manuel Ebner
@ 2026-09-02 17:17 ` Randy Dunlap
2026-09-02 18:15 ` Steven Rostedt
0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2026-09-02 17:17 UTC (permalink / raw)
To: Manuel Ebner, Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers,
Jonathan Corbet, Shuah Khan
Cc: linux-kernel, linux-trace-kernel, linux-doc
On 9/2/26 8:10 AM, Manuel Ebner wrote:
> Remove needless ')' from sentence.
>
> Signed-off-by: Manuel Ebner <manuelebnerli@mailbox.org>
> ---
> Documentation/trace/histogram-design.rst | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/trace/histogram-design.rst b/Documentation/trace/histogram-design.rst
> index 41a726cd3..b757afa22 100644
> --- a/Documentation/trace/histogram-design.rst
> +++ b/Documentation/trace/histogram-design.rst
> @@ -876,7 +876,7 @@ next_pid field on this sched_switch event, we retrieve the
> variables specified in the wakeup_latency() trace action, and use
> them to generate a new wakeup_latency event into the trace stream.
>
> -Note that the way the trace handlers such as wakeup_latency() (which
> +Note that the way the trace handlers such as wakeup_latency() which
> could equivalently be written trace(wakeup_latency,$wakeup_lat,next_pid)
> are implemented, the parameters specified to the trace handler must be
> variables. In this case, $wakeup_lat is obviously a variable, but
Seems to me that the "which ..." should be a parenthetical phrase,
i.e., with parentheses at both ends of it. IMO.
But let's see the the TRACE maintainers have an opinion about it.
--
~Randy
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Documentation: trace: histogram-design: fix bracket
2026-09-02 17:17 ` Randy Dunlap
@ 2026-09-02 18:15 ` Steven Rostedt
0 siblings, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2026-09-02 18:15 UTC (permalink / raw)
To: Randy Dunlap
Cc: Manuel Ebner, Masami Hiramatsu, Mathieu Desnoyers,
Jonathan Corbet, Shuah Khan, linux-kernel, linux-trace-kernel,
linux-doc
On Wed, 2 Sep 2026 10:17:17 -0700
Randy Dunlap <rdunlap@infradead.org> wrote:
> > diff --git a/Documentation/trace/histogram-design.rst b/Documentation/trace/histogram-design.rst
> > index 41a726cd3..b757afa22 100644
> > --- a/Documentation/trace/histogram-design.rst
> > +++ b/Documentation/trace/histogram-design.rst
> > @@ -876,7 +876,7 @@ next_pid field on this sched_switch event, we retrieve the
> > variables specified in the wakeup_latency() trace action, and use
> > them to generate a new wakeup_latency event into the trace stream.
> >
> > -Note that the way the trace handlers such as wakeup_latency() (which
> > +Note that the way the trace handlers such as wakeup_latency() which
> > could equivalently be written trace(wakeup_latency,$wakeup_lat,next_pid)
> > are implemented, the parameters specified to the trace handler must be
> > variables. In this case, $wakeup_lat is obviously a variable, but
>
> Seems to me that the "which ..." should be a parenthetical phrase,
> i.e., with parentheses at both ends of it. IMO.
> But let's see the the TRACE maintainers have an opinion about it.
Yes, it's not an extra parenthesis but a missing one. Likely because it
would be placed in the position there is already a parenthesis.
Note that the way the trace handlers such as wakeup_latency() (which
could equivalently be written trace(wakeup_latency,$wakeup_lat,next_pid)) <<
are implemented, the parameters specified to the trace handler must be
variables. In this case, $wakeup_lat is obviously a variable, but
Perhaps the wording could be a bit better.
diff --git a/Documentation/trace/histogram-design.rst b/Documentation/trace/histogram-design.rst
index 41a726cd3536..ec133d0692c5 100644
--- a/Documentation/trace/histogram-design.rst
+++ b/Documentation/trace/histogram-design.rst
@@ -876,8 +876,7 @@ next_pid field on this sched_switch event, we retrieve the
variables specified in the wakeup_latency() trace action, and use
them to generate a new wakeup_latency event into the trace stream.
-Note that the way the trace handlers such as wakeup_latency() (which
-could equivalently be written trace(wakeup_latency,$wakeup_lat,next_pid)
+Note that the way the trace handlers such as wakeup_latency()
are implemented, the parameters specified to the trace handler must be
variables. In this case, $wakeup_lat is obviously a variable, but
next_pid isn't, since it's just naming a field in the sched_switch
@@ -916,6 +915,13 @@ means it will be automatically converted into a field variable::
onmatch(sched.sched_waking).wakeup_latency($wakeup_lat,next_pid)' >>
/sys/kernel/tracing/events/sched/sched_switch/trigger
+Note that the above is the old way to trigger a synthetic event, whereas the
+newer way is preferred, which uses the trace() action handler::
+
+ # echo 'hist:keys=next_pid:wakeup_lat=common_timestamp.usecs-$ts0: \
+ onmatch(sched.sched_waking).trace(wakeup_latency,$wakeup_lat,next_pid)' >>
+ /sys/kernel/tracing/events/sched/sched_switch/trigger
+
The diagram for the sched_switch event is similar to previous examples
but shows the additional field_vars[] array for hist_data and shows
the linkages between the field_vars and the variables and references
-- Steve
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-09-02 18:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-02 15:10 [PATCH] Documentation: trace: histogram-design: fix bracket Manuel Ebner
2026-09-02 17:17 ` Randy Dunlap
2026-09-02 18:15 ` Steven Rostedt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox