From: Seung-Woo Kim Date: Thu, 5 Sep 2019 00:14:46 +0000 (+0900) Subject: packaging: add perf package for perf tool and traceevent plugins X-Git-Tag: submit/tizen/20191031.012258~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d4fb57d2135c37b96b1703bf91b68f19c434b2b7;p=platform%2Fkernel%2Flinux-rpi3.git packaging: add perf package for perf tool and traceevent plugins Add perf package for perf tool and its traceevent plugins. Note: they are built from below directories. - perf: tools/perf - traceevent plugins: tools/lib/traceevent Change-Id: I418c52ec7dffb6b98e72e402af5bf67c3d837ba7 Signed-off-by: Seung-Woo Kim --- diff --git a/packaging/linux-rpi3.spec b/packaging/linux-rpi3.spec index 9af261819771..ed7aae01c0be 100644 --- a/packaging/linux-rpi3.spec +++ b/packaging/linux-rpi3.spec @@ -64,6 +64,15 @@ Provides: %{variant}-kernel-devel-uname-r = %{fullVersion} %description -n %{variant}-linux-kernel-devel This package provides kernel map and etc information. +%package -n linux-kernel-perf +Summary: The perf performance counter tool +Group: System/Kernel +Provides: perf = %{fullVersion} + +%description -n linux-kernel-perf +This package provides the "perf" tool that can be used to monitor performance +counter events as well as various kernel internal events. + %prep %setup -q -n linux-kernel-%{version} @@ -86,6 +95,10 @@ make dtbs %{?_smp_mflags} # 1-4. Build modules make modules %{?_smp_mflags} +# 1-5. Build perf +make -s -C tools/lib/traceevent %{?_smp_mflags} +make -s -C tools/perf %{?_smp_mflags} + %install QA_SKIP_BUILD_ROOT="DO_NOT_WANT"; export QA_SKIP_BUILD_ROOT @@ -116,6 +129,13 @@ install -m 644 rpi3/boot/bootcode.bin %{buildroot}/boot/ install -m 644 rpi3/boot/start*.elf %{buildroot}/boot/ install -m 644 rpi3/boot/fixup*.dat %{buildroot}/boot/ +# 2-5. Install perf +install -d %{buildroot}/usr +make -s -C tools/perf DESTDIR=%{buildroot}/usr install +rm -rf %{buildroot}/usr/etc +rm -rf %{buildroot}/usr/lib/debug +rm -rf %{buildroot}/usr/share + # 3-1. remove unnecessary files to prepare for devel package find %{_builddir}/linux-kernel-%{version} -name ".tmp_vmlinux*" -delete find %{_builddir}/linux-kernel-%{version} -name ".gitignore" -delete @@ -163,3 +183,9 @@ rm -rf %{buildroot} /boot/bootcode.bin /boot/start*.elf /boot/fixup*.dat + +%files -n linux-kernel-perf +%license COPYING +/usr/bin/* +/usr/libexec/* +/usr/lib/traceevent/*