From patchwork Thu Jan 21 00:52:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "MOESSBAUER, Felix" X-Patchwork-Id: 280 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:94eb:0:0:0:0:0 with SMTP id l40csp322611ooi; Thu, 21 Jan 2021 02:52:40 -0800 (PST) X-Received: by 2002:a17:907:3f9e:: with SMTP id hr30mr8644454ejc.445.1611226360026; Thu, 21 Jan 2021 02:52:40 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1611226360; cv=pass; d=google.com; s=arc-20160816; b=pHKuz1NgjCH1agw3E+ZZVThTX+Z5SvtW6YRap9AbThj6Gb5bI5xNmr/fwhLj6SuKCM okejT1FLSRuyGbY70zhhTIsLFmuefiFxHNi1oMr+RxCO/NJqlUtM9y9d2O4r7CLqcs47 TAwakq/qI8m52BJQ5RCzXI+yeTF2KGuHCEYEU6FF0jT9r1uQNIhnj6a7qb4/jVuDIM+L 0kCJRA+fOz9Ry4QzJeV/jqJoNBhw14GAdl8WHXRhEck+Jbo1DeIom9zoGndo5aUo3Vrh z3W3+J+zaZcpSbix91vQsDeP2N9WQKX4xmfYhf12M244822LX05Wl4VjsSEwzR3MlZRQ 31mg== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:sender:dkim-signature; bh=XVzAlxzNx/7sh1pYUNeqUxLEHHvZG+iF8Vx66k9zDaE=; b=QOdUTBICAuSr74jbvWlscSdRw7N731BbiKg8Cd5phnVMWQmOrHq+kaW7sOeW0B2uIy KmjPQUgFE+yFag0dgfYedCAfsebM+IiN4c8sgwcbBM+rd5k5/yglu8O4X+23MvX9gwWI ZXP18LO3eTNjNoEPKRNpJWExzWvy9BDCNr48GmeM2e80hAKSnxwOmGc19ZszbVELbTvE zIo/EQoCYGSte8qqMCdluoRkCnzYSmA02Pz4mxDEDq8F0RecnNYG7txLgZQjNyro2T0R nc7Yhv469sXg8bJRLiGPxUaD2+qugk75Hn8A/LXBAj6ZlVs6jnzusvuxu/3224uJ/Ohw f0wQ== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=Ov25zvBd; arc=pass (i=2 spf=pass spfdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of isar-users+bncbczk33mgwucrb55zuwaamgqew7qsvla@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCZK33MGWUCRB55ZUWAAMGQEW7QSVLA@googlegroups.com; dmarc=fail (p=NONE sp=NONE dis=NONE arc=pass) header.from=siemens.com Received: from mail-sor-f55.google.com (mail-sor-f55.google.com. [209.85.220.55]) by mx.google.com with SMTPS id x21sor3430411eju.44.2021.01.21.02.52.39 (Google Transport Security); Thu, 21 Jan 2021 02:52:40 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbczk33mgwucrb55zuwaamgqew7qsvla@googlegroups.com designates 209.85.220.55 as permitted sender) client-ip=209.85.220.55; Authentication-Results: mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=Ov25zvBd; arc=pass (i=2 spf=pass spfdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of isar-users+bncbczk33mgwucrb55zuwaamgqew7qsvla@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCZK33MGWUCRB55ZUWAAMGQEW7QSVLA@googlegroups.com; dmarc=fail (p=NONE sp=NONE dis=NONE arc=pass) header.from=siemens.com ARC-Seal: i=2; a=rsa-sha256; t=1611226359; cv=pass; d=google.com; s=arc-20160816; b=eTiaOVEPTUsuJ+ONxhslEkHlMIM9xIeCAVDsEDfwntCTwUzrfOyxX8DxTCGZxrN6jg AexQfUeVj+2f3V0f63x2pfPgcRuRlcjUZEsiKlAuK2jUVJ6uOJY91JnQoq1ISijmCASA eBAJZxUtOF9sWCR1vL2SvEQVe+iGN3IJFNQC/B04Fde6fDkZrbbC6B8Os2AUG/hyozot 1haAv0YwdKdGSJAAsayXhnPgwh9JjEmOmz2oZuFn/oG++WHGulsuzJMb1ijjmzORf2c8 lZ+8e7ou5oPlp5yymZkOYYAE8NEXcgjJTDek0QVpkvJ+QHhPZXKzMO67xMelt0G90U3n WhuQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:sender:dkim-signature; bh=XVzAlxzNx/7sh1pYUNeqUxLEHHvZG+iF8Vx66k9zDaE=; b=nrYkw+U3i9A6UVX5FFP2M0VIXvB5U2JHL62CclQ6DfrliBqRv40CaY0n5928aftl4o QIe+JG5TZxI/rxtPiDp43Ve4ZoWFqCU3HX/R7rOK88MxwR677OWzGbtGqLBS2RySmm2b iT+yXNHC9vGrSZT4O0IU/6lZUu5KzYEWam4KZ3CJCLy56Bhu/exzEZorbNrUN2oXm2DD tVK7Ph+X1lQYe0Uln0DoPDJJ1WUYkDLZS1Wz5eaBZItv6kf1mOfZiXRnex/5t24+3pjH qLHGbmlQTGXdamw26DEUd6k1Ahd0IuDaM2Cu2somRBt0p1BkNrDg1/zVlQ/eLMBV0/9h f9eQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of felix.moessbauer@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=felix.moessbauer@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=XVzAlxzNx/7sh1pYUNeqUxLEHHvZG+iF8Vx66k9zDaE=; b=Ov25zvBddPkMLHoNkzUZMoIv3K1AtSiiq6al/c5Ei0y2Nq9XdKVUl2CBypm2RGzKgl Z4+wlsdSCi+1A1pg4uaj9WVq4RwgEia73dy5dq1rhEHDvfad3kcVBCSx/0ar6KKfsmva hZ1g4qpd1j2yLLY7nySd5gK4adT9/l69GYxCyt/CJbq096z3CdxCCjJ9YzdbHZjfWVBJ jN5GuRbA29AJ5CM6kfVvHfYBxcwotRfZJ7pdHvzJqh+mfuoCscJczC1OHjNqI2GPMSBf ijRmsSNVHv44CtQuTB3EKaAtFaX22gea+Cb6alrcq5PLFZDk5Uy+p+Q4Dt0/qp4lsBuo Qbsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=XVzAlxzNx/7sh1pYUNeqUxLEHHvZG+iF8Vx66k9zDaE=; b=sN7MWv8Wgi9OHVAa8qGWVH3YIk8H6r63XQM7zkGdxPoen6M6KLlL/BzAnrDETc8Kfg RyU4yhxDTeWae8KSNTfkRHeFzrVn2mXwjKkK1oPVqFm9rYy9Hm8jZgA7esdOn5Sq0BJ7 XexgQgVnJ//KxEG7aglpkHwNi8dyw3l3VZZWVqeN/lcnMhTjsMXnnZxdKGbSPDaHXFKi JShDiXRwaJhWtGnvgxINRFwNaZE6P0Tcr70bgp5tdRsHlpuwHenN8Zk4lrBh9whwaOWv Ck05oRgy4/m8lAE/wcQ9R8oAtkNIWPEiye2J0l23dlUvxMjAs4NW1ihGzkLBeo1vpQOi /TtQ== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM531VOxANus8rdCbWCCKlYykrQuEO2D8lx+eRd7DqVWvYSLd3Zynx 9JgRearFDofBeVSZRGyePfI= X-Google-Smtp-Source: ABdhPJzoizIbq8WkH7OMPdoxIpDQJHJEkIlMOV1nXCKgb9frubleBnf6xuzzmuoS4lieGE58pey1RQ== X-Received: by 2002:a17:906:a008:: with SMTP id p8mr8983256ejy.117.1611226359738; Thu, 21 Jan 2021 02:52:39 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6402:1432:: with SMTP id c18ls2163712edx.0.gmail; Thu, 21 Jan 2021 02:52:38 -0800 (PST) X-Received: by 2002:a50:d80c:: with SMTP id o12mr10198075edj.338.1611226358886; Thu, 21 Jan 2021 02:52:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611226358; cv=none; d=google.com; s=arc-20160816; b=BlsUUFKWkZw6berDqbori/EQZKmuoS0nt6bwT9a83Qd/A46QmDiB6jlldtNrNzt745 0spAlIV72aGUaMX/CwHMG8GIBph92rpLl5jLocnoOgkefLHiWu7OutWaxAEu3i4VNZeM VNJA0StRq8l3X+KBUMnavQ3albloymCxm+fShrmYX/LDGE+nzmxInNEMzEgmKgsiQh38 mOu/zQKNQJgQ+BNUkmSC/Arp6SfnaeRmBvMgPheGF14kE9SjOZOGR5dS8hAXCmR4om+R VavTVUiegpEjRBUG8H/P0XywCWyOWMzL+LdE2tpbEwEJZWjyIeZzsmiWsN9zQw1mAo74 5KRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=7tJZ/BDIpT3vXJ+SyblD6qESxZGSrmRnQTrDgLBkTEQ=; b=La0R3epmoEF2kwsfP2FU1ViDjjiayGE+incjUfPs7i1PDqfGWfoLDBzYrpXKYUfkdl nvWM+jyN5gfpJECFWOGUTW59r8WpgMqUWg9yYMVIEH4qSQDV1tmAr8VL5O9zGmrV2pvM i9RK8RjztGd34ygnb6z6HBYd+yjRDDDuOSyNpYc7O1mFH2/v5VWiJqF2MEZK9FUgBqKf ScjfMWHkYhFvqKndOLNahav7+wFTAKBmmSGaS3D+7RcV9sNcSrFI8FRqrm/nRrxF42Kb EisHr0QVO09b988OtHk9hS7a1MENYzsd5B8MmCdSN9QgZRGHI4paCthKo+1O+byq8emf Iuug== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of felix.moessbauer@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=felix.moessbauer@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from goliath.siemens.de (goliath.siemens.de. [192.35.17.28]) by gmr-mx.google.com with ESMTPS id j6si165545edh.0.2021.01.21.02.52.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Jan 2021 02:52:38 -0800 (PST) Received-SPF: pass (google.com: domain of felix.moessbauer@siemens.com designates 192.35.17.28 as permitted sender) client-ip=192.35.17.28; Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id 10LAqc8C027440 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 21 Jan 2021 11:52:38 +0100 Received: from MD1T0KAC-VM.ad001.siemens.net (md1t0kac.ad001.siemens.net [139.25.0.7]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id 10LAqYfx022443; Thu, 21 Jan 2021 11:52:38 +0100 From: Felix Moessbauer To: isar-users@googlegroups.com Cc: Felix Moessbauer Subject: [PATCH 1/2] feat: package linux-perf- in kernel recipe Date: Thu, 21 Jan 2021 11:52:23 +0100 Message-Id: <20210121105224.26285-2-felix.moessbauer@siemens.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 X-Original-Sender: felix.moessbauer@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of felix.moessbauer@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=felix.moessbauer@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1689493291540253714?= X-GMAIL-MSGID: =?utf-8?q?1689493291540253714?= This patch builds and packages the version specific bindings of perf as part of the kernel recipe. The support can be disabled by setting KERNEL_PACKAGE_PERF="0". As special patches are needed for each kernel version, support for perf is automatically disabled for kernels where no patches are provided. A user of this recipe can provide these patches for a custom kernel by setting / replacing KERNEL_PERF_PATCHES[.]. It is also possible to only patch the linux-perf- package and use an upstream kernel by adding a dependency to the linux-perf- package. Signed-off-by: Felix Moessbauer --- .../linux/files/debian/control.tmpl | 31 +++++ .../files/debian/rules.d/tools/perf/Makefile | 60 +++++++++ .../linux/files/debian/rules.tmpl | 18 ++- .../perf/4.19/tools-perf-install.patch | 58 +++++++++ .../perf/4.19/tools-perf-version.patch | 119 ++++++++++++++++++ .../patches/perf/5.4/tools-perf-install.patch | 51 ++++++++ .../patches/perf/5.4/tools-perf-version.patch | 111 ++++++++++++++++ meta/recipes-kernel/linux/linux-custom.inc | 11 +- meta/recipes-kernel/linux/linux-tools.inc | 66 ++++++++++ 9 files changed, 521 insertions(+), 4 deletions(-) create mode 100644 meta/recipes-kernel/linux/files/debian/rules.d/tools/perf/Makefile create mode 100644 meta/recipes-kernel/linux/files/patches/perf/4.19/tools-perf-install.patch create mode 100644 meta/recipes-kernel/linux/files/patches/perf/4.19/tools-perf-version.patch create mode 100644 meta/recipes-kernel/linux/files/patches/perf/5.4/tools-perf-install.patch create mode 100644 meta/recipes-kernel/linux/files/patches/perf/5.4/tools-perf-version.patch create mode 100644 meta/recipes-kernel/linux/linux-tools.inc diff --git a/meta/recipes-kernel/linux/files/debian/control.tmpl b/meta/recipes-kernel/linux/files/debian/control.tmpl index dd0b624..3a09938 100644 --- a/meta/recipes-kernel/linux/files/debian/control.tmpl +++ b/meta/recipes-kernel/linux/files/debian/control.tmpl @@ -35,3 +35,34 @@ Architecture: any Description: Linux kernel debugging symbols for @KR@ This package will come in handy if you need to debug the kernel. It provides all the necessary debug symbols for the kernel and its modules. + +Package: linux-perf-${KERNEL_PERF_COMPAT} +Build-Profiles: +Section: devel +Architecture: alpha amd64 arm64 armel armhf hppa i386 mips mips64 mips64el mipsel mipsn32 mipsn32el mipsr6 mipsr6el mipsn32r6 mipsn32r6el mips64r6 mips64r6el powerpc ppc64 ppc64el riscv64 s390 s390x sh4 sparc sparc64 +Build-Depends: + asciidoctor , + gcc-multilib [amd64 mips64 mips64el mips64r6 mips64r6el ppc64 s390x sparc64], + libaudit-dev, + libbabeltrace-dev (>= 1.5.0), + libbabeltrace-dev (>= 1.5.3-2~) | libbabeltrace-ctf-dev (>= 1.5.0), + libdw-dev, + libiberty-dev, + libnewt-dev, + libnuma-dev, + libperl-dev, + libunwind-dev [amd64 arm64 armel armhf hppa i386 mips mips64 mips64el mipsel powerpc ppc64 ppc64el sh4], + libopencsd-dev, + python3-dev, +Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, ${python3:Depends} +Recommends: linux-base +Provides: linux-tools-${KERNEL_PERF_COMPAT} +Conflicts: linux-tools-${KERNEL_PERF_COMPAT} +Replaces: linux-tools-${KERNEL_PERF_COMPAT} +Suggests: linux-doc-${KERNEL_PERF_COMPAT} +Description: Performance analysis tools for Linux ${KERNEL_PERF_COMPAT} + This package contains the 'perf' performance analysis tools for Linux + kernel version ${KERNEL_PERF_COMPAT}. + . + The linux-base package contains a 'perf' command which will invoke the + appropriate version for the running kernel. diff --git a/meta/recipes-kernel/linux/files/debian/rules.d/tools/perf/Makefile b/meta/recipes-kernel/linux/files/debian/rules.d/tools/perf/Makefile new file mode 100644 index 0000000..3de82e1 --- /dev/null +++ b/meta/recipes-kernel/linux/files/debian/rules.d/tools/perf/Makefile @@ -0,0 +1,60 @@ +#!/usr/bin/make -f +# Note: this ruleset is based on the Makefile +# that is used for building the linux-perf- +# package in debian + +VERSION := $(KERNEL_PERF_COMPAT) +deb_top_dir := $(CURDIR)/debian +DESTDIR := $(deb_top_dir)/linux-perf-$(VERSION) +PARALLEL_BUILD=-j $(shell echo $$(($$(nproc) * 2))) + +CFLAGS := $(shell dpkg-buildflags --get CFLAGS) -Wall +CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS) -Wall +LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS) + +MAKE_PERF := $(MAKE) O=$(CURDIR) prefix=/usr V=1 VF=1 WERROR=0 EXTRA_CFLAGS='$(CFLAGS) $(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' +MAKE_PERF += NO_GTK2=1 +MAKE_PERF += feature-jvmti=0 +MAKE_PERF += perfexecdir=lib/perf_$(VERSION)-core plugindir=/usr/lib/traceevent_$(VERSION)/plugins STRACE_GROUPS_DIR=share/perf_$(VERSION)-core/strace/groups tipdir=share/doc/linux-perf-$(VERSION) perf_include_dir=include/perf_$(VERSION) perf_examples_dir=share/doc/linux-perf-$(VERSION)/examples +MAKE_PERF += feature-libbfd=0 feature-libbfd-liberty=0 feature-libbfd-liberty-z=0 HAVE_CPLUS_DEMANGLE_SUPPORT=1 +MAKE_PERF += NO_LIBCRYPTO=1 +MAKE_PERF += LIBBABELTRACE=1 +MAKE_PERF += USE_ASCIIDOCTOR=1 +MAKE_PERF += PYTHON=/usr/bin/python3 +VERS_PATTERN := $(subst .,[._],$(VERSION)) +VERS_PERFPY := $(subst .,_,$(VERSION)) + +override_dh_auto_configure: + sed -i s/\'perf\'/\'perf_$(VERS_PERFPY)\'/g tools/perf/util/setup.py + sed -i s/PyInit_perf\(/PyInit_perf_$(VERS_PERFPY)\(/g tools/perf/util/python.c + +override_dh_auto_build: + +${MAKE_PERF} ${PARALLEL_MAKE} -C tools/perf -f Makefile.perf all VERSION=$(VERSION) DESTDIR=dummy + # Check that perf didn't get linked against libbfd or libcrypto + ! ldd $(CURDIR)/perf | grep -E '\blib(bfd|crypto)' + # Check that it includes cplus_demangle from libiberty + grep cplus_demangle $(CURDIR)/perf + +override_dh_auto_install: + +${MAKE_PERF} ${PARALLEL_MAKE} -C tools/perf -f Makefile.perf install VERSION=$(VERSION) DESTDIR=$(DESTDIR) + rm -f $(DESTDIR)/usr/bin/trace_$(VERSION) + mkdir -p $(DESTDIR)/usr/share/bash-completion/ + mv $(DESTDIR)/etc/bash_completion.d \ + $(DESTDIR)/usr/share/bash-completion/completions + rmdir --ignore-fail-on-non-empty $(DESTDIR)/etc + + # Check for unversioned files that are likely to result in file conflicts + cd $(DESTDIR) && ! find \! -type d \! -path '*[_-]$(VERS_PATTERN)*' | grep . + +override_dh_auto_clean: + rm -rf ${deb_top_dir}/linux-perf-$(VERSION) + # undo the replacements + sed -i s/\'perf_$(VERS_PERFPY)\'/\'perf\'/g tools/perf/util/setup.py + sed -i s/PyInit_perf_$(VERS_PERFPY)\(/PyInit_perf\(/g tools/perf/util/python.c + +override_dh_auto_test: + echo "Skip tests" + +%: + CFLAGS= LDFLAGS= dh $@ --parallel + diff --git a/meta/recipes-kernel/linux/files/debian/rules.tmpl b/meta/recipes-kernel/linux/files/debian/rules.tmpl index 05a26fe..a70fc2c 100755 --- a/meta/recipes-kernel/linux/files/debian/rules.tmpl +++ b/meta/recipes-kernel/linux/files/debian/rules.tmpl @@ -13,20 +13,36 @@ isar_env=$(strip \ export DEB_HOST_GNU_TYPE='$(DEB_HOST_GNU_TYPE)' && \ export MAKE='$(MAKE)' && \ export O='${O}' && \ - export S='${S}' \ + export S='${S}' && \ + export KERNEL_PACKAGE_PERF='${KERNEL_PACKAGE_PERF}' && \ + export KERNEL_PERF_COMPAT='${KERNEL_PERF_COMPAT}' \ ) %: dh $(@) +override_dh_auto_configure: +ifeq (${KERNEL_PACKAGE_PERF},1) + $(isar_env) && $(MAKE) -f $(deb_top_dir)/rules.d/tools/perf/Makefile $@ +endif + override_dh_auto_clean: $(isar_env) && bash $(deb_top_dir)/isar/clean +ifeq (${KERNEL_PACKAGE_PERF},1) + $(isar_env) && $(MAKE) -f $(deb_top_dir)/rules.d/tools/perf/Makefile $@ +endif override_dh_auto_build: $(isar_env) && bash $(deb_top_dir)/isar/build +ifeq (${KERNEL_PACKAGE_PERF},1) + $(isar_env) && $(MAKE) -f $(deb_top_dir)/rules.d/tools/perf/Makefile $@ +endif override_dh_auto_install: $(isar_env) && bash $(deb_top_dir)/isar/install +ifeq (${KERNEL_PACKAGE_PERF},1) + $(isar_env) && $(MAKE) -f $(deb_top_dir)/rules.d/tools/perf/Makefile $@ +endif override_dh_auto_test: true diff --git a/meta/recipes-kernel/linux/files/patches/perf/4.19/tools-perf-install.patch b/meta/recipes-kernel/linux/files/patches/perf/4.19/tools-perf-install.patch new file mode 100644 index 0000000..8cfd02a --- /dev/null +++ b/meta/recipes-kernel/linux/files/patches/perf/4.19/tools-perf-install.patch @@ -0,0 +1,58 @@ +From: Bastian Blank +Date: Fri, 07 Oct 2011 21:37:52 +0100 +Subject: Install perf scripts non-executable +Forwarded: no + +[bwh: Forward-ported to 4.13] + +Index: linux/tools/perf/Makefile.perf +=================================================================== +--- linux.orig/tools/perf/Makefile.perf ++++ linux/tools/perf/Makefile.perf +@@ -796,8 +796,8 @@ endif + ifndef NO_LIBPERL + $(call QUIET_INSTALL, perl-scripts) \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace'; \ +- $(INSTALL) scripts/perl/Perf-Trace-Util/lib/Perf/Trace/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace'; \ +- $(INSTALL) scripts/perl/*.pl -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl'; \ ++ $(INSTALL) -m 644 scripts/perl/Perf-Trace-Util/lib/Perf/Trace/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace'; \ ++ $(INSTALL) -m 644 scripts/perl/*.pl -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl'; \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/bin'; \ + $(INSTALL) scripts/perl/bin/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/bin' + endif +@@ -805,27 +805,27 @@ ifndef NO_LIBPYTHON + $(call QUIET_INSTALL, python-scripts) \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/Perf-Trace-Util/lib/Perf/Trace'; \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/bin'; \ +- $(INSTALL) scripts/python/Perf-Trace-Util/lib/Perf/Trace/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/Perf-Trace-Util/lib/Perf/Trace'; \ +- $(INSTALL) scripts/python/*.py -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python'; \ ++ $(INSTALL) -m 644 scripts/python/Perf-Trace-Util/lib/Perf/Trace/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/Perf-Trace-Util/lib/Perf/Trace'; \ ++ $(INSTALL) -m 644 scripts/python/*.py -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python'; \ + $(INSTALL) scripts/python/bin/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/bin' + endif + $(call QUIET_INSTALL, perf_completion-script) \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d'; \ +- $(INSTALL) perf-completion.sh '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf_$(VERSION)' ++ $(INSTALL) -m 644 perf-completion.sh '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf_$(VERSION)' + $(call QUIET_INSTALL, perf-tip) \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(tip_instdir_SQ)'; \ +- $(INSTALL) Documentation/tips.txt -t '$(DESTDIR_SQ)$(tip_instdir_SQ)' ++ $(INSTALL) -m 644 Documentation/tips.txt -t '$(DESTDIR_SQ)$(tip_instdir_SQ)' + + install-tests: all install-gtk + $(call QUIET_INSTALL, tests) \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests'; \ +- $(INSTALL) tests/attr.py '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests'; \ ++ $(INSTALL) -m 644 tests/attr.py '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests'; \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr'; \ +- $(INSTALL) tests/attr/* '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr'; \ ++ $(INSTALL) -m 644 tests/attr/* '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr'; \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell'; \ +- $(INSTALL) tests/shell/*.sh '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell'; \ ++ $(INSTALL) -m 644 tests/shell/*.sh '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell'; \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell/lib'; \ +- $(INSTALL) tests/shell/lib/*.sh '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell/lib' ++ $(INSTALL) -m 644 tests/shell/lib/*.sh '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell/lib' + + install-bin: install-tools install-tests install-traceevent-plugins + diff --git a/meta/recipes-kernel/linux/files/patches/perf/4.19/tools-perf-version.patch b/meta/recipes-kernel/linux/files/patches/perf/4.19/tools-perf-version.patch new file mode 100644 index 0000000..6833bb7 --- /dev/null +++ b/meta/recipes-kernel/linux/files/patches/perf/4.19/tools-perf-version.patch @@ -0,0 +1,119 @@ +From: Bastian Blank +Date: Mon, 26 Sep 2011 13:53:12 +0100 +Subject: Create manpages and binaries including the version +Forwarded: no + +[bwh: Fix version insertion in perf man page cross-references and perf +man page title. Install bash_completion script for perf with a +version-dependent name. And do the same for trace.] + +Index: linux/tools/perf/Makefile.perf +=================================================================== +--- linux.orig/tools/perf/Makefile.perf ++++ linux/tools/perf/Makefile.perf +@@ -759,23 +759,23 @@ endif + install-tools: all install-gtk + $(call QUIET_INSTALL, binaries) \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)'; \ +- $(INSTALL) $(OUTPUT)perf '$(DESTDIR_SQ)$(bindir_SQ)'; \ +- $(LN) '$(DESTDIR_SQ)$(bindir_SQ)/perf' '$(DESTDIR_SQ)$(bindir_SQ)/trace' ++ $(INSTALL) $(OUTPUT)perf '$(DESTDIR_SQ)$(bindir_SQ)/perf_$(VERSION)'; \ ++ $(LN) '$(DESTDIR_SQ)$(bindir_SQ)/perf_$(VERSION)' '$(DESTDIR_SQ)$(bindir_SQ)/trace_$(VERSION)' ++ $(call QUIET_INSTALL, libexec) \ ++ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' + ifndef NO_PERF_READ_VDSO32 + $(call QUIET_INSTALL, perf-read-vdso32) \ +- $(INSTALL) $(OUTPUT)perf-read-vdso32 '$(DESTDIR_SQ)$(bindir_SQ)'; ++ $(INSTALL) $(OUTPUT)perf-read-vdso32 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)'; + endif + ifndef NO_PERF_READ_VDSOX32 + $(call QUIET_INSTALL, perf-read-vdsox32) \ +- $(INSTALL) $(OUTPUT)perf-read-vdsox32 '$(DESTDIR_SQ)$(bindir_SQ)'; ++ $(INSTALL) $(OUTPUT)perf-read-vdsox32 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)'; + endif + ifndef NO_JVMTI + $(call QUIET_INSTALL, $(LIBJVMTI)) \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(libdir_SQ)'; \ + $(INSTALL) $(OUTPUT)$(LIBJVMTI) '$(DESTDIR_SQ)$(libdir_SQ)'; + endif +- $(call QUIET_INSTALL, libexec) \ +- $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' + ifndef NO_LIBBPF + $(call QUIET_INSTALL, bpf-headers) \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perf_include_instdir_SQ)/bpf'; \ +@@ -811,7 +811,7 @@ ifndef NO_LIBPYTHON + endif + $(call QUIET_INSTALL, perf_completion-script) \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d'; \ +- $(INSTALL) perf-completion.sh '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf' ++ $(INSTALL) perf-completion.sh '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf_$(VERSION)' + $(call QUIET_INSTALL, perf-tip) \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(tip_instdir_SQ)'; \ + $(INSTALL) Documentation/tips.txt -t '$(DESTDIR_SQ)$(tip_instdir_SQ)' +@@ -836,7 +836,7 @@ install-python_ext: + + # 'make install-doc' should call 'make -C Documentation install' + $(INSTALL_DOC_TARGETS): +- $(QUIET_SUBDIR0)Documentation $(QUIET_SUBDIR1) $(@:-doc=) ++ $(QUIET_SUBDIR0)Documentation $(QUIET_SUBDIR1) $(@:-doc=) VERSION=$(VERSION) + + ### Cleaning rules + +Index: linux/tools/perf/Documentation/Makefile +=================================================================== +--- linux.orig/tools/perf/Documentation/Makefile ++++ linux/tools/perf/Documentation/Makefile +@@ -194,14 +194,16 @@ ifdef missing_tools + $(error "You need to install $(missing_tools) for man pages") + endif + +-do-install-man: man ++do-install-man: $(addprefix install-man-,$(_DOC_MAN1)) ++ ++install-man-perf.1: $(OUTPUT)perf.1 ++ $(INSTALL) -d -m 755 $(DESTDIR)$(man1dir) ++ sed -e 's/"PERF"/"PERF_$(VERSION)"/' -e 's/fBperf-/fBperf_$(VERSION)-/g' $^ > $(DESTDIR)$(man1dir)/perf_$(VERSION).1 ++ ++install-man-perf%.1: $(OUTPUT)perf%.1 + $(call QUIET_INSTALL, Documentation-man) \ + $(INSTALL) -d -m 755 $(DESTDIR)$(man1dir); \ +-# $(INSTALL) -d -m 755 $(DESTDIR)$(man5dir); \ +-# $(INSTALL) -d -m 755 $(DESTDIR)$(man7dir); \ +- $(INSTALL) -m 644 $(DOC_MAN1) $(DESTDIR)$(man1dir); \ +-# $(INSTALL) -m 644 $(DOC_MAN5) $(DESTDIR)$(man5dir); \ +-# $(INSTALL) -m 644 $(DOC_MAN7) $(DESTDIR)$(man7dir) ++ sed -e 's/"PERF\\-/"PERF_$(VERSION)\\-/' -e 's/fBperf-/fBperf_$(VERSION)-/g' $^ > $(DESTDIR)$(man1dir)/perf_$(VERSION)$*.1 + + install-man: check-man-tools man do-install-man + +Index: linux/tools/perf/util/Build +=================================================================== +--- linux.orig/tools/perf/util/Build ++++ linux/tools/perf/util/Build +@@ -193,6 +193,7 @@ CFLAGS_libstring.o += -Wno-unused-pa + CFLAGS_hweight.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" + CFLAGS_parse-events.o += -Wno-redundant-decls + CFLAGS_header.o += -include $(OUTPUT)PERF-VERSION-FILE ++CFLAGS_vdso.o += -DPERFEXECDIR='"$(perfexec_instdir_SQ)"' + + $(OUTPUT)util/kallsyms.o: ../lib/symbol/kallsyms.c FORCE + $(call rule_mkdir) +Index: linux/tools/perf/util/vdso.c +=================================================================== +--- linux.orig/tools/perf/util/vdso.c ++++ linux/tools/perf/util/vdso.c +@@ -52,12 +52,12 @@ static struct vdso_info *vdso_info__new( + .vdso32 = { + .temp_file_name = VDSO__TEMP_FILE_NAME, + .dso_name = DSO__NAME_VDSO32, +- .read_prog = "perf-read-vdso32", ++ .read_prog = PERFEXECDIR "/perf-read-vdso32", + }, + .vdsox32 = { + .temp_file_name = VDSO__TEMP_FILE_NAME, + .dso_name = DSO__NAME_VDSOX32, +- .read_prog = "perf-read-vdsox32", ++ .read_prog = PERFEXECDIR "/perf-read-vdsox32", + }, + #endif + }; diff --git a/meta/recipes-kernel/linux/files/patches/perf/5.4/tools-perf-install.patch b/meta/recipes-kernel/linux/files/patches/perf/5.4/tools-perf-install.patch new file mode 100644 index 0000000..c6e53e3 --- /dev/null +++ b/meta/recipes-kernel/linux/files/patches/perf/5.4/tools-perf-install.patch @@ -0,0 +1,51 @@ +From: Bastian Blank +Date: Fri, 07 Oct 2011 21:37:52 +0100 +Subject: Install perf scripts non-executable +Forwarded: no + +[bwh: Forward-ported to 4.13] +--- + tools/perf/Makefile.perf | 20 ++++++++++---------- + 1 file changed, 10 insertions(+), 10 deletions(-) + +--- a/tools/perf/Makefile.perf ++++ b/tools/perf/Makefile.perf +@@ -854,8 +854,8 @@ endif + ifndef NO_LIBPERL + $(call QUIET_INSTALL, perl-scripts) \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace'; \ +- $(INSTALL) scripts/perl/Perf-Trace-Util/lib/Perf/Trace/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace'; \ +- $(INSTALL) scripts/perl/*.pl -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl'; \ ++ $(INSTALL) -m 644 scripts/perl/Perf-Trace-Util/lib/Perf/Trace/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace'; \ ++ $(INSTALL) -m 644 scripts/perl/*.pl -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl'; \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/bin'; \ + $(INSTALL) scripts/perl/bin/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/bin' + endif +@@ -869,21 +869,21 @@ ifndef NO_LIBPYTHON + endif + $(call QUIET_INSTALL, perf_completion-script) \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d'; \ +- $(INSTALL) perf-completion.sh '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf_$(VERSION)' ++ $(INSTALL) -m 644 perf-completion.sh '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf_$(VERSION)' + $(call QUIET_INSTALL, perf-tip) \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(tip_instdir_SQ)'; \ +- $(INSTALL) Documentation/tips.txt -t '$(DESTDIR_SQ)$(tip_instdir_SQ)' ++ $(INSTALL) -m 644 Documentation/tips.txt -t '$(DESTDIR_SQ)$(tip_instdir_SQ)' + + install-tests: all install-gtk + $(call QUIET_INSTALL, tests) \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests'; \ +- $(INSTALL) tests/attr.py '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests'; \ ++ $(INSTALL) -m 644 tests/attr.py '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests'; \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr'; \ +- $(INSTALL) tests/attr/* '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr'; \ ++ $(INSTALL) -m 644 tests/attr/* '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr'; \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell'; \ +- $(INSTALL) tests/shell/*.sh '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell'; \ ++ $(INSTALL) -m 644 tests/shell/*.sh '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell'; \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell/lib'; \ +- $(INSTALL) tests/shell/lib/*.sh '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell/lib' ++ $(INSTALL) -m 644 tests/shell/lib/*.sh '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell/lib' + + install-bin: install-tools install-tests install-traceevent-plugins + diff --git a/meta/recipes-kernel/linux/files/patches/perf/5.4/tools-perf-version.patch b/meta/recipes-kernel/linux/files/patches/perf/5.4/tools-perf-version.patch new file mode 100644 index 0000000..e82a305 --- /dev/null +++ b/meta/recipes-kernel/linux/files/patches/perf/5.4/tools-perf-version.patch @@ -0,0 +1,111 @@ +From: Bastian Blank +Date: Mon, 26 Sep 2011 13:53:12 +0100 +Subject: Create manpages and binaries including the version +Forwarded: no + +[bwh: Fix version insertion in perf man page cross-references and perf +man page title. Install bash_completion script for perf with a +version-dependent name. And do the same for trace.] + +--- a/tools/perf/Makefile.perf ++++ b/tools/perf/Makefile.perf +@@ -759,23 +759,23 @@ endif + install-tools: all install-gtk + $(call QUIET_INSTALL, binaries) \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)'; \ +- $(INSTALL) $(OUTPUT)perf '$(DESTDIR_SQ)$(bindir_SQ)'; \ +- $(LN) '$(DESTDIR_SQ)$(bindir_SQ)/perf' '$(DESTDIR_SQ)$(bindir_SQ)/trace' ++ $(INSTALL) $(OUTPUT)perf '$(DESTDIR_SQ)$(bindir_SQ)/perf_$(VERSION)'; \ ++ $(LN) '$(DESTDIR_SQ)$(bindir_SQ)/perf_$(VERSION)' '$(DESTDIR_SQ)$(bindir_SQ)/trace_$(VERSION)' ++ $(call QUIET_INSTALL, libexec) \ ++ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' + ifndef NO_PERF_READ_VDSO32 + $(call QUIET_INSTALL, perf-read-vdso32) \ +- $(INSTALL) $(OUTPUT)perf-read-vdso32 '$(DESTDIR_SQ)$(bindir_SQ)'; ++ $(INSTALL) $(OUTPUT)perf-read-vdso32 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)'; + endif + ifndef NO_PERF_READ_VDSOX32 + $(call QUIET_INSTALL, perf-read-vdsox32) \ +- $(INSTALL) $(OUTPUT)perf-read-vdsox32 '$(DESTDIR_SQ)$(bindir_SQ)'; ++ $(INSTALL) $(OUTPUT)perf-read-vdsox32 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)'; + endif + ifndef NO_JVMTI + $(call QUIET_INSTALL, $(LIBJVMTI)) \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(libdir_SQ)'; \ + $(INSTALL) $(OUTPUT)$(LIBJVMTI) '$(DESTDIR_SQ)$(libdir_SQ)'; + endif +- $(call QUIET_INSTALL, libexec) \ +- $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' + ifndef NO_LIBBPF + $(call QUIET_INSTALL, bpf-headers) \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perf_include_instdir_SQ)/bpf'; \ +@@ -811,7 +811,7 @@ ifndef NO_LIBPYTHON + endif + $(call QUIET_INSTALL, perf_completion-script) \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d'; \ +- $(INSTALL) perf-completion.sh '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf' ++ $(INSTALL) perf-completion.sh '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf_$(VERSION)' + $(call QUIET_INSTALL, perf-tip) \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(tip_instdir_SQ)'; \ + $(INSTALL) Documentation/tips.txt -t '$(DESTDIR_SQ)$(tip_instdir_SQ)' +@@ -836,7 +836,7 @@ install-python_ext: + + # 'make install-doc' should call 'make -C Documentation install' + $(INSTALL_DOC_TARGETS): +- $(QUIET_SUBDIR0)Documentation $(QUIET_SUBDIR1) $(@:-doc=) ++ $(QUIET_SUBDIR0)Documentation $(QUIET_SUBDIR1) $(@:-doc=) VERSION=$(VERSION) + + ### Cleaning rules + +--- a/tools/perf/Documentation/Makefile ++++ b/tools/perf/Documentation/Makefile +@@ -194,14 +194,16 @@ ifdef missing_tools + $(error "You need to install $(missing_tools) for man pages") + endif + +-do-install-man: man ++do-install-man: $(addprefix install-man-,$(_DOC_MAN1)) ++ ++install-man-perf.1: $(OUTPUT)perf.1 ++ $(INSTALL) -d -m 755 $(DESTDIR)$(man1dir) ++ sed -e 's/"PERF"/"PERF_$(VERSION)"/' -e 's/fBperf-/fBperf_$(VERSION)-/g' $^ > $(DESTDIR)$(man1dir)/perf_$(VERSION).1 ++ ++install-man-perf%.1: $(OUTPUT)perf%.1 + $(call QUIET_INSTALL, Documentation-man) \ + $(INSTALL) -d -m 755 $(DESTDIR)$(man1dir); \ +-# $(INSTALL) -d -m 755 $(DESTDIR)$(man5dir); \ +-# $(INSTALL) -d -m 755 $(DESTDIR)$(man7dir); \ +- $(INSTALL) -m 644 $(DOC_MAN1) $(DESTDIR)$(man1dir); \ +-# $(INSTALL) -m 644 $(DOC_MAN5) $(DESTDIR)$(man5dir); \ +-# $(INSTALL) -m 644 $(DOC_MAN7) $(DESTDIR)$(man7dir) ++ sed -e 's/"PERF\\-/"PERF_$(VERSION)\\-/' -e 's/fBperf-/fBperf_$(VERSION)-/g' $^ > $(DESTDIR)$(man1dir)/perf_$(VERSION)$*.1 + + install-man: check-man-tools man do-install-man + +--- a/tools/perf/util/Build ++++ b/tools/perf/util/Build +@@ -193,6 +193,7 @@ CFLAGS_libstring.o += -Wno-unused-pa + CFLAGS_hweight.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" + CFLAGS_parse-events.o += -Wno-redundant-decls + CFLAGS_header.o += -include $(OUTPUT)PERF-VERSION-FILE ++CFLAGS_vdso.o += -DPERFEXECDIR='"$(perfexec_instdir_SQ)"' + + $(OUTPUT)util/kallsyms.o: ../lib/symbol/kallsyms.c FORCE + $(call rule_mkdir) +--- a/tools/perf/util/vdso.c ++++ b/tools/perf/util/vdso.c +@@ -52,12 +52,12 @@ static struct vdso_info *vdso_info__new( + .vdso32 = { + .temp_file_name = VDSO__TEMP_FILE_NAME, + .dso_name = DSO__NAME_VDSO32, +- .read_prog = "perf-read-vdso32", ++ .read_prog = PERFEXECDIR "/perf-read-vdso32", + }, + .vdsox32 = { + .temp_file_name = VDSO__TEMP_FILE_NAME, + .dso_name = DSO__NAME_VDSOX32, +- .read_prog = "perf-read-vdsox32", ++ .read_prog = PERFEXECDIR "/perf-read-vdsox32", + }, + #endif + }; diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc index ed89aa0..2faceec 100644 --- a/meta/recipes-kernel/linux/linux-custom.inc +++ b/meta/recipes-kernel/linux/linux-custom.inc @@ -33,6 +33,9 @@ KERNEL_HEADERS_DEBIAN_DEPENDS ?= "libc6, \ KERNEL_LIBC_DEV_DEPLOY ?= "0" +# include perf recipe +include linux-tools.inc + # Settings that may be changed on a per distro, machine or layer basis # -------------------------------------------------------------------- @@ -71,6 +74,8 @@ TEMPLATE_VARS += " \ KERNEL_HEADERS_DEBIAN_DEPENDS \ LINUX_VERSION_EXTENSION \ KERNEL_NAME_PROVIDED \ + KERNEL_PACKAGE_PERF \ + KERNEL_PERF_COMPAT \ " inherit dpkg @@ -81,9 +86,9 @@ KERNEL_NAME_PROVIDED ?= "${@ d.getVar('PN', True).partition('linux-')[2]}" # Make bitbake know we will be producing linux-image and linux-headers packages python() { - kernel_name = d.getVar("KERNEL_NAME_PROVIDED", True) - d.setVar('PROVIDES', 'linux-image-' + kernel_name + ' ' + \ - 'linux-headers-' + kernel_name) + kernel_name = d.getVar("KERNEL_NAME_PROVIDED", True) + d.appendVar('PROVIDES', ' linux-image-' + kernel_name + \ + ' linux-headers-' + kernel_name + ' ') } def get_kernel_arch(d): diff --git a/meta/recipes-kernel/linux/linux-tools.inc b/meta/recipes-kernel/linux/linux-tools.inc new file mode 100644 index 0000000..b1e9376 --- /dev/null +++ b/meta/recipes-kernel/linux/linux-tools.inc @@ -0,0 +1,66 @@ +# Packaging of linux kernel tools +# +# This software is a part of ISAR. +# Copyright (c) Siemens AG, 2020 +# +# SPDX-License-Identifier: MIT + +# Settings related to kernel tools +# -------------------------------- + +KERNEL_PACKAGE_PERF ?= "1" +PERF_BUILD_DEPENDS = "\ + asciidoctor , \ + gcc-multilib [amd64 mips64 mips64el mips64r6 mips64r6el ppc64 s390x sparc64], \ + libaudit-dev, \ + libbabeltrace-dev (>= 1.5.0), \ + libbabeltrace-dev (>= 1.5.3-2~) | libbabeltrace-ctf-dev (>= 1.5.0), \ + libdw-dev, \ + libiberty-dev, \ + libnewt-dev, \ + libnuma-dev, \ + libperl-dev, \ + libunwind-dev [amd64 arm64 armel armhf hppa i386 mips mips64 mips64el mipsel powerpc ppc64 ppc64el sh4], \ + libopencsd-dev, \ + python3-dev, \ +" + +# we need patches for each kernel version +# if a kernel is not in the list of kernels we have patches for, +# we just disable the perf support. +# To add perf support for an previously unsupported kernel, simply +# provide the necessary patches in KERNEL_PERF_PATCHES[,] +KERNEL_PERF_COMPAT = "nopackage" +KERNEL_PERF_PATCHES[4.19] ?= " \ + file://patches/perf/4.19/tools-perf-version.patch \ + file://patches/perf/4.19/tools-perf-install.patch \ +" +KERNEL_PERF_PATCHES[5.4] ?= " \ + file://patches/perf/5.4/tools-perf-version.patch \ + file://patches/perf/5.4/tools-perf-install.patch \ +" + +python() { + if d.getVar('KERNEL_PACKAGE_PERF') != '1': + return + try: + kvers = d.getVar('PV', True).split('.') + except: + bb.warn('could not extract kernel version. Disabling perf support. Version provided: {}'.format(d.getVar('PV', True))) + d.setVar('KERNEL_PACKAGE_PERF', '0') + return + + perf_version = kvers[0] + '.' + kvers[1] + # read patch-list for this kernel version + patches_dict = d.getVarFlags('KERNEL_PERF_PATCHES') + if not perf_version in patches_dict.keys(): + bb.warn('no perf packaging for kernel version {}. Disable perf support'.format(perf_version)) + d.setVar('KERNEL_PACKAGE_PERF', '0') + return + + d.setVar('KERNEL_PERF_COMPAT', perf_version) + d.appendVar('PROVIDES', ' linux-perf-' + perf_version + ' ') + d.appendVar('SRC_URI', ' ' + patches_dict[perf_version] + ' ') + d.appendVar('KBUILD_DEPENDS', d.getVar('PERF_BUILD_DEPENDS')) +} + From patchwork Thu Jan 21 00:52:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "MOESSBAUER, Felix" X-Patchwork-Id: 281 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:94eb:0:0:0:0:0 with SMTP id l40csp322625ooi; Thu, 21 Jan 2021 02:52:41 -0800 (PST) X-Received: by 2002:a1c:8095:: with SMTP id b143mr8253571wmd.71.1611226360962; Thu, 21 Jan 2021 02:52:40 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1611226360; cv=pass; d=google.com; s=arc-20160816; b=T8BVD1aLOFCLh/wSM+jK04CBAkYcvvJT8t6DhM9pYzheh81cyUp6W0Fr5vkjrN3+9o TAgyZRMWM2ezNvY3YNgoiVCy0xoDOjgsSq+sCpFB4pv35zOe5nJpgyM5SlipLXTwjMH0 b1D1BGI2ucnp11ojuLBnghF1JBsDgfMLxlX/fdkkUpXZP35nsgCLrOrwN1nPjYg3FYgK ztZSY7kumVMvltv5TmEy6CZ//KNaDPSZ+G4zHi4hCCMa5yAS2xUNgtEPwjEMcbrrXqNf q2qK+Gss4pdYoYn2YfGILD297dkM+8wOHPpDNhpWLn3nJjhNKfXTK48HbWI/vXNSDRxx /U1Q== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=/HzfOidtZUHwxro5mBaF3KtciDeWYa7gRYOoCOTlVsA=; b=TDFL+mG41hf8nkyVlUWB22b9mth3hg6F3FuFp1h4C3zZmJ8KnOdfYTLUyjH8vpPYck Tgf+yJdwIHY+A7apRze9Fe+ONzyvnR++FvuxAy5TmUqC2NH5h5zfFHEXq6mRhUCgT0Gr SeHx7wwoW8ey1ZLTSZec05gJ+8MSr9kApqrNu8ytd2pMNqHee9OzPQ0o6YUFXQtFDLZC Mp47GbkCsvv4Uh8Q4AwkMzGujYLXU06lrK2UEKEaCvgiGYwsIFEI9nAyghKzsFDFA/JH cisnz9U7goEF2LcmwR0ofsf9clkfNyAVGjWPPypnl8oJppohZFybbsiYZpZ2XcJp36Lz hvug== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=E9Lbj+Lk; arc=pass (i=2 spf=pass spfdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of isar-users+bncbczk33mgwucrb6fzuwaamgqeaqqo26i@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCZK33MGWUCRB6FZUWAAMGQEAQQO26I@googlegroups.com; dmarc=fail (p=NONE sp=NONE dis=NONE arc=pass) header.from=siemens.com Received: from mail-sor-f55.google.com (mail-sor-f55.google.com. [209.85.220.55]) by mx.google.com with SMTPS id h9sor2531643wrt.8.2021.01.21.02.52.40 (Google Transport Security); Thu, 21 Jan 2021 02:52:40 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbczk33mgwucrb6fzuwaamgqeaqqo26i@googlegroups.com designates 209.85.220.55 as permitted sender) client-ip=209.85.220.55; Authentication-Results: mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=E9Lbj+Lk; arc=pass (i=2 spf=pass spfdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of isar-users+bncbczk33mgwucrb6fzuwaamgqeaqqo26i@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCZK33MGWUCRB6FZUWAAMGQEAQQO26I@googlegroups.com; dmarc=fail (p=NONE sp=NONE dis=NONE arc=pass) header.from=siemens.com ARC-Seal: i=2; a=rsa-sha256; t=1611226360; cv=pass; d=google.com; s=arc-20160816; b=dUb9D3Ck2BYWaf5bSOKQe5g1gkn3Z1OgzCDGWLXz+mAbKZAKV+o0tg62UL9Nl0NWp5 wuWNv39Jpk7BxQ9JLQHgMgxn5rMUnsLIvMJCyOw4NS5M6iUsD9llDLfIYrptx+AP5XUS YVXHzKu1KlXb8otYdgDkt5I3KERemFxxEfw6XJw1I0L9lO+voUaMgUby2zi6o+3/SgmK GI+xGX4EYTrTo+WcaeMHJ5d/xTYPPqgmBfCpByVJUo6W/p8kAIMEHT1qGZ6/pZ0B9u4q ggvdQaQS3+RajO2vFgONcvYsDwYAydoXpTK6TI4v9JDXkfswQQJyaWg48kFYxchv3ydQ NjWA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=/HzfOidtZUHwxro5mBaF3KtciDeWYa7gRYOoCOTlVsA=; b=laSn4uWwUyE/mWAKonh3fQjvpqxJZHQ2QuC13zFUM0HsYZj5kxi1y8o7xACYrbhTrl huUe6QEZaGpSURhgmSUd+gLPENVJSwsYV/SdewlqIaN/0qVPSdpMHAvjh1a7hkcTl9gU xRpPPmMjPW10sqw6ipI80sfE1fCKUZu1iT9MjzcieyYQiV3Uww5AgENDS09Q1dv7Kil9 DxzFhhtZDHmXTjTRpfD/NRpKVAN2sVsrLIcJqxytf047tFpefGg11+a/0lMNlt7jY3ww QjiHLbVFA5616/SYy9L8wqbMne7YEkCF3auh73OTkAi39IJ981trkgr12G9yDyeBv9HX jBtA== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of felix.moessbauer@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=felix.moessbauer@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=/HzfOidtZUHwxro5mBaF3KtciDeWYa7gRYOoCOTlVsA=; b=E9Lbj+LkHvUbAoY9Mh2e5kfkhtcKQqe9GwpelPyLMLy6BrSgNJKcYZqLlsDWobu+aY Ddy9pqO/2fqWolBd6aLt4PtombP7VbocnGeyOBvaDrH0VXuViAZWaSY36tUb8vTib3GA 29VNrW7CmC1W4aBTwhpP2GPWEFB5CQCNqF+jn4dK7N6bYRD6g3wQzAwyRSftC2jUnLra vJpIOcWQXE4+bJYC0XZI04nKiGD/QwTStdscJsIdyRL17DQaXRVJ0D/50bMkN8filXv1 yGLsdzlMEahMxT+kY4yUP0A2oa3LX+AMNvB6fs9ta6xQtuRS5uoZW/BOLOdAZofTmvRD IrOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=/HzfOidtZUHwxro5mBaF3KtciDeWYa7gRYOoCOTlVsA=; b=F4qa88Xpc1KSB7r9dcPjqTOGfYr5+pU0IF3aPrcyFgHq9u17jZW17wjXaigpa+I/ha ntHwrRdvdRtNnXbNWadXaiWH1m37Whe/QpAev6F0PNSnogW1IWH8bjR3ugdPxExcpGUN X2uN13Ag4uAxmc5xBv3J+4zXf5vHiNSg/eRIPoDgjBjdL4KfaBx6cQclgz6nXJqZkZXt eTRw6WrkS3ZUibSl70wPg4HBKtwTCajNf5OolmFVZnU38XrN/55DMpIrhcblZOkqc8Fd SecikAfO8RZQpHEbFYSpT9BBOC72j0ZIUK5XEiQ9jni+wMw+6LLZ/lnhqc03f7veGjTC QD6Q== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM532MUcJ2sYGWNQkD7XurVKNF9BLH6L9zJVrFOqviU9cHvMGQl4Fy Z9ouKj+C4jCK3C/Bc+Cs0p4= X-Google-Smtp-Source: ABdhPJwpTHs1/9MRWkC3BPxgbEb4audzU6sG+e/H9La19PuAaSgS7sAKeQQSRxDn5VZXEB2xg22bmg== X-Received: by 2002:a5d:58d7:: with SMTP id o23mr13875319wrf.288.1611226360742; Thu, 21 Jan 2021 02:52:40 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a5d:6812:: with SMTP id w18ls990430wru.1.gmail; Thu, 21 Jan 2021 02:52:40 -0800 (PST) X-Received: by 2002:a5d:4806:: with SMTP id l6mr11205634wrq.389.1611226359956; Thu, 21 Jan 2021 02:52:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611226359; cv=none; d=google.com; s=arc-20160816; b=joi9sbOWzKFRzWEkAIBM+0+XyhdDzMuh1zewr6VVVLWWdfA97ENcLGTlP8BAZtmxEq jZb851NPt5VD4+mnhcKvlOdiCnh5emU6u21lShntqjapRRMbuGK+jsOyDlzEPlcFmroW gOFo/eKTOk6eePtFCdmIu8NVvx9HTXU/TDBwOgYceLhAne55bwHtJeMQ1IWfNihFUguf itiSRt/29d9EBzJbX0OskRpAuN1PPTOq8QmcGEBQM6Au4hF3mappGFQLN2//FKNaEb6S BTYNPbRu4YxViruECvnbX0M8Kp7FG7YpHIooBZwZRchQ3SfVUwtTTm5Uw4snGiUwxBYs GSWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=jUWzrLYt0sMjBI4RK9HKevDRwDy3nKvulAnFif5shA4=; b=0quhH7H73VC3WhlOu3JUrefyX0jD+imzqTSnX240w8DQKCtM4oqJ1JAsxwiPhY5wiZ nfKj2TtL3isjBZ09ycZ7lQsSq98FAgMOHGmjTor0dJtElHQyCc8knVYgABnkbAr6CNR5 FYd1fk4gl1P/d/BGOE+z8Gs22aVZQz/71QzV71gsUUWZvMAFUSX066rPZPqbavi//WcZ t/GEF9ln2s0zmLpf2YH0bmig/VKK4h6f6VywLvyplCkxrKYfvzb+9CxH4Xmf2zPlW1kE jWZZD1JfimH353AKD6cA1ormTfLLdIWjIOGcu8AS2/tvLyitK3ckmRkL+M385a074ORb FmQA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of felix.moessbauer@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=felix.moessbauer@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from goliath.siemens.de (goliath.siemens.de. [192.35.17.28]) by gmr-mx.google.com with ESMTPS id y1si276558wrl.4.2021.01.21.02.52.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Jan 2021 02:52:39 -0800 (PST) Received-SPF: pass (google.com: domain of felix.moessbauer@siemens.com designates 192.35.17.28 as permitted sender) client-ip=192.35.17.28; Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id 10LAqdua027457 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 21 Jan 2021 11:52:39 +0100 Received: from MD1T0KAC-VM.ad001.siemens.net (md1t0kac.ad001.siemens.net [139.25.0.7]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id 10LAqYg0022443; Thu, 21 Jan 2021 11:52:39 +0100 From: Felix Moessbauer To: isar-users@googlegroups.com Cc: Felix Moessbauer Subject: [PATCH 2/2] feat: add and package python bindings for perf Date: Thu, 21 Jan 2021 11:52:24 +0100 Message-Id: <20210121105224.26285-3-felix.moessbauer@siemens.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 X-Original-Sender: felix.moessbauer@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of felix.moessbauer@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=felix.moessbauer@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1689493292599989876?= X-GMAIL-MSGID: =?utf-8?q?1689493292599989876?= Signed-off-by: Felix Moessbauer --- .../patches/perf/4.19/tools-perf-python.patch | 16 ++++++++++++++++ meta/recipes-kernel/linux/linux-tools.inc | 1 + 2 files changed, 17 insertions(+) create mode 100644 meta/recipes-kernel/linux/files/patches/perf/4.19/tools-perf-python.patch diff --git a/meta/recipes-kernel/linux/files/patches/perf/4.19/tools-perf-python.patch b/meta/recipes-kernel/linux/files/patches/perf/4.19/tools-perf-python.patch new file mode 100644 index 0000000..6fc1bde --- /dev/null +++ b/meta/recipes-kernel/linux/files/patches/perf/4.19/tools-perf-python.patch @@ -0,0 +1,16 @@ +--- a/tools/perf/Makefile.perf ++++ b/tools/perf/Makefile.perf +@@ -829,10 +829,10 @@ + + install-bin: install-tools install-tests install-traceevent-plugins + +-install: install-bin try-install-man +- + install-python_ext: +- $(PYTHON_WORD) util/setup.py --quiet install --root='/$(DESTDIR_SQ)' ++ $(PYTHON_WORD) util/setup.py --quiet install --root='/$(DESTDIR_SQ)' --install-layout=deb; ++ ++install: install-bin try-install-man install-python_ext + + # 'make install-doc' should call 'make -C Documentation install' + $(INSTALL_DOC_TARGETS): diff --git a/meta/recipes-kernel/linux/linux-tools.inc b/meta/recipes-kernel/linux/linux-tools.inc index b1e9376..07b93a2 100644 --- a/meta/recipes-kernel/linux/linux-tools.inc +++ b/meta/recipes-kernel/linux/linux-tools.inc @@ -34,6 +34,7 @@ KERNEL_PERF_COMPAT = "nopackage" KERNEL_PERF_PATCHES[4.19] ?= " \ file://patches/perf/4.19/tools-perf-version.patch \ file://patches/perf/4.19/tools-perf-install.patch \ + file://patches/perf/4.19/tools-perf-python.patch \ " KERNEL_PERF_PATCHES[5.4] ?= " \ file://patches/perf/5.4/tools-perf-version.patch \