summaryrefslogtreecommitdiff
path: root/tools/tracing/rtla/src/utils.h
diff options
context:
space:
mode:
authorDaniel Bristot de Oliveira <bristot@kernel.org>2023-06-06 19:12:16 +0300
committerSteven Rostedt (Google) <rostedt@goodmis.org>2023-06-13 23:26:03 +0300
commit272ced2556e63943113a54c113f8c11aeb53a5c3 (patch)
tree8500d7461984c1227f3ebd9e89329cd4e21d9883 /tools/tracing/rtla/src/utils.h
parenta957cbc02531a23beeac6dd9e751f8d4dadaf7a9 (diff)
downloadlinux-272ced2556e63943113a54c113f8c11aeb53a5c3.tar.xz
rtla: Add --house-keeping option
To avoid having rtla interfering with the measurement threads, add an option for the user to set the CPUs in which rtla should run. For instance: # rtla timerlat top -H 0 -c 1-7 Will place rtla in the CPU 0, while running the measurement threads in the CPU 1-7. Link: https://lkml.kernel.org/r/6a6c78a579a96ba8b02ae67ee1e0ba2cb5e03c4a.1686066600.git.bristot@kernel.org Cc: William White <chwhite@redhat.com> Cc: Jonathan Corbet <corbet@lwn.net> Tested-by: Juri Lelli <juri.lelli@redhat.com> Suggested-by: Juri Lelli <juri.lelli@redhat.com> Signed-off-by: Daniel Bristot de Oliveira <bristot@kernel.org> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Diffstat (limited to 'tools/tracing/rtla/src/utils.h')
-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 42b6f099d10a..9ab2f0d7bc1c 100644
--- a/tools/tracing/rtla/src/utils.h
+++ b/tools/tracing/rtla/src/utils.h
@@ -1,6 +1,8 @@
// SPDX-License-Identifier: GPL-2.0
+
#include <stdint.h>
#include <time.h>
+#include <sched.h>
/*
* '18446744073709551615\0'
@@ -54,6 +56,7 @@ struct sched_attr {
};
int parse_prio(char *arg, struct sched_attr *sched_param);
+int parse_cpu_set(char *cpu_list, cpu_set_t *set);
int set_comm_sched_attr(const char *comm_prefix, struct sched_attr *attr);
int set_comm_cgroup(const char *comm_prefix, const char *cgroup);
int set_cpu_dma_latency(int32_t latency);