From nobody Sun Nov 24 21:58:35 2024 Received: from mail-yw1-f201.google.com (mail-yw1-f201.google.com [209.85.128.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1AE7C1ABEC5 for ; Sat, 2 Nov 2024 16:54:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730566465; cv=none; b=c18HhxOAbC+m3Wr9nOn49KYm2ootqAG+GK/bUOZGcLTf3xR3exl717wfMr01LUoPVR/fcKRI2FbJAFMaChCc/DTeQ1f58WXUgbXytQo4fgR+8Zca2SjKv0yFErmLjPbyMuG2qurraSzgfXyuW99MNNmKSwnETt7qonqRtHyaWNc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730566465; c=relaxed/simple; bh=CkQ0PqkTIWt9YwGPuFgU+xUVEgjnar/6hDiTfIJH+ac=; h=Date:In-Reply-To:Message-Id:Mime-Version:References:Subject:From: To:Content-Type; b=kp8BKtEsDSJVDw84wpVPeLyMcez/Mslfgfj8L53p3dVOzHtv01kvqYK1cX81l6IEkUbdwufAqGwl7XjNnLeaP8D7+eoI+fsTTgncMORjSEr3lZLPXkOEDhPfFThH+Y1lLLxh7/UvXZ7WaA0WYO6BczyJpXIZ1Gt45i0ib+qTqhA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=NWE+482o; arc=none smtp.client-ip=209.85.128.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="NWE+482o" Received: by mail-yw1-f201.google.com with SMTP id 00721157ae682-6e35bdb6a31so53859457b3.1 for ; Sat, 02 Nov 2024 09:54:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1730566463; x=1731171263; darn=vger.kernel.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=bHyQZ7KuzF1BHlUEcfMzmmjCRw5gxHBITHCl3IdIk30=; b=NWE+482ojGddDEsyVSN7hu4OX9p4fL6MyYiCr2IysjWq7UjYN1Ub0kyctjBzwfVT2e HS2wQ/DvfXuFJsWUTmlaQY5Z96bp0IKV55xmY6qAu5yVLdYixajrRa+bcdH2U+r3RMxz 6qQ8AOICV7iso7BiXrOq0U1rr/CvP725V+fRCVl7wGoTI55W6nsoDPO8SffllgPU1wXF J8I//5g1dlMPNFfazqmB+eIw4WHsFoXVIPKNV4rmo8PrYzf5fMX1dOtwICqXscMw/dEa P8w/QDcR5DtDKv1faIriE0dDLQY9/ZdSrJAcFvMR9svk+F8enzrKEojQfIUyNPRCAzTt /9Qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730566463; x=1731171263; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=bHyQZ7KuzF1BHlUEcfMzmmjCRw5gxHBITHCl3IdIk30=; b=vfQLnbamV33yMlSQTL4kzuaCalMgufjWkmP3AyofmVhsD4unl6rFuvzgz5eY6kwmwz hxmNjjzsS0eZr03DUeu9aibG3JMIwipHV5AblLvlC3Fn6FxbJXdOCX/4/UVU6eRclWxk +4tFuBiKtOIA73bF1KUgEiZzV0tG82ADYvIQm4nZ5RNCx04Ltws+6zSNKulh1fKIpWvL fH5UI97BY/Hm+wu6rE8Xykz8ePy15BYJ0hI1XKzJbQ4IUHu2Yux+fh7+GZEv0iCpVM2l ySr5s/d6gDi3QG73LMM5ZYtfuSkUNcnyZD1hCKCrq1jsC5CfsbAFuWRyBqT/3B9NJXxu l4iQ== X-Forwarded-Encrypted: i=1; AJvYcCWoydsAwxg8ILMu2xSvPyLygR/ZaL3Oc5NIEW89lSCRTSAjcJ/JohW56EEBnOM2YLUPSy8MvvrGaVeWqQo=@vger.kernel.org X-Gm-Message-State: AOJu0YyfjtkGC8jledff+7S236VB1XpjNIhojEO+61Qlpm3GNZBJ930I D7f5UuL3EoQkyaCB5nYjyQC5KHKgLDp8sBxzU7+ShfYthomkdLRqYj2iAUVeygVnviJAWniXwIT 3TUkvgA== X-Google-Smtp-Source: AGHT+IHvIfjIVlSNpoCWEllWxrK2Fwv3qM/NdTT3f32H1uXkLTOVbIoX8JVD0iVdEJxRyn1iqXdqGpB5soCF X-Received: from irogers.svl.corp.google.com ([2620:15c:2c5:11:26a5:cdb5:356c:64a4]) (user=irogers job=sendgmr) by 2002:a25:aa83:0:b0:e30:c235:d79f with SMTP id 3f1490d57ef6-e30e5b282d1mr5227276.8.1730566463143; Sat, 02 Nov 2024 09:54:23 -0700 (PDT) Date: Sat, 2 Nov 2024 09:54:00 -0700 In-Reply-To: <20241102165400.75785-1-irogers@google.com> Message-Id: <20241102165400.75785-7-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20241102165400.75785-1-irogers@google.com> X-Mailer: git-send-email 2.47.0.199.ga7371fff76-goog Subject: [PATCH v2 6/6] perf tests: Enable tests disabled due to tracepoint parsing From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Kan Liang , Athira Jajeev , James Clark , Dominique Martinet , Yang Li , Colin Ian King , Yang Jihong , "Steinar H. Gunderson" , Oliver Upton , Ilkka Koskinen , Ze Gao , Weilin Wang , Ben Gainey , zhaimingbing , Zixian Cai , Andi Kleen , Paran Lee , Thomas Falcon , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, "Steven Rostedt (Google)" Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Signed-off-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo --- tools/perf/tests/Build | 6 +++--- tools/perf/tests/builtin-test.c | 2 -- tools/perf/tests/parse-events.c | 25 +------------------------ 3 files changed, 4 insertions(+), 29 deletions(-) diff --git a/tools/perf/tests/Build b/tools/perf/tests/Build index 03cbdf7c50a0..db33b33dc970 100644 --- a/tools/perf/tests/Build +++ b/tools/perf/tests/Build @@ -5,10 +5,10 @@ perf-test-y +=3D tests-scripts.o perf-test-y +=3D parse-events.o perf-test-y +=3D dso-data.o perf-test-y +=3D vmlinux-kallsyms.o -perf-test-$(CONFIG_LIBTRACEEVENT) +=3D openat-syscall.o -perf-test-$(CONFIG_LIBTRACEEVENT) +=3D openat-syscall-all-cpus.o +perf-test-y +=3D openat-syscall.o +perf-test-y +=3D openat-syscall-all-cpus.o perf-test-$(CONFIG_LIBTRACEEVENT) +=3D openat-syscall-tp-fields.o -perf-test-$(CONFIG_LIBTRACEEVENT) +=3D mmap-basic.o +perf-test-y +=3D mmap-basic.o perf-test-y +=3D perf-record.o perf-test-y +=3D evsel-roundtrip-name.o perf-test-$(CONFIG_LIBTRACEEVENT) +=3D evsel-tp-sched.o diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-tes= t.c index d2cabaa8ad92..4c3b622130a9 100644 --- a/tools/perf/tests/builtin-test.c +++ b/tools/perf/tests/builtin-test.c @@ -60,11 +60,9 @@ static struct test_suite *arch_tests[] =3D { =20 static struct test_suite *generic_tests[] =3D { &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, diff --git a/tools/perf/tests/parse-events.c b/tools/perf/tests/parse-event= s.c index 82a19674a38f..5ec2e5607987 100644 --- a/tools/perf/tests/parse-events.c +++ b/tools/perf/tests/parse-events.c @@ -54,8 +54,6 @@ static bool test_perf_config(const struct perf_evsel *evs= el, __u64 expected_conf return (evsel->attr.config & PERF_HW_EVENT_MASK) =3D=3D expected_config; } =20 -#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 evl= ist *evlist) } return TEST_OK; } -#endif /* HAVE_LIBTRACEEVENT */ =20 static int test__checkevent_raw(struct evlist *evlist) { @@ -311,7 +308,6 @@ static int test__checkevent_breakpoint_rw(struct evlist= *evlist) return TEST_OK; } =20 -#ifdef HAVE_LIBTRACEEVENT static int test__checkevent_tracepoint_modifier(struct evlist *evlist) { struct evsel *evsel =3D evlist__first(evlist); @@ -340,7 +336,6 @@ test__checkevent_tracepoint_multi_modifier(struct evlis= t *evlist) =20 return test__checkevent_tracepoint_multi(evlist); } -#endif /* HAVE_LIBTRACEEVENT */ =20 static int test__checkevent_raw_modifier(struct evlist *evlist) { @@ -629,7 +624,6 @@ static int test__checkevent_pmu(struct evlist *evlist) return TEST_OK; } =20 -#ifdef HAVE_LIBTRACEEVENT static int test__checkevent_list(struct evlist *evlist) { struct evsel *evsel =3D evlist__first(evlist); @@ -671,7 +665,6 @@ static int test__checkevent_list(struct evlist *evlist) =20 return TEST_OK; } -#endif =20 static int test__checkevent_pmu_name(struct evlist *evlist) { @@ -971,7 +964,6 @@ static int test__group2(struct evlist *evlist) return TEST_OK; } =20 -#ifdef HAVE_LIBTRACEEVENT static int test__group3(struct evlist *evlist __maybe_unused) { struct evsel *evsel, *group1_leader =3D NULL, *group2_leader =3D NULL; @@ -1078,7 +1070,6 @@ static int test__group3(struct evlist *evlist __maybe= _unused) } return TEST_OK; } -#endif =20 static int test__group4(struct evlist *evlist __maybe_unused) { @@ -1813,7 +1804,6 @@ static int test__term_equal_legacy(struct evlist *evl= ist) return TEST_OK; } =20 -#ifdef HAVE_LIBTRACEEVENT static int count_tracepoints(void) { struct dirent *events_ent; @@ -1867,7 +1857,6 @@ static int test__all_tracepoints(struct evlist *evlis= t) =20 return test__checkevent_tracepoint_multi(evlist); } -#endif /* HAVE_LIBTRACEVENT */ =20 struct evlist_test { const char *name; @@ -1876,7 +1865,6 @@ struct evlist_test { }; =20 static const struct evlist_test test__events[] =3D { -#ifdef HAVE_LIBTRACEEVENT { .name =3D "syscalls:sys_enter_openat", .check =3D test__checkevent_tracepoint, @@ -1887,7 +1875,6 @@ static const struct evlist_test test__events[] =3D { .check =3D test__checkevent_tracepoint_multi, /* 1 */ }, -#endif { .name =3D "r1a", .check =3D test__checkevent_raw, @@ -1938,7 +1925,6 @@ static const struct evlist_test test__events[] =3D { .check =3D test__checkevent_breakpoint_w, /* 1 */ }, -#ifdef HAVE_LIBTRACEEVENT { .name =3D "syscalls:sys_enter_openat:k", .check =3D test__checkevent_tracepoint_modifier, @@ -1949,7 +1935,6 @@ static const struct evlist_test test__events[] =3D { .check =3D test__checkevent_tracepoint_multi_modifier, /* 3 */ }, -#endif { .name =3D "r1a:kp", .check =3D test__checkevent_raw_modifier, @@ -1995,13 +1980,11 @@ static const struct evlist_test test__events[] =3D { .check =3D test__checkevent_breakpoint_w_modifier, /* 2 */ }, -#ifdef HAVE_LIBTRACEEVENT { .name =3D "r1,syscalls:sys_enter_openat:k,1:1:hp", .check =3D test__checkevent_list, /* 3 */ }, -#endif { .name =3D "instructions:G", .check =3D test__checkevent_exclude_host_modifier, @@ -2032,13 +2015,11 @@ static const struct evlist_test test__events[] =3D { .check =3D test__group2, /* 9 */ }, -#ifdef HAVE_LIBTRACEEVENT { .name =3D "group1{syscalls:sys_enter_openat:H,cycles:kppp},group2{cycle= s,1:3}:G,instructions:u", .check =3D test__group3, /* 0 */ }, -#endif { .name =3D "{cycles:u,instructions:kp}:p", .check =3D test__group4, @@ -2049,13 +2030,11 @@ static const struct evlist_test test__events[] =3D { .check =3D test__group5, /* 2 */ }, -#ifdef HAVE_LIBTRACEEVENT { .name =3D "*:*", .check =3D test__all_tracepoints, /* 3 */ }, -#endif { .name =3D "{cycles,cache-misses:G}:H", .check =3D test__group_gh1, @@ -2111,7 +2090,7 @@ static const struct evlist_test test__events[] =3D { .check =3D test__checkevent_breakpoint_len_rw_modifier, /* 4 */ }, -#if defined(__s390x__) && defined(HAVE_LIBTRACEEVENT) +#if defined(__s390x__) { .name =3D "kvm-s390:kvm_s390_create_vm", .check =3D test__checkevent_tracepoint, @@ -2265,13 +2244,11 @@ static const struct evlist_test test__events[] =3D { .check =3D test__checkevent_breakpoint_2_events, /* 3 */ }, -#ifdef HAVE_LIBTRACEEVENT { .name =3D "9p:9p_client_req", .check =3D test__checkevent_tracepoint, /* 4 */ }, -#endif }; =20 static const struct evlist_test test__events_pmu[] =3D { --=20 2.47.0.199.ga7371fff76-goog