From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5CA4EC27C4F for ; Thu, 13 Jun 2024 23:31:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:From:Subject:Mime-Version:Message-Id :Date:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=sMFZzDC4cuIVQ42p+gSjwPNM9hG7LknPd/iDclMqjyE=; b=Awj9EApoeQZLt7 jTA6NbEQZWwNjmvUoM5U1LzecRsygWIXUXm32SiCgFW114H/EJK2LJETkKinN7ZW5p45luxRa1jrl ifgyOK9gXSltdRizpHMHeB+VJiUSOWgGh0yiUnKVC7ba7KLi62x2gRKdileXO0+ya8pZDtMMLtqNk HZNHnovxU+g3mM4m8/EsqpODbDtq96qZnV7mMoY7LJ0Baz0u5tE97aodBsYhh2KTpGEd4WuoTHnpF +TOCxhdmpzguXmAsAx6yH6j+W/6y7/vpSnlf2hea63hKsp3LKD9RedF+lZUpRbyavbmx614C0l2iR +lE6ugnPEAb75qbyd4tw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sHtv1-00000000lbR-1W7G; Thu, 13 Jun 2024 23:31:47 +0000 Received: from mail-yb1-xb4a.google.com ([2607:f8b0:4864:20::b4a]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sHtux-00000000lYd-0seF for linux-riscv@lists.infradead.org; Thu, 13 Jun 2024 23:31:44 +0000 Received: by mail-yb1-xb4a.google.com with SMTP id 3f1490d57ef6-dfefc2c8569so3059212276.3 for ; Thu, 13 Jun 2024 16:31:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1718321498; x=1718926298; darn=lists.infradead.org; h=to:from:subject:mime-version:message-id:date:from:to:cc:subject :date:message-id:reply-to; bh=bv/Fm1C1sIcT67jHqqKPUxG1mSp4iG3kEZiVQMnNilI=; b=Ov+091hog2iQd18GR6sSURy2iB+zTZ3sqlCoCQoWEhE7Z5Pmk9Cbi0IAQ9Dt2HOPjV zIjR3gPxPQktEOZ8sAmTAoLZUu/wOS8vUuRYcTlwcOkkdkHCYpfS84bWthm6Lhkw1/i5 wyOu1GWe9fPkyocbIpp1hG+6XFvAINY6pRVnDEsgkxvaPryziqd1+nIqOFqjt0baYXeU /TFazz2tZ1mY9NoV4A+VgOLRM5n0SzW2Iexshd5QfpvJBPUSPWHg7Lx4khLWV8vLqaie 7G6VBiCJMDUGune4ScPT+aEhs+zK7hK2NTkh4HKCxquMe/Ca7fsNmBqTxHm1tQK2tC0f 4H3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718321498; x=1718926298; h=to:from:subject:mime-version:message-id:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=bv/Fm1C1sIcT67jHqqKPUxG1mSp4iG3kEZiVQMnNilI=; b=BzibJ7ooz+eeOjbDVLk86niP6Nn+XoNCTW5O5MKK5WcARFvOZfeCZfDsdml1DWp2ku yfuUWwqnzSTuYKi5l6DnTntCvPhUNZykQAPLC1Mo8AO7q1rWlgI1TsyEBvRwD6qH1Tjg z03U/QIEkBIkidRn75/MOnlWuq9FS0S2r7RfTqPBfe/kRcqw+MQh1jPbjBFfhDKlHTkQ ote6V9FXoZ9bXTSG+wu7nQ0G0PI1RdUBPE8nmr2GXQgvv/Dbp0jPN23e+JnDCvHhrlPx u6FHzO6tDMVbz1oZD1BYBCVhthY47ciJkwBAJAQk2I/3L2Zz6gNh6by09bpNn5TJ7r+/ ur0w== X-Forwarded-Encrypted: i=1; AJvYcCVM/ltLIMOOffahMstKI6fUOMMTsvj4YoD9YE+cvhJv+9JYMGP5CZ8Zoge/3B+PGUATi49agM+WRA6bLT2GJfm+fB8iD33INCoASbly1VfT X-Gm-Message-State: AOJu0YxL56lud1h5u5vUmB3/NPkjJLsnLcz6dC/9JqC2QUl62ua4onsi FJBMEPxWblD5noOt0r4PVw/qfZBTtCJ6lOmySPzsVVxktvpnBbsOGhx6vw7JfcU2WTTW2K1senW yQ7+lvQ== X-Google-Smtp-Source: AGHT+IEeElc3Y5HxcuYVce8c3qaAQhtxoPOeS2i+52eehdbxjLd+idIerVIBEsPYYq9g+NtXzt+B6SE6V2RK X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:96dd:26a6:1493:53c8]) (user=irogers job=sendgmr) by 2002:a05:6902:2988:b0:dfa:4b20:bdaf with SMTP id 3f1490d57ef6-dff15470dfdmr79758276.13.1718321498506; Thu, 13 Jun 2024 16:31:38 -0700 (PDT) Date: Thu, 13 Jun 2024 16:31:14 -0700 Message-Id: <20240613233122.3564730-1-irogers@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.45.2.627.g7a2c4fd464-goog Subject: [PATCH v3 0/8] Refactor perf python module build From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Kan Liang , John Garry , Will Deacon , James Clark , 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=20Roy=20Baron?=" , 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240613_163143_262197_92C90E02 X-CRM114-Status: GOOD ( 13.84 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org 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. By not building .c files for the python module and for the build of perf, this should also help build times. Patch 1 adds '*.a' cleanup to the clean target. Patches 2 to 6 add static libraries for existing parts of the perf build. Patch 7 adds the python build using libraries rather than C source files. Patch 8 cleans up the python dependencies and removes the no longer needed python-ext-sources. v3: Add missed xtensa directory for the util build. Remove adding the arch directory to perf-y as it creates an empty object file that breaks with GCC and LTO. v2: Add '*.a' cleanup to clean target. Add reviewed-by James Clark. Ian Rogers (8): perf build: Add '*.a' to clean targets 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 | 83 +++- tools/perf/arch/Build | 5 +- 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/arch/xtensa/Build | 2 +- 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 +- 50 files changed, 625 insertions(+), 729 deletions(-) delete mode 100644 tools/perf/util/python-ext-sources -- 2.45.2.627.g7a2c4fd464-goog _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv