public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bagas Sanjaya <bagasdotme@gmail.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>,
	Steven Rostedt <rostedt@goodmis.org>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Jonathan Corbet <corbet@lwn.net>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>,
	Ross Zwisler <zwisler@chromium.org>,
	Ross Zwisler <zwisler@google.com>
Subject: Re: linux-next: manual merge of the ftrace tree with the jc_docs tree
Date: Wed, 15 Feb 2023 09:03:07 +0700	[thread overview]
Message-ID: <Y+w9W5JM6zIvnsWZ@debian.me> (raw)
In-Reply-To: <20230215121638.1e86ffa1@canb.auug.org.au>

[-- Attachment #1: Type: text/plain, Size: 8449 bytes --]

On Wed, Feb 15, 2023 at 12:16:38PM +1100, Stephen Rothwell wrote:
> diff --cc Documentation/trace/histogram.rst
> index 7b7e4893b8f6,8e95295e39b6..000000000000
> --- a/Documentation/trace/histogram.rst
> +++ b/Documentation/trace/histogram.rst
> @@@ -1861,9 -1864,9 +1864,9 @@@ A histogram can now be defined for the 
>   The above shows the latency "lat" in a power of 2 grouping.
>   
>   Like any other event, once a histogram is enabled for the event, the
> - output can be displayed by reading the event's 'hist' file.
> + output can be displayed by reading the event's 'hist' file::
>   
>  -  # cat /sys/kernel/debug/tracing/events/synthetic/wakeup_latency/hist
>  +  # cat /sys/kernel/tracing/events/synthetic/wakeup_latency/hist
>   
>     # event histogram
>     #
> @@@ -1908,10 -1911,10 +1911,10 @@@
>   
>   
>   The latency values can also be grouped linearly by a given size with
> - the ".buckets" modifier and specify a size (in this case groups of 10).
> + the ".buckets" modifier and specify a size (in this case groups of 10)::
>   
>     # echo 'hist:keys=pid,prio,lat.buckets=10:sort=lat' >> \
>  -        /sys/kernel/debug/tracing/events/synthetic/wakeup_latency/trigger
>  +        /sys/kernel/tracing/events/synthetic/wakeup_latency/trigger
>   
>     # event histogram
>     #
> @@@ -2052,13 -2182,13 +2182,13 @@@ The following commonly-used handler.act
>   
>         # echo 'hist:keys=$testpid:testpid=pid:onmatch(sched.sched_wakeup_new).\
>                 wakeup_new_test($testpid) if comm=="cyclictest"' >> \
>  -              /sys/kernel/debug/tracing/events/sched/sched_wakeup_new/trigger
>  +              /sys/kernel/tracing/events/sched/sched_wakeup_new/trigger
>   
> -     Or, equivalently, using the 'trace' keyword syntax:
> +     Or, equivalently, using the 'trace' keyword syntax::
>   
> -     # echo 'hist:keys=$testpid:testpid=pid:onmatch(sched.sched_wakeup_new).\
> -             trace(wakeup_new_test,$testpid) if comm=="cyclictest"' >> \
> -             /sys/kernel/tracing/events/sched/sched_wakeup_new/trigger
> +       # echo 'hist:keys=$testpid:testpid=pid:onmatch(sched.sched_wakeup_new).\
> +               trace(wakeup_new_test,$testpid) if comm=="cyclictest"' >> \
>  -              /sys/kernel/debug/tracing/events/sched/sched_wakeup_new/trigger
> ++              /sys/kernel/tracing/events/sched/sched_wakeup_new/trigger
>   
>       Creating and displaying a histogram based on those events is now
>       just a matter of using the fields and new synthetic event in the
> @@@ -2191,48 -2321,48 +2321,48 @@@
>       resulting latency, stored in wakeup_lat, exceeds the current
>       maximum latency, a snapshot is taken.  As part of the setup, all
>       the scheduler events are also enabled, which are the events that
> -     will show up in the snapshot when it is taken at some point:
> +     will show up in the snapshot when it is taken at some point::
>   
> -     # echo 1 > /sys/kernel/tracing/events/sched/enable
>  -      # echo 1 > /sys/kernel/debug/tracing/events/sched/enable
> ++      # echo 1 > /sys/kernel/tracing/events/sched/enable
>   
> -     # echo 'hist:keys=pid:ts0=common_timestamp.usecs \
> -             if comm=="cyclictest"' >> \
> -             /sys/kernel/tracing/events/sched/sched_waking/trigger
> +       # echo 'hist:keys=pid:ts0=common_timestamp.usecs \
> +               if comm=="cyclictest"' >> \
>  -              /sys/kernel/debug/tracing/events/sched/sched_waking/trigger
> ++              /sys/kernel/tracing/events/sched/sched_waking/trigger
>   
> -     # echo 'hist:keys=next_pid:wakeup_lat=common_timestamp.usecs-$ts0: \
> -             onmax($wakeup_lat).save(next_prio,next_comm,prev_pid,prev_prio, \
> - 	    prev_comm):onmax($wakeup_lat).snapshot() \
> - 	    if next_comm=="cyclictest"' >> \
> - 	    /sys/kernel/tracing/events/sched/sched_switch/trigger
> +       # echo 'hist:keys=next_pid:wakeup_lat=common_timestamp.usecs-$ts0: \
> +               onmax($wakeup_lat).save(next_prio,next_comm,prev_pid,prev_prio, \
> + 	      prev_comm):onmax($wakeup_lat).snapshot() \
> + 	      if next_comm=="cyclictest"' >> \
>  -	      /sys/kernel/debug/tracing/events/sched/sched_switch/trigger
> ++	      /sys/kernel/tracing/events/sched/sched_switch/trigger
>   
>       When the histogram is displayed, for each bucket the max value
>       and the saved values corresponding to the max are displayed
>       following the rest of the fields.
>   
>       If a snapshot was taken, there is also a message indicating that,
> -     along with the value and event that triggered the global maximum:
> +     along with the value and event that triggered the global maximum::
>   
> -     # cat /sys/kernel/tracing/events/sched/sched_switch/hist
> -       { next_pid:       2101 } hitcount:        200
> - 	max:         52  next_prio:        120  next_comm: cyclictest \
> -         prev_pid:          0  prev_prio:        120  prev_comm: swapper/6
>  -      # cat /sys/kernel/debug/tracing/events/sched/sched_switch/hist
> ++      # cat /sys/kernel/tracing/events/sched/sched_switch/hist
> +         { next_pid:       2101 } hitcount:        200
> + 	  max:         52  next_prio:        120  next_comm: cyclictest \
> +           prev_pid:          0  prev_prio:        120  prev_comm: swapper/6
>   
> -       { next_pid:       2103 } hitcount:       1326
> - 	max:        572  next_prio:         19  next_comm: cyclictest \
> -         prev_pid:          0  prev_prio:        120  prev_comm: swapper/1
> +         { next_pid:       2103 } hitcount:       1326
> + 	  max:        572  next_prio:         19  next_comm: cyclictest \
> +           prev_pid:          0  prev_prio:        120  prev_comm: swapper/1
>   
> -       { next_pid:       2102 } hitcount:       1982 \
> - 	max:         74  next_prio:         19  next_comm: cyclictest \
> -         prev_pid:          0  prev_prio:        120  prev_comm: swapper/5
> +         { next_pid:       2102 } hitcount:       1982 \
> + 	  max:         74  next_prio:         19  next_comm: cyclictest \
> +           prev_pid:          0  prev_prio:        120  prev_comm: swapper/5
>   
> -     Snapshot taken (see tracing/snapshot).  Details:
> - 	triggering value { onmax($wakeup_lat) }:        572	\
> - 	triggered by event with key: { next_pid:       2103 }
> +       Snapshot taken (see tracing/snapshot).  Details:
> + 	  triggering value { onmax($wakeup_lat) }:        572	\
> + 	  triggered by event with key: { next_pid:       2103 }
>   
> -     Totals:
> -         Hits: 3508
> -         Entries: 3
> -         Dropped: 0
> +       Totals:
> +           Hits: 3508
> +           Entries: 3
> +           Dropped: 0
>   
>       In the above case, the event that triggered the global maximum has
>       the key with next_pid == 2103.  If you look at the bucket that has
> @@@ -2310,15 -2440,15 +2440,15 @@@
>       $cwnd variable.  If the value has changed, a snapshot is taken.
>       As part of the setup, all the scheduler and tcp events are also
>       enabled, which are the events that will show up in the snapshot
> -     when it is taken at some point:
> +     when it is taken at some point::
>   
> -     # echo 1 > /sys/kernel/tracing/events/sched/enable
> -     # echo 1 > /sys/kernel/tracing/events/tcp/enable
>  -      # echo 1 > /sys/kernel/debug/tracing/events/sched/enable
>  -      # echo 1 > /sys/kernel/debug/tracing/events/tcp/enable
> ++      # echo 1 > /sys/kernel/tracing/events/sched/enable
> ++      # echo 1 > /sys/kernel/tracing/events/tcp/enable
>   
> -     # echo 'hist:keys=dport:cwnd=snd_cwnd: \
> -             onchange($cwnd).save(snd_wnd,srtt,rcv_wnd): \
> - 	    onchange($cwnd).snapshot()' >> \
> - 	    /sys/kernel/tracing/events/tcp/tcp_probe/trigger
> +       # echo 'hist:keys=dport:cwnd=snd_cwnd: \
> +               onchange($cwnd).save(snd_wnd,srtt,rcv_wnd): \
> + 	      onchange($cwnd).snapshot()' >> \
>  -	      /sys/kernel/debug/tracing/events/tcp/tcp_probe/trigger
> ++	      /sys/kernel/tracing/events/tcp/tcp_probe/trigger
>   
>       When the histogram is displayed, for each bucket the tracked value
>       and the saved values corresponding to that value are displayed

The resolution LGTM, thanks!

-- 
An old man doll... just what I always wanted! - Clara

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2023-02-15  2:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-15  1:16 linux-next: manual merge of the ftrace tree with the jc_docs tree Stephen Rothwell
2023-02-15  2:03 ` Bagas Sanjaya [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-11-21  1:35 Stephen Rothwell
2025-11-21  3:07 ` Bagas Sanjaya
2025-11-26 10:07 ` Gopi Krishna Menon
2023-02-13  1:24 Stephen Rothwell
2021-08-20  4:02 Stephen Rothwell
2018-03-21  4:31 Stephen Rothwell
2018-03-21  4:37 ` Stephen Rothwell
2018-03-21 13:15   ` Steven Rostedt
2018-03-21 20:55     ` Tom Zanussi
2018-03-21 22:21       ` Stephen Rothwell
2018-03-21 23:09         ` Tom Zanussi
2018-03-22 13:41         ` 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=Y+w9W5JM6zIvnsWZ@debian.me \
    --to=bagasdotme@gmail.com \
    --cc=corbet@lwn.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=sfr@canb.auug.org.au \
    --cc=zwisler@chromium.org \
    --cc=zwisler@google.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