Received: by 2002:ab2:3c46:0:b0:1f5:f2ab:c469 with SMTP id x6csp245767lqf; Fri, 26 Apr 2024 05:48:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWZeyU7tyJlyTkeZ1b1WQqWfia2QXfgTNX0TDUVlBbQUsV8e5V59213U4obyl5vEl2hlz/DN9KuAlviU/n1ucjuoOr7OpvKM0SDzNvNEg== X-Google-Smtp-Source: AGHT+IHLG4wYeNk+W6tVV6Iypzsw8QBb9Fk6KYwPsMWzO0QPz0y3JutSKpZL3dERp6FmAIA79yzD X-Received: by 2002:a25:a309:0:b0:de4:5c7d:2855 with SMTP id d9-20020a25a309000000b00de45c7d2855mr2553197ybi.37.1714135698807; Fri, 26 Apr 2024 05:48:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714135698; cv=pass; d=google.com; s=arc-20160816; b=tRxYZmo/RhtXfe7SvSKg7w797snJEx90qKV7OFS+7NA3zsghq6enTPuobPkUNPDLU2 eWtU7OHiwEneR53TyxZCuzX/1SH6f68y+XWZPJ+MuLj/EU6fOn/Kr+PbXIirvBou/91h ICMV4pQ0VSEJgcxPvxNFU0GPTfa6yIS22uow5t3xxnequdFYoZHsXkUjwARU1bCs0Xg+ jUjZ/pD4R7x+8I4dCNiIkmAyCXwFWcrOq+WHAla3NAl8I+/Uny3CiMvqZ2v3yiumtZ9V b1oCG2rfX9br3IJy4sDWCJLXwbrOJ2rOXhXeX5Ffwi3whhYGMLaezorLRT9NH9/ju+uH 0Zrw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=RLuDLye23uSCJS78ZzSdgUei3CmqCpZaqBK+LHHl3E8=; fh=hQOosIMro6LbCVM82haBWxfdqdIdmgzCUbTDSxjfBaM=; b=jW8jf1dy4hDgyE1dbM9pci+kiZrwZaezFa73oXCJGp1UohIqk9yPehbNrNdLeOt9Z+ teFk1gZmHQWvpXkJUa2RskL7eAZSQJrZ/9upxm+oIton7Pk/PeH+bMtqpcomYM/4cPHX nQh7u0Ho6iIGonFbhhcPN3JNS7JbToiJXHiqQ0M+R8zcYN/CenlUnSeyvjxc1hhG51TI WBerbq3O4r75CTlMMoqC0IBn3lPUo/SY4jSBiTsU6MbCUjX/rQ0pr2fLDEXJ6FfxUmEg fSNrZD4potUwYtHqZD5zEWZ+M/OI/85Ssh29Ai/uk73Sf+C+oQWZ7WMugSAhVaf+6OB8 HRfA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ecWCkYsd; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-159996-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159996-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id o20-20020a05622a045400b0043a8cb19535si284681qtx.73.2024.04.26.05.48.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 05:48:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-159996-linux.lists.archive=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=@kernel.org header.s=k20201202 header.b=ecWCkYsd; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-159996-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159996-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 443881C21958 for ; Fri, 26 Apr 2024 12:48:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AF75D146A80; Fri, 26 Apr 2024 12:48:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ecWCkYsd" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 D8DF82A1B0; Fri, 26 Apr 2024 12:48:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714135691; cv=none; b=A/GXBHD9FLeMw1ShOLaWZwefA/aGG9oUiE03/k/E0KfZqb5K1urBHJrwN1ZUG9Vc7u9HuiA7l13n3IQsh6qCLQOeQJixAGz1XAYlgfpqTxi93qcpURD9OhrdJsGEA9GxezcBkHvdmB75P60RBY7XJu/8gWoyAFqdlWxIe19s0Yg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714135691; c=relaxed/simple; bh=FOzFFi+msUeLXNfbb70s5KkbOCz2J/1lKkGOcbc75Vg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=J12L6kqaunsCcTPCUvpN9XxVLfSdFS6uDUHbR71ypR71JHEkRew0NM0il3tTQ67OOEsuaFrSqLCP3EcZHg+V/2Xe1uNcHK5skQmrTsypXusvhceHBfrryMqywSgAY7131ldhe+Ark7ak4V6dH++0QMMDCE+7XgP1ZORIdMvEOsI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ecWCkYsd; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id CA065C113CD; Fri, 26 Apr 2024 12:48:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714135691; bh=FOzFFi+msUeLXNfbb70s5KkbOCz2J/1lKkGOcbc75Vg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ecWCkYsduNjS49+qSQh1C9PfkhcSQEE6IyK+p7RSLiL63G45KfKhpPKyvSIAMjfNp Gphe2ZSFIxP6ouvibgmzqnhI2l2AT85SgrbTll+xnmIXCKGoPKi9VGqT5PO8G8I8QV 9PiSZxvQCmC1dHV38z8xHJpo3QWWvYuAlwPYpXDD/BvlbUM0DIMU4JMbGS648KyHJE iM4z5I98bkBIEq57JQT+iJlyMC+oFV0IfXIun0yMJmN6MF7yLsbKYbkcNjS44f2wuY r+gKvc6AmRFZ7ieo2sgIyfLbRwrEl827SQjo+9u3QL9K9lHdDNkYTdNdOn3VYRqkrZ vAiqgGO+oHm3A== Date: Fri, 26 Apr 2024 09:48:08 -0300 From: Arnaldo Carvalho de Melo To: Adrian Hunter , Andi Kleen Cc: Jiri Olsa , Namhyung Kim , Ian Rogers , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Subject: Re: [PATCH V3] perf scripts python: Add a script to run instances of perf script in parallel Message-ID: References: <20240423133248.10206-1-adrian.hunter@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Wed, Apr 24, 2024 at 11:15:11AM -0300, Arnaldo Carvalho de Melo wrote: > On Tue, Apr 23, 2024 at 04:33:53PM -0700, Andi Kleen wrote: > > On Tue, Apr 23, 2024 at 04:32:48PM +0300, Adrian Hunter wrote: > > > The script is useful for Intel PT traces, that can be efficiently > > > decoded by perf script when split by CPU and/or time ranges. Running > > > jobs in parallel can decrease the overall decoding time. > > > Signed-off-by: Adrian Hunter > > Reviewed-by: Andi Kleen > Thanks, applied, and added a note on testing it using: Plus this, please check. Committer testing: Ian reported that shellcheck found some issues, I installed it as there are no warnings about it not being available, but when available it fails the build with: TEST /tmp/build/perf-tools-next/tests/shell/script.sh.shellcheck_log CC /tmp/build/perf-tools-next/util/header.o In tests/shell/script.sh line 20: rm -rf "${temp_dir}/"* ^-------------^ SC2115 (warning): Use "${var:?}" to ensure this never expands to /* . In tests/shell/script.sh line 83: output1_dir="${temp_dir}/output1" ^---------^ SC2034 (warning): output1_dir appears unused. Verify use (or export if used externally). In tests/shell/script.sh line 84: output2_dir="${temp_dir}/output2" ^---------^ SC2034 (warning): output2_dir appears unused. Verify use (or export if used externally). In tests/shell/script.sh line 86: python3 "${pp}" -o "${output_dir}" --jobs 4 --verbose -- perf script -i "${perf_data}" ^-----------^ SC2154 (warning): output_dir is referenced but not assigned (did you mean 'output1_dir'?). For more information: https://www.shellcheck.net/wiki/SC2034 -- output1_dir appears unused. Verif... https://www.shellcheck.net/wiki/SC2115 -- Use "${var:?}" to ensure this nev... https://www.shellcheck.net/wiki/SC2154 -- output_dir is referenced but not ... Did these fixes: - rm -rf "${temp_dir}/"* + rm -rf "${temp_dir:?}/"* And: @@ -83,8 +83,8 @@ test_parallel_perf() output1_dir="${temp_dir}/output1" output2_dir="${temp_dir}/output2" perf record -o "${perf_data}" --sample-cpu uname - python3 "${pp}" -o "${output_dir}" --jobs 4 --verbose -- perf script -i "${perf_data}" - python3 "${pp}" -o "${output_dir}" --jobs 4 --verbose --per-cpu -- perf script -i "${perf_data}" + python3 "${pp}" -o "${output1_dir}" --jobs 4 --verbose -- perf script -i "${perf_data}" + python3 "${pp}" -o "${output2_dir}" --jobs 4 --verbose --per-cpu -- perf script -i "${perf_data}"