From patchwork Wed Feb 21 03:41:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Rogers X-Patchwork-Id: 203887 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp813218dyc; Tue, 20 Feb 2024 19:43:34 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX3aTu7nYM8+3isVc8oDouTPXs7dxhbc5KjDPSLMRtCCRVnWYESo71bR9WS5G7e7coXo7qE/HKTrfvHkkpzZtTPJ7JZgg== X-Google-Smtp-Source: AGHT+IEZnTz4NYyv1FX749hIFZeNKse2CnZkGjiElAkSScNFSntw/M38d5rMWqxGo8azdCVqVLGu X-Received: by 2002:a17:902:a3cf:b0:1dc:2f2e:139f with SMTP id q15-20020a170902a3cf00b001dc2f2e139fmr546478plb.39.1708487014178; Tue, 20 Feb 2024 19:43:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708487014; cv=pass; d=google.com; s=arc-20160816; b=sN+Qbo3/jDt0RCyhGVTXe3wD1iNHXonHXRShKLrfPCjSP51c1EPLRqLjljhTrK4K0i 9dgdYaXvOoJ0wRR+WvvYjLy1idgxRPhxKRaJ2SWsczr0HbWu3v6F2MFOyb6khlSj68+i g3fzJTWgONdREZ7A7jLkqRk5VKOl4Hsrq6Mn15v8Qk12YaNp9xD7T2IPqMQX5NDzvMlo d9BDuDShPotLrDzzwG1Crm/JyqdhXPoFmB2ZPD7875bnmJZavrHGTwQmeV6lVYhrgMEc 5zBsAQy24Z3lYS6jp7txVtEreaW2o74Y//VZu+vg+vsNjmCGgdkeXjI3AbH0FGfFiTgY vDuQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:from:subject:references:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:in-reply-to:date :dkim-signature; bh=OwHudnCNl5wfpV2IMol1tp79ctLuVP/i5n4Lz8j3mXY=; fh=PuuaUpTTaYkreygZPyIWKH4b3UUAmD/njXc0MwgnD6o=; b=jZFcIiUi71qYvEA65xjGYyyPAkkwwUDlltyRXAukmHIRY9NY05Y5klVzyxUbQQh1dK zSnmU9rhH/GMHdZ7tLXiIGEU9QA3kroPZEmM2OSwv/TcvUkMAVyvFws2IyG+vvrP9Qud 19cktpHnZ8xjuVWUBAoSGBGo20ucqRmuP/gSlfzE5Dhsxa6WjofM8xgOey8PRAm2kdKJ DAD24jk0mXVMXaAYtO07EUbwGVXTaOZXjTZVwrErazSCfYdCgpKWNGdEi2zC9WlvLkhx NgENHP2bsrooDl2eqTr5kP7YcSJ3SrSHEDVP+aAbMGs8f6oZhAYdv+YZgLa8UK6ZBZf+ swpg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="cz5q/b+E"; arc=pass (i=1 spf=pass spfdomain=flex--irogers.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-74010-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74010-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id jb18-20020a170903259200b001dba356b96fsi7177190plb.420.2024.02.20.19.43.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 19:43:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-74010-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="cz5q/b+E"; arc=pass (i=1 spf=pass spfdomain=flex--irogers.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-74010-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74010-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 06488282DC9 for ; Wed, 21 Feb 2024 03:43:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 060043A28B; Wed, 21 Feb 2024 03:42:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="cz5q/b+E" Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) (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 9E3F439FC3 for ; Wed, 21 Feb 2024 03:42:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708486932; cv=none; b=f4OQThmN6RTDL/9ZHP/1dZFo3et4A++MZ0hayvepMVb3Fq77nxI2xXyQO67x/I65NIP44gsEqKDseomDEUetDUOCrM81oYbAmeteLUufjqGtLDDJ9l5oBrspzdCAcgpFvudap3eD5sbdcrGdBQZKR3VkPPhIDtW1qsJ3rp1tyOs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708486932; c=relaxed/simple; bh=9QHqj0EQvOX6+a6MNptism09KshtnOJS+VQ0pDYpZf8=; h=Date:In-Reply-To:Message-Id:Mime-Version:References:Subject:From: To:Content-Type; b=OGoH5kyoRQmIqt4NeTT9JpJxTf4O1e3Szb4DrnNuz637LzCuFNxvKlrVXfHT0qdjZ0Q4Ap4/KGV+tJ0W36CH8151rlXXn5UOaMCN7KfRtgfGW9LlDvmb1wEw4uZNm8YgU8vBOZ0ko7A6ytSPgV32Hl0B4MOrFI4WHbpyAb2L4Gg= 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=cz5q/b+E; arc=none smtp.client-ip=209.85.219.202 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 Received: by mail-yb1-f202.google.com with SMTP id 3f1490d57ef6-dced704f17cso2109165276.1 for ; Tue, 20 Feb 2024 19:42:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1708486929; x=1709091729; 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=OwHudnCNl5wfpV2IMol1tp79ctLuVP/i5n4Lz8j3mXY=; b=cz5q/b+EfWRt2txHILY61V/gXJBUL2CSnvB009BhTjTdw0aWlisPpCaFRExuFxZ1uF Y3WlZN5mnjzsqRFTaNoGjelMHbxXk+4n7L7BvT7JRhEUYrdpSbjP7rERkiRlJBezQSTp XcHIOqPVFIR6HR9+Wudknqxh2oWHF0fUfqUCXIVCQK7Ql8dbeuopjnFCa2R52wevmNZO aq/+IaFdflieT2tcK/0j6Ui0b7DHwu78N8hGKTzTll8emsj9rD2uinslvX8g+CoTELyA 2IXklu85A8AW3tqVTP9f+EXf+jHh4WlNSstn3f6Bpe4yS4ph436vFtCEvylHz56y65US S/0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708486929; x=1709091729; 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=OwHudnCNl5wfpV2IMol1tp79ctLuVP/i5n4Lz8j3mXY=; b=d6b2pc4NKCziSyOokbwLaznP79NpF1ifjHXUHul2TNjBiSgQS4oyXDGb64BwVU8616 Zn/5frpSVA/7J+j0+ZHtXzkAMld2Y4wvYVxSLyGldrjajVKPPuBYQGm0ulqGASKGbTqw B3DbbbZbzbLw1GRHUhQTfYYWPl6CAJaTPvnDl/0f1pfmMWXprSahSDiDPKSlj6pP+BOw i2vwNElhVupEm2POajYILEwmvWi1pNy0OvrYsUgV1UQp628xhLmi1Asxyvu3pGbYqlSc S3O8z8Vu90n+U+pNvdCeHuddVRd4iNz2FE9RA3TyY5c2a7MnqsX0+MU/UP+VANFdEGcm ADlQ== X-Forwarded-Encrypted: i=1; AJvYcCW+f8c8Yj6aU2LXWzLOFm0DPeHJMw62bRzfVCO2V4va1h5ls4CcKM2eHUT1faoo9TRlOa/UmFPxl0wpzxHAxdYSr4ikclBvCTfN4vwY X-Gm-Message-State: AOJu0YwObbLaZzXj6TvJrn+j+ZPqjHRXCjdfJ5FLeMKs1xB2ljbPMAaU fJme0yaH2HHCqpCillWV7/xvo7iWhHaRHNmQNUE2BSIuuPmYT1gRFtOOHLOfJVBHhzhgv5Dm4T4 Qrrj1Aw== X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:3c02:f882:5876:b7ab]) (user=irogers job=sendgmr) by 2002:a25:a447:0:b0:dcc:41ad:fb3b with SMTP id f65-20020a25a447000000b00dcc41adfb3bmr602386ybi.10.1708486929422; Tue, 20 Feb 2024 19:42:09 -0800 (PST) Date: Tue, 20 Feb 2024 19:41:50 -0800 In-Reply-To: <20240221034155.1500118-1-irogers@google.com> Message-Id: <20240221034155.1500118-4-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240221034155.1500118-1-irogers@google.com> X-Mailer: git-send-email 2.44.0.rc0.258.g7320e95886-goog Subject: [PATCH v6 3/8] perf tests: Avoid fork in perf_has_symbol test From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Athira Jajeev , James Clark , Kan Liang , Yang Jihong , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, llvm@lists.linux.dev X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791478479178446344 X-GMAIL-MSGID: 1791478479178446344 perf test -vv Symbols is used to indentify symbols within the perf binary. Add the -F flag so that the test command doesn't fork the test before running. This removes a little overhead. Acked-by: Adrian Hunter Signed-off-by: Ian Rogers --- tools/perf/tests/shell/lib/perf_has_symbol.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/tests/shell/lib/perf_has_symbol.sh b/tools/perf/tests/shell/lib/perf_has_symbol.sh index 5d59c32ae3e7..561c93b75d77 100644 --- a/tools/perf/tests/shell/lib/perf_has_symbol.sh +++ b/tools/perf/tests/shell/lib/perf_has_symbol.sh @@ -3,7 +3,7 @@ perf_has_symbol() { - if perf test -vv "Symbols" 2>&1 | grep "[[:space:]]$1$"; then + if perf test -vv -F "Symbols" 2>&1 | grep "[[:space:]]$1$"; then echo "perf does have symbol '$1'" return 0 fi