From patchwork Thu Jun 13 23:31:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Rogers X-Patchwork-Id: 13697604 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 15A13C27C79 for ; Thu, 13 Jun 2024 23:33:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:To:From:Subject :References:Mime-Version:Message-Id:In-Reply-To:Date:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=r+L2y8W9nebELrh4jjwhLDqIvkQwPnsfqcpkdzoDYes=; b=P+rYvqdmDdKy+dbSTcC2JEG5a/ 04WnFDm8pxqxq9RinMy+G5my42roAVZdnmEUvven9Z+QeAxDBSTpFZAcnBpkuOH0yk4K24AEzoYSG 5piDMRiQzZOSWgM3cKD3IPoyjmxHo5bwhKxyeT1yWmi8giIT7S29lC3hM3lKlt7xIwhErL1XS+cxp OSlmTvkrgcB8duMR+Y7HfBbUyyDoOMY5sqlCXdFSIzd81XeGGE/16VkwuuJscSe8mEjEqZWGUL1BV +5jQJWP2YdYksTx4FxRrL3KB57UCbsh8VpY1mrsLi3kuZdDzeJyx2QtiZ0tdnjfoVu4o5YUsWJmjg XL8cEtiA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sHtwu-00000000mql-0weH; Thu, 13 Jun 2024 23:33:44 +0000 Received: from mail-yb1-xb49.google.com ([2607:f8b0:4864:20::b49]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sHtvF-00000000ljG-1dWn for linux-arm-kernel@lists.infradead.org; Thu, 13 Jun 2024 23:32:07 +0000 Received: by mail-yb1-xb49.google.com with SMTP id 3f1490d57ef6-dfeec5da777so2568971276.3 for ; Thu, 13 Jun 2024 16:31:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1718321517; x=1718926317; darn=lists.infradead.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=r+L2y8W9nebELrh4jjwhLDqIvkQwPnsfqcpkdzoDYes=; b=kU84idSk9CqSMd5HAIy/vi7n+rNqS+9gWodMTNiTYZOvA5gYBaQfHojYjSERF3+27f wz4fiFTt/hkeGXR9BegSLgKPYUR9mosFdTPzSjxCzPhlJkJCewn9YhCRTzxQVZxv3mMs 7PwcPqo9t28Yu7kC6avrH2kkbRf5p7YuquxWaIUgB/hhFTmO18tBZTviNWqz7yjOz+zN feSX2G6f3RspGQGiavaDLiwNTT2ufCXSZGbpoxe7algzovd9IiTqyI02ptT4RhfTNLQT puqx8+3PJxsD4jgOlQpa5nYgMS7RokvXez5U8nMbo6NhsXKgpjR5UCmxx37zff203Bol syMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718321517; x=1718926317; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=r+L2y8W9nebELrh4jjwhLDqIvkQwPnsfqcpkdzoDYes=; b=QyHxw4DBbXegh8EA33n/pamStBivu3vWPd8S31Z5N3AD05L5aNjKgsy9IMQHhFyeDm zRJQpwlhSP4/YEgtvqwsLiyryb0INaPW1BDn+ggBQv5aoxde0eRv7CttzOHwGj7NPzQv /VbYnl0JO8xAYDXpNgx3HRL+dlX8r+jOhM/wloo0FY5MonB3DD09oRLUUHS6gIeyfShY 3J2eQw2L3IXEDLsKu7tIOYDPDGQlone6OroixQIyfvtw6f+siOCSZNg+s/NrSoLEejyq EovUWmIEtCsi4Tcw4HU9gaxxuohuUppJnlNz3CbipWMqS+BxR+cBuB41fDw+BXzPcMgU pgYw== X-Forwarded-Encrypted: i=1; AJvYcCXYmI6BerNm/4uzsc/cXhP2Ree521lq/kYnpzAbBx1ptsUY3bXeW9LkcZ2XyTEj7yMbg5s/s9AHfrEGcZKKgIFjnfB+Dv4KWI57U3bjeUpYzITNrNQ= X-Gm-Message-State: AOJu0Yx1kd+CL25hb7Ld3+3t7kfLJVQznaMqJQtOJ0TEfSVIOcaxR/xH yAluuH6azZXAkPjKAh2tb2RoqzUIRLI5IpDYGTYZ74RRAMAyHnd1AI2gDnAi2uOzJFQqCZvUo97 MYEq/tQ== X-Google-Smtp-Source: AGHT+IEPh6V7sGbFHR3+mSLnMHVnCNCyXK9wRdgNwAVEtM+jm7kOCyEDIINjZOrKiPFf8Nvnv9P0x6gU6Ikz X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:96dd:26a6:1493:53c8]) (user=irogers job=sendgmr) by 2002:a05:6902:1204:b0:dfa:ff27:db1 with SMTP id 3f1490d57ef6-dff15412181mr135767276.4.1718321517470; Thu, 13 Jun 2024 16:31:57 -0700 (PDT) Date: Thu, 13 Jun 2024 16:31:22 -0700 In-Reply-To: <20240613233122.3564730-1-irogers@google.com> Message-Id: <20240613233122.3564730-9-irogers@google.com> Mime-Version: 1.0 References: <20240613233122.3564730-1-irogers@google.com> X-Mailer: git-send-email 2.45.2.627.g7a2c4fd464-goog Subject: [PATCH v3 8/8] perf python: Clean up build dependencies 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_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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240613_163201_612762_0255288C X-CRM114-Status: GOOD ( 15.68 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The python build now depends on libraries and doesn't use python-ext-sources except for the util/python.c dependency. Switch to just directly depending on that file and util/setup.py. This allows the removal of python-ext-sources. Signed-off-by: Ian Rogers Reviewed-by: James Clark --- tools/perf/Makefile.perf | 10 +----- tools/perf/util/python-ext-sources | 53 ------------------------------ 2 files changed, 1 insertion(+), 62 deletions(-) delete mode 100644 tools/perf/util/python-ext-sources diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index 4a1a9f09fa09..590081384882 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -380,14 +380,6 @@ python-clean := $(call QUIET_CLEAN, python) $(RM) -r $(PYTHON_EXTBUILD) $(OUTPUT # Use the detected configuration -include $(OUTPUT).config-detected -ifeq ($(CONFIG_LIBTRACEEVENT),y) - PYTHON_EXT_SRCS := $(shell grep -v ^\# util/python-ext-sources) -else - PYTHON_EXT_SRCS := $(shell grep -v ^\#\\\|util/trace-event.c\\\|util/trace-event-parse.c util/python-ext-sources) -endif - -PYTHON_EXT_DEPS := util/python-ext-sources util/setup.py $(LIBAPI) - SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) PROGRAMS += $(OUTPUT)perf @@ -715,7 +707,7 @@ all: shell_compatibility_test $(ALL_PROGRAMS) $(LANG_BINDINGS) $(OTHER_PROGRAMS) # Create python binding output directory if not already present $(shell [ -d '$(OUTPUT)python' ] || mkdir -p '$(OUTPUT)python') -$(OUTPUT)python/perf$(PYTHON_EXTENSION_SUFFIX): $(PYTHON_EXT_SRCS) $(PYTHON_EXT_DEPS) $(PERFLIBS) +$(OUTPUT)python/perf$(PYTHON_EXTENSION_SUFFIX): util/python.c util/setup.py $(PERFLIBS) $(QUIET_GEN)LDSHARED="$(CC) -pthread -shared" \ CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS) $(LIBS)' \ $(PYTHON_WORD) util/setup.py \ diff --git a/tools/perf/util/python-ext-sources b/tools/perf/util/python-ext-sources deleted file mode 100644 index 1bec945f4838..000000000000 --- a/tools/perf/util/python-ext-sources +++ /dev/null @@ -1,53 +0,0 @@ -# -# List of files needed by perf python extension -# -# Each source file must be placed on its own line so that it can be -# processed by Makefile and util/setup.py accordingly. -# - -util/python.c -../lib/ctype.c -util/cap.c -util/evlist.c -util/evsel.c -util/evsel_fprintf.c -util/perf_event_attr_fprintf.c -util/cpumap.c -util/memswap.c -util/mmap.c -util/namespaces.c -../lib/bitmap.c -../lib/find_bit.c -../lib/list_sort.c -../lib/hweight.c -../lib/string.c -../lib/vsprintf.c -util/thread_map.c -util/util.c -util/cgroup.c -util/parse-branch-options.c -util/rblist.c -util/counts.c -util/print_binary.c -util/strlist.c -util/trace-event.c -util/trace-event-parse.c -../lib/rbtree.c -util/string.c -util/symbol_fprintf.c -util/units.c -util/affinity.c -util/rwsem.c -util/hashmap.c -util/perf_regs.c -util/fncache.c -util/rlimit.c -util/perf-regs-arch/perf_regs_aarch64.c -util/perf-regs-arch/perf_regs_arm.c -util/perf-regs-arch/perf_regs_csky.c -util/perf-regs-arch/perf_regs_loongarch.c -util/perf-regs-arch/perf_regs_mips.c -util/perf-regs-arch/perf_regs_powerpc.c -util/perf-regs-arch/perf_regs_riscv.c -util/perf-regs-arch/perf_regs_s390.c -util/perf-regs-arch/perf_regs_x86.c