sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget0/translations/zh_CN/tools/rtla/rtla-timerlat-topmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget0/translations/zh_TW/tools/rtla/rtla-timerlat-topmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget0/translations/it_IT/tools/rtla/rtla-timerlat-topmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget0/translations/ja_JP/tools/rtla/rtla-timerlat-topmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget0/translations/ko_KR/tools/rtla/rtla-timerlat-topmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hPortuguese (Brazilian)}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget0/translations/pt_BR/tools/rtla/rtla-timerlat-topmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget0/translations/sp_SP/tools/rtla/rtla-timerlat-topmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhsubstitution_definition)}(h!.. |tool| replace:: timerlat top h]h timerlat top}hhsbah}(h]h ]h"]toolah$]h&]uh1hhJ/var/lib/git/docbuild/linux/Documentation/tools/rtla/rtla-timerlat-top.rsthKhhhhubhsection)}(hhh](htitle)}(hrtla-timerlat-toph]hrtla-timerlat-top}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h+Measures the operating system timer latencyh]h+Measures the operating system timer latency}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh field_list)}(hhh]hfield)}(hhh](h field_name)}(hManual sectionh]hManual section}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhKubh field_body)}(h1 h]h paragraph)}(h1h]h1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hhhK hj ubah}(h]h ]h"]h$]h&]uh1jhhubeh}(h]h ]h"]h$]h&]uh1hhhhK hhhhubah}(h]h ]h"]h$]h&]uh1hhhhhhhhK ubh)}(hhh](h)}(hSYNOPSISh]hSYNOPSIS}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj/hhhhhK ubj)}(h%**rtla timerlat top** [*OPTIONS*] ...h](hstrong)}(h**rtla timerlat top**h]hrtla timerlat top}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jDhj@ubh [}(hj@hhhNhNubhemphasis)}(h *OPTIONS*h]hOPTIONS}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhj@ubh] ...}(hj@hhhNhNubeh}(h]h ]h"]h$]h&]uh1j hhhKhj/hhubeh}(h]synopsisah ]h"]synopsisah$]h&]uh1hhhhhhhhK ubh)}(hhh](h)}(h DESCRIPTIONh]h DESCRIPTION}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjzhhhhhKubj)}(hXBThe **rtla timerlat** tool is an interface for the *timerlat* tracer. The *timerlat* tracer dispatches a kernel thread per-cpu. These threads set a periodic timer to wake themselves up and go back to sleep. After the wakeup, they collect and generate useful information for the debugging of operating system timer latency.h](hThe }(hjhhhNhNubjE)}(h**rtla timerlat**h]h rtla timerlat}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjubh tool is an interface for the }(hjhhhNhNubjY)}(h *timerlat*h]htimerlat}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjubh tracer. The }(hjhhhNhNubjY)}(h *timerlat*h]htimerlat}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjubh tracer dispatches a kernel thread per-cpu. These threads set a periodic timer to wake themselves up and go back to sleep. After the wakeup, they collect and generate useful information for the debugging of operating system timer latency.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j h8Documentation/tools/rtla/common_timerlat_description.txthKhjzhhubj)}(hThe *timerlat* tracer outputs information in two ways. It periodically prints the timer latency at the timer *IRQ* handler and the *Thread* handler. It also enables the trace of the most relevant information via **osnoise:** tracepoints.h](hThe }(hjhhhNhNubjY)}(h *timerlat*h]htimerlat}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjubh_ tracer outputs information in two ways. It periodically prints the timer latency at the timer }(hjhhhNhNubjY)}(h*IRQ*h]hIRQ}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjubh handler and the }(hjhhhNhNubjY)}(h*Thread*h]hThread}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjubhI handler. It also enables the trace of the most relevant information via }(hjhhhNhNubjE)}(h **osnoise:**h]hosnoise:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjubh tracepoints.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j hjhKhjzhhubj)}(hXThe **rtla timerlat** tool sets the options of the *timerlat* tracer and collects and displays a summary of the results. By default, the collection is done synchronously in kernel space using a dedicated BPF program attached to the *timerlat* tracer. If either BPF or the **osnoise:timerlat_sample** tracepoint it attaches to is unavailable, the **rtla timerlat** tool falls back to using tracefs to process the data asynchronously in user space.h](hThe }(hj&hhhNhNubjE)}(h**rtla timerlat**h]h rtla timerlat}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jDhj&ubh tool sets the options of the }(hj&hhhNhNubjY)}(h *timerlat*h]htimerlat}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jXhj&ubh tracer and collects and displays a summary of the results. By default, the collection is done synchronously in kernel space using a dedicated BPF program attached to the }(hj&hhhNhNubjY)}(h *timerlat*h]htimerlat}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhj&ubh tracer. If either BPF or the }(hj&hhhNhNubjE)}(h**osnoise:timerlat_sample**h]hosnoise:timerlat_sample}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jDhj&ubh/ tracepoint it attaches to is unavailable, the }(hj&hhhNhNubjE)}(h**rtla timerlat**h]h rtla timerlat}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1jDhj&ubhS tool falls back to using tracefs to process the data asynchronously in user space.}(hj&hhhNhNubeh}(h]h ]h"]h$]h&]uh1j hjhK hjzhhubj)}(hThe **rtla timerlat top** displays a summary of the periodic output from the *timerlat* tracer. It also provides information for each operating system noise via the **osnoise:** tracepoints that can be seen with the option **-T**.h](hThe }(hjhhhNhNubjE)}(h**rtla timerlat top**h]hrtla timerlat top}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjubh4 displays a summary of the periodic output from the }(hjhhhNhNubjY)}(h *timerlat*h]htimerlat}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjubhN tracer. It also provides information for each operating system noise via the }(hjhhhNhNubjE)}(h **osnoise:**h]hosnoise:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjubh. tracepoints that can be seen with the option }(hjhhhNhNubjE)}(h**-T**h]h-T}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j hhhKhjzhhubeh}(h] descriptionah ]h"] descriptionah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hOPTIONSh]hOPTIONS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hI.. |threshold| replace:: **-a/--auto**, **-i/--irq**, or **-T/--thread**h](jE)}(h **-a/--auto**h]h -a/--auto}hjsbah}(h]h ]h"]h$]h&]uh1jDhjubh, }hjsbjE)}(h **-i/--irq**h]h-i/--irq}hjsbah}(h]h ]h"]h$]h&]uh1jDhjubh, or }hjsbjE)}(h**-T/--thread**h]h -T/--thread}hj%sbah}(h]h ]h"]h$]h&]uh1jDhjubeh}(h]h ]h"] thresholdah$]h&]uh1hh4Documentation/tools/rtla/common_timerlat_options.txthKhjhhubh)}(h.. |thresharg| replace:: -Th]h-T}hj;sbah}(h]h ]h"] threshargah$]h&]uh1hhj:hKhjhhubh)}(h#.. |tracer| replace:: timerlat h]htimerlat}hjJsbah}(h]h ]h"]tracerah$]h&]uh1hhj:hKhjhhubh)}(hX@.. |actionsperf| replace:: For time-sensitive actions, it is recommended to run **rtla timerlat** with BPF support and RT priority. Note that due to implementational limitations, actions might be delayed up to one second after tracing is stopped if BPF mode is not available or disabled. h](h5For time-sensitive actions, it is recommended to run }hjYsbjE)}(h**rtla timerlat**h]h rtla timerlat}hjasbah}(h]h ]h"]h$]h&]uh1jDhjYubh with BPF support and RT priority. Note that due to implementational limitations, actions might be delayed up to one second after tracing is stopped if BPF mode is not available or disabled.}hjYsbeh}(h]h ]h"] actionsperfah$]h&]uh1hhj:hKhjhhubj)}(h**-a**, **--auto** *us*h](jE)}(h**-a**h]h-a}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjzubh, }(hjzhhhNhNubjE)}(h **--auto**h]h--auto}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjzubh }(hjzhhhNhNubjY)}(h*us*h]hus}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjzubeh}(h]h ]h"]h$]h&]uh1j hj:hK hjhhubh block_quote)}(hXSet the automatic trace mode. This mode sets some commonly used options while debugging the system. It is equivalent to use **-T** *us* **-s** *us* **-t**. By default, *timerlat* tracer uses FIFO:95 for *timerlat* threads, thus equivalent to **-P** *f:95*. h]j)}(hXSet the automatic trace mode. This mode sets some commonly used options while debugging the system. It is equivalent to use **-T** *us* **-s** *us* **-t**. By default, *timerlat* tracer uses FIFO:95 for *timerlat* threads, thus equivalent to **-P** *f:95*.h](h|Set the automatic trace mode. This mode sets some commonly used options while debugging the system. It is equivalent to use }(hjhhhNhNubjE)}(h**-T**h]h-T}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjubh }(hjhhhNhNubjY)}(h*us*h]hus}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjubh }hjsbjE)}(h**-s**h]h-s}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjubh }hjsbjY)}(h*us*h]hus}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjubh }(hjhhhNhNubjE)}(h**-t**h]h-t}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjubh. By default, }(hjhhhNhNubjY)}(h *timerlat*h]htimerlat}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjubh tracer uses FIFO:95 for }(hjhhhNhNubjY)}(h *timerlat*h]htimerlat}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjubh threads, thus equivalent to }(hjhhhNhNubjE)}(h**-P**h]h-P}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjubh }hjsbjY)}(h*f:95*h]hf:95}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j hj:hK hjubah}(h]h ]h"]h$]h&]uh1jhj:hK hjhhubj)}(h**-p**, **--period** *us*h](jE)}(h**-p**h]h-p}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjrubh, }(hjrhhhNhNubjE)}(h **--period**h]h--period}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjrubh }(hjrhhhNhNubjY)}(h*us*h]hus}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjrubeh}(h]h ]h"]h$]h&]uh1j hj:hKhjhhubj)}(h2Set the *timerlat* tracer period in microseconds. h]j)}(h1Set the *timerlat* tracer period in microseconds.h](hSet the }(hjhhhNhNubjY)}(h *timerlat*h]htimerlat}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjubh tracer period in microseconds.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j hj:hKhjubah}(h]h ]h"]h$]h&]uh1jhj:hKhjhhubj)}(h**-i**, **--irq** *us*h](jE)}(h**-i**h]h-i}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjubh, }(hjhhhNhNubjE)}(h **--irq**h]h--irq}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjubh }(hjhhhNhNubjY)}(h*us*h]hus}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjubeh}(h]h ]h"]h$]h&]uh1j hj:hKhjhhubj)}(hCStop trace if the *IRQ* latency is higher than the argument in us. h]j)}(hBStop trace if the *IRQ* latency is higher than the argument in us.h](hStop trace if the }(hjhhhNhNubjY)}(h*IRQ*h]hIRQ}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjubh+ latency is higher than the argument in us.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j hj:hKhjubah}(h]h ]h"]h$]h&]uh1jhj:hKhjhhubj)}(h**-T**, **--thread** *us*h](jE)}(h**-T**h]h-T}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jDhj>ubh, }(hj>hhhNhNubjE)}(h **--thread**h]h--thread}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1jDhj>ubh }(hj>hhhNhNubjY)}(h*us*h]hus}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhj>ubeh}(h]h ]h"]h$]h&]uh1j hj:hKhjhhubj)}(hFStop trace if the *Thread* latency is higher than the argument in us. h]j)}(hEStop trace if the *Thread* latency is higher than the argument in us.h](hStop trace if the }(hj~hhhNhNubjY)}(h*Thread*h]hThread}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhj~ubh+ latency is higher than the argument in us.}(hj~hhhNhNubeh}(h]h ]h"]h$]h&]uh1j hj:hKhjzubah}(h]h ]h"]h$]h&]uh1jhj:hKhjhhubj)}(h**-s**, **--stack** *us*h](jE)}(h**-s**h]h-s}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjubh, }(hjhhhNhNubjE)}(h **--stack**h]h--stack}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjubh }(hjhhhNhNubjY)}(h*us*h]hus}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjubeh}(h]h ]h"]h$]h&]uh1j hj:hKhjhhubj)}(h[Save the stack trace at the *IRQ* if a *Thread* latency is higher than the argument in us. h]j)}(hZSave the stack trace at the *IRQ* if a *Thread* latency is higher than the argument in us.h](hSave the stack trace at the }(hjhhhNhNubjY)}(h*IRQ*h]hIRQ}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjubh if a }(hjhhhNhNubjY)}(h*Thread*h]hThread}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjubh+ latency is higher than the argument in us.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j hj:hK hjubah}(h]h ]h"]h$]h&]uh1jhj:hK hjhhubj)}(h**-t**, **--trace** \[*file*]h](jE)}(h**-t**h]h-t}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjubh, }(hjhhhNhNubjE)}(h **--trace**h]h--trace}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjubh [}(hjhhhNhNubjY)}(h*file*h]hfile}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjubh]}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j hj:hK#hjhhubj)}(h7Save the stopped trace to [*file|timerlat_trace.txt*]. h]j)}(h6Save the stopped trace to [*file|timerlat_trace.txt*].h](hSave the stopped trace to [}(hj`hhhNhNubjY)}(h*file|timerlat_trace.txt*h]hfile|timerlat_trace.txt}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhj`ubh].}(hj`hhhNhNubeh}(h]h ]h"]h$]h&]uh1j hj:hK%hj\ubah}(h]h ]h"]h$]h&]uh1jhj:hK%hjhhubhdefinition_list)}(hhh](hdefinition_list_item)}(h**--dma-latency** *us* Set the /dev/cpu_dma_latency to *us*, aiming to bound exit from idle latencies. *cyclictest* sets this value to *0* by default, use **--dma-latency** *0* to have similar results. h](hterm)}(h**--dma-latency** *us*h](jE)}(h**--dma-latency**h]h --dma-latency}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjubh }(hjhhhNhNubjY)}(h*us*h]hus}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjubeh}(h]h ]h"]h$]h&]uh1jhj:hK*hjubh definition)}(hhh]j)}(hSet the /dev/cpu_dma_latency to *us*, aiming to bound exit from idle latencies. *cyclictest* sets this value to *0* by default, use **--dma-latency** *0* to have similar results.h](h Set the /dev/cpu_dma_latency to }(hjhhhNhNubjY)}(h*us*h]hus}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjubh,, aiming to bound exit from idle latencies. }(hjhhhNhNubjY)}(h *cyclictest*h]h cyclictest}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjubh sets this value to }(hjhhhNhNubjY)}(h*0*h]h0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjubh by default, use }(hjhhhNhNubjE)}(h**--dma-latency**h]h --dma-latency}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjubh }(hjhhhNhNubjY)}(h*0*h]h0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjubh to have similar results.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j hj:hK(hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj:hK*hjubj)}(hXR**--deepest-idle-state** *n* Disable idle states higher than *n* for cpus that are running timerlat threads to reduce exit from idle latencies. If *n* is -1, all idle states are disabled. On exit from timerlat, the idle state setting is restored to its original state before running timerlat. Requires rtla to be built with libcpupower. h](j)}(h**--deepest-idle-state** *n*h](jE)}(h**--deepest-idle-state**h]h--deepest-idle-state}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jDhj:ubh }(hj:hhhNhNubjY)}(h*n*h]hn}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhj:ubeh}(h]h ]h"]h$]h&]uh1jhj:hK2hj6ubj)}(hhh](j)}(hXDisable idle states higher than *n* for cpus that are running timerlat threads to reduce exit from idle latencies. If *n* is -1, all idle states are disabled. On exit from timerlat, the idle state setting is restored to its original state before running timerlat.h](h Disable idle states higher than }(hjghhhNhNubjY)}(h*n*h]hn}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjgubhS for cpus that are running timerlat threads to reduce exit from idle latencies. If }(hjghhhNhNubjY)}(h*n*h]hn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjgubh is -1, all idle states are disabled. On exit from timerlat, the idle state setting is restored to its original state before running timerlat.}(hjghhhNhNubeh}(h]h ]h"]h$]h&]uh1j hj:hK-hjdubj)}(h+Requires rtla to be built with libcpupower.h]h+Requires rtla to be built with libcpupower.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hj:hK2hjdubeh}(h]h ]h"]h$]h&]uh1jhj6ubeh}(h]h ]h"]h$]h&]uh1jhj:hK2hjhhubeh}(h]h ]h"]h$]h&]uh1jhjhhhj:hNubj)}(h**-k**, **--kernel-threads**h](jE)}(h**-k**h]h-k}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjubh, }(hjhhhNhNubjE)}(h**--kernel-threads**h]h--kernel-threads}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjubeh}(h]h ]h"]h$]h&]uh1j hj:hK4hjhhubj)}(h:Use timerlat kernel-space threads, in contrast of **-u**. h]j)}(h9Use timerlat kernel-space threads, in contrast of **-u**.h](h2Use timerlat kernel-space threads, in contrast of }(hjhhhNhNubjE)}(h**-u**h]h-u}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j hj:hK6hjubah}(h]h ]h"]h$]h&]uh1jhj:hK6hjhhubj)}(h**-u**, **--user-threads**h](jE)}(h**-u**h]h-u}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jDhj ubh, }(hj hhhNhNubjE)}(h**--user-threads**h]h--user-threads}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jDhj ubeh}(h]h ]h"]h$]h&]uh1j hj:hK8hjhhubj)}(hX=Set timerlat to run without a workload, and then dispatches user-space workloads to wait on the timerlat_fd. Once the workload is awakened, it goes to sleep again adding so the measurement for the kernel-to-user and user-to-kernel to the tracer output. **--user-threads** will be used unless the user specify **-k**. h]j)}(hX<Set timerlat to run without a workload, and then dispatches user-space workloads to wait on the timerlat_fd. Once the workload is awakened, it goes to sleep again adding so the measurement for the kernel-to-user and user-to-kernel to the tracer output. **--user-threads** will be used unless the user specify **-k**.h](hSet timerlat to run without a workload, and then dispatches user-space workloads to wait on the timerlat_fd. Once the workload is awakened, it goes to sleep again adding so the measurement for the kernel-to-user and user-to-kernel to the tracer output. }(hj;hhhNhNubjE)}(h**--user-threads**h]h--user-threads}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1jDhj;ubh& will be used unless the user specify }(hj;hhhNhNubjE)}(h**-k**h]h-k}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1jDhj;ubh.}(hj;hhhNhNubeh}(h]h ]h"]h$]h&]uh1j hj:hK:hj7ubah}(h]h ]h"]h$]h&]uh1jhj:hK:hjhhubj)}(h**-U**, **--user-load**h](jE)}(h**-U**h]h-U}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjsubh, }(hjshhhNhNubjE)}(h**--user-load**h]h --user-load}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjsubeh}(h]h ]h"]h$]h&]uh1j hj:hK?hjhhubj)}(hSet timerlat to run without workload, waiting for the user to dispatch a per-cpu task that waits for a new period on the tracing/osnoise/per_cpu/cpu$ID/timerlat_fd. See linux/tools/rtla/example/timerlat_load.py for an example of user-load code. h]j)}(hSet timerlat to run without workload, waiting for the user to dispatch a per-cpu task that waits for a new period on the tracing/osnoise/per_cpu/cpu$ID/timerlat_fd. See linux/tools/rtla/example/timerlat_load.py for an example of user-load code.h]hSet timerlat to run without workload, waiting for the user to dispatch a per-cpu task that waits for a new period on the tracing/osnoise/per_cpu/cpu$ID/timerlat_fd. See linux/tools/rtla/example/timerlat_load.py for an example of user-load code.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hj:hKAhjubah}(h]h ]h"]h$]h&]uh1jhj:hKAhjhhubj)}(h**--bpf-action** *bpf-program*h](jE)}(h**--bpf-action**h]h --bpf-action}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjubh }(hjhhhNhNubjY)}(h *bpf-program*h]h bpf-program}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjubeh}(h]h ]h"]h$]h&]uh1j hj:hKEhjhhubj)}(hXQLoads a BPF program from an ELF file and executes it when a latency threshold is exceeded. The BPF program must be a valid ELF file loadable with libbpf. The program must contain a function named ``action_handler``, stored in an ELF section with the ``tp_`` prefix. The prefix is used by libbpf to set BPF program type to BPF_PROG_TYPE_TRACEPOINT. The program receives a ``struct trace_event_raw_timerlat_sample`` parameter containing timerlat sample data. An example is provided in ``tools/tracing/rtla/example/timerlat_bpf_action.c``. This example demonstrates how to create a BPF program that prints latency information using bpf_trace_printk() when a threshold is exceeded. **Note**: BPF actions require BPF support to be available. If BPF is not available or disabled, the tool falls back to tracefs mode and BPF actions are not supported. h](j)}(hZLoads a BPF program from an ELF file and executes it when a latency threshold is exceeded.h]hZLoads a BPF program from an ELF file and executes it when a latency threshold is exceeded.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hj:hKGhjubj)}(hXThe BPF program must be a valid ELF file loadable with libbpf. The program must contain a function named ``action_handler``, stored in an ELF section with the ``tp_`` prefix. The prefix is used by libbpf to set BPF program type to BPF_PROG_TYPE_TRACEPOINT.h](hiThe BPF program must be a valid ELF file loadable with libbpf. The program must contain a function named }(hjhhhNhNubhliteral)}(h``action_handler``h]haction_handler}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh$, stored in an ELF section with the }(hjhhhNhNubj)}(h``tp_``h]htp_}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhZ prefix. The prefix is used by libbpf to set BPF program type to BPF_PROG_TYPE_TRACEPOINT.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j hj:hKIhjubj)}(hlThe program receives a ``struct trace_event_raw_timerlat_sample`` parameter containing timerlat sample data.h](hThe program receives a }(hj% hhhNhNubj)}(h*``struct trace_event_raw_timerlat_sample``h]h&struct trace_event_raw_timerlat_sample}(hj- hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj% ubh+ parameter containing timerlat sample data.}(hj% hhhNhNubeh}(h]h ]h"]h$]h&]uh1j hj:hKMhjubj)}(hAn example is provided in ``tools/tracing/rtla/example/timerlat_bpf_action.c``. This example demonstrates how to create a BPF program that prints latency information using bpf_trace_printk() when a threshold is exceeded.h](hAn example is provided in }(hjE hhhNhNubj)}(h4``tools/tracing/rtla/example/timerlat_bpf_action.c``h]h0tools/tracing/rtla/example/timerlat_bpf_action.c}(hjM hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjE ubh. This example demonstrates how to create a BPF program that prints latency information using bpf_trace_printk() when a threshold is exceeded.}(hjE hhhNhNubeh}(h]h ]h"]h$]h&]uh1j hj:hKPhjubj)}(h**Note**: BPF actions require BPF support to be available. If BPF is not available or disabled, the tool falls back to tracefs mode and BPF actions are not supported.h](jE)}(h**Note**h]hNote}(hji hhhNhNubah}(h]h ]h"]h$]h&]uh1jDhje ubh: BPF actions require BPF support to be available. If BPF is not available or disabled, the tool falls back to tracefs mode and BPF actions are not supported.}(hje hhhNhNubeh}(h]h ]h"]h$]h&]uh1j hj:hKThjubeh}(h]h ]h"]h$]h&]uh1jhj:hKGhjhhubj)}(h**--stack-format** *format*h](jE)}(h**--stack-format**h]h--stack-format}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jDhj ubh }(hj hhhNhNubjY)}(h*format*h]hformat}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jXhj ubeh}(h]h ]h"]h$]h&]uh1j hj:hKWhjhhubj)}(hXjAdjust the format of the stack trace printed during auto-analysis. The supported values for *format* are: * **truncate** Print the stack trace up to the first unknown address (default). * **skip** Skip unknown addresses. * **full** Print the entire stack trace, including unknown addresses. For unknown addresses, the raw pointer is printed. h](j)}(hBAdjust the format of the stack trace printed during auto-analysis.h]hBAdjust the format of the stack trace printed during auto-analysis.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj:hKYhj ubj)}(h&The supported values for *format* are:h](hThe supported values for }(hj hhhNhNubjY)}(h*format*h]hformat}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jXhj ubh are:}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1j hj:hK[hj ubh bullet_list)}(hhh](h list_item)}(hP**truncate** Print the stack trace up to the first unknown address (default).h]j)}(hj h](jE)}(h **truncate**h]htruncate}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jDhj ubhD Print the stack trace up to the first unknown address (default).}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1j hj:hK]hj ubah}(h]h ]h"]h$]h&]uh1j hj ubj )}(h'**skip** Skip unknown addresses.h]j)}(hj h](jE)}(h**skip**h]hskip}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jDhj ubh Skip unknown addresses.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1j hj:hK^hj ubah}(h]h ]h"]h$]h&]uh1j hj ubj )}(hK**full** Print the entire stack trace, including unknown addresses. h]j)}(hJ**full** Print the entire stack trace, including unknown addresses.h](jE)}(h**full**h]hfull}(hj< hhhNhNubah}(h]h ]h"]h$]h&]uh1jDhj8 ubhB Print the entire stack trace, including unknown addresses.}(hj8 hhhNhNubeh}(h]h ]h"]h$]h&]uh1j hj:hK_hj4 ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]bullet*uh1j hj:hK]hj ubj)}(h2For unknown addresses, the raw pointer is printed.h]h2For unknown addresses, the raw pointer is printed.}(hjb hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj:hKahj ubeh}(h]h ]h"]h$]h&]uh1jhj:hKYhjhhubj)}(h**-q**, **--quiet**h](jE)}(h**-q**h]h-q}(hjz hhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjv ubh, }(hjv hhhNhNubjE)}(h **--quiet**h]h--quiet}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjv ubeh}(h]h ]h"]h$]h&]uh1j h/Documentation/tools/rtla/common_top_options.txthKhjhhubj)}(h0Print only a summary at the end of the session. h]j)}(h/Print only a summary at the end of the session.h]h/Print only a summary at the end of the session.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj hKhj ubah}(h]h ]h"]h$]h&]uh1jhj hKhjhhubj)}(h**-c**, **--cpus** *cpu-list*h](jE)}(h**-c**h]h-c}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jDhj ubh, }(hj hhhNhNubjE)}(h **--cpus**h]h--cpus}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jDhj ubh }(hj hhhNhNubjY)}(h *cpu-list*h]hcpu-list}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jXhj ubeh}(h]h ]h"]h$]h&]uh1j h+Documentation/tools/rtla/common_options.txthKhjhhubj)}(hSet the |tool| tracer to run the sample threads in the cpu-list. By default, the |tool| tracer runs the sample threads on all CPUs. h](j)}(h@Set the |tool| tracer to run the sample threads in the cpu-list.h](hSet the }(hj hhhNhNubh timerlat top}(hj hhhNhNubh2 tracer to run the sample threads in the cpu-list.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1j hj hKhj ubj)}(hBBy default, the |tool| tracer runs the sample threads on all CPUs.h](hBy default, the }(hj hhhNhNubh timerlat top}(hj hhhNhNubh, tracer runs the sample threads on all CPUs.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1j hj hKhj ubeh}(h]h ]h"]h$]h&]uh1jhj hKhjhhubj)}(h&**-H**, **--house-keeping** *cpu-list*h](jE)}(h**-H**h]h-H}(hj0 hhhNhNubah}(h]h ]h"]h$]h&]uh1jDhj, ubh, }(hj, hhhNhNubjE)}(h**--house-keeping**h]h--house-keeping}(hjB hhhNhNubah}(h]h ]h"]h$]h&]uh1jDhj, ubh }(hj, hhhNhNubjY)}(h *cpu-list*h]hcpu-list}(hjT hhhNhNubah}(h]h ]h"]h$]h&]uh1jXhj, ubeh}(h]h ]h"]h$]h&]uh1j hj hKhjhhubj)}(hRun rtla control threads only on the given cpu-list. If omitted, rtla will attempt to auto-migrate its main thread to any CPU that is not running any workload threads. h](j)}(h4Run rtla control threads only on the given cpu-list.h]h4Run rtla control threads only on the given cpu-list.}(hjl hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj hK hjh ubj)}(hrIf omitted, rtla will attempt to auto-migrate its main thread to any CPU that is not running any workload threads.h]hrIf omitted, rtla will attempt to auto-migrate its main thread to any CPU that is not running any workload threads.}(hjz hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj hK hjh ubeh}(h]h ]h"]h$]h&]uh1jhj hK hjhhubj)}(h&**-d**, **--duration** *time[s|m|h|d]*h](jE)}(h**-d**h]h-d}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jDhj ubh, }(hj hhhNhNubjE)}(h**--duration**h]h --duration}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jDhj ubh }(hj hhhNhNubjY)}(h*time[s|m|h|d]*h]h time[s|m|h|d]}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jXhj ubeh}(h]h ]h"]h$]h&]uh1j hj hK hjhhubj)}(h!Set the duration of the session. h]j)}(h Set the duration of the session.h]h Set the duration of the session.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj hKhj ubah}(h]h ]h"]h$]h&]uh1jhj hKhjhhubj)}(h**-D**, **--debug**h](jE)}(h**-D**h]h-D}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jDhj ubh, }(hj hhhNhNubjE)}(h **--debug**h]h--debug}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jDhj ubeh}(h]h ]h"]h$]h&]uh1j hj hKhjhhubj)}(hPrint debug info. h]j)}(hPrint debug info.h]hPrint debug info.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj hKhj ubah}(h]h ]h"]h$]h&]uh1jhj hKhjhhubj)}(h**-e**, **--event** *sys:event*h](jE)}(h**-e**h]h-e}(hj( hhhNhNubah}(h]h ]h"]h$]h&]uh1jDhj$ ubh, }(hj$ hhhNhNubjE)}(h **--event**h]h--event}(hj: hhhNhNubah}(h]h ]h"]h$]h&]uh1jDhj$ ubh }(hj$ hhhNhNubjY)}(h *sys:event*h]h sys:event}(hjL hhhNhNubah}(h]h ]h"]h$]h&]uh1jXhj$ ubeh}(h]h ]h"]h$]h&]uh1j hj hKhjhhubj)}(hEnable an event in the trace (**-t**) session. The argument can be a specific event, e.g., **-e** *sched:sched_switch*, or all events of a system group, e.g., **-e** *sched*. Multiple **-e** are allowed. It is only active when **-t** or **-a** are set. h]j)}(hEnable an event in the trace (**-t**) session. The argument can be a specific event, e.g., **-e** *sched:sched_switch*, or all events of a system group, e.g., **-e** *sched*. Multiple **-e** are allowed. It is only active when **-t** or **-a** are set.h](hEnable an event in the trace (}(hjd hhhNhNubjE)}(h**-t**h]h-t}(hjl hhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjd ubh7) session. The argument can be a specific event, e.g., }(hjd hhhNhNubjE)}(h**-e**h]h-e}(hj~ hhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjd ubh }(hjd hhhNhNubjY)}(h*sched:sched_switch*h]hsched:sched_switch}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjd ubh), or all events of a system group, e.g., }(hjd hhhNhNubjE)}(h**-e**h]h-e}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjd ubh }hjd sbjY)}(h*sched*h]hsched}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjd ubh . Multiple }(hjd hhhNhNubjE)}(h**-e**h]h-e}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjd ubh% are allowed. It is only active when }(hjd hhhNhNubjE)}(h**-t**h]h-t}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjd ubh or }(hjd hhhNhNubjE)}(h**-a**h]h-a}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjd ubh are set.}(hjd hhhNhNubeh}(h]h ]h"]h$]h&]uh1j hj hKhj` ubah}(h]h ]h"]h$]h&]uh1jhj hKhjhhubj)}(h**--filter** **h](jE)}(h **--filter**h]h--filter}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jDhj ubh }(hj hhhNhNubjY)}(h **h]h}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jXhj ubeh}(h]h ]h"]h$]h&]uh1j hj hKhjhhubj)}(hFilter the previous **-e** *sys:event* event with **. For further information about event filtering see https://www.kernel.org/doc/html/latest/trace/events.html#event-filtering. h]j)}(hFilter the previous **-e** *sys:event* event with **. For further information about event filtering see https://www.kernel.org/doc/html/latest/trace/events.html#event-filtering.h](hFilter the previous }(hj6 hhhNhNubjE)}(h**-e**h]h-e}(hj> hhhNhNubah}(h]h ]h"]h$]h&]uh1jDhj6 ubh }(hj6 hhhNhNubjY)}(h *sys:event*h]h sys:event}(hjP hhhNhNubah}(h]h ]h"]h$]h&]uh1jXhj6 ubh event with }(hj6 hhhNhNubjY)}(h **h]h}(hjb hhhNhNubah}(h]h ]h"]h$]h&]uh1jXhj6 ubh4. For further information about event filtering see }(hj6 hhhNhNubh reference)}(hHhttps://www.kernel.org/doc/html/latest/trace/events.html#event-filteringh]hHhttps://www.kernel.org/doc/html/latest/trace/events.html#event-filtering}(hjv hhhNhNubah}(h]h ]h"]h$]h&]refurijx uh1jt hj6 ubh.}(hj6 hhhNhNubeh}(h]h ]h"]h$]h&]uh1j hj hKhj2 ubah}(h]h ]h"]h$]h&]uh1jhj hKhjhhubj)}(hhh]j)}(hXj**--trigger** ** Enable a trace event trigger to the previous **-e** *sys:event*. If the *hist:* trigger is activated, the output histogram will be automatically saved to a file named *system_event_hist.txt*. For example, the command: rtla -t -e osnoise:irq_noise --trigger="hist:key=desc,duration/1000:sort=desc,duration/1000:vals=hitcount" Will automatically save the content of the histogram associated to *osnoise:irq_noise* event in *osnoise_irq_noise_hist.txt*. For further information about event trigger see https://www.kernel.org/doc/html/latest/trace/events.html#event-triggers. h](j)}(h**--trigger** **h](jE)}(h **--trigger**h]h --trigger}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jDhj ubh }(hj hhhNhNubjY)}(h **h]h }(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jXhj ubeh}(h]h ]h"]h$]h&]uh1jhj hK&hj ubj)}(hhh](j)}(hEnable a trace event trigger to the previous **-e** *sys:event*. If the *hist:* trigger is activated, the output histogram will be automatically saved to a file named *system_event_hist.txt*. For example, the command:h](h-Enable a trace event trigger to the previous }(hj hhhNhNubjE)}(h**-e**h]h-e}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jDhj ubh }(hj hhhNhNubjY)}(h *sys:event*h]h sys:event}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jXhj ubh . If the }(hj hhhNhNubjY)}(h*hist:*h]hhist:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jXhj ubhX trigger is activated, the output histogram will be automatically saved to a file named }(hj hhhNhNubjY)}(h*system_event_hist.txt*h]hsystem_event_hist.txt}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhj ubh. For example, the command:}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1j hj hKhj ubj)}(h{rtla -t -e osnoise:irq_noise --trigger="hist:key=desc,duration/1000:sort=desc,duration/1000:vals=hitcount"h]hrtla -t -e osnoise:irq_noise --trigger=”hist:key=desc,duration/1000:sort=desc,duration/1000:vals=hitcount”}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hj hK"hj ubj)}(h}Will automatically save the content of the histogram associated to *osnoise:irq_noise* event in *osnoise_irq_noise_hist.txt*.h](hCWill automatically save the content of the histogram associated to }(hj-hhhNhNubjY)}(h*osnoise:irq_noise*h]hosnoise:irq_noise}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jXhj-ubh event in }(hj-hhhNhNubjY)}(h*osnoise_irq_noise_hist.txt*h]hosnoise_irq_noise_hist.txt}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhj-ubh.}(hj-hhhNhNubeh}(h]h ]h"]h$]h&]uh1j hj hK$hj ubj)}(hxFor further information about event trigger see https://www.kernel.org/doc/html/latest/trace/events.html#event-triggers.h](h0For further information about event trigger see }(hj_hhhNhNubju )}(hGhttps://www.kernel.org/doc/html/latest/trace/events.html#event-triggersh]hGhttps://www.kernel.org/doc/html/latest/trace/events.html#event-triggers}(hjghhhNhNubah}(h]h ]h"]h$]h&]refurijiuh1jt hj_ubh.}(hj_hhhNhNubeh}(h]h ]h"]h$]h&]uh1j hj hK&hj ubeh}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hK&hj ubah}(h]h ]h"]h$]h&]uh1jhjhhhj hNubj)}(h>**-P**, **--priority** *o:prio|r:prio|f:prio|d:runtime:period*h](jE)}(h**-P**h]h-P}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjubh, }(hjhhhNhNubjE)}(h**--priority**h]h --priority}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjubh }(hjhhhNhNubjY)}(h'*o:prio|r:prio|f:prio|d:runtime:period*h]h%o:prio|r:prio|f:prio|d:runtime:period}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjubeh}(h]h ]h"]h$]h&]uh1j hj hK(hjhhubj)}(hXSet scheduling parameters to the |tool| tracer threads, the format to set the priority are: - *o:prio* - use SCHED_OTHER with *prio*; - *r:prio* - use SCHED_RR with *prio*; - *f:prio* - use SCHED_FIFO with *prio*; - *d:runtime[us|ms|s]:period[us|ms|s]* - use SCHED_DEADLINE with *runtime* and *period* in nanoseconds. If not set, tracer threads keep their default priority. For rtla user threads, it is set to SCHED_FIFO with priority 95. For kernel threads, see *osnoise* and *timerlat* tracer documentation for the running kernel version. h](j)}(h[Set scheduling parameters to the |tool| tracer threads, the format to set the priority are:h](h!Set scheduling parameters to the }(hjhhhNhNubh timerlat top}(hjhhhNhNubh4 tracer threads, the format to set the priority are:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j hj hK*hjubj )}(hhh](j )}(h'*o:prio* - use SCHED_OTHER with *prio*;h]j)}(hjh](jY)}(h*o:prio*h]ho:prio}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjubh - use SCHED_OTHER with }(hjhhhNhNubjY)}(h*prio*h]hprio}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjubh;}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j hj hK,hjubah}(h]h ]h"]h$]h&]uh1j hjubj )}(h$*r:prio* - use SCHED_RR with *prio*;h]j)}(hj$h](jY)}(h*r:prio*h]hr:prio}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jXhj&ubh - use SCHED_RR with }(hj&hhhNhNubjY)}(h*prio*h]hprio}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jXhj&ubh;}(hj&hhhNhNubeh}(h]h ]h"]h$]h&]uh1j hj hK-hj"ubah}(h]h ]h"]h$]h&]uh1j hjubj )}(h&*f:prio* - use SCHED_FIFO with *prio*;h]j)}(hj[h](jY)}(h*f:prio*h]hf:prio}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1jXhj]ubh - use SCHED_FIFO with }(hj]hhhNhNubjY)}(h*prio*h]hprio}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhj]ubh;}(hj]hhhNhNubeh}(h]h ]h"]h$]h&]uh1j hj hK.hjYubah}(h]h ]h"]h$]h&]uh1j hjubj )}(hf*d:runtime[us|ms|s]:period[us|ms|s]* - use SCHED_DEADLINE with *runtime* and *period* in nanoseconds. h]j)}(he*d:runtime[us|ms|s]:period[us|ms|s]* - use SCHED_DEADLINE with *runtime* and *period* in nanoseconds.h](jY)}(h$*d:runtime[us|ms|s]:period[us|ms|s]*h]h"d:runtime[us|ms|s]:period[us|ms|s]}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjubh - use SCHED_DEADLINE with }(hjhhhNhNubjY)}(h *runtime*h]hruntime}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjubh and }(hjhhhNhNubjY)}(h*period*h]hperiod}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjubh in nanoseconds.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j hj hK/hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]j` -uh1j hj hK,hjubj)}(hIf not set, tracer threads keep their default priority. For rtla user threads, it is set to SCHED_FIFO with priority 95. For kernel threads, see *osnoise* and *timerlat* tracer documentation for the running kernel version.h](hIf not set, tracer threads keep their default priority. For rtla user threads, it is set to SCHED_FIFO with priority 95. For kernel threads, see }(hjhhhNhNubjY)}(h *osnoise*h]hosnoise}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjubh and }(hjhhhNhNubjY)}(h *timerlat*h]htimerlat}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjubh5 tracer documentation for the running kernel version.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j hj hK1hjubeh}(h]h ]h"]h$]h&]uh1jhj hK*hjhhubj)}(h **-C**, **--cgroup** \[*cgroup*]h](jE)}(h**-C**h]h-C}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjubh, }(hjhhhNhNubjE)}(h **--cgroup**h]h--cgroup}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjubh [}(hjhhhNhNubjY)}(h*cgroup*h]hcgroup}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjubh]}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j hj hK3hjhhubj)}(hXSet a *cgroup* to the tracer's threads. If the **-C** option is passed without arguments, the tracer's thread will inherit **rtla**'s *cgroup*. Otherwise, the threads will be placed on the *cgroup* passed to the option. If not set, the behavior differs between workload types. User workloads created by rtla will inherit rtla's cgroup. Kernel workloads are assigned the root cgroup. h](j)}(hSet a *cgroup* to the tracer's threads. If the **-C** option is passed without arguments, the tracer's thread will inherit **rtla**'s *cgroup*. Otherwise, the threads will be placed on the *cgroup* passed to the option.h](hSet a }(hj]hhhNhNubjY)}(h*cgroup*h]hcgroup}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1jXhj]ubh# to the tracer’s threads. If the }(hj]hhhNhNubjE)}(h**-C**h]h-C}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1jDhj]ubhH option is passed without arguments, the tracer’s thread will inherit }(hj]hhhNhNubjE)}(h**rtla**h]hrtla}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jDhj]ubh’s }(hj]hhhNhNubjY)}(h*cgroup*h]hcgroup}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhj]ubh/. Otherwise, the threads will be placed on the }(hj]hhhNhNubjY)}(h*cgroup*h]hcgroup}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhj]ubh passed to the option.}(hj]hhhNhNubeh}(h]h ]h"]h$]h&]uh1j hj hK5hjYubj)}(hIf not set, the behavior differs between workload types. User workloads created by rtla will inherit rtla's cgroup. Kernel workloads are assigned the root cgroup.h]hIf not set, the behavior differs between workload types. User workloads created by rtla will inherit rtla’s cgroup. Kernel workloads are assigned the root cgroup.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hj hK7hjYubeh}(h]h ]h"]h$]h&]uh1jhj hK5hjhhubj)}(h**--warm-up** *s*h](jE)}(h **--warm-up**h]h --warm-up}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjubh }(hjhhhNhNubjY)}(h*s*h]hs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjubeh}(h]h ]h"]h$]h&]uh1j hj hK9hjhhubj)}(hAfter starting the workload, let it run for *s* seconds before starting collecting the data, allowing the system to warm-up. Statistical data generated during warm-up is discarded. h]j)}(hAfter starting the workload, let it run for *s* seconds before starting collecting the data, allowing the system to warm-up. Statistical data generated during warm-up is discarded.h](h,After starting the workload, let it run for }(hjhhhNhNubjY)}(h*s*h]hs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjubh seconds before starting collecting the data, allowing the system to warm-up. Statistical data generated during warm-up is discarded.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j hj hK;hjubah}(h]h ]h"]h$]h&]uh1jhj hK;hjhhubj)}(hhh]j)}(h**--trace-buffer-size** *kB* Set the per-cpu trace buffer size in kB for the tracing output. If not set, the default tracefs buffer size is used. h](j)}(h**--trace-buffer-size** *kB*h](jE)}(h**--trace-buffer-size**h]h--trace-buffer-size}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jDhj4ubh }(hj4hhhNhNubjY)}(h*kB*h]hkB}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhj4ubeh}(h]h ]h"]h$]h&]uh1jhj hK@hj0ubj)}(hhh](j)}(h?Set the per-cpu trace buffer size in kB for the tracing output.h]h?Set the per-cpu trace buffer size in kB for the tracing output.}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1j hj hK>hj^ubj)}(h4If not set, the default tracefs buffer size is used.h]h4If not set, the default tracefs buffer size is used.}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1j hj hK@hj^ubeh}(h]h ]h"]h$]h&]uh1jhj0ubeh}(h]h ]h"]h$]h&]uh1jhj hK@hj-ubah}(h]h ]h"]h$]h&]uh1jhjhhhj hNubj)}(h**--on-threshold** *action*h](jE)}(h**--on-threshold**h]h--on-threshold}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjubh }(hjhhhNhNubjY)}(h*action*h]haction}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjubeh}(h]h ]h"]h$]h&]uh1j hj hKBhjhhubj)}(hXDefines an action to be executed when tracing is stopped on a latency threshold specified by |threshold|. Multiple --on-threshold actions may be specified, and they will be executed in the order they are provided. If any action fails, subsequent actions in the list will not be executed. Supported actions are: - *trace[,file=]* Saves trace output, optionally taking a filename. Alternative to -t/--trace. Note that unlike -t/--trace, specifying this multiple times will result in the trace being saved multiple times. - *signal,num=,pid=* Sends signal to process. "parent" might be specified in place of pid to target the parent process of rtla. - *shell,command=* Execute shell command. - *continue* Continue tracing after actions are executed instead of stopping. Example: $ rtla |tool| |thresharg| 20 --on-threshold trace --on-threshold shell,command="grep ipi_send |tracer|\_trace.txt" --on-threshold signal,num=2,pid=parent This will save a trace with the default filename "|tracer|\_trace.txt", print its lines that contain the text "ipi_send" on standard output, and send signal 2 (SIGINT) to the parent process. Performance Considerations: |actionsperf| h](j)}(hiDefines an action to be executed when tracing is stopped on a latency threshold specified by |threshold|.h](h]Defines an action to be executed when tracing is stopped on a latency threshold specified by }(hjhhhNhNubjE)}(hjh]h -a/--auto}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jDhNhNhjhhubh, }(hjhhhNhNubjE)}(hjh]h-i/--irq}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jDhNhNhjhhubh, or }(hjhhhNhNubjE)}(hj'h]h -T/--thread}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jDhNhNhjhhubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j hj hKDhjubj)}(hMultiple --on-threshold actions may be specified, and they will be executed in the order they are provided. If any action fails, subsequent actions in the list will not be executed.h]hMultiple --on-threshold actions may be specified, and they will be executed in the order they are provided. If any action fails, subsequent actions in the list will not be executed.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hj hKGhjubj)}(hSupported actions are:h]hSupported actions are:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj hKKhjubj )}(hhh](j )}(h*trace[,file=]* Saves trace output, optionally taking a filename. Alternative to -t/--trace. Note that unlike -t/--trace, specifying this multiple times will result in the trace being saved multiple times. h](j)}(h*trace[,file=]*h]jY)}(hj#h]htrace[,file=]}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jXhj!ubah}(h]h ]h"]h$]h&]uh1j hj hKMhjubj)}(hSaves trace output, optionally taking a filename. Alternative to -t/--trace. Note that unlike -t/--trace, specifying this multiple times will result in the trace being saved multiple times.h]hSaves trace output, optionally taking a filename. Alternative to -t/--trace. Note that unlike -t/--trace, specifying this multiple times will result in the trace being saved multiple times.}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj hKOhjubeh}(h]h ]h"]h$]h&]uh1j hjubj )}(h*signal,num=,pid=* Sends signal to process. "parent" might be specified in place of pid to target the parent process of rtla. h](j)}(h*signal,num=,pid=*h]jY)}(hjRh]hsignal,num=,pid=}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjPubah}(h]h ]h"]h$]h&]uh1j hj hKShjLubj)}(hjSends signal to process. "parent" might be specified in place of pid to target the parent process of rtla.h]hnSends signal to process. “parent” might be specified in place of pid to target the parent process of rtla.}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1j hj hKUhjLubeh}(h]h ]h"]h$]h&]uh1j hjubj )}(h2*shell,command=* Execute shell command. h](j)}(h*shell,command=*h]jY)}(hjh]hshell,command=}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjubah}(h]h ]h"]h$]h&]uh1j hj hKXhj{ubj)}(hExecute shell command.h]hExecute shell command.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hj hKZhj{ubeh}(h]h ]h"]h$]h&]uh1j hjubj )}(hM*continue* Continue tracing after actions are executed instead of stopping. h](j)}(h *continue*h]jY)}(hjh]hcontinue}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjubah}(h]h ]h"]h$]h&]uh1j hj hK\hjubj)}(h@Continue tracing after actions are executed instead of stopping.h]h@Continue tracing after actions are executed instead of stopping.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hj hK^hjubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]j` juh1j hj hKMhjubj)}(hExample:h]hExample:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hj hK`hjubj)}(h$ rtla |tool| |thresharg| 20 --on-threshold trace --on-threshold shell,command="grep ipi_send |tracer|\_trace.txt" --on-threshold signal,num=2,pid=parenth](h$ rtla }(hjhhhNhNubh timerlat top}(hjhhhNhNubh }(hjhhhNhNubh-T}(hjhhhNhNubhG 20 --on-threshold trace --on-threshold shell,command=”grep ipi_send }(hjhhhNhNubhtimerlat}(hjhhhNhNubh5_trace.txt” --on-threshold signal,num=2,pid=parent}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j hj hKbhjubj)}(hThis will save a trace with the default filename "|tracer|\_trace.txt", print its lines that contain the text "ipi_send" on standard output, and send signal 2 (SIGINT) to the parent process.h](h4This will save a trace with the default filename “}(hjhhhNhNubhtimerlat}(hjhhhNhNubh_trace.txt”, print its lines that contain the text “ipi_send” on standard output, and send signal 2 (SIGINT) to the parent process.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j hj hKfhjubj)}(hPerformance Considerations:h]hPerformance Considerations:}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj hKjhjubj)}(h |actionsperf|h](h5For time-sensitive actions, it is recommended to run }(hj7hhhNhNubjE)}(hjch]h rtla timerlat}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jDhNhNhj7hhubh with BPF support and RT priority. Note that due to implementational limitations, actions might be delayed up to one second after tracing is stopped if BPF mode is not available or disabled.}(hj7hhhNhNubeh}(h]h ]h"]h$]h&]uh1j hj hKlhjubeh}(h]h ]h"]h$]h&]uh1jhj hKDhjhhubj)}(h**--on-end** *action*h](jE)}(h **--on-end**h]h--on-end}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1jDhj\ubh }(hj\hhhNhNubjY)}(h*action*h]haction}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhj\ubeh}(h]h ]h"]h$]h&]uh1j hj hKnhjhhubj)}(hXDefines an action to be executed at the end of tracing. Multiple --on-end actions can be specified, and they will be executed in the order they are provided. If any action fails, subsequent actions in the list will not be executed. See the documentation for **--on-threshold** for the list of supported actions, with the exception that *continue* has no effect. Example: $ rtla |tool| -d 5s --on-end trace This runs rtla with the default options, and saves trace output at the end. h](j)}(h7Defines an action to be executed at the end of tracing.h]h7Defines an action to be executed at the end of tracing.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hj hKphjubj)}(hMultiple --on-end actions can be specified, and they will be executed in the order they are provided. If any action fails, subsequent actions in the list will not be executed.h]hMultiple --on-end actions can be specified, and they will be executed in the order they are provided. If any action fails, subsequent actions in the list will not be executed.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hj hKrhjubj)}(hSee the documentation for **--on-threshold** for the list of supported actions, with the exception that *continue* has no effect.h](hSee the documentation for }(hjhhhNhNubjE)}(h**--on-threshold**h]h--on-thresholde}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjubh< for the list of supported actions, with the exception that }(hjhhhNhNubjY)}(h *continue*h]hcontinue}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjubh has no effect.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j hj hKvhjubj)}(hExample:h]hExample:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hj hKyhjubj)}(h"$ rtla |tool| -d 5s --on-end traceh](h$ rtla }(hjhhhNhNubh timerlat top}(hjhhhNhNubh -d 5s --on-end trace}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j hj hK{hjubj)}(hKThis runs rtla with the default options, and saves trace output at the end.h]hKThis runs rtla with the default options, and saves trace output at the end.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hj hK}hjubeh}(h]h ]h"]h$]h&]uh1jhj hKphjhhubj)}(h**-h**, **--help**h](jE)}(h**-h**h]h-h}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjubh, }(hjhhhNhNubjE)}(h **--help**h]h--help}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjubeh}(h]h ]h"]h$]h&]uh1j hj hKhjhhubj)}(hPrint help menu. h]j)}(hPrint help menu.h]hPrint help menu.}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj hKhj:ubah}(h]h ]h"]h$]h&]uh1jhj hKhjhhubj)}(h**--dump-tasks**h]jE)}(hjTh]h --dump-tasks}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjRubah}(h]h ]h"]h$]h&]uh1j h/Documentation/tools/rtla/common_timerlat_aa.txthKhjhhubj)}(hUprints the task running on all CPUs if stop conditions are met (depends on !--no-aa) h]j)}(hTprints the task running on all CPUs if stop conditions are met (depends on !--no-aa)h]hTprints the task running on all CPUs if stop conditions are met (depends on !--no-aa)}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjihKhjjubah}(h]h ]h"]h$]h&]uh1jhjihKhjhhubj)}(h **--no-aa**h]jE)}(hjh]h--no-aa}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjubah}(h]h ]h"]h$]h&]uh1j hjihKhjhhubj)}(h8disable auto-analysis, reducing rtla timerlat cpu usage h]j)}(h7disable auto-analysis, reducing rtla timerlat cpu usageh]h7disable auto-analysis, reducing rtla timerlat cpu usage}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjihKhjubah}(h]h ]h"]h$]h&]uh1jhjihKhjhhubj)}(h**--aa-only** *us*h](jE)}(h **--aa-only**h]h --aa-only}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjubh }(hjhhhNhNubjY)}(h*us*h]hus}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjubeh}(h]h ]h"]h$]h&]uh1j hhhK%hjhhubj)}(hXSet stop tracing conditions and run without collecting and displaying statistics. Print the auto-analysis if the system hits the stop tracing condition. This option is useful to reduce rtla timerlat CPU, enabling the debug without the overhead of collecting the statistics. h]j)}(hXSet stop tracing conditions and run without collecting and displaying statistics. Print the auto-analysis if the system hits the stop tracing condition. This option is useful to reduce rtla timerlat CPU, enabling the debug without the overhead of collecting the statistics.h]hXSet stop tracing conditions and run without collecting and displaying statistics. Print the auto-analysis if the system hits the stop tracing condition. This option is useful to reduce rtla timerlat CPU, enabling the debug without the overhead of collecting the statistics.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hhhK'hjubah}(h]h ]h"]h$]h&]uh1jhhhK'hjhhubeh}(h]optionsah ]h"]optionsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hEXAMPLEh]hEXAMPLE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK-ubj)}(hIn the example below, the timerlat tracer is dispatched in cpus *1-23* in the automatic trace mode, instructing the tracer to stop if a *40 us* latency or higher is found::h](h@In the example below, the timerlat tracer is dispatched in cpus }(hj hhhNhNubjY)}(h*1-23*h]h1-23}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhj ubhB in the automatic trace mode, instructing the tracer to stop if a }(hj hhhNhNubjY)}(h*40 us*h]h40 us}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jXhj ubh latency or higher is found:}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1j hhhK/hjhhubh literal_block)}(hX# timerlat -a 40 -c 1-23 -q Timer Latency 0 00:00:12 | IRQ Timer Latency (us) | Thread Timer Latency (us) CPU COUNT | cur min avg max | cur min avg max 1 #12322 | 0 0 1 15 | 10 3 9 31 2 #12322 | 3 0 1 12 | 10 3 9 23 3 #12322 | 1 0 1 21 | 8 2 8 34 4 #12322 | 1 0 1 17 | 10 2 11 33 5 #12322 | 0 0 1 12 | 8 3 8 25 6 #12322 | 1 0 1 14 | 16 3 11 35 7 #12322 | 0 0 1 14 | 9 2 8 29 8 #12322 | 1 0 1 22 | 9 3 9 34 9 #12322 | 0 0 1 14 | 8 2 8 24 10 #12322 | 1 0 0 12 | 9 3 8 24 11 #12322 | 0 0 0 15 | 6 2 7 29 12 #12321 | 1 0 0 13 | 5 3 8 23 13 #12319 | 0 0 1 14 | 9 3 9 26 14 #12321 | 1 0 0 13 | 6 2 8 24 15 #12321 | 1 0 1 15 | 12 3 11 27 16 #12318 | 0 0 1 13 | 7 3 10 24 17 #12319 | 0 0 1 13 | 11 3 9 25 18 #12318 | 0 0 0 12 | 8 2 8 20 19 #12319 | 0 0 1 18 | 10 2 9 28 20 #12317 | 0 0 0 20 | 9 3 8 34 21 #12318 | 0 0 0 13 | 8 3 8 28 22 #12319 | 0 0 1 11 | 8 3 10 22 23 #12320 | 28 0 1 28 | 41 3 11 41 rtla timerlat hit stop tracing ## CPU 23 hit stop tracing, analyzing it ## IRQ handler delay: 27.49 us (65.52 %) IRQ latency: 28.13 us Timerlat IRQ duration: 9.59 us (22.85 %) Blocking thread: 3.79 us (9.03 %) objtool:49256 3.79 us Blocking thread stacktrace -> timerlat_irq -> __hrtimer_run_queues -> hrtimer_interrupt -> __sysvec_apic_timer_interrupt -> sysvec_apic_timer_interrupt -> asm_sysvec_apic_timer_interrupt -> _raw_spin_unlock_irqrestore -> cgroup_rstat_flush_locked -> cgroup_rstat_flush_irqsafe -> mem_cgroup_flush_stats -> mem_cgroup_wb_stats -> balance_dirty_pages -> balance_dirty_pages_ratelimited_flags -> btrfs_buffered_write -> btrfs_do_write_iter -> vfs_write -> __x64_sys_pwrite64 -> do_syscall_64 -> entry_SYSCALL_64_after_hwframe ------------------------------------------------------------------------ Thread latency: 41.96 us (100%) The system has exit from idle latency! Max timerlat IRQ latency from idle: 17.48 us in cpu 4 Saving trace to timerlat_trace.txth]hX# timerlat -a 40 -c 1-23 -q Timer Latency 0 00:00:12 | IRQ Timer Latency (us) | Thread Timer Latency (us) CPU COUNT | cur min avg max | cur min avg max 1 #12322 | 0 0 1 15 | 10 3 9 31 2 #12322 | 3 0 1 12 | 10 3 9 23 3 #12322 | 1 0 1 21 | 8 2 8 34 4 #12322 | 1 0 1 17 | 10 2 11 33 5 #12322 | 0 0 1 12 | 8 3 8 25 6 #12322 | 1 0 1 14 | 16 3 11 35 7 #12322 | 0 0 1 14 | 9 2 8 29 8 #12322 | 1 0 1 22 | 9 3 9 34 9 #12322 | 0 0 1 14 | 8 2 8 24 10 #12322 | 1 0 0 12 | 9 3 8 24 11 #12322 | 0 0 0 15 | 6 2 7 29 12 #12321 | 1 0 0 13 | 5 3 8 23 13 #12319 | 0 0 1 14 | 9 3 9 26 14 #12321 | 1 0 0 13 | 6 2 8 24 15 #12321 | 1 0 1 15 | 12 3 11 27 16 #12318 | 0 0 1 13 | 7 3 10 24 17 #12319 | 0 0 1 13 | 11 3 9 25 18 #12318 | 0 0 0 12 | 8 2 8 20 19 #12319 | 0 0 1 18 | 10 2 9 28 20 #12317 | 0 0 0 20 | 9 3 8 34 21 #12318 | 0 0 0 13 | 8 3 8 28 22 #12319 | 0 0 1 11 | 8 3 10 22 23 #12320 | 28 0 1 28 | 41 3 11 41 rtla timerlat hit stop tracing ## CPU 23 hit stop tracing, analyzing it ## IRQ handler delay: 27.49 us (65.52 %) IRQ latency: 28.13 us Timerlat IRQ duration: 9.59 us (22.85 %) Blocking thread: 3.79 us (9.03 %) objtool:49256 3.79 us Blocking thread stacktrace -> timerlat_irq -> __hrtimer_run_queues -> hrtimer_interrupt -> __sysvec_apic_timer_interrupt -> sysvec_apic_timer_interrupt -> asm_sysvec_apic_timer_interrupt -> _raw_spin_unlock_irqrestore -> cgroup_rstat_flush_locked -> cgroup_rstat_flush_irqsafe -> mem_cgroup_flush_stats -> mem_cgroup_wb_stats -> balance_dirty_pages -> balance_dirty_pages_ratelimited_flags -> btrfs_buffered_write -> btrfs_do_write_iter -> vfs_write -> __x64_sys_pwrite64 -> do_syscall_64 -> entry_SYSCALL_64_after_hwframe ------------------------------------------------------------------------ Thread latency: 41.96 us (100%) The system has exit from idle latency! Max timerlat IRQ latency from idle: 17.48 us in cpu 4 Saving trace to timerlat_trace.txt}hj@sbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1j>hhhK3hjhhubj)}(hXIn this case, the major factor was the delay suffered by the *IRQ handler* that handles **timerlat** wakeup: *65.52%*. This can be caused by the current thread masking interrupts, which can be seen in the blocking thread stacktrace: the current thread (*objtool:49256*) disabled interrupts via *raw spin lock* operations inside mem cgroup, while doing write syscall in a btrfs file system.h](h=In this case, the major factor was the delay suffered by the }(hjPhhhNhNubjY)}(h *IRQ handler*h]h IRQ handler}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjPubh that handles }(hjPhhhNhNubjE)}(h **timerlat**h]htimerlat}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjPubh wakeup: }(hjPhhhNhNubjY)}(h*65.52%*h]h65.52%}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjPubh. This can be caused by the current thread masking interrupts, which can be seen in the blocking thread stacktrace: the current thread (}(hjPhhhNhNubjY)}(h*objtool:49256*h]h objtool:49256}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjPubh) disabled interrupts via }(hjPhhhNhNubjY)}(h*raw spin lock*h]h raw spin lock}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjPubhP operations inside mem cgroup, while doing write syscall in a btrfs file system.}(hjPhhhNhNubeh}(h]h ]h"]h$]h&]uh1j hhhKphjhhubj)}(hOThe raw trace is saved in the **timerlat_trace.txt** file for further analysis.h](hThe raw trace is saved in the }(hjhhhNhNubjE)}(h**timerlat_trace.txt**h]htimerlat_trace.txt}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjubh file for further analysis.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j hhhKwhjhhubj)}(hXNote that **rtla timerlat** was dispatched without changing *timerlat* tracer threads' priority. That is generally not needed because these threads have priority *FIFO:95* by default, which is a common priority used by real-time kernel developers to analyze scheduling delays.h](h Note that }(hjhhhNhNubjE)}(h**rtla timerlat**h]h rtla timerlat}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjubh! was dispatched without changing }(hjhhhNhNubjY)}(h *timerlat*h]htimerlat}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjubh^ tracer threads’ priority. That is generally not needed because these threads have priority }(hjhhhNhNubjY)}(h *FIFO:95*h]hFIFO:95}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jXhjubhi by default, which is a common priority used by real-time kernel developers to analyze scheduling delays.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j hhhKyhjhhubh)}(hhh](h)}(hSEE ALSOh]hSEE ALSO}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubj)}(h1**rtla-timerlat**\(1), **rtla-timerlat-hist**\(1)h](jE)}(h**rtla-timerlat**h]h rtla-timerlat}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jDhj-ubh(1), }(hj-hhhNhNubjE)}(h**rtla-timerlat-hist**h]hrtla-timerlat-hist}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1jDhj-ubh(1)}(hj-hhhNhNubeh}(h]h ]h"]h$]h&]uh1j hhhKhjhhubj)}(hH`Timerlat tracer `__h]ju )}(hj]h]hTimerlat tracer}(hj_hhhNhNubah}(h]h ]h"]h$]h&]nameTimerlat tracerrefuri2https://docs.kernel.org/trace/timerlat-tracer.htmluh1jt hj[ubah}(h]h ]h"]h$]h&]uh1j hhhKhjhhubeh}(h]see-alsoah ]h"]see alsoah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(hAUTHORh]hAUTHOR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj~hhhhhKubj)}(h:Written by Daniel Bristot de Oliveira h](h'Written by Daniel Bristot de Oliveira <}(hjhhhNhNubju )}(hbristot@kernel.orgh]hbristot@kernel.org}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurimailto:bristot@kernel.orguh1jt hjubh>}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j hhhKhj~hhubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hjsbah}(h]h ]h"]h$]h&]jNjOuh1jhj~hhh,Documentation/tools/rtla/common_appendix.txthKubeh}(h]authorah ]h"]authorah$]h&]uh1hhjhhhhhKubeh}(h]exampleah ]h"]exampleah$]h&]uh1hhhhhhhhK-ubh)}(hhh](h)}(hSIGINT BEHAVIORh]hSIGINT BEHAVIOR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhjhKubj)}(hqOn the first SIGINT, RTLA exits after collecting all outstanding samples up to the point of receiving the signal.h]hqOn the first SIGINT, RTLA exits after collecting all outstanding samples up to the point of receiving the signal.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjhKhjhhubj)}(hWhen receiving more than one SIGINT, RTLA discards any outstanding samples, and exits while displaying only samples that have already been processed.h]hWhen receiving more than one SIGINT, RTLA discards any outstanding samples, and exits while displaying only samples that have already been processed.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjhK hjhhubj)}(haIf SIGINT is received during RTLA cleanup, RTLA exits immediately via the default signal handler.h]haIf SIGINT is received during RTLA cleanup, RTLA exits immediately via the default signal handler.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjhK hjhhubj)}(hXNote: For the purpose of SIGINT behavior, the expiry of duration specified via the -d/--duration option is treated as equivalent to receiving a SIGINT. For example, a SIGINT received after duration expired but samples have not been processed yet will drop any outstanding samples.h]hXNote: For the purpose of SIGINT behavior, the expiry of duration specified via the -d/--duration option is treated as equivalent to receiving a SIGINT. For example, a SIGINT received after duration expired but samples have not been processed yet will drop any outstanding samples.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjhKhjhhubj)}(hAlso note that when using the timerlat tool in BPF mode, samples are processed in-kernel; RTLA only copies them out to display them to the user. A second SIGINT does not affect in-kernel sample aggregation.h]hAlso note that when using the timerlat tool in BPF mode, samples are processed in-kernel; RTLA only copies them out to display them to the user. A second SIGINT does not affect in-kernel sample aggregation.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjhKhjhhubeh}(h]sigint-behaviorah ]h"]sigint behaviorah$]h&]uh1hhhhhhjhKubh)}(hhh](h)}(h EXIT STATUSh]h EXIT STATUS}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1hhhjhKubj?)}(h0 Passed: the test did not hit the stop tracing condition 1 Error: invalid argument 2 Failed: the test hit the stop tracing conditionh]h0 Passed: the test did not hit the stop tracing condition 1 Error: invalid argument 2 Failed: the test hit the stop tracing condition}hjBsbah}(h]h ]h"]h$]h&]jNjOuh1j>hjhKhj1hhubeh}(h] exit-statusah ]h"] exit statusah$]h&]uh1hhhhhhjhKubh)}(hhh](h)}(hREPORTING BUGSh]hREPORTING BUGS}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjXhhhjhK"ubj)}(hUReport bugs to and h](hReport bugs to <}(hjihhhNhNubju )}(hlinux-kernel@vger.kernel.orgh]hlinux-kernel@vger.kernel.org}(hjqhhhNhNubah}(h]h ]h"]h$]h&]refuri#mailto:linux-kernel@vger.kernel.orguh1jt hjiubh> and <}(hjihhhNhNubju )}(h!linux-trace-devel@vger.kernel.orgh]h!linux-trace-devel@vger.kernel.org}(hjhhhNhNubah}(h]h ]h"]h$]h&]refuri(mailto:linux-trace-devel@vger.kernel.orguh1jt hjiubh>}(hjihhhNhNubeh}(h]h ]h"]h$]h&]uh1j hjhK#hjXhhubeh}(h]reporting-bugsah ]h"]reporting bugsah$]h&]uh1hhhhhhjhK"ubh)}(hhh](h)}(hLICENSEh]hLICENSE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhjhK'ubj)}(h6**rtla** is Free Software licensed under the GNU GPLv2h](jE)}(h**rtla**h]hrtla}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jDhjubh. is Free Software licensed under the GNU GPLv2}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j hjhK(hjhhubeh}(h]licenseah ]h"]licenseah$]h&]uh1hhhhhhjhK'ubh)}(hhh](h)}(hCOPYINGh]hCOPYING}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhjhK+ubj)}(hwCopyright \(C) 2021 Red Hat, Inc. Free use of this software is granted under the terms of the GNU Public License (GPL).h]hwCopyright (C) 2021 Red Hat, Inc. Free use of this software is granted under the terms of the GNU Public License (GPL).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjhK,hjhhubeh}(h]copyingah ]h"]copyingah$]h&]uh1hhhhhhjhK+ubeh}(h]+measures-the-operating-system-timer-latencyah ]h"]+measures the operating system timer latencyah$]h&]uh1hhhhhhhhKubeh}(h]rtla-timerlat-topah ]h"]rtla-timerlat-topah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj6error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourcehƌ _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}(hhj7jjGj;jVjJjwjYusubstitution_names}(toolhÌ thresholdj7 threshargjGtracerjV actionsperfjwurefnames}refids}nameids}(jj jjjwjtjjjjjjj{jxjjj.j+jUjRjjjjjju nametypes}(jjjwjjjj{jj.jUjjjuh}(j hjhjtj/jjzjjjjjxjjj~j+jjRj1jjXjjjju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log].Documentation/tools/rtla/rtla-timerlat-top.rst(NNNNta decorationNhhub.