Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp18839lqs; Thu, 13 Jun 2024 02:27:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWgYgODBFKQZFl7Ikg71F4AJrGbbpGNC10qx79Q9u0V+RawG/QTLc2PhqYD/3MxBZou0ozFGi4/UWorNOuWghfKd255sh3JdttuvpVPtg== X-Google-Smtp-Source: AGHT+IEGB2AReMv8Dvdtld90YxP8LtcZM7831uJhn/9kY/XIvSanWcA+AgrLZn6lIr36GkpIxntT X-Received: by 2002:a1f:738b:0:b0:4ec:f8b1:a34b with SMTP id 71dfb90a1353d-4ed07e95e37mr4291754e0c.8.1718270860529; Thu, 13 Jun 2024 02:27:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718270860; cv=pass; d=google.com; s=arc-20160816; b=R+2S8Fv3GcN35MimKizAPYBt5oxyAk7KNE5hw8w55YYnDYAFYsMxw9yldidA7LA5D6 3qqKcR+1hM9CGvlZTy+FA27iHJHyuV7AXR75tcwE60YjBRpkIjCbLmwZkeLHUfVS1+nA 4LbqzrVCYEHujae4bYa2XhenKg1c/Jf3OSXBhCTfFs2MhVIoxCeO/VVIx2SAiLTu0RQd qdp+cBqFeWvAz6ChJ4LCD/cuI+ZvSR1JjAlW44toALF/ARz3sGJVKpezlgg1ujK7elr0 vB7xysn+mJP63AJYCpOFy2IQ3iIEooy0zOInZzl0VBcGZqlY/BeayIWgq94BDhnXpjg4 IC8A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:cc:content-language :references:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=aSSf+Q22t8SW7lmr95nbbIoVuGLgfNSHo4M16drmhtE=; fh=kfM/v3BSC1x/R8F3vCgAUmK7cWp67OzYP9SjbOAETqc=; b=iCDoc6YujrYTgf6GdgXimU96qPS34Z8jhdTH5XE1ukVWM8q/LIK07JiF5bHxAY7uSR yZrWHKVo+RzZST3Zt3B8dLlGhrzTjHV5N7qa31X+EabL2f5lQPAAZfylVMm6yXZkuhkh 1VS/JNGrrEucoJpDhqMo2J4q/7chkaxhin6gj0a3aSaElh9NzVBOdaNfox1EklPrZLHX RjaM+OtnD1tGxO8MCYCc36oBnQlFYunCRWJDXovkI0Gq+z8jwWfk+qHSYWDS7fZb1v5h BYoqIwQ+mzEGKhdPAGxIXpnpiR7jP+YD3HTEM7u9c702fawyXSvHh5/Dq/H9IvqFO6/B 7Npw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-212945-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212945-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id af79cd13be357-798abd1754bsi92168585a.492.2024.06.13.02.27.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 02:27:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-212945-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; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-212945-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212945-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.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 41C471C21F6D for ; Thu, 13 Jun 2024 09:27:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3E4E913F420; Thu, 13 Jun 2024 09:27:27 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 53D6313A3E3; Thu, 13 Jun 2024 09:27:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718270846; cv=none; b=olCol8EoK3YzkT1KyQV5VbTOAoHvGyFQZ0bCrPyf4wxrKMqaJ9HRncymJeCkiIEUVjRdiLhYcB+1rgCHYny3NlIGJRR38Qjmb61KBcPUsTkEJeygyp67VrWXjL+Wxm15vjR/xNCLoT3A6soN/XIufW1QHV4qOkGfwoTLj+2B+Co= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718270846; c=relaxed/simple; bh=vxAPeb2Mts0r+X8CEYqNf06SKswc4GRuspVbQUOuPS0=; h=Message-ID:Date:MIME-Version:Subject:To:References:Cc:From: In-Reply-To:Content-Type; b=JWwnbme+yK8WiV0VbXA8R5KZLHe94n5qYp3heut5dUp8XwhHQGvSXuLGoVMy68Rtes9K+q22seIZMxnrZW2bWOVTaQ/prqFjxa/0sQHQ7h3FYNXKNu388ZoMVxYFU+Z2veBP/efIGXe2DNA1BA8VYrutl3y5aBFTphHNw1Vk0a0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id ED0ED1063; Thu, 13 Jun 2024 02:27:46 -0700 (PDT) Received: from [192.168.1.100] (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2F0333F5A1; Thu, 13 Jun 2024 02:27:17 -0700 (PDT) Message-ID: Date: Thu, 13 Jun 2024 10:27:15 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1 0/7] Refactor perf python module build To: Ian Rogers References: <20240612183205.3120248-1-irogers@google.com> Content-Language: en-US Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , 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 , =?UTF-8?Q?Bj=C3=B6rn_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 From: James Clark In-Reply-To: <20240612183205.3120248-1-irogers@google.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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. > 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 >