* [trace:trace/for-next 19/23] htmldocs: Documentation/trace/histogram.rst:1969: WARNING: Unexpected indentation. @ 2023-01-28 18:26 kernel test robot 2023-01-29 3:14 ` [PATCH] tracing/histogram: Wrap remaining shell snippets in code blocks Bagas Sanjaya 0 siblings, 1 reply; 5+ messages in thread From: kernel test robot @ 2023-01-28 18:26 UTC (permalink / raw) To: Steven Rostedt (Google); +Cc: oe-kbuild-all, linux-doc tree: git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace trace/for-next head: 9f712417e1fc7d3db042941524e59573e02a55c7 commit: 88238513bb26713ef6d4418bdf1af062fe608bcb [19/23] tracing/histogram: Document variable stacktrace reproduce: # https://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git/commit/?id=88238513bb26713ef6d4418bdf1af062fe608bcb git remote add trace git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace git fetch --no-tags trace trace/for-next git checkout 88238513bb26713ef6d4418bdf1af062fe608bcb make menuconfig # enable CONFIG_COMPILE_TEST, CONFIG_WARN_MISSING_DOCUMENTS, CONFIG_WARN_ABI_ERRORS make htmldocs If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@intel.com> All warnings (new ones prefixed by >>): >> Documentation/trace/histogram.rst:1969: WARNING: Unexpected indentation. >> Documentation/trace/histogram.rst:1970: WARNING: Block quote ends without a blank line; unexpected unindent. >> Documentation/trace/histogram.rst:2014: WARNING: Definition list ends without a blank line; unexpected unindent. vim +1969 Documentation/trace/histogram.rst 1949 1950 # cd /sys/kernel/tracing 1951 # echo 's:block_lat pid_t pid; u64 delta; unsigned long[] stack;' > dynamic_events 1952 # echo 'hist:keys=next_pid:ts=common_timestamp.usecs,st=stacktrace if prev_state == 2' >> events/sched/sched_switch/trigger 1953 # echo 'hist:keys=prev_pid:delta=common_timestamp.usecs-$ts,s=$st:onmax($delta).trace(block_lat,prev_pid,$delta,$s)' >> events/sched/sched_switch/trigger 1954 # echo 1 > events/synthetic/block_lat/enable 1955 # cat trace 1956 1957 # tracer: nop 1958 # 1959 # entries-in-buffer/entries-written: 2/2 #P:8 1960 # 1961 # _-----=> irqs-off/BH-disabled 1962 # / _----=> need-resched 1963 # | / _---=> hardirq/softirq 1964 # || / _--=> preempt-depth 1965 # ||| / _-=> migrate-disable 1966 # |||| / delay 1967 # TASK-PID CPU# ||||| TIMESTAMP FUNCTION 1968 # | | | ||||| | | > 1969 <idle>-0 [005] d..4. 521.164922: block_lat: pid=0 delta=8322 stack=STACK: > 1970 => __schedule+0x448/0x7b0 1971 => schedule+0x5a/0xb0 1972 => io_schedule+0x42/0x70 1973 => bit_wait_io+0xd/0x60 1974 => __wait_on_bit+0x4b/0x140 1975 => out_of_line_wait_on_bit+0x91/0xb0 1976 => jbd2_journal_commit_transaction+0x1679/0x1a70 1977 => kjournald2+0xa9/0x280 1978 => kthread+0xe9/0x110 1979 => ret_from_fork+0x2c/0x50 1980 1981 <...>-2 [004] d..4. 525.184257: block_lat: pid=2 delta=76 stack=STACK: 1982 => __schedule+0x448/0x7b0 1983 => schedule+0x5a/0xb0 1984 => schedule_timeout+0x11a/0x150 1985 => wait_for_completion_killable+0x144/0x1f0 1986 => __kthread_create_on_node+0xe7/0x1e0 1987 => kthread_create_on_node+0x51/0x70 1988 => create_worker+0xcc/0x1a0 1989 => worker_thread+0x2ad/0x380 1990 => kthread+0xe9/0x110 1991 => ret_from_fork+0x2c/0x50 1992 1993 A synthetic event that has a stacktrace field may use it as a key in histogram: 1994 1995 # echo 'hist:delta.buckets=100,stack.stacktrace:sort=delta' > events/synthetic/block_lat/trigger 1996 # cat events/synthetic/block_lat/hist 1997 1998 # event histogram 1999 # 2000 # trigger info: hist:keys=delta.buckets=100,stacktrace:vals=hitcount:sort=delta.buckets=100:size=2048 [active] 2001 # 2002 2003 { delta: ~ 0-99, stacktrace: 2004 event_hist_trigger+0x464/0x480 2005 event_triggers_call+0x52/0xe0 2006 trace_event_buffer_commit+0x193/0x250 2007 trace_event_raw_event_sched_switch+0xfc/0x150 2008 __traceiter_sched_switch+0x41/0x60 2009 __schedule+0x448/0x7b0 2010 schedule_idle+0x26/0x40 2011 cpu_startup_entry+0x19/0x20 2012 start_secondary+0xed/0xf0 2013 secondary_startup_64_no_verify+0xe0/0xeb > 2014 } hitcount: 6 2015 { delta: ~ 0-99, stacktrace: 2016 event_hist_trigger+0x464/0x480 2017 event_triggers_call+0x52/0xe0 2018 trace_event_buffer_commit+0x193/0x250 2019 trace_event_raw_event_sched_switch+0xfc/0x150 2020 __traceiter_sched_switch+0x41/0x60 2021 __schedule+0x448/0x7b0 2022 schedule_idle+0x26/0x40 2023 cpu_startup_entry+0x19/0x20 2024 __pfx_kernel_init+0x0/0x10 2025 arch_call_rest_init+0xa/0x24 2026 start_kernel+0x964/0x98d 2027 secondary_startup_64_no_verify+0xe0/0xeb 2028 } hitcount: 3 2029 { delta: ~ 0-99, stacktrace: 2030 event_hist_trigger+0x464/0x480 2031 event_triggers_call+0x52/0xe0 2032 trace_event_buffer_commit+0x193/0x250 2033 trace_event_raw_event_sched_switch+0xfc/0x150 2034 __traceiter_sched_switch+0x41/0x60 2035 __schedule+0x448/0x7b0 2036 schedule+0x5a/0xb0 2037 worker_thread+0xaf/0x380 2038 kthread+0xe9/0x110 2039 ret_from_fork+0x2c/0x50 2040 } hitcount: 1 2041 { delta: ~ 100-199, stacktrace: 2042 event_hist_trigger+0x464/0x480 2043 event_triggers_call+0x52/0xe0 2044 trace_event_buffer_commit+0x193/0x250 2045 trace_event_raw_event_sched_switch+0xfc/0x150 2046 __traceiter_sched_switch+0x41/0x60 2047 __schedule+0x448/0x7b0 2048 schedule_idle+0x26/0x40 2049 cpu_startup_entry+0x19/0x20 2050 start_secondary+0xed/0xf0 2051 secondary_startup_64_no_verify+0xe0/0xeb 2052 } hitcount: 15 2053 [..] 2054 { delta: ~ 8500-8599, stacktrace: 2055 event_hist_trigger+0x464/0x480 2056 event_triggers_call+0x52/0xe0 2057 trace_event_buffer_commit+0x193/0x250 2058 trace_event_raw_event_sched_switch+0xfc/0x150 2059 __traceiter_sched_switch+0x41/0x60 2060 __schedule+0x448/0x7b0 2061 schedule_idle+0x26/0x40 2062 cpu_startup_entry+0x19/0x20 2063 start_secondary+0xed/0xf0 2064 secondary_startup_64_no_verify+0xe0/0xeb 2065 } hitcount: 1 2066 2067 Totals: 2068 Hits: 89 2069 Entries: 11 2070 Dropped: 0 2071 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] tracing/histogram: Wrap remaining shell snippets in code blocks 2023-01-28 18:26 [trace:trace/for-next 19/23] htmldocs: Documentation/trace/histogram.rst:1969: WARNING: Unexpected indentation kernel test robot @ 2023-01-29 3:14 ` Bagas Sanjaya 2023-02-02 18:14 ` Jonathan Corbet 0 siblings, 1 reply; 5+ messages in thread From: Bagas Sanjaya @ 2023-01-29 3:14 UTC (permalink / raw) To: linux-kernel, linux-trace-kernel, linux-doc, oe-kbuild-all Cc: Steven Rostedt, Masami Hiramatsu, Jonathan Corbet, Bagas Sanjaya, kernel test robot Most shell command snippets (echo/cat) and their output are already in literal code blocks. However a few still isn't wrapped, in which the htmldocs output is ugly. Wrap the remaining unwrapped snippets, while also fix recent kernel test robot warnings. Link: https://lore.kernel.org/linux-doc/202301290253.LU5yIxcJ-lkp@intel.com/ Fixes: 88238513bb2671 ("tracing/histogram: Document variable stacktrace") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com> --- Documentation/trace/histogram.rst | 93 ++++++++++++++++--------------- 1 file changed, 47 insertions(+), 46 deletions(-) diff --git a/Documentation/trace/histogram.rst b/Documentation/trace/histogram.rst index 5c391328b9bb41..8e95295e39b65c 100644 --- a/Documentation/trace/histogram.rst +++ b/Documentation/trace/histogram.rst @@ -1864,7 +1864,7 @@ A histogram can now be defined for the new synthetic event:: 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 @@ -1911,7 +1911,7 @@ output can be displayed by reading the event's 'hist' file. 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 @@ -1945,7 +1945,7 @@ the ".buckets" modifier and specify a size (in this case groups of 10). To save stacktraces, create a synthetic event with a field of type "unsigned long[]" or even just "long[]". For example, to see how long a task is blocked in an -uninterruptible state: +uninterruptible state:: # cd /sys/kernel/tracing # echo 's:block_lat pid_t pid; u64 delta; unsigned long[] stack;' > dynamic_events @@ -1990,7 +1990,8 @@ uninterruptible state: => kthread+0xe9/0x110 => ret_from_fork+0x2c/0x50 -A synthetic event that has a stacktrace field may use it as a key in histogram: +A synthetic event that has a stacktrace field may use it as a key in +histogram:: # echo 'hist:delta.buckets=100,stack.stacktrace:sort=delta' > events/synthetic/block_lat/trigger # cat events/synthetic/block_lat/hist @@ -2183,11 +2184,11 @@ The following commonly-used handler.action pairs are available: wakeup_new_test($testpid) if comm=="cyclictest"' >> \ /sys/kernel/debug/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/debug/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 Creating and displaying a histogram based on those events is now just a matter of using the fields and new synthetic event in the @@ -2320,48 +2321,48 @@ The following commonly-used handler.action pairs are available: 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/debug/tracing/events/sched/enable + # echo 1 > /sys/kernel/debug/tracing/events/sched/enable - # echo 'hist:keys=pid:ts0=common_timestamp.usecs \ - if comm=="cyclictest"' >> \ - /sys/kernel/debug/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 - # 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 + # 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 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/debug/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 + { 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 @@ -2439,15 +2440,15 @@ The following commonly-used handler.action pairs are available: $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/debug/tracing/events/sched/enable - # echo 1 > /sys/kernel/debug/tracing/events/tcp/enable + # echo 1 > /sys/kernel/debug/tracing/events/sched/enable + # echo 1 > /sys/kernel/debug/tracing/events/tcp/enable - # 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 + # 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 When the histogram is displayed, for each bucket the tracked value and the saved values corresponding to that value are displayed @@ -2470,10 +2471,10 @@ The following commonly-used handler.action pairs are available: { dport: 443 } hitcount: 211 changed: 10 snd_wnd: 26960 srtt: 17379 rcv_wnd: 28800 - Snapshot taken (see tracing/snapshot). Details:: + Snapshot taken (see tracing/snapshot). Details: - triggering value { onchange($cwnd) }: 10 - triggered by event with key: { dport: 80 } + triggering value { onchange($cwnd) }: 10 + triggered by event with key: { dport: 80 } Totals: Hits: 414 base-commit: 9f712417e1fc7d3db042941524e59573e02a55c7 -- An old man doll... just what I always wanted! - Clara ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] tracing/histogram: Wrap remaining shell snippets in code blocks 2023-01-29 3:14 ` [PATCH] tracing/histogram: Wrap remaining shell snippets in code blocks Bagas Sanjaya @ 2023-02-02 18:14 ` Jonathan Corbet 2023-02-03 9:19 ` Bagas Sanjaya 0 siblings, 1 reply; 5+ messages in thread From: Jonathan Corbet @ 2023-02-02 18:14 UTC (permalink / raw) To: Bagas Sanjaya, linux-kernel, linux-trace-kernel, linux-doc, oe-kbuild-all Cc: Steven Rostedt, Masami Hiramatsu, Bagas Sanjaya, kernel test robot Bagas Sanjaya <bagasdotme@gmail.com> writes: > Most shell command snippets (echo/cat) and their output are already in > literal code blocks. However a few still isn't wrapped, in which the > htmldocs output is ugly. > > Wrap the remaining unwrapped snippets, while also fix recent kernel test > robot warnings. > > Link: https://lore.kernel.org/linux-doc/202301290253.LU5yIxcJ-lkp@intel.com/ > Fixes: 88238513bb2671 ("tracing/histogram: Document variable stacktrace") > Reported-by: kernel test robot <lkp@intel.com> > Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com> > --- > Documentation/trace/histogram.rst | 93 ++++++++++++++++--------------- > 1 file changed, 47 insertions(+), 46 deletions(-) So this is a good cleanup and I'd like to apply it, but it doesn't come close to applying to docs-next. Which tree did you do this against? Thanks, jon ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] tracing/histogram: Wrap remaining shell snippets in code blocks 2023-02-02 18:14 ` Jonathan Corbet @ 2023-02-03 9:19 ` Bagas Sanjaya 2023-02-07 17:41 ` Steven Rostedt 0 siblings, 1 reply; 5+ messages in thread From: Bagas Sanjaya @ 2023-02-03 9:19 UTC (permalink / raw) To: Jonathan Corbet, linux-kernel, linux-trace-kernel, linux-doc, oe-kbuild-all Cc: Steven Rostedt, Masami Hiramatsu, kernel test robot On 2/3/23 01:14, Jonathan Corbet wrote: > So this is a good cleanup and I'd like to apply it, but it doesn't come > close to applying to docs-next. Which tree did you do this against? > for-next branch (linux-trace tree). -- An old man doll... just what I always wanted! - Clara ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] tracing/histogram: Wrap remaining shell snippets in code blocks 2023-02-03 9:19 ` Bagas Sanjaya @ 2023-02-07 17:41 ` Steven Rostedt 0 siblings, 0 replies; 5+ messages in thread From: Steven Rostedt @ 2023-02-07 17:41 UTC (permalink / raw) To: Bagas Sanjaya Cc: Jonathan Corbet, linux-kernel, linux-trace-kernel, linux-doc, oe-kbuild-all, Masami Hiramatsu, kernel test robot On Fri, 3 Feb 2023 16:19:41 +0700 Bagas Sanjaya <bagasdotme@gmail.com> wrote: > On 2/3/23 01:14, Jonathan Corbet wrote: > > So this is a good cleanup and I'd like to apply it, but it doesn't come > > close to applying to docs-next. Which tree did you do this against? > > > > for-next branch (linux-trace tree). > I'll add this to my tree. Thanks! -- Steve ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-02-07 17:41 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2023-01-28 18:26 [trace:trace/for-next 19/23] htmldocs: Documentation/trace/histogram.rst:1969: WARNING: Unexpected indentation kernel test robot 2023-01-29 3:14 ` [PATCH] tracing/histogram: Wrap remaining shell snippets in code blocks Bagas Sanjaya 2023-02-02 18:14 ` Jonathan Corbet 2023-02-03 9:19 ` Bagas Sanjaya 2023-02-07 17:41 ` Steven Rostedt
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).