summaryrefslogtreecommitdiff
path: root/tools/perf/tests/thread-map.c
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2019-08-22 14:11:41 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-08-22 23:16:57 +0300
commita2f354e3abb853f9a40048829e1f839e8f7fada5 (patch)
treeefd44d199538c509e2a17004ad09c85a045563d1 /tools/perf/tests/thread-map.c
parent5e51b0bb245d963f5ce750256c504be95201e38c (diff)
downloadlinux-a2f354e3abb853f9a40048829e1f839e8f7fada5.tar.xz
libperf: Add perf_thread_map__nr/perf_thread_map__pid functions
So it's part of libperf library as basic functions operating on perf_thread_map objects. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20190822111141.25823-6-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/tests/thread-map.c')
-rw-r--r--tools/perf/tests/thread-map.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/tests/thread-map.c b/tools/perf/tests/thread-map.c
index d61773cacf0b..d803eafedc60 100644
--- a/tools/perf/tests/thread-map.c
+++ b/tools/perf/tests/thread-map.c
@@ -26,7 +26,7 @@ int test__thread_map(struct test *test __maybe_unused, int subtest __maybe_unuse
TEST_ASSERT_VAL("wrong nr", map->nr == 1);
TEST_ASSERT_VAL("wrong pid",
- thread_map__pid(map, 0) == getpid());
+ perf_thread_map__pid(map, 0) == getpid());
TEST_ASSERT_VAL("wrong comm",
perf_thread_map__comm(map, 0) &&
!strcmp(perf_thread_map__comm(map, 0), NAME));
@@ -41,7 +41,7 @@ int test__thread_map(struct test *test __maybe_unused, int subtest __maybe_unuse
thread_map__read_comms(map);
TEST_ASSERT_VAL("wrong nr", map->nr == 1);
- TEST_ASSERT_VAL("wrong pid", thread_map__pid(map, 0) == -1);
+ TEST_ASSERT_VAL("wrong pid", perf_thread_map__pid(map, 0) == -1);
TEST_ASSERT_VAL("wrong comm",
perf_thread_map__comm(map, 0) &&
!strcmp(perf_thread_map__comm(map, 0), "dummy"));
@@ -68,7 +68,7 @@ static int process_event(struct perf_tool *tool __maybe_unused,
TEST_ASSERT_VAL("wrong nr", threads->nr == 1);
TEST_ASSERT_VAL("wrong pid",
- thread_map__pid(threads, 0) == getpid());
+ perf_thread_map__pid(threads, 0) == getpid());
TEST_ASSERT_VAL("wrong comm",
perf_thread_map__comm(threads, 0) &&
!strcmp(perf_thread_map__comm(threads, 0), NAME));