From nobody Sun Nov 24 01:20:46 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 2A2F41C1F2B for ; Fri, 8 Nov 2024 18:48:08 +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=1731091690; cv=none; b=gs8CNFmUSlTGOlKiEg4GcHavTAjmPBUpVoTKx7AVd4xHuFNegoON9SpHeX170GV1eZzWKKuEHs5L3HBPGEh3wdi/a6aVrVoshLxARDhSuaS5DH3bPtTRm8QmbeNh7KFr57osTexgdX8n0EWXmoTpY02dDAstcgiVw4T/jx6iBOg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731091690; c=relaxed/simple; bh=QRhwRrSJyI/kOaWmz0vfruc+Nvc3XqPg7f05ygNW5iY=; h=Date:In-Reply-To:Message-Id:Mime-Version:References:Subject:From: To:Content-Type; b=mKGippOXLZxeB7d+L6W2n/k70xDqgOCLicvD/FCjN5IqbIuXvWUwwh6CWpgomh+vegSwLDmg/vgHhGSGSoUfyBmatVqIjVl6Sk3AtsOLD+xsO+y3wcekGtBIqAZT1Yrgby2iHRGje4EMf0qLg0ZF5MtOF+GcEGDQ5zD3KkAv4AQ= 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=nKXYqXBc; 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="nKXYqXBc" Received: by mail-yw1-f201.google.com with SMTP id 00721157ae682-6e35199eb2bso49361327b3.3 for ; Fri, 08 Nov 2024 10:48:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1731091688; x=1731696488; 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=Flqrjh5XHYvCPHOJ71U9pEXddkJk6YSG/Cy+AhkddDE=; b=nKXYqXBcFgB7aib/K6ru6tUx8oLc/FS5kjqYwXrzL3G4AtYRE3ytBpPVtuOPQnMLqT qW/yh7SSLxmCHC2yti5xoaKSBRSZton9X64ZO7Riyq7ZfNbYCb0XmK/Rbr0OR1rQX81g 2F7tGAUFD6udBOx9NxVOKe87XmlDyk8GC39mRBBqwHL/YLGPu1BC0jQtDrcqIIE39MiZ OUBczzvOHcRXUe7p7PV1hAEY1fptERAWz3IJJPrpjMt3ELiR/U8sy/jhHvTayjoJ1hyO DMs+IPFZqSioG7e0GE2F1SuiB0yGzP6tVMtWOg54x7pqfA2BAggaGGaQs7eHJZsfGeG8 SmeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731091688; x=1731696488; 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=Flqrjh5XHYvCPHOJ71U9pEXddkJk6YSG/Cy+AhkddDE=; b=mmbjIdFaoW0NzkjhOha2JSESW6LBJ2btFhJ6+occTaGNQk65TpQIS1i2h2/E6niClp sVfxCo+QzqW4cvoyHNx9mqxXAHLgcTB0oYjIgY4uD8o74/nu2hX5Ti1AO0+tx2veLG32 X4pDxUEO0mdaE9v3l1/6Es9R7/hVwZark6YUzPTnl9+lKhuQLXeKZT5XpZvCRfOwlroo hhWOfzbazwpmu5BSDRE4JUIVTVpndVEKDMxP4WxCrd2acqTkS9GwFSvawkavOWPdQXRd 4TJHASlVzR+mD74B7rFPESCX6dZTqsXsxYBVXk64wIcbiSet6CZAKzIXthZypOm2HbX+ xwvA== X-Forwarded-Encrypted: i=1; AJvYcCVsE/fgt47CqvyeidxgkfmxBwlAI/ZXRm7LTAkFf+6O/pbGn9bhJjDWQuNiZzSc/F75hTdtwsALfd2IfIc=@vger.kernel.org X-Gm-Message-State: AOJu0YwR+PGLzdlphB4hgaYkoOKvkbAyhudSrAOPG5e7TG6NABA17v1W sytODKGHw+mNVds/WGGd6eXUHLVAjrBC62eVX/f6kLSQCBrcedtMxlHL2v/rY6p9s7qlplGcoRa HN0+XaA== X-Google-Smtp-Source: AGHT+IHZ1qTghdshfBPUmOFWiF8IM69C3hlHfjzypkVnBZ+XYbcanOCv0+vmPJghWffJ1iwSP5YYk+J+P4Sb X-Received: from irogers.svl.corp.google.com ([2620:15c:2c5:11:6fd2:1e36:6d8c:7c49]) (user=irogers job=sendgmr) by 2002:a5b:80a:0:b0:e30:dccd:9aaa with SMTP id 3f1490d57ef6-e337f8c6c74mr11389276.6.1731091688081; Fri, 08 Nov 2024 10:48:08 -0800 (PST) Date: Fri, 8 Nov 2024 10:47:51 -0800 In-Reply-To: <20241108184751.359237-1-irogers@google.com> Message-Id: <20241108184751.359237-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: <20241108184751.359237-1-irogers@google.com> X-Mailer: git-send-email 2.47.0.277.g8800431eea-goog Subject: [PATCH v4 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 --- 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 01ed9335db4d..f26a668a96df 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.277.g8800431eea-goog