196b546c2SGopi Krishna Menon**-c**, **--cpus** *cpu-list* 296b546c2SGopi Krishna Menon 33e30aee8STomas Glozar Set the |tool| tracer to run the sample threads in the cpu-list. 496b546c2SGopi Krishna Menon 521d5c65dSTomas Glozar By default, the |tool| tracer runs the sample threads on all CPUs. 621d5c65dSTomas Glozar 796b546c2SGopi Krishna Menon**-H**, **--house-keeping** *cpu-list* 896b546c2SGopi Krishna Menon 996b546c2SGopi Krishna Menon Run rtla control threads only on the given cpu-list. 1096b546c2SGopi Krishna Menon 1121d5c65dSTomas Glozar If omitted, rtla will attempt to auto-migrate its main thread to any CPU that is not running any workload threads. 1221d5c65dSTomas Glozar 1396b546c2SGopi Krishna Menon**-d**, **--duration** *time[s|m|h|d]* 1496b546c2SGopi Krishna Menon 1596b546c2SGopi Krishna Menon Set the duration of the session. 1696b546c2SGopi Krishna Menon 1796b546c2SGopi Krishna Menon**-D**, **--debug** 1896b546c2SGopi Krishna Menon 1996b546c2SGopi Krishna Menon Print debug info. 2096b546c2SGopi Krishna Menon 2196b546c2SGopi Krishna Menon**-e**, **--event** *sys:event* 2296b546c2SGopi Krishna Menon 2396b546c2SGopi Krishna Menon Enable 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. 2496b546c2SGopi Krishna Menon 2596b546c2SGopi Krishna Menon**--filter** *<filter>* 2696b546c2SGopi Krishna Menon 2796b546c2SGopi Krishna Menon Filter the previous **-e** *sys:event* event with *<filter>*. For further information about event filtering see https://www.kernel.org/doc/html/latest/trace/events.html#event-filtering. 2896b546c2SGopi Krishna Menon 2996b546c2SGopi Krishna Menon**--trigger** *<trigger>* 3096b546c2SGopi Krishna Menon Enable a trace event trigger to the previous **-e** *sys:event*. 3196b546c2SGopi Krishna Menon If the *hist:* trigger is activated, the output histogram will be automatically saved to a file named *system_event_hist.txt*. 3296b546c2SGopi Krishna Menon For example, the command: 3396b546c2SGopi Krishna Menon 3496b546c2SGopi Krishna Menon rtla <command> <mode> -t -e osnoise:irq_noise --trigger="hist:key=desc,duration/1000:sort=desc,duration/1000:vals=hitcount" 3596b546c2SGopi Krishna Menon 3696b546c2SGopi Krishna Menon Will automatically save the content of the histogram associated to *osnoise:irq_noise* event in *osnoise_irq_noise_hist.txt*. 3796b546c2SGopi Krishna Menon 3896b546c2SGopi Krishna Menon For further information about event trigger see https://www.kernel.org/doc/html/latest/trace/events.html#event-triggers. 3996b546c2SGopi Krishna Menon 4096b546c2SGopi Krishna Menon**-P**, **--priority** *o:prio|r:prio|f:prio|d:runtime:period* 4196b546c2SGopi Krishna Menon 423e30aee8STomas Glozar Set scheduling parameters to the |tool| tracer threads, the format to set the priority are: 4396b546c2SGopi Krishna Menon 4496b546c2SGopi Krishna Menon - *o:prio* - use SCHED_OTHER with *prio*; 4596b546c2SGopi Krishna Menon - *r:prio* - use SCHED_RR with *prio*; 4696b546c2SGopi Krishna Menon - *f:prio* - use SCHED_FIFO with *prio*; 4796b546c2SGopi Krishna Menon - *d:runtime[us|ms|s]:period[us|ms|s]* - use SCHED_DEADLINE with *runtime* and *period* in nanoseconds. 4896b546c2SGopi Krishna Menon 49198fcc7cSTomas Glozar 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. 50198fcc7cSTomas Glozar 51*5779de8dSLinus Torvalds**-C**, **--cgroup** \[*cgroup*] 5296b546c2SGopi Krishna Menon 5396b546c2SGopi Krishna Menon Set 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. 5496b546c2SGopi Krishna Menon 55122a552bSTomas Glozar 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. 56122a552bSTomas Glozar 5796b546c2SGopi Krishna Menon**--warm-up** *s* 5896b546c2SGopi Krishna Menon 5996b546c2SGopi Krishna Menon After 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. 6096b546c2SGopi Krishna Menon 6196b546c2SGopi Krishna Menon**--trace-buffer-size** *kB* 6296b546c2SGopi Krishna Menon Set the per-cpu trace buffer size in kB for the tracing output. 6396b546c2SGopi Krishna Menon 6421d5c65dSTomas Glozar If not set, the default tracefs buffer size is used. 6521d5c65dSTomas Glozar 6696b546c2SGopi Krishna Menon**--on-threshold** *action* 6796b546c2SGopi Krishna Menon 6896b546c2SGopi Krishna Menon Defines an action to be executed when tracing is stopped on a latency threshold 6996b546c2SGopi Krishna Menon specified by |threshold|. 7096b546c2SGopi Krishna Menon 7196b546c2SGopi Krishna Menon Multiple --on-threshold actions may be specified, and they will be executed in 7296b546c2SGopi Krishna Menon the order they are provided. If any action fails, subsequent actions in the list 7396b546c2SGopi Krishna Menon will not be executed. 7496b546c2SGopi Krishna Menon 7596b546c2SGopi Krishna Menon Supported actions are: 7696b546c2SGopi Krishna Menon 7796b546c2SGopi Krishna Menon - *trace[,file=<filename>]* 7896b546c2SGopi Krishna Menon 7996b546c2SGopi Krishna Menon Saves trace output, optionally taking a filename. Alternative to -t/--trace. 80aad1530fSTomas Glozar Note that unlike -t/--trace, specifying this multiple times will result in 8196b546c2SGopi Krishna Menon the trace being saved multiple times. 8296b546c2SGopi Krishna Menon 8396b546c2SGopi Krishna Menon - *signal,num=<sig>,pid=<pid>* 8496b546c2SGopi Krishna Menon 8596b546c2SGopi Krishna Menon Sends signal to process. "parent" might be specified in place of pid to target 8696b546c2SGopi Krishna Menon the parent process of rtla. 8796b546c2SGopi Krishna Menon 8896b546c2SGopi Krishna Menon - *shell,command=<command>* 8996b546c2SGopi Krishna Menon 9096b546c2SGopi Krishna Menon Execute shell command. 9196b546c2SGopi Krishna Menon 9296b546c2SGopi Krishna Menon - *continue* 9396b546c2SGopi Krishna Menon 9496b546c2SGopi Krishna Menon Continue tracing after actions are executed instead of stopping. 9596b546c2SGopi Krishna Menon 9696b546c2SGopi Krishna Menon Example: 9796b546c2SGopi Krishna Menon 9896b546c2SGopi Krishna Menon $ rtla |tool| |thresharg| 20 --on-threshold trace 9996b546c2SGopi Krishna Menon --on-threshold shell,command="grep ipi_send |tracer|\_trace.txt" 10096b546c2SGopi Krishna Menon --on-threshold signal,num=2,pid=parent 10196b546c2SGopi Krishna Menon 10296b546c2SGopi Krishna Menon This will save a trace with the default filename "|tracer|\_trace.txt", print its 10396b546c2SGopi Krishna Menon lines that contain the text "ipi_send" on standard output, and send signal 2 10496b546c2SGopi Krishna Menon (SIGINT) to the parent process. 10596b546c2SGopi Krishna Menon 10696b546c2SGopi Krishna Menon Performance Considerations: 10796b546c2SGopi Krishna Menon 10896b546c2SGopi Krishna Menon |actionsperf| 10996b546c2SGopi Krishna Menon 11096b546c2SGopi Krishna Menon**--on-end** *action* 11196b546c2SGopi Krishna Menon 11296b546c2SGopi Krishna Menon Defines an action to be executed at the end of tracing. 11396b546c2SGopi Krishna Menon 11496b546c2SGopi Krishna Menon Multiple --on-end actions can be specified, and they will be executed in the order 11596b546c2SGopi Krishna Menon they are provided. If any action fails, subsequent actions in the list will not be 11696b546c2SGopi Krishna Menon executed. 11796b546c2SGopi Krishna Menon 11896b546c2SGopi Krishna Menon See the documentation for **--on-threshold** for the list of supported actions, with 11996b546c2SGopi Krishna Menon the exception that *continue* has no effect. 12096b546c2SGopi Krishna Menon 12196b546c2SGopi Krishna Menon Example: 12296b546c2SGopi Krishna Menon 12396b546c2SGopi Krishna Menon $ rtla |tool| -d 5s --on-end trace 12496b546c2SGopi Krishna Menon 12596b546c2SGopi Krishna Menon This runs rtla with the default options, and saves trace output at the end. 12696b546c2SGopi Krishna Menon 12796b546c2SGopi Krishna Menon**-h**, **--help** 12896b546c2SGopi Krishna Menon 12996b546c2SGopi Krishna Menon Print help menu. 130