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: 13697587 X-Patchwork-Delegate: bpf@iogearbox.net Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7D60915884D for ; Thu, 13 Jun 2024 23:31:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718321520; cv=none; b=nWE+V9/sZI0UjnFztNZLTOvZ9tYT/wcAtq80VrU0Niu6fnn8PCoSU+fO2WUwcCurmcSynIQuZVjLmCqo/XxEc7b8z+oI2sNR/e1152mlBW8frQXvurNcWveNTpBMFSCJKlgvFETd+OGWzaaz87JEJkD2DQXWTPnQ3VJFlznCMdc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718321520; c=relaxed/simple; bh=/ONs+RfIi9pLA0kZMRaJefFpcB8Apxh4eLPjFTsRe2k=; h=Date:In-Reply-To:Message-Id:Mime-Version:References:Subject:From: To:Content-Type; b=WYIsJzymNjfxQsGO1qwxwnR4BE33yhRhugAiVGmrHjdaGYFhBRp7jxFZQpvsu1MTHCyt51mnITravOE2riiEAv7kWbI8dLrmhuE2/aJ60FU9jHCKp+P98OVXALtoCHPsAgzIk8cP2wIBd0l+39fsNx8BPyNZf1g6vedn+5+9UZc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=ECORuHTw; arc=none smtp.client-ip=209.85.219.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="ECORuHTw" Received: by mail-yb1-f202.google.com with SMTP id 3f1490d57ef6-df796aaa57dso2308957276.1 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=vger.kernel.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=ECORuHTwHGB/Ph9nU/ff21rHd49aMyz/FSczqgrCqFJhWN073jEJIuh/g7k0lo4/TI XSphDlof2cWSJSxBJjws+zKp/21Oeyo5PHwKivHFhBfO3ilB6KTG3fxXqb/YZ0HNf28d EjtnV+a68eUue2os0uDZTDzUJsSYKg7noX/PuMRfN0w/56x4cu0/rIFhMnteSEconcdY 1lZReEtAPSGlNV+ojWscqoiw1ttSxhCpX85rzgLw4dYCgcZSyD08VsU8WBRULZ9u6jPP 3Zhcw6ee6Dzp8cxECDM8K27kd+p+F466Fs7bI3uPUIwkP+xaPIDn0A5jQQpAHAzsyF/p 366A== 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=jy354IIkTKHgYoXguUfLEL7h2+yDoSoSJDaG+XKBDqmkywVg7TxkiQ2hO6ZnJYCHN1 OaEzhTxR/m8r1wBY4JJkaRBVRN7wp/ge8Z58lSaIe/MFzJ+C6Tob4+xeppMoC958Dj2n 1t/4oHjTIf89HCJdwoAOXYZIfAfZH82S2P57XLAs02072/K4vGDktNLZsfyWt2he1Gcp JaO1SbHxhJWAkZ0ag0wmFvcH80OquMk2XM4WTLBaMsie6wYq+vCY85JWvR0VIEsP2ftW CQtrtf0x1nIf8YG79h8CoTaaUXDTyKKLUjWxYouIxasyieYZ1fy3+4q1PNRJ3wwEQwjM 4Ydg== X-Forwarded-Encrypted: i=1; AJvYcCVzdKuy2/NXhZ7novulyLDWVUo7RHo8iSJm2jM3rGC8Sd0Md5022Qt+oHyhh6OKnQKJ82nS2tbLpO9zyxAhvHxZDCiC X-Gm-Message-State: AOJu0YwRxpHbPXe5QPBjLah1XlWDKNvhd7jChxqtWwLHHw4NSPIT98Wm tCGENtsqkQ5cBN4nLCN7otJ7IE8Mm5OQCbNqhEbTe886SGuRZ3iva8l3OqQdvaeE8XYYs/aYuEs sye+CTg== 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> Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 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