From patchwork Thu Sep 14 21:19:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Rogers X-Patchwork-Id: 13386071 X-Patchwork-Delegate: bpf@iogearbox.net Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AB400273CA for ; Thu, 14 Sep 2023 21:20:09 +0000 (UTC) Received: from mail-yw1-x1149.google.com (mail-yw1-x1149.google.com [IPv6:2607:f8b0:4864:20::1149]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2517D2723 for ; Thu, 14 Sep 2023 14:20:09 -0700 (PDT) Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-59bcabc69easo20067837b3.1 for ; Thu, 14 Sep 2023 14:20:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1694726408; x=1695331208; 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=YO3ZTyHFm+00gT95r949gZji8+XYvbCsq+dhsmDC+Ok=; b=E2tqCAxPd3bvCjWpCu1Mdk81qd7sNmUQscYrFGIN4qeq1ugNv5edtqC0V+gUnG2fpl OguXR94Cg1gct+QfZy2nG6MO5lGlZiygLIuJ+Wp4R04WhrShZRFyGi4Zz3y3jh34gbnH QYyrRBbQp6YRVXaL7cjm28TvkQcTnFk6Qovm6GL7LTEChcgyygRulO0m0AYF/wAAgXL9 r6xF1iur7uNSFI7cBbSI8qhlDDYkrtXmDH61YJ6sOUdoGuhe8bAvXVStv6UYQHlXoEHN P6kUnKPUoAAoOLC4dnauYDG0DpxxB0VSJj/fIEb1z8BbaoN4+t7cfbw5x7+YaJiBpl87 J2oA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694726408; x=1695331208; 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=YO3ZTyHFm+00gT95r949gZji8+XYvbCsq+dhsmDC+Ok=; b=so64hajUTA3oCWdnto74YgsSh78EHttNsybLk+Tlp7kJKhdbwdAHGocxGy0z5ItoKQ HfrTUy/l/p0LQufoI0n4CU7iMR6rPZaeXGnEsfGrxKp1znl8wgNGm1DTv2RHJ/Bq7OTH 9zDcACTO3I8fz4EN757lD47jkwxUjRCyWxxTcXaJVXgq9Z8oyRqRjcTDh3edzQ2v6eIp Ehld6a4pXHq85EhD1M7DzffrOTdLhE7BvzC78znnU20Im9eZErtkUXX2cP/8240OHp+B eJDt2Y48CCn83DLquc7JqqCBQOgeROeLabeg6dhifeyoWHprwOqzVli8yCvAXMIwgKPC wcNQ== X-Gm-Message-State: AOJu0YwGZ6TBjCFsdufqee5pU4UEUtE3eoW3J9lQgLz72asALYNcd/dK DZbuFWhCN29vzTHiV8yzF7R4BK50jBYZ X-Google-Smtp-Source: AGHT+IGCEX/KOyc+NQTtFfPYAWgFXG6kDLqyIKgl2lhi89WqTIgea5kl72TnA6Q8vTJoreHIXz9tXTcmvDM3 X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:5357:1d03:3084:aacb]) (user=irogers job=sendgmr) by 2002:a81:af11:0:b0:589:a5c6:4a8e with SMTP id n17-20020a81af11000000b00589a5c64a8emr175716ywh.1.1694726408395; Thu, 14 Sep 2023 14:20:08 -0700 (PDT) Date: Thu, 14 Sep 2023 14:19:48 -0700 In-Reply-To: <20230914211948.814999-1-irogers@google.com> Message-Id: <20230914211948.814999-6-irogers@google.com> Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20230914211948.814999-1-irogers@google.com> X-Mailer: git-send-email 2.42.0.459.ge4e396fd5e-goog Subject: [PATCH v1 5/5] perf test: Detect off-cpu support from build options From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , Nick Terrell , Nathan Chancellor , Nick Desaulniers , Tom Rix , Andrii Nakryiko , Tiezhu Yang , James Clark , Kajol Jain , Patrice Duroux , Athira Rajeev , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, llvm@lists.linux.dev Use perf version to detect whether BPF skeletons were enabled in a build rather than a failing perf record. Signed-off-by: Ian Rogers --- tools/perf/tests/shell/record_offcpu.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/tests/shell/record_offcpu.sh b/tools/perf/tests/shell/record_offcpu.sh index a0d14cd0aa79..a1ef8f0d2b5c 100755 --- a/tools/perf/tests/shell/record_offcpu.sh +++ b/tools/perf/tests/shell/record_offcpu.sh @@ -28,7 +28,7 @@ test_offcpu_priv() { err=2 return fi - if perf record --off-cpu -o /dev/null --quiet true 2>&1 | grep BUILD_BPF_SKEL + if perf version --build-options 2>&1 | grep HAVE_BPF_SKEL | grep -q OFF then echo "off-cpu test [Skipped missing BPF support]" err=2