aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/tracing/rtla/src/utils.h
diff options
context:
space:
mode:
authorDaniel Bristot de Oliveira <bristot@kernel.org>2023-01-31 16:38:53 +0100
committerSteven Rostedt (Google) <rostedt@goodmis.org>2023-02-02 10:48:03 -0500
commit27e348b221f6a78cbe86e7def8e2611f84509211 (patch)
tree727df9f4e6db878833181816a83e74b99f92fe80 /tools/tracing/rtla/src/utils.h
parenttools/tracing/rtla: osnoise_hist: display average with two-digit precision (diff)
downloadwireguard-linux-27e348b221f6a78cbe86e7def8e2611f84509211.tar.xz
wireguard-linux-27e348b221f6a78cbe86e7def8e2611f84509211.zip
rtla/timerlat: Add auto-analysis core
Currently, timerlat displays a summary of the timerlat tracer results saving the trace if the system hits a stop condition. While this represented a huge step forward, the root cause was not that is accessible to non-expert users. The auto-analysis fulfill this gap by parsing the trace timerlat runs, printing an intuitive auto-analysis. Link: https://lkml.kernel.org/r/1ee073822f6a2cbb33da0c817331d0d4045e837f.1675179318.git.bristot@kernel.org Cc: Daniel Bristot de Oliveira <bristot@kernel.org> Cc: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Daniel Bristot de Oliveira <bristot@kernel.org> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Diffstat (limited to '')
-rw-r--r--tools/tracing/rtla/src/utils.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/tracing/rtla/src/utils.h b/tools/tracing/rtla/src/utils.h
index 5571afd3b549..90e4f52a030b 100644
--- a/tools/tracing/rtla/src/utils.h
+++ b/tools/tracing/rtla/src/utils.h
@@ -56,3 +56,6 @@ struct sched_attr {
int parse_prio(char *arg, struct sched_attr *sched_param);
int set_comm_sched_attr(const char *comm_prefix, struct sched_attr *attr);
int set_cpu_dma_latency(int32_t latency);
+
+#define ns_to_usf(x) (((double)x/1000))
+#define ns_to_per(total, part) ((part * 100) / (double)total)