From patchwork Wed Feb 14 04:53:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Rogers X-Patchwork-Id: 200801 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp990856dyb; Tue, 13 Feb 2024 20:55:50 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVkSUhwDCl+9qDZcpPE9sCv9YnlZttu+i9B9u1Ih+8BoCHTV0+8wEwLprYcIOYHMeSxNotTBT0wyPHsUIysX6tjA6uOlA== X-Google-Smtp-Source: AGHT+IHPeY9WJ2e6guaZ9vHqUIARtzAjdzvdNbDkEUfIguQXh03YM20JxLZkB7TcbYlJcFIM3hhJ X-Received: by 2002:a05:620a:b86:b0:787:24e6:baa8 with SMTP id k6-20020a05620a0b8600b0078724e6baa8mr1602297qkh.56.1707886550196; Tue, 13 Feb 2024 20:55:50 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707886550; cv=pass; d=google.com; s=arc-20160816; b=TAEun4wEJO/zKRRoQR7cC0iyPVlxOKYM67COMcUgV12Cfa0Uu89FZX7hNcH1Urwhdf KPwjiwdnHs5BP+BWipHyUaH5Phu5a0GU5hfqgCtOWb0TOT2pJfkYDNcuj6etd0zi2ZTC d3KC2ASp2MvSmR+brpH2iSvt/0yLjbNwvZtFCe36uuVWZT5Yu2K7sJlTZ3QBKhUHC0BY vUbYO5zfZzt7BPW7cr0AEKFud8MCd3Jr0mBcxuL6HqsBYKN8HSb71Ben1QlPmlgUP+pz 6WMTHqyuMnyyHDtWuBXK43GTKg6O8PHPYmNcQj0NQHurYPuwO3q9sbki+8acME06YT7/ eWEw== 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=WQsEsQdYL+F7rq54Mfa+75HgoPY/TwxmW9rhD6V78kU=; fh=/zT6VuKwH6/WkhoOjhSKKEgeusqx5z4m2zHD8xtWrK4=; b=Jfe/5j/uoCQ0kN7E1vuJjRVI4c3FJXZ8ccx7ibVj8kS8DO0N1DCqYeQQJ34T6J4CQU yXW5ELo0iu9+BYe5RSo/9HW2nDMYXZl0IWGUNajUesqoY5Z6Yka0i7MXraCOnWriZESj S/RJGxGqlM8ilolNXnRRBjoGW9/mIWmTEU3d+ixJaQFsu9rWgOKLpfRdZW1y+QGt/g4k +TlwTeHIDRCxGtO7CUAlw2v/MtbLlGqCYsbCUUBjyNCor5Vtx9mM51KmFt8RilRp6hoq WDRlllKl7kSzXmgNM8il788XwkYtSYMeGE7f7V4+vSI8ULSpskXLOH4NKTVGH3m2/ni/ D43Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=ka1HKHnw; 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-64739-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64739-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com X-Forwarded-Encrypted: i=2; AJvYcCUlbieo3f918yce44/VOFgpGtBU0pM3MxvmyFAduAIG6yPzG+XcQeyG1kT5Tlxi4BbBLLy0Aa0eX9iH6PgS6RN/S3R/LQ== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id a12-20020a05620a102c00b00785b33ee81fsi9868900qkk.623.2024.02.13.20.55.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 20:55:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-64739-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=ka1HKHnw; 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-64739-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64739-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id C12551C2288C for ; Wed, 14 Feb 2024 04:55:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 947B3125A5; Wed, 14 Feb 2024 04:54:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="ka1HKHnw" Received: from mail-yw1-f202.google.com (mail-yw1-f202.google.com [209.85.128.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 513CA1119E for ; Wed, 14 Feb 2024 04:54:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707886481; cv=none; b=F9iJ1Av0O8Duy8PjK43igjhCAy0K0VBP5NEJXc7Ys7JW7i4vq05Pv3fxkdVbTy7ua5M8hWMl3sgyxeVhjQWpoQ2dVN9e/0CzIT2J6MWYXZfNvczzkLA4ljkuNzFmLtwzY7LClqL2mHa4dv1KHQPMDEqfeAdSibmlVa5rArmd9ME= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707886481; c=relaxed/simple; bh=cEoquvI2Ge+v6/Ow4yXCwb905NVQF3PwLLtFQnXzKG0=; h=Date:In-Reply-To:Message-Id:Mime-Version:References:Subject:From: To:Content-Type; b=gzogAVducOJe0CAVqsrMwN6+cEF9uRPaPWsbGxEkE+9vmF3iwsnATDjbp5zfYgfVi3CORvdHYsCLFDPVkz81fJ0fFNHqFsUoY8a7Y2XWlY4Xp5Dy0k3CyVGWzlgi15XCghhtFjHjdS3xSCP35lD89x/tUBTU9ZRYDFpbuwaZNZQ= 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=ka1HKHnw; arc=none smtp.client-ip=209.85.128.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-yw1-f202.google.com with SMTP id 00721157ae682-6077fa2fa9bso30720987b3.2 for ; Tue, 13 Feb 2024 20:54:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1707886478; x=1708491278; 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=WQsEsQdYL+F7rq54Mfa+75HgoPY/TwxmW9rhD6V78kU=; b=ka1HKHnwUZf/VtZmg13XfpuL356/CJEiYDRvGxg8or1taZebth0hH+3EF/v2bsJ1K/ T6HJTlUU9Xj9GUPg4+Jh0hiaxXlC53GVqNGHmIhMOOXKpWEMQiSvm5P/WfCWaNItYR/i c2N6g4fgB6wDiWqFCQjUNHfWzYwLtpCzVVJLyKo2oFfUieIF1vlPOU1VTYfI8RVC/1Rx WmNflBbWD0iBrarDoOFTfkuuH5WEDHNhQbFC4ehOGJIepaez3U+7mVMY6+Ut7lXRTCWv O0e39iaA27ZfMz1noSy6ESsD2RsnuCm2L9do1rqEHImu0PYWzBCHXfeW/2sPgYWVvzRG XNbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707886478; x=1708491278; 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=WQsEsQdYL+F7rq54Mfa+75HgoPY/TwxmW9rhD6V78kU=; b=UHbaT4BYkgu8P/ZncBxiOPqGXwobjXLGVTKHEzzcmuhmi8a0jefzbm2Xu7FNesErjD zig/9Bz5gQPtWmLcEdthA2mwMmsvPh3LbpbDRa+DJvVlUvLpTRmkTyeH1Vn6GBFBylzh AzJkBli4lMb2JrgbDCx8YpLfhAJzGT4TpmEG1NtTHm0WYXgo3eRB0Em00cwxYXWRbBd+ 6fEku3G2P59sDKCdXYGJOuQ8ajMmrJu0SZa/mh5sCvFtaiEmVSpexz3IFj9B1pRNOH2D x5SP23pCEe4+EIj0ceEpFwvt8uNHBECF4/Q60VGKIU5DrZHX3vX+yI3LrJE+oYQZSmpC FlZQ== X-Forwarded-Encrypted: i=1; AJvYcCWV/N6qlcwf/iCsP/6PpeczyAeyT7knV6BRIKzZnxqJVpjUUfSM4SX6d7JkDUM+/pfkH1Mfgx7YEkR5bEXc1zputzreOAEICV27+E0Y X-Gm-Message-State: AOJu0YyoQRzse9KaQzb5NXd4XD4wl4965mI5iA+1j1RGdciwbYASAZLj QCFtIJ6ZA1JR4iEfGhVR/Zap7nAwGMX+TjDL4joWNzFEvwlPd+FslUlFTD7UJjLGiYgocOW86bf nn4CmSw== X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:6d92:85eb:9adc:66dd]) (user=irogers job=sendgmr) by 2002:a0d:cb4a:0:b0:607:83bd:bea3 with SMTP id n71-20020a0dcb4a000000b0060783bdbea3mr244497ywd.10.1707886478458; Tue, 13 Feb 2024 20:54:38 -0800 (PST) Date: Tue, 13 Feb 2024 20:53:51 -0800 In-Reply-To: <20240214045356.748330-1-irogers@google.com> Message-Id: <20240214045356.748330-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: <20240214045356.748330-1-irogers@google.com> X-Mailer: git-send-email 2.43.0.687.g38aa6559b0-goog Subject: [PATCH v4 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 , James Clark , Athira Jajeev , 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: 1790848847111497328 X-GMAIL-MSGID: 1790848847111497328 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. Signed-off-by: Ian Rogers Acked-by: Adrian Hunter --- 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