mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-29 09:12:07 +00:00
perf tests: Enable tests disabled due to tracepoint parsing
Tracepoint parsing required libtraceevent but no longer does. Remove the Build logic and #ifdefs that caused the tests not to be run. Test code that directly uses libtraceevent is still guarded. Reviewed-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Ian Rogers <irogers@google.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Cc: Ben Gainey <ben.gainey@arm.com> Cc: Colin Ian King <colin.i.king@gmail.com> Cc: Dominique Martinet <asmadeus@codewreck.org> Cc: Ilkka Koskinen <ilkka@os.amperecomputing.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Oliver Upton <oliver.upton@linux.dev> Cc: Paran Lee <p4ranlee@gmail.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Steinar H. Gunderson <sesse@google.com> Cc: Steven Rostedt (VMware) <rostedt@goodmis.org> Cc: Thomas Falcon <thomas.falcon@intel.com> Cc: Weilin Wang <weilin.wang@intel.com> Cc: Yang Jihong <yangjihong@bytedance.com> Cc: Yang Li <yang.lee@linux.alibaba.com> Cc: Ze Gao <zegao2021@gmail.com> Cc: Zixian Cai <fzczx123@gmail.com> Cc: zhaimingbing <zhaimingbing@cmss.chinamobile.com> Link: https://lore.kernel.org/r/20241118225345.889810-8-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
6c8310e838
commit
5e530a8287
@ -5,10 +5,10 @@ perf-test-y += tests-scripts.o
|
||||
perf-test-y += parse-events.o
|
||||
perf-test-y += dso-data.o
|
||||
perf-test-y += vmlinux-kallsyms.o
|
||||
perf-test-$(CONFIG_LIBTRACEEVENT) += openat-syscall.o
|
||||
perf-test-$(CONFIG_LIBTRACEEVENT) += openat-syscall-all-cpus.o
|
||||
perf-test-y += openat-syscall.o
|
||||
perf-test-y += openat-syscall-all-cpus.o
|
||||
perf-test-$(CONFIG_LIBTRACEEVENT) += openat-syscall-tp-fields.o
|
||||
perf-test-$(CONFIG_LIBTRACEEVENT) += mmap-basic.o
|
||||
perf-test-y += mmap-basic.o
|
||||
perf-test-y += perf-record.o
|
||||
perf-test-y += evsel-roundtrip-name.o
|
||||
perf-test-$(CONFIG_LIBTRACEEVENT) += evsel-tp-sched.o
|
||||
|
@ -60,11 +60,9 @@ static struct test_suite *arch_tests[] = {
|
||||
|
||||
static struct test_suite *generic_tests[] = {
|
||||
&suite__vmlinux_matches_kallsyms,
|
||||
#ifdef HAVE_LIBTRACEEVENT
|
||||
&suite__openat_syscall_event,
|
||||
&suite__openat_syscall_event_on_all_cpus,
|
||||
&suite__basic_mmap,
|
||||
#endif
|
||||
&suite__mem,
|
||||
&suite__parse_events,
|
||||
&suite__expr,
|
||||
|
@ -54,8 +54,6 @@ static bool test_perf_config(const struct perf_evsel *evsel, __u64 expected_conf
|
||||
return (evsel->attr.config & PERF_HW_EVENT_MASK) == expected_config;
|
||||
}
|
||||
|
||||
#ifdef HAVE_LIBTRACEEVENT
|
||||
|
||||
#if defined(__s390x__)
|
||||
/* Return true if kvm module is available and loaded. Test this
|
||||
* and return success when trace point kvm_s390_create_vm
|
||||
@ -112,7 +110,6 @@ static int test__checkevent_tracepoint_multi(struct evlist *evlist)
|
||||
}
|
||||
return TEST_OK;
|
||||
}
|
||||
#endif /* HAVE_LIBTRACEEVENT */
|
||||
|
||||
static int test__checkevent_raw(struct evlist *evlist)
|
||||
{
|
||||
@ -311,7 +308,6 @@ static int test__checkevent_breakpoint_rw(struct evlist *evlist)
|
||||
return TEST_OK;
|
||||
}
|
||||
|
||||
#ifdef HAVE_LIBTRACEEVENT
|
||||
static int test__checkevent_tracepoint_modifier(struct evlist *evlist)
|
||||
{
|
||||
struct evsel *evsel = evlist__first(evlist);
|
||||
@ -340,7 +336,6 @@ test__checkevent_tracepoint_multi_modifier(struct evlist *evlist)
|
||||
|
||||
return test__checkevent_tracepoint_multi(evlist);
|
||||
}
|
||||
#endif /* HAVE_LIBTRACEEVENT */
|
||||
|
||||
static int test__checkevent_raw_modifier(struct evlist *evlist)
|
||||
{
|
||||
@ -629,7 +624,6 @@ static int test__checkevent_pmu(struct evlist *evlist)
|
||||
return TEST_OK;
|
||||
}
|
||||
|
||||
#ifdef HAVE_LIBTRACEEVENT
|
||||
static int test__checkevent_list(struct evlist *evlist)
|
||||
{
|
||||
struct evsel *evsel = evlist__first(evlist);
|
||||
@ -671,7 +665,6 @@ static int test__checkevent_list(struct evlist *evlist)
|
||||
|
||||
return TEST_OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int test__checkevent_pmu_name(struct evlist *evlist)
|
||||
{
|
||||
@ -971,7 +964,6 @@ static int test__group2(struct evlist *evlist)
|
||||
return TEST_OK;
|
||||
}
|
||||
|
||||
#ifdef HAVE_LIBTRACEEVENT
|
||||
static int test__group3(struct evlist *evlist __maybe_unused)
|
||||
{
|
||||
struct evsel *evsel, *group1_leader = NULL, *group2_leader = NULL;
|
||||
@ -1078,7 +1070,6 @@ static int test__group3(struct evlist *evlist __maybe_unused)
|
||||
}
|
||||
return TEST_OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int test__group4(struct evlist *evlist __maybe_unused)
|
||||
{
|
||||
@ -1813,7 +1804,6 @@ static int test__term_equal_legacy(struct evlist *evlist)
|
||||
return TEST_OK;
|
||||
}
|
||||
|
||||
#ifdef HAVE_LIBTRACEEVENT
|
||||
static int count_tracepoints(void)
|
||||
{
|
||||
struct dirent *events_ent;
|
||||
@ -1867,7 +1857,6 @@ static int test__all_tracepoints(struct evlist *evlist)
|
||||
|
||||
return test__checkevent_tracepoint_multi(evlist);
|
||||
}
|
||||
#endif /* HAVE_LIBTRACEVENT */
|
||||
|
||||
struct evlist_test {
|
||||
const char *name;
|
||||
@ -1876,7 +1865,6 @@ struct evlist_test {
|
||||
};
|
||||
|
||||
static const struct evlist_test test__events[] = {
|
||||
#ifdef HAVE_LIBTRACEEVENT
|
||||
{
|
||||
.name = "syscalls:sys_enter_openat",
|
||||
.check = test__checkevent_tracepoint,
|
||||
@ -1887,7 +1875,6 @@ static const struct evlist_test test__events[] = {
|
||||
.check = test__checkevent_tracepoint_multi,
|
||||
/* 1 */
|
||||
},
|
||||
#endif
|
||||
{
|
||||
.name = "r1a",
|
||||
.check = test__checkevent_raw,
|
||||
@ -1938,7 +1925,6 @@ static const struct evlist_test test__events[] = {
|
||||
.check = test__checkevent_breakpoint_w,
|
||||
/* 1 */
|
||||
},
|
||||
#ifdef HAVE_LIBTRACEEVENT
|
||||
{
|
||||
.name = "syscalls:sys_enter_openat:k",
|
||||
.check = test__checkevent_tracepoint_modifier,
|
||||
@ -1949,7 +1935,6 @@ static const struct evlist_test test__events[] = {
|
||||
.check = test__checkevent_tracepoint_multi_modifier,
|
||||
/* 3 */
|
||||
},
|
||||
#endif
|
||||
{
|
||||
.name = "r1a:kp",
|
||||
.check = test__checkevent_raw_modifier,
|
||||
@ -1995,13 +1980,11 @@ static const struct evlist_test test__events[] = {
|
||||
.check = test__checkevent_breakpoint_w_modifier,
|
||||
/* 2 */
|
||||
},
|
||||
#ifdef HAVE_LIBTRACEEVENT
|
||||
{
|
||||
.name = "r1,syscalls:sys_enter_openat:k,1:1:hp",
|
||||
.check = test__checkevent_list,
|
||||
/* 3 */
|
||||
},
|
||||
#endif
|
||||
{
|
||||
.name = "instructions:G",
|
||||
.check = test__checkevent_exclude_host_modifier,
|
||||
@ -2032,13 +2015,11 @@ static const struct evlist_test test__events[] = {
|
||||
.check = test__group2,
|
||||
/* 9 */
|
||||
},
|
||||
#ifdef HAVE_LIBTRACEEVENT
|
||||
{
|
||||
.name = "group1{syscalls:sys_enter_openat:H,cycles:kppp},group2{cycles,1:3}:G,instructions:u",
|
||||
.check = test__group3,
|
||||
/* 0 */
|
||||
},
|
||||
#endif
|
||||
{
|
||||
.name = "{cycles:u,instructions:kp}:p",
|
||||
.check = test__group4,
|
||||
@ -2049,13 +2030,11 @@ static const struct evlist_test test__events[] = {
|
||||
.check = test__group5,
|
||||
/* 2 */
|
||||
},
|
||||
#ifdef HAVE_LIBTRACEEVENT
|
||||
{
|
||||
.name = "*:*",
|
||||
.check = test__all_tracepoints,
|
||||
/* 3 */
|
||||
},
|
||||
#endif
|
||||
{
|
||||
.name = "{cycles,cache-misses:G}:H",
|
||||
.check = test__group_gh1,
|
||||
@ -2111,7 +2090,7 @@ static const struct evlist_test test__events[] = {
|
||||
.check = test__checkevent_breakpoint_len_rw_modifier,
|
||||
/* 4 */
|
||||
},
|
||||
#if defined(__s390x__) && defined(HAVE_LIBTRACEEVENT)
|
||||
#if defined(__s390x__)
|
||||
{
|
||||
.name = "kvm-s390:kvm_s390_create_vm",
|
||||
.check = test__checkevent_tracepoint,
|
||||
@ -2265,13 +2244,11 @@ static const struct evlist_test test__events[] = {
|
||||
.check = test__checkevent_breakpoint_2_events,
|
||||
/* 3 */
|
||||
},
|
||||
#ifdef HAVE_LIBTRACEEVENT
|
||||
{
|
||||
.name = "9p:9p_client_req",
|
||||
.check = test__checkevent_tracepoint,
|
||||
/* 4 */
|
||||
},
|
||||
#endif
|
||||
};
|
||||
|
||||
static const struct evlist_test test__events_pmu[] = {
|
||||
|
Loading…
Reference in New Issue
Block a user