Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp176821lqs; Thu, 13 Jun 2024 07:15:56 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVXPyjll8Nbe/WSMHEGDeAAPfdqt6y56FMtHDiSkgJcMYNgfUYsdEa6GagJ5yv69hJGKK1r5+SGWxI+F5lUJzR6+ULp63K9zZdM79PVIQ== X-Google-Smtp-Source: AGHT+IFjOGiYeK6HOlOVin6woaZCWGb2SPlhjVhrCXxDY2b3g1iIYrtHh0yA6cTO1PbrlNKqK79i X-Received: by 2002:a05:6122:a0a:b0:4ec:f758:e514 with SMTP id 71dfb90a1353d-4ed07b90cb4mr5492624e0c.11.1718288155833; Thu, 13 Jun 2024 07:15:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718288155; cv=pass; d=google.com; s=arc-20160816; b=ONm4phZIwp4kR86mH2LsXdRKoUc0oN4UlbiGeIKoNsNnapSyV6mVUTplEaeBj6mBYU fVW3wHSCPTbj+g2KFj2Ujeu1ZgMeVziUFPuagzibejE0B57exhMiFaKPsF4dfebS0ims FrdPeJh1jRtVb60wyjifj39qtdtxHEDLB2a3s54u4PxwgwRkrx23HIvZQagGqQUp0Jol nTxiEUzTVinSCfLluKrgcnrewgIFxBdCCruKghIAkdhmpZECEg+WfYcBVXtCuTblJO1c 1w8fi873UqQ+ljIP0Wy1a6Z8CIRRo9oY0ri1sWbP7FpmYFq5wmTUdfetf2tC0WicGUwi OwpA== 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=89aoE3CIu4W/9hh/00wE0II/3Sd0IH06Tx6+7F3Pj8I=; fh=ICG0bmiLYo9tX3+mKOVwl8KO2vJeui5EFr3jsVsR+AY=; b=ISMAKXrqXjheg+3R9UYXai/bSfgsDlkm3hdBxJhlJ5+ilDjuGHhAKjjdQSmQH1XidU kA3+lTo21DK1oCQHEfa2e4XdyAtLMlRi9G9OlfQxhDCfp/DwTd4kzwMmFpHC0QVZK77J CEhnjMrfPHZXmvzQXCKj2Hh32JJFRqrwrgMAv3OGz6lOklc2WUADlrT9u0NDDk7eVXoC hYfv3E7LP+FRXDKWxKSHKcw7hLoI+mYV1YqyxiTaSKErm4a/0i3xAqnVkPaBFY4yVlJv cZRR9rI3MYrYprvxxUP4bZZFBqw3ci5YN23+RL69QLRRa+E3XatErgTLiR4NR7krFYYI xxFA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=c+MGreyN; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-213413-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213413-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. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 71dfb90a1353d-4ed41438decsi272776e0c.237.2024.06.13.07.15.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 07:15:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-213413-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=c+MGreyN; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-213413-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213413-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 7CD541C209CF for ; Thu, 13 Jun 2024 14:15:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 16B9A145A1A; Thu, 13 Jun 2024 14:15:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="c+MGreyN" 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 13CF510F1; Thu, 13 Jun 2024 14:15:42 +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=1718288143; cv=none; b=I/LXOhLkejtTXG0ZgwywcQQhwEwEkHVuwYSdHH+5hsVMAPyAkYBh9LlLmgDJ84XZEs5xJzUKo/WEPyktEvoK+PNPxEJFgZCpPfMuMXa/2tUDnXrBvb7J7CSM8YbHE3r4wlt2mn8aavlUTv6cPNo0uOqdKu+LwiE7AX667icojxA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718288143; c=relaxed/simple; bh=JzDvvJIFsoEa8Pp8qeuXMOIfuGTZA2pY6sCk2zTKjoQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=XWirorQgDcLZRe7ruvxGvRn35k8Xt9W82r2gw2msw6AiJP3Yit2dbjOOhVEy0J4iH38FgkPSsj3Vriniwz+eZCalPKz3N+qZ6Ru14+CXmWXJtesAFngC5ICXZCxFLPntg7ydaKoZCezoxO4lJcKpj/T8hKeSG8iQ+GNz7BqNIK4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=c+MGreyN; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id DB66CC2BBFC; Thu, 13 Jun 2024 14:15:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718288142; bh=JzDvvJIFsoEa8Pp8qeuXMOIfuGTZA2pY6sCk2zTKjoQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=c+MGreyNpxLjoAxhXsbjTrGiU1ZiPyaiegSPRV4Pnh1kzeM1z2qs69/qzeNLEN9Zl eXWi/qnxmfvJR9zLgQlFgddLCCOnXIWsBIBVq7TeeQFf0t1fN6QAmjO5WIRAv/dBMl TuPrmVQifdEhwNF+s9/mNTt1vaXjf+g1UbCqT9ebYbIF3pfKPvjVccIPTxqXWeG1VL tJN9Z16KipjklAv9syKzfciXDEgM/+nMFzcdv9XP33gfgUOICDHyE6nkDg81ordhIy 8q3rbHRx2voGajA9vsaty6RlNzwoa7s/icxWGNjLgYiYJgnu2jvldp03BSixKLnifw SzDji6l+ihKlg== Date: Thu, 13 Jun 2024 11:15:37 -0300 From: Arnaldo Carvalho de Melo To: James Clark Cc: Ian Rogers , Peter Zijlstra , Ingo Molnar , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter , Kan Liang , John Garry , Will Deacon , Mike Leach , Leo Yan , Guo Ren , Paul Walmsley , Palmer Dabbelt , Albert Ou , Suzuki K Poulose , Yicong Yang , Jonathan Cameron , Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Boqun Feng , Gary Guo , =?iso-8859-1?Q?Bj=F6rn?= Roy Baron , Benno Lossin , Andreas Hindborg , Alice Ryhl , Nick Terrell , Ravi Bangoria , Kees Cook , Andrei Vagin , Athira Jajeev , Oliver Upton , Ze Gao , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-riscv@lists.infradead.org, coresight@lists.linaro.org, rust-for-linux@vger.kernel.org, bpf@vger.kernel.org Subject: Re: [PATCH v1 0/7] Refactor perf python module build Message-ID: References: <20240612183205.3120248-1-irogers@google.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 Thu, Jun 13, 2024 at 10:27:15AM +0100, James Clark wrote: > On 12/06/2024 19:31, Ian Rogers wrote: > > Refactor the perf python module build to instead of building C files > > it links libraries. To support this make static libraries for tests, > > ui, util and pmu-events. Doing this allows fewer functions to be > > stubbed out, importantly parse_events is no longer stubbed out which > > will improve the ability to work with heterogeneous cores. > > > > Patches 1 to 5 add static libraries for existing parts of the perf > > build. > > > > Patch 6 adds the python build using libraries rather than C source > > files. > > > > Patch 7 cleans up the python dependencies and removes the no longer > > needed python-ext-sources. > > > > Reviewed-by: James Clark > > It does require a clean build to avoid some -fPIC errors presumably > because not everything that requires it gets rebuilt, for anyone who > gets stuck on that. We need to find a way to avoid requiring the 'make clean' :-/ - Arnaldo > > Ian Rogers (7): > > perf ui: Make ui its own library > > perf pmu-events: Make pmu-events a library > > perf test: Make tests its own library > > perf bench: Make bench its own library > > perf util: Make util its own library > > perf python: Switch module to linking libraries from building source > > perf python: Clean up build dependencies > > > > tools/perf/Build | 14 +- > > tools/perf/Makefile.config | 5 + > > tools/perf/Makefile.perf | 66 ++- > > tools/perf/arch/Build | 4 +- > > tools/perf/arch/arm/Build | 4 +- > > tools/perf/arch/arm/tests/Build | 8 +- > > tools/perf/arch/arm/util/Build | 10 +- > > tools/perf/arch/arm64/Build | 4 +- > > tools/perf/arch/arm64/tests/Build | 8 +- > > tools/perf/arch/arm64/util/Build | 20 +- > > tools/perf/arch/csky/Build | 2 +- > > tools/perf/arch/csky/util/Build | 6 +- > > tools/perf/arch/loongarch/Build | 2 +- > > tools/perf/arch/loongarch/util/Build | 8 +- > > tools/perf/arch/mips/Build | 2 +- > > tools/perf/arch/mips/util/Build | 6 +- > > tools/perf/arch/powerpc/Build | 4 +- > > tools/perf/arch/powerpc/tests/Build | 6 +- > > tools/perf/arch/powerpc/util/Build | 24 +- > > tools/perf/arch/riscv/Build | 2 +- > > tools/perf/arch/riscv/util/Build | 8 +- > > tools/perf/arch/s390/Build | 2 +- > > tools/perf/arch/s390/util/Build | 16 +- > > tools/perf/arch/sh/Build | 2 +- > > tools/perf/arch/sh/util/Build | 2 +- > > tools/perf/arch/sparc/Build | 2 +- > > tools/perf/arch/sparc/util/Build | 2 +- > > tools/perf/arch/x86/Build | 6 +- > > tools/perf/arch/x86/tests/Build | 20 +- > > tools/perf/arch/x86/util/Build | 42 +- > > tools/perf/bench/Build | 46 +- > > tools/perf/scripts/Build | 4 +- > > tools/perf/scripts/perl/Perf-Trace-Util/Build | 2 +- > > .../perf/scripts/python/Perf-Trace-Util/Build | 2 +- > > tools/perf/tests/Build | 140 +++---- > > tools/perf/tests/workloads/Build | 12 +- > > tools/perf/ui/Build | 18 +- > > tools/perf/ui/browsers/Build | 14 +- > > tools/perf/ui/tui/Build | 8 +- > > tools/perf/util/Build | 394 +++++++++--------- > > tools/perf/util/arm-spe-decoder/Build | 2 +- > > tools/perf/util/cs-etm-decoder/Build | 2 +- > > tools/perf/util/hisi-ptt-decoder/Build | 2 +- > > tools/perf/util/intel-pt-decoder/Build | 2 +- > > tools/perf/util/perf-regs-arch/Build | 18 +- > > tools/perf/util/python-ext-sources | 53 --- > > tools/perf/util/python.c | 271 +++++------- > > tools/perf/util/scripting-engines/Build | 4 +- > > tools/perf/util/setup.py | 33 +- > > 49 files changed, 612 insertions(+), 722 deletions(-) > > delete mode 100644 tools/perf/util/python-ext-sources > >