Sync from SUSE:SLFO:Main perf revision 4dced3fe47148d248d4f7c33d69553c5

This commit is contained in:
Adrian Schröter 2025-02-20 11:15:12 +01:00
commit 9f895ffae7
8 changed files with 19096 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
_component_files Normal file
View File

@ -0,0 +1 @@
COPYING CREDITS README tools include scripts Kbuild Makefile arch/*/{include,lib,tools,Makefile} lib kernel/bpf/disasm.[ch]

2
_patterns Normal file
View File

@ -0,0 +1,2 @@
tools/perf/**
tools/lib/perf/**

7
_service Normal file
View File

@ -0,0 +1,7 @@
<services>
<service name="kernel-source-component" mode="manual">
<param name="repo">kerncvs.suse.de:/srv/git/kernel-source.git</param>
</service>
<service name="set_version" mode="manual">
</service>
</services>

BIN
perf-6.12.0.git3456.f82da74913.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

18873
perf.changes Normal file

File diff suppressed because it is too large Load Diff

4
perf.obsinfo Normal file
View File

@ -0,0 +1,4 @@
name: perf
version: 6.12.0.git3456.f82da74913
mtime: 1738978291
commit: f82da74913ed019f278d1c12e4d963851347e87b

183
perf.spec Normal file
View File

@ -0,0 +1,183 @@
#
# spec file for package perf
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# A bug in dwz leaves temporary trace-*.debug.#dwz#.* on 64 bits in place
# It was long ago fixed in OpenSUSE but somehow is now occuring on SLE15-SP6
# https://sourceware.org/bugzilla/show_bug.cgi?id=26645
# https://bugzilla.suse.com/show_bug.cgi?id=1180984
# perf does not link with LTO
%define _lto_cflags %{nil}
%define _find_debuginfo_dwz_opts %{nil}
Name: perf
Version: 6.12.0.git3456.f82da74913
Release: 0
Summary: Performance Monitoring Tools for Linux
License: GPL-2.0-only
Group: Development/Tools/Debuggers
Url: https://perf.wiki.kernel.org/
Source0: %{name}-%{version}.tar.gz
BuildRequires: asciidoc
BuildRequires: audit-devel
BuildRequires: binutils-devel
BuildRequires: bison
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: gcc-c++
BuildRequires: gtk2-devel
BuildRequires: libdw-devel
BuildRequires: libelf-devel
BuildRequires: libtraceevent-devel
BuildRequires: llvm
BuildRequires: OpenCSD-devel
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: newt-devel
BuildRequires: openssl-devel
BuildRequires: xmlto
BuildRequires: xz-devel
BuildRequires: zlib-devel
BuildRequires: rubygem(asciidoctor)
%ifarch aarch64 ia64 x86_64 ppc64 ppc64le ppc %sparc
BuildRequires: libnuma-devel
%endif
%ifarch s390x s390
%define _perf_unwind NO_LIBUNWIND=1
%else
%define _perf_unwind %{nil}
BuildRequires: libunwind-devel
%endif
# dl_open requirement so not autodetected
%ifarch ppc64 ppc64le
Requires: libebl
%endif
%{perl_requires}
%{?libperl_requires}
# upstream patches
# non upstream patches
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
This package provides a userspace tool 'perf', which monitors performance for
either unmodified binaries or the entire system. It requires a Linux kernel
which includes the Performance Counters for Linux (PCL) subsystem (>= 2.6.31).
This subsystem utilizes the Performance Monitoring Unit (PMU) / hardware
counters of the underlying cpu architecture (if supported).
%package devel
Summary: Development headers for perf
Group: Development/Libraries/Other
Requires: %{name} = %{version}
%description devel
Development headers for perf.
%package gtk
Summary: Gtk browser for perf-report
Group: Development/Tools/Other
Requires: %{name} = %{version}
%description gtk
A GTK2 frontend for perf-report. (Use `perf report --gtk`.)
%package bash-completion
Summary: Bash completion for perf
Group: System/Shells
Requires: %{name}
Requires: bash-completion
Supplements: (%{name} and bash-completion)
%description bash-completion
bash command line completion support for perf.
%prep
%setup -q
chmod +x tools/perf/util/generate-cmdlist.sh
# don't error out on deprecated definitions in gtk2.h
sed -i 's@ignored "-Wstrict-prototypes"@&\n#pragma GCC diagnostic ignored "-Wdeprecated-declarations"@' tools/build/feature/test-gtk2.c
# skip info-from-txt generation (it's the same as man anyway)
sed -i.old 's@\(all: .*\)info@\1@' tools/perf/Documentation/Makefile
# BPF_SKEL=1 requires clang, enable when we resolve CLANG in SLE issue
%define perf_options LIBTRACEEVENT_DYNAMIC=1 CORESIGHT=1 GTK2=1 PYTHON=python3 ASCIIDOC8=1 USE_ASCIIDOCTOR=1 EXTRA_CFLAGS="%{optflags}" prefix=/usr libdir=%{_libdir} perfexecdir=lib/%{name}-core tipdir=share/doc/packages/perf %{_perf_unwind}
%build
cd tools/perf
export WERROR=0
# PASS rpm optflags as EXTRA_FLAGS, passing as CFLAGS overrides and breaks build
# Specifying "all doc" as one invocation when using -f Makefile.perf doesn't
# work and all is deferred to later %install; so seperate into two
make %{?_smp_mflags} -f Makefile.perf \
V=0 VF=0 \
%{perf_options} \
all
make %{?_smp_mflags} -f Makefile.perf \
V=0 VF=0 \
%{perf_options} \
doc
%install
cd tools/perf
export WERROR=0
make -f Makefile.perf \
%{perf_options} \
DESTDIR=%{buildroot} \
install install-doc
mkdir -p %{buildroot}%{_datadir}/bash-completion/completions/
mv %{buildroot}%{_sysconfdir}/bash_completion.d/perf %{buildroot}%{_datadir}/bash-completion/completions/
%fdupes %{buildroot}/%{_prefix}/lib/%{name}-core
%files
%defattr(-, root, root)
%attr(0644, root, root) %doc COPYING CREDITS README tools/perf/design.txt
%attr(0644, root, root) %doc %{_docdir}/perf/tips.txt
%{_bindir}/perf
%{_bindir}/trace
%{_prefix}/lib/%{name}-core
%{_datadir}/%{name}-core
%{_mandir}/man1/perf*
%files devel
%dir %{_includedir}/perf/
%attr(0644, root, root) %{_includedir}/perf/*.h
%files gtk
%{_libdir}/libperf-gtk.so
%files bash-completion
%dir %{_datadir}/bash-completion
%dir %{_datadir}/bash-completion/completions
%{_datadir}/bash-completion/completions/perf
%changelog