perf: pack the libperf-jvmti plug-in to perf RPM
libperf-jvmti.so hasn't been built as part of perf RPM in the previous openEuler releases. This patch will enable the building and packing of jvmti shared library by default. It should faciliate the JDK user to profile Java application after installing the perf. Signed-off-by: Zhichang Yuan <Erik.Yuan@arm.com>
This commit is contained in:
parent
6c0a06245b
commit
5657903ce7
28
kernel.spec
28
kernel.spec
@ -12,7 +12,7 @@
|
|||||||
%global upstream_sublevel 0
|
%global upstream_sublevel 0
|
||||||
%global devel_release 1
|
%global devel_release 1
|
||||||
%global maintenance_release .0.0
|
%global maintenance_release .0.0
|
||||||
%global pkg_release .9
|
%global pkg_release .10
|
||||||
|
|
||||||
%define with_debuginfo 1
|
%define with_debuginfo 1
|
||||||
# Do not recompute the build-id of vmlinux in find-debuginfo.sh
|
# Do not recompute the build-id of vmlinux in find-debuginfo.sh
|
||||||
@ -29,6 +29,9 @@
|
|||||||
# failed if there is new config options
|
# failed if there is new config options
|
||||||
%define listnewconfig_fail 0
|
%define listnewconfig_fail 0
|
||||||
|
|
||||||
|
#defualt is enabled. You can disable it with --without option
|
||||||
|
%define with_perf %{?_without_perf: 0} %{?!_without_perf: 1}
|
||||||
|
|
||||||
Name: kernel
|
Name: kernel
|
||||||
Version: %{upstream_version}.%{upstream_sublevel}
|
Version: %{upstream_version}.%{upstream_sublevel}
|
||||||
Release: %{devel_release}%{?maintenance_release}%{?pkg_release}%{?extra_release}
|
Release: %{devel_release}%{?maintenance_release}%{?pkg_release}%{?extra_release}
|
||||||
@ -101,6 +104,12 @@ Requires: dracut >= 001-7 grubby >= 8.28-2 initscripts >= 8.11.1-1 linux-firmwar
|
|||||||
ExclusiveArch: noarch aarch64 i686 x86_64
|
ExclusiveArch: noarch aarch64 i686 x86_64
|
||||||
ExclusiveOS: Linux
|
ExclusiveOS: Linux
|
||||||
|
|
||||||
|
%if %{with_perf}
|
||||||
|
BuildRequires: flex xz-devel libzstd-devel
|
||||||
|
BuildRequires: java-devel
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The Linux Kernel, the operating system core itself.
|
The Linux Kernel, the operating system core itself.
|
||||||
|
|
||||||
@ -150,6 +159,7 @@ Obsoletes: kernel-tools-libs-devel
|
|||||||
This package contains the development files for the tools/ directory from
|
This package contains the development files for the tools/ directory from
|
||||||
the kernel source.
|
the kernel source.
|
||||||
|
|
||||||
|
%if %{with_perf}
|
||||||
%package -n perf
|
%package -n perf
|
||||||
Summary: Performance monitoring for the Linux kernel
|
Summary: Performance monitoring for the Linux kernel
|
||||||
%description -n perf
|
%description -n perf
|
||||||
@ -172,6 +182,8 @@ Summary: Python bindings for apps which will manipulate perf events
|
|||||||
%description -n python3-perf
|
%description -n python3-perf
|
||||||
A Python module that permits applications written in the Python programming
|
A Python module that permits applications written in the Python programming
|
||||||
language to use the interface to manipulate perf events.
|
language to use the interface to manipulate perf events.
|
||||||
|
# with_perf
|
||||||
|
%endif
|
||||||
|
|
||||||
%package -n bpftool
|
%package -n bpftool
|
||||||
Summary: Inspection and simple manipulation of eBPF programs and maps
|
Summary: Inspection and simple manipulation of eBPF programs and maps
|
||||||
@ -211,6 +223,7 @@ package or when debugging this package.\
|
|||||||
%files -n kernel-tools-debuginfo -f kernel-tools-debugfiles.list
|
%files -n kernel-tools-debuginfo -f kernel-tools-debugfiles.list
|
||||||
%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} -p '.*%{_bindir}/centrino-decode.*(\.debug)?|.*%{_bindir}/powernow-k8-decode.*(\.debug)?|.*%{_bindir}/cpupower.*(\.debug)?|.*%{_libdir}/libcpupower.*|.*%{_libdir}/libcpupower.*|.*%{_bindir}/turbostat.(\.debug)?|.*%{_bindir}/.*gpio.*(\.debug)?|.*%{_bindir}/.*iio.*(\.debug)?|.*%{_bindir}/tmon.*(.debug)?|XXX' -o kernel-tools-debugfiles.list}
|
%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} -p '.*%{_bindir}/centrino-decode.*(\.debug)?|.*%{_bindir}/powernow-k8-decode.*(\.debug)?|.*%{_bindir}/cpupower.*(\.debug)?|.*%{_libdir}/libcpupower.*|.*%{_libdir}/libcpupower.*|.*%{_bindir}/turbostat.(\.debug)?|.*%{_bindir}/.*gpio.*(\.debug)?|.*%{_bindir}/.*iio.*(\.debug)?|.*%{_bindir}/tmon.*(.debug)?|XXX' -o kernel-tools-debugfiles.list}
|
||||||
|
|
||||||
|
%if %{with_perf}
|
||||||
%debuginfo_template -n perf
|
%debuginfo_template -n perf
|
||||||
%files -n perf-debuginfo -f perf-debugfiles.list
|
%files -n perf-debuginfo -f perf-debugfiles.list
|
||||||
%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} -p '.*%{_bindir}/perf.*(\.debug)?|.*%{_libexecdir}/perf-core/.*|.*%{_libdir}/traceevent/.*|XXX' -o perf-debugfiles.list}
|
%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} -p '.*%{_bindir}/perf.*(\.debug)?|.*%{_libexecdir}/perf-core/.*|.*%{_libdir}/traceevent/.*|XXX' -o perf-debugfiles.list}
|
||||||
@ -224,6 +237,8 @@ package or when debugging this package.\
|
|||||||
%debuginfo_template -n python3-perf
|
%debuginfo_template -n python3-perf
|
||||||
%files -n python3-perf-debuginfo -f python3-perf-debugfiles.list
|
%files -n python3-perf-debuginfo -f python3-perf-debugfiles.list
|
||||||
%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} -p '.*%{python3_sitearch}/perf.*(.debug)?|XXX' -o python3-perf-debugfiles.list}
|
%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} -p '.*%{python3_sitearch}/perf.*(.debug)?|XXX' -o python3-perf-debugfiles.list}
|
||||||
|
#with_perf
|
||||||
|
%endif
|
||||||
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -342,6 +357,7 @@ make ARCH=%{Arch} modules %{?_smp_mflags}
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
## make tools
|
## make tools
|
||||||
|
%if %{with_perf}
|
||||||
# perf
|
# perf
|
||||||
%global perf_make \
|
%global perf_make \
|
||||||
make EXTRA_CFLAGS="-Wl,-z,now -g -Wall -fstack-protector-strong -fPIC" EXTRA_PERFLIBS="-fpie -pie" %{?_smp_mflags} -s V=1 WERROR=0 NO_LIBUNWIND=1 HAVE_CPLUS_DEMANGLE=1 NO_GTK2=1 NO_LIBNUMA=1 NO_STRLCPY=1 prefix=%{_prefix}
|
make EXTRA_CFLAGS="-Wl,-z,now -g -Wall -fstack-protector-strong -fPIC" EXTRA_PERFLIBS="-fpie -pie" %{?_smp_mflags} -s V=1 WERROR=0 NO_LIBUNWIND=1 HAVE_CPLUS_DEMANGLE=1 NO_GTK2=1 NO_LIBNUMA=1 NO_STRLCPY=1 prefix=%{_prefix}
|
||||||
@ -365,6 +381,7 @@ chmod +x tools/python3-perf/check-headers.sh
|
|||||||
pushd tools/perf/Documentation/
|
pushd tools/perf/Documentation/
|
||||||
make %{?_smp_mflags} man
|
make %{?_smp_mflags} man
|
||||||
popd
|
popd
|
||||||
|
%endif
|
||||||
|
|
||||||
# bpftool
|
# bpftool
|
||||||
pushd tools/bpf/bpftool
|
pushd tools/bpf/bpftool
|
||||||
@ -605,6 +622,7 @@ popd
|
|||||||
|
|
||||||
|
|
||||||
## install tools
|
## install tools
|
||||||
|
%if %{with_perf}
|
||||||
# perf
|
# perf
|
||||||
# perf tool binary and supporting scripts/binaries
|
# perf tool binary and supporting scripts/binaries
|
||||||
%if 0%{?with_python2}
|
%if 0%{?with_python2}
|
||||||
@ -630,6 +648,7 @@ rm -rf %{buildroot}/usr/lib/perf/include/bpf/
|
|||||||
install -d %{buildroot}/%{_mandir}/man1
|
install -d %{buildroot}/%{_mandir}/man1
|
||||||
install -pm0644 tools/kvm/kvm_stat/kvm_stat.1 %{buildroot}/%{_mandir}/man1/
|
install -pm0644 tools/kvm/kvm_stat/kvm_stat.1 %{buildroot}/%{_mandir}/man1/
|
||||||
install -pm0644 tools/perf/Documentation/*.1 %{buildroot}/%{_mandir}/man1/
|
install -pm0644 tools/perf/Documentation/*.1 %{buildroot}/%{_mandir}/man1/
|
||||||
|
%endif
|
||||||
|
|
||||||
# bpftool
|
# bpftool
|
||||||
pushd tools/bpf/bpftool
|
pushd tools/bpf/bpftool
|
||||||
@ -777,8 +796,10 @@ fi
|
|||||||
%defattr (-, root, root)
|
%defattr (-, root, root)
|
||||||
/usr/include/*
|
/usr/include/*
|
||||||
|
|
||||||
|
%if %{with_perf}
|
||||||
%files -n perf
|
%files -n perf
|
||||||
%{_bindir}/perf
|
%{_bindir}/perf
|
||||||
|
%{_libdir}/libperf-jvmti.so
|
||||||
%dir %{_libdir}/traceevent
|
%dir %{_libdir}/traceevent
|
||||||
%{_libdir}/traceevent/plugins/
|
%{_libdir}/traceevent/plugins/
|
||||||
%{_libexecdir}/perf-core
|
%{_libexecdir}/perf-core
|
||||||
@ -799,6 +820,7 @@ fi
|
|||||||
%files -n python3-perf
|
%files -n python3-perf
|
||||||
%license linux-%{KernelVer}/COPYING
|
%license linux-%{KernelVer}/COPYING
|
||||||
%{python3_sitearch}/*
|
%{python3_sitearch}/*
|
||||||
|
%endif
|
||||||
|
|
||||||
%files -n kernel-tools -f cpupower.lang
|
%files -n kernel-tools -f cpupower.lang
|
||||||
%{_bindir}/cpupower
|
%{_bindir}/cpupower
|
||||||
@ -862,6 +884,10 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jan 22 2021 Yuan Zhichang<erik.yuan@arm.com> - 5.10.0-0.0.0.10
|
||||||
|
- Add the option of "with_perf"
|
||||||
|
- Output jvmti plug-in as part of perf building
|
||||||
|
|
||||||
* Tue Jan 26 2021 Chunsheng Luo <luochunsheng@huawei.com> - 5.10.0-1.0.0.9
|
* Tue Jan 26 2021 Chunsheng Luo <luochunsheng@huawei.com> - 5.10.0-1.0.0.9
|
||||||
- split from kernel-devel to kernel-headers and kernel-devel
|
- split from kernel-devel to kernel-headers and kernel-devel
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user