Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp459426lqd; Wed, 24 Apr 2024 07:32:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXmBit54v34GeTw5Hoe3f47Vzb1RDC1WzjGnQ6lkgmbdJ9q+eYuwAZ6Qnv+wdMA4PmOHtGVB8z3HWR2jTpAiYkuPF4Ag7XrKTKx7lmEqg== X-Google-Smtp-Source: AGHT+IFs5OkYvIghN1f0J1F5KBl6rlWrsm4QJnWrEo1gq4f5SEHa1kdl0uqV8xhT+rtue5fxe/ax X-Received: by 2002:a05:6a21:4983:b0:1a9:11e6:8e03 with SMTP id ax3-20020a056a21498300b001a911e68e03mr2614729pzc.40.1713969120227; Wed, 24 Apr 2024 07:32:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713969120; cv=pass; d=google.com; s=arc-20160816; b=iq53RQjrd2TSNhJMOCpr0USE98lSke5ukKRIwya1lCxXeIkKcmIRtBjCvvHQyfGxzG o63cWltngopxniaXbpaUZEFlUOhjz6rJlGZ0D0JPgxZ+ALR3akKiE2GERrW5x8AHibK0 jLBdi4K1LKa6hhyQcmH3Khg4HIfQOND8jEJMNQnpTGDKNDxAztEM2M6GLrZWAh0SUWjr nBR5j7FNt+ESf/RllpgPZgMNAXkqbEdtHVXI245ZV7RcTdnKbc+CffJikl4Ih8z9+vXZ ZF9uRL5EgUkHB/GYQpA8zdM1fnTWTDg8hptlTMMbGsJc946Xi36kFsubjQYYYIjv/ODy JFVw== 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=LPy8Ttx+9/7Pq6LFKy/Q4QfW2KsCJodsi5ARM1YFMfM=; fh=e6e57dLQDIfNYcGy7h8ncM/K8jdVfvU5qBmE06q9dII=; b=EffVcqkfq9lOg92qjZjnP0a1m4RM+xTv8CIZea8M0KcGG4uztaKiYINTZbJpoQ1sIz Q5tTY1JthjBjW+Ho7pzwilr/bwdU4ExhzPEK+UHpZEhq1la4bExGDcqH7JMeNFxYWVpq eJreDjHZlEOFK/a9zVGTXCDrI1DbLhfCB+tNiLieTv5oGayzldW2qXInpKj0bQLOE9iP 6Xs7CwztR8g8DkoXnXjGcS0jhBJded/xv3toXTHhOvErQdJpTRVl3MmHMZBB7IP4iicn upsv0sMnhHmeImu8i2Nz/dz97QOXFvNSx3iprRW+fgoZrni8xChH1V4hSSDsbhMbesBZ e3Kg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XTnv4CCd; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-157052-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157052-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id v14-20020a056a00148e00b006ed633b9110si11636895pfu.26.2024.04.24.07.31.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 07:32:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-157052-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XTnv4CCd; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-157052-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157052-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 6B448B23C8D for ; Wed, 24 Apr 2024 14:15:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E3C7A15E7E3; Wed, 24 Apr 2024 14:15:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="XTnv4CCd" 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 1719E1E4A9; Wed, 24 Apr 2024 14:15:10 +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=1713968111; cv=none; b=gsQIHjhVzufm+uGjBDD5K51wzJq0rmvBYkkJIRnb80JlwlvzTFgmzTw+COI8xN65pWAFef0s+xOi3TGcK3J+T421EE8Q0eCosoxQUPkn1ciBwQMmUjrW2myYd8ja6dCnZ4x1AkJl25VOu0BDBFyjh3xP4DticdkHzjvSzjQugrE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713968111; c=relaxed/simple; bh=HNbPj5ZyYt4Q8V+TnVsYN3A1lRAyvMw2Q3ZWnqGiNcs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Wchkw+Bvr/EyHBYmoRL70vdappVTZddYRqoO95qTl14K0LGzW4HS8Mjkcjxe4ROA9rrR3qpBXTbaEHhyEo5f3pAdDQqwTG5LG0WHNz7bUhjdJxtrm60eDV7aKExLap1h8fEEZfv2GcDAKhjnO5bYvx45FDRmHhU+V1KKnWm9tyU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=XTnv4CCd; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1D386C2BD10; Wed, 24 Apr 2024 14:15:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713968110; bh=HNbPj5ZyYt4Q8V+TnVsYN3A1lRAyvMw2Q3ZWnqGiNcs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XTnv4CCdOO4TGqdhQj4q+Q3Iad43fzw7mOkjyB75VJ/H5iLASLvgHE7s0WztzW3dC vPoiqYH0I+Fg8TQvaUWk8Dwqk+zlCkHUTSqzuq+WBOeHc41EPDIL3g3lySuVhrtvS9 7HlHuvQAWedLnEz80attFMbuCqSFdNoCOUDg+mQfpuMEGhiogYxYKIRt0wu2Hz+n/4 sWgNDClH4dQBn1VE1AkCg8ngMgZFJT0ttNBheJ66HRpMkzy1jJKnDU4pjax0qSZ1U6 fn7QPph6DnY3xV1oRkU9P5JIJ/7LfazvX3oIbssSccpBxNoB3iJYYzYkcJC5+uDXzf 3hPllp/Ks6WGg== Date: Wed, 24 Apr 2024 11:15:07 -0300 From: Arnaldo Carvalho de Melo To: Andi Kleen Cc: Adrian Hunter , 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 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: > > Add a Python script to run a perf script command multiple times in > > parallel, using perf script options --cpu and --time so that each job > > processes a different chunk of the data. > > > > Extend perf script tests to test also the new script. > > > > The script supports the use of normal perf script options like > > --dlfilter and --script, so that the benefit of running parallel jobs > > naturally extends to them also. In addition, a command can be provided > > (refer --pipe-to option) to pipe standard output to a custom command. > > > > Refer to the script's own help text at the end of the patch for more > > details. > > > > 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: root@number:~# perf test -vv "perf script tests" 97: perf script tests: Starting: perf script --cpu=27 -i /tmp/perf-test-script.T4MJDr0L6J/pp-perf.data Finished: perf script --cpu=25 -i /tmp/perf-test-script.T4MJDr0L6J/pp-perf.data Finished: perf script --cpu=26 -i /tmp/perf-test-script.T4MJDr0L6J/pp-perf.data Finished: perf script --cpu=27 -i /tmp/perf-test-script.T4MJDr0L6J/pp-perf.data There are 28 jobs: 27 completed, 1 running Finished: perf script --cpu=24 -i /tmp/perf-test-script.T4MJDr0L6J/pp-perf.data There are 28 jobs: 28 completed, 0 running All jobs finished successfully parallel-perf.py done parallel-perf test [Success] --- Cleaning up --- ---- end(0) ---- 97: perf script tests : Ok root@number:~# - Arnaldo