4d8c1ba0 | 21-Oct-2024 |
furkanonder <furkanonder@protonmail.com> |
tools/rtla: Improve exception handling in timerlat_load.py
The enhancements made to timerlat_load.py are intended to improve the script's exception handling.
Summary of the changes: - Specific ex
tools/rtla: Improve exception handling in timerlat_load.py
The enhancements made to timerlat_load.py are intended to improve the script's exception handling.
Summary of the changes: - Specific exceptions are now caught for CPU affinity and priority settings, with clearer error messages provided. - The timerlat file descriptor opening now includes handling for PermissionError and OSError, with informative messages. - In the infinite loop, generic exceptions have been replaced with specific types like KeyboardInterrupt and IOError, improving feedback.
Before: $ sudo python timerlat_load.py 122 Error setting affinity After: $ sudo python timerlat_load.py 122 Error setting affinity: [Errno 22] Invalid argument
Before: $ sudo python timerlat_load.py 1 -p 950 Error setting priority After: $ sudo python timerlat_load.py 1 -p 950 Error setting priority: [Errno 22] Invalid argument
Before: $ python timerlat_load.py 1 Error opening timerlat fd, did you run timerlat -U? After: $ python timerlat_load.py 1 Permission denied. Please check your access rights.
Cc: "lgoncalv@redhat.com" <lgoncalv@redhat.com> Cc: "jkacur@redhat.com" <jkacur@redhat.com> Link: https://lore.kernel.org/Q_k1s4hBtUy2px8ou0QKenjEK2_T_LoV8IxAE79aBakBogb-7uHp2fpET3oWtI1t3dy8uKjWeRzQOdKNzIzOOpyM4OjutJOriZ9TrGY6b-g=@protonmail.com Signed-off-by: Furkan Onder <furkanonder@protonmail.com> Reviewed-by: Tomas Glozar <tglozar@redhat.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
show more ...
|
bd268183 | 21-Oct-2024 |
furkanonder <furkanonder@protonmail.com> |
tools/rtla: Enhance argument parsing in timerlat_load.py
The enhancements made to timerlat_load.py are aimed at improving the clarity of argument parsing.
Summary of Changes: - The cpu argument is
tools/rtla: Enhance argument parsing in timerlat_load.py
The enhancements made to timerlat_load.py are aimed at improving the clarity of argument parsing.
Summary of Changes: - The cpu argument is now specified as an integer type in the argument parser to enforce input validation, and the construction of affinity_mask has been simplified to directly use the integer value of args.cpu. - The prio argument is similarly updated to be of integer type for consistency and validation, eliminating the need for the conversion of args.prio to an integer, as this is now handled by the argument parser.
Cc: "jkacur@redhat.com" <jkacur@redhat.com> Cc: "lgoncalv@redhat.com" <lgoncalv@redhat.com> Link: https://lore.kernel.org/QfgO7ayKD9dsLk8_ZDebkAV0OF7wla7UmasbP9CBmui_sChOeizy512t3RqCHTjvQoUBUDP8dwEOVCdHQ5KvVNEiP69CynMY94SFDERWl94=@protonmail.com Signed-off-by: Furkan Onder <furkanonder@protonmail.com> Reviewed-by: Tomas Glozar <tglozar@redhat.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
show more ...
|