Commit 5128492b authored by Ian Rogers's avatar Ian Rogers Committed by Namhyung Kim
Browse files

perf thread_map: Remove uid options



Now the target doesn't have a uid, it is handled through BPF filters,
remove the uid options to thread_map creation. Tidy up the functions
used in tests to avoid passing unused arguments.

Signed-off-by: default avatarIan Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/20250604174545.2853620-11-irogers@google.com


Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
parent b4c658d4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -62,7 +62,7 @@ static int attach__current_disabled(struct evlist *evlist)

	pr_debug("attaching to current thread as disabled\n");

	threads = thread_map__new(-1, getpid(), UINT_MAX);
	threads = thread_map__new_by_tid(getpid());
	if (threads == NULL) {
		pr_debug("thread_map__new\n");
		return -1;
@@ -88,7 +88,7 @@ static int attach__current_enabled(struct evlist *evlist)

	pr_debug("attaching to current thread as enabled\n");

	threads = thread_map__new(-1, getpid(), UINT_MAX);
	threads = thread_map__new_by_tid(getpid());
	if (threads == NULL) {
		pr_debug("failed to call thread_map__new\n");
		return -1;
+1 −1
Original line number Diff line number Diff line
@@ -78,7 +78,7 @@ static int test__keep_tracking(struct test_suite *test __maybe_unused, int subte
	int found, err = -1;
	const char *comm;

	threads = thread_map__new(-1, getpid(), UINT_MAX);
	threads = thread_map__new_by_tid(getpid());
	CHECK_NOT_NULL__(threads);

	cpus = perf_cpu_map__new_online_cpus();
+1 −1
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@ static int test__basic_mmap(struct test_suite *test __maybe_unused, int subtest
	char sbuf[STRERR_BUFSIZE];
	struct mmap *md;

	threads = thread_map__new(-1, getpid(), UINT_MAX);
	threads = thread_map__new_by_tid(getpid());
	if (threads == NULL) {
		pr_debug("thread_map__new\n");
		return -1;
+1 −1
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ static int test__openat_syscall_event_on_all_cpus(struct test_suite *test __mayb
	struct evsel *evsel;
	unsigned int nr_openat_calls = 111, i;
	cpu_set_t cpu_set;
	struct perf_thread_map *threads = thread_map__new(-1, getpid(), UINT_MAX);
	struct perf_thread_map *threads = thread_map__new_by_tid(getpid());
	char sbuf[STRERR_BUFSIZE];
	char errbuf[BUFSIZ];

+1 −1
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ static int test__openat_syscall_event(struct test_suite *test __maybe_unused,
	int err = TEST_FAIL, fd;
	struct evsel *evsel;
	unsigned int nr_openat_calls = 111, i;
	struct perf_thread_map *threads = thread_map__new(-1, getpid(), UINT_MAX);
	struct perf_thread_map *threads = thread_map__new_by_tid(getpid());
	char sbuf[STRERR_BUFSIZE];
	char errbuf[BUFSIZ];

Loading