diff options
author | Leo Yan <leo.yan@linaro.org> | 2020-10-19 13:02:35 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2020-11-04 15:42:40 +0300 |
commit | 3989bbf9607d6716900d9df91c46a2ce8a504b93 (patch) | |
tree | e7d099204441f0b9a5d1482a145710891eca7434 /tools/perf/tests/builtin-test.c | |
parent | 0ee281e1e4e12f8c09b99f80a2482a55cd7d6bca (diff) | |
download | linux-3989bbf9607d6716900d9df91c46a2ce8a504b93.tar.xz |
perf tests tsc: Make tsc testing as a common testing
x86 arch provides the testing for conversion between tsc and perf time,
the testing is located in x86 arch folder. Move this testing out from
x86 arch folder and place it into the common testing folder, so allows
to execute tsc testing on other architectures (e.g. Arm64).
This patch removes the inclusion of "arch-tests.h" from the testing
code, this can avoid building failure if any arch has no this header
file.
Committer testing:
$ perf test -v tsc
Couldn't bump rlimit(MEMLOCK), failures may take place when creating BPF maps, etc
70: Convert perf time to TSC :
--- start ---
test child forked, pid 4032834
mmap size 528384B
1st event perf time 165409788843605 tsc 336578703793868
rdtsc time 165409788854986 tsc 336578703837038
2nd event perf time 165409788855487 tsc 336578703838935
test child finished with 0
---- end ----
Convert perf time to TSC: Ok
$
Signed-off-by: Leo Yan <leo.yan@linaro.org>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Link: https://lore.kernel.org/r/20201019100236.23675-2-leo.yan@linaro.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/tests/builtin-test.c')
-rw-r--r-- | tools/perf/tests/builtin-test.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c index 132bdb3e6c31..02e7bbf70419 100644 --- a/tools/perf/tests/builtin-test.c +++ b/tools/perf/tests/builtin-test.c @@ -350,6 +350,10 @@ static struct test generic_tests[] = { .func = test__expand_cgroup_events, }, { + .desc = "Convert perf time to TSC", + .func = test__perf_time_to_tsc, + }, + { .func = NULL, }, }; |