diff --git a/.fmf/version b/.fmf/version deleted file mode 100644 index d00491f..0000000 --- a/.fmf/version +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/.gitignore b/.gitignore index dcf1bf6..fdbb818 100644 --- a/.gitignore +++ b/.gitignore @@ -3,14 +3,3 @@ /trace-cmd-2.2.1.tar.gz /trace-cmd-2.6.tar.gz /trace-cmd-2.6.1.tar.gz -/trace-cmd-v2.6.2.tar.gz -/trace-cmd-v2.7.tar.gz -/trace-cmd-v2.8.3.tar.gz -/trace-cmd-v2.9.1.tar.gz -/trace-cmd-v2.9.2.tar.gz -/trace-cmd-v2.9.7.tar.gz -/trace-cmd-v3.0.3.tar.gz -/trace-cmd-v3.1.4.tar.gz -/trace-cmd-v3.1.6.tar.gz -/trace-cmd-v3.2.tar.gz -/trace-cmd-v3.3.1.tar.gz diff --git a/98-trace-cmd.rules b/98-trace-cmd.rules deleted file mode 100644 index 9575bd8..0000000 --- a/98-trace-cmd.rules +++ /dev/null @@ -1 +0,0 @@ -SUBSYSTEM=="module", ACTION=="add", PROGRAM="/usr/bin/systemctl is-active trace-cmd.service", PROGRAM="/usr/bin/systemctl reload trace-cmd.service" diff --git a/kernelshark.desktop b/kernelshark.desktop new file mode 100644 index 0000000..e51a7ab --- /dev/null +++ b/kernelshark.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Name=Kernelshark +Comment=Analyze data output by trace-cmd +Exec=kernelshark +Type=Application +Categories=Development;Profiling; +Icon=applications-development diff --git a/sources b/sources index 65e4f7d..35ce0b5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (trace-cmd-v3.3.1.tar.gz) = a643efc2868d08871a7359dd0a17389685fb229f26328ee96f27a3dd94b5f3eb62009b945c14725eda1f09fa15367ffe2e2c3611d89860dcc031bbd6403cdee0 +SHA512 (trace-cmd-2.6.1.tar.gz) = 741281c8dc9355218932c6edc6b585de92ffc2b530744d13b4eb838ead8d2c6ec91fd25f39e590b50223c3425ae1cf2ec949f269335fc9d2b0cf1c4999751ec4 diff --git a/tests/plan.fmf b/tests/plan.fmf deleted file mode 100644 index f8b2604..0000000 --- a/tests/plan.fmf +++ /dev/null @@ -1,8 +0,0 @@ -prepare: - how: install - package: - - trace-cmd -discover: - how: fmf -execute: - how: tmt diff --git a/tests/sanity/PURPOSE b/tests/sanity/PURPOSE deleted file mode 100644 index ac1e2e4..0000000 --- a/tests/sanity/PURPOSE +++ /dev/null @@ -1 +0,0 @@ -Basic sanity test for trace-cmd diff --git a/tests/sanity/runtest.sh b/tests/sanity/runtest.sh deleted file mode 100755 index 1198f22..0000000 --- a/tests/sanity/runtest.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/bash -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Description: Basic sanity test for trace-cmd -# Author: Ziqian SUN (Zamir) -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2018 Red Hat, Inc. All rights reserved. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include rhts environment -. /usr/bin/rhts-environment.sh -. /usr/share/beakerlib/beakerlib.sh - -if ! mount | grep -q debugfs ; then - mount -t debugfs nodev /sys/kernel/debug -fi - -trace-cmd reset -rlJournalStart - for TRACER in $(cat /sys/kernel/debug/tracing/available_tracers) ; do - rlPhaseStartTest "Enable ${TRACER} using trace-cmd" - rlRun "trace-cmd start -p ${TRACER}" - rlAssertEquals "Check current tracer" "$(cat /sys/kernel/debug/tracing/current_tracer)" "${TRACER}" - rlAssertEquals "Check tracing status" "$(cat /sys/kernel/debug/tracing/tracing_on)" "1" - rlRun "trace-cmd stop" - rlAssertEquals "Check tracing status" "$(cat /sys/kernel/debug/tracing/tracing_on)" "0" - rlRun "trace-cmd reset" - rlPhaseEnd - if [[ "${TRACER}" == "function" ]]; then - rlPhaseStartTest "Test trace-cmd show" - rlRun "trace-cmd start -p ${TRACER}" - rlWatchdog "trace-cmd show | grep -v '^#' > trace-cmd-show-function.log" 5 INT - rlAssertGreater "At least one line of trace data" $(cat trace-cmd-show-function.log | wc -l) 1 - rlRun "trace-cmd stop" - rlRun "trace-cmd reset" - rlFileSubmit trace-cmd-show-function.log - rm -f trace-cmd-show-function.log - rlPhaseEnd - fi - done -rlJournalEnd diff --git a/tests/sanity/sanity.fmf b/tests/sanity/sanity.fmf deleted file mode 100644 index 8733518..0000000 --- a/tests/sanity/sanity.fmf +++ /dev/null @@ -1,3 +0,0 @@ -test: bash ./runtest.sh -framework: beakerlib -duration: 15m diff --git a/trace-cmd-2.6-libdir.patch b/trace-cmd-2.6-libdir.patch new file mode 100644 index 0000000..79b8f1b --- /dev/null +++ b/trace-cmd-2.6-libdir.patch @@ -0,0 +1,17 @@ +diff -up ./Makefile.orig ./Makefile +--- ./Makefile.orig 2016-08-18 00:26:57.580940826 -0400 ++++ ./Makefile 2016-08-18 00:29:51.594273746 -0400 +@@ -31,6 +31,13 @@ $(call allow-override,AR,$(CROSS_COMPILE + EXT = -std=gnu99 + INSTALL = install + ++# figure out what arch we are on and install to the right place ++ARCH = $(shell getconf LONG_BIT) ++LIBDIR_32 = /usr/lib ++LIBDIR_64 = /usr/lib64 ++libdir=$(LIBDIR_$(ARCH)) ++ ++ + # Use DESTDIR for installing into a different root directory. + # This is useful for building a package. The program will be + # installed in this directory as if it was the root directory. diff --git a/trace-cmd.conf b/trace-cmd.conf deleted file mode 100644 index 85c4fbe..0000000 --- a/trace-cmd.conf +++ /dev/null @@ -1,4 +0,0 @@ -# ftrace based flightrecorder configuration file. - -# trace-cmd options -OPTS="-b 2048 -i -e block -e irq -e mce -e module -e power -e sched -e signal -e timer -e workqueue -e kvm -e net" diff --git a/trace-cmd.service b/trace-cmd.service deleted file mode 100644 index 27b07f5..0000000 --- a/trace-cmd.service +++ /dev/null @@ -1,15 +0,0 @@ -[Unit] -Description=trace-cmd Flightrecorder -DefaultDependencies=no -Before=sysinit.target - -[Service] -Type=oneshot -RemainAfterExit=yes -EnvironmentFile=/etc/sysconfig/trace-cmd.conf -ExecStart=/usr/bin/trace-cmd start $OPTS -ExecStop=/usr/bin/trace-cmd reset -ExecReload=/usr/bin/trace-cmd start $OPTS - -[Install] -WantedBy=multi-user.target diff --git a/trace-cmd.spec b/trace-cmd.spec index 3d7202f..9006bdc 100644 --- a/trace-cmd.spec +++ b/trace-cmd.spec @@ -1,268 +1,84 @@ +#%global checkout 20130723git07f0eee2 # git tag -#%%global git_commit trace-cmd-v2.6.2 -#%%global git_commit 57371aaa2f469d0ba15fd85276deca7bfdd7ce36 - -%global srcversion 3.3.1 +%global git_commit trace-cmd-v2.6 Name: trace-cmd -Version: %{srcversion} -Release: 4%{?dist} -License: LGPL-2.1-only AND LGPL-2.1-or-later AND GPL-2.0-only AND GPL-2.0-or-later +Version: 2.6.1 +Release: 1%{?dist} +License: GPLv2 and LGPLv2 Summary: A user interface to Ftrace -ExcludeArch: %{ix86} %{arm} - +Group: Development/Tools URL: http://git.kernel.org/?p=linux/kernel/git/rostedt/trace-cmd.git;a=summary -# If upstream does not provide tarballs, to generate: -# git clone https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git +# Upstream does not provide tarballs. +# To generate: +# git clone git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git # cd trace-cmd -# git archive --prefix=trace-cmd-%%{version}/ -o trace-cmd-v%%{version}.tar.gz %%{git_commit} -Source0: https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/snapshot/trace-cmd-v%{srcversion}.tar.gz -Source1: trace-cmd.conf -Source2: trace-cmd.service -Source3: 98-trace-cmd.rules +# git archive --prefix=trace-cmd-%%{version}/ -o trace-cmd-%%{version}.tar.gz %%{git_commit} +Source0: trace-cmd-%{version}.tar.gz +Source1: kernelshark.desktop +Patch1: trace-cmd-2.6-libdir.patch -BuildRequires: make -BuildRequires: gcc BuildRequires: xmlto BuildRequires: asciidoc -BuildRequires: graphviz doxygen -BuildRequires: gcc-c++ -BuildRequires: cmake -BuildRequires: libtraceevent-devel >= 1.8.0 -BuildRequires: libtracefs-devel >= 1.8.0 -BuildRequires: audit-libs-devel -BuildRequires: chrpath -BuildRequires: swig -BuildRequires: systemd-rpm-macros -BuildRequires: libtracecmd-devel -BuildRequires: libzstd-devel +BuildRequires: mlocate +# needed for the GUI parts +BuildRequires: libxml2-devel +BuildRequires: gtk2-devel +BuildRequires: glib2-devel +BuildRequires: desktop-file-utils %description trace-cmd is a user interface to Ftrace. Instead of needing to use the debugfs directly, trace-cmd will handle of setting of options and tracers and will record into a data file. -%package python3 -Summary: Python plugin support for trace-cmd +%package -n kernelshark +Summary: GUI analysis for Ftrace data captured by trace-cmd +Group: Development/Tools Requires: trace-cmd%{_isa} = %{version}-%{release} -BuildRequires: python3-devel -%description python3 -Python plugin support for trace-cmd +%description -n kernelshark +Kernelshark is the GUI frontend for analyzing data produced by +'trace-cmd extract' %prep -%autosetup -n %{name}-v%{srcversion} -cp %{SOURCE1} . -cp %{SOURCE2} . -cp %{SOURCE3} . +%setup -q -n %{name}-%{version} +%patch1 -p1 %build # MANPAGE_DOCBOOK_XSL define is hack to avoid using locate MANPAGE_DOCBOOK_XSL=`rpm -ql docbook-style-xsl | grep manpages/docbook.xsl` -CFLAGS="%{optflags} -D_GNU_SOURCE" LDFLAGS="%{build_ldflags}" BUILD_TYPE=Release \ - make V=9999999999 MANPAGE_DOCBOOK_XSL=$MANPAGE_DOCBOOK_XSL \ - prefix=%{_prefix} libdir=%{_libdir} \ - PYTHON_VERS=python3 all_cmd doc -for i in python/*.py ; do - sed -i 's/env python2/python3/g' $i -done -chrpath --delete tracecmd/trace-cmd +make V=1 CFLAGS="%{optflags} -D_GNU_SOURCE" MANPAGE_DOCBOOK_XSL=$MANPAGE_DOCBOOK_XSL prefix=%{_prefix} all doc gui + %install -make libdir=%{_libdir} prefix=%{_prefix} V=1 DESTDIR=%{buildroot}/ CFLAGS="%{optflags} -D_GNU_SOURCE" LDFLAGS="%{build_ldflags} -z muldefs " BUILD_TYPE=Release install install_doc install_python +make V=1 DESTDIR=%{buildroot} prefix=%{_prefix} install install_doc install_gui find %{buildroot}%{_mandir} -type f | xargs chmod u-x,g-x,o-x find %{buildroot}%{_datadir} -type f | xargs chmod u-x,g-x,o-x find %{buildroot}%{_libdir} -type f -iname "*.so" | xargs chmod 0755 -mkdir -p -m755 %{buildroot}/%{_sysconfdir}/sysconfig/ -mkdir -p -m755 %{buildroot}/%{_unitdir}/ -mkdir -p -m755 %{buildroot}/%{_udevrulesdir}/ -install -p -m 644 trace-cmd.conf %{buildroot}/%{_sysconfdir}/sysconfig/ -install -p -m 644 trace-cmd.service %{buildroot}/%{_unitdir}/ -install -p -m 644 98-trace-cmd.rules %{buildroot}/%{_udevrulesdir}/ -rm -rf %{buildroot}/%{_docdir}/libtracecmd-doc -rm -rf %{buildroot}/%{_mandir}/man3/* - -%preun -%systemd_preun %{name}.service +install -dm 755 %{buildroot}/%{_datadir}/applications +install -pm 644 %{SOURCE1} %{buildroot}/%{_datadir}/applications/kernelshark.desktop +desktop-file-validate %{buildroot}/%{_datadir}/applications/kernelshark.desktop %files %doc COPYING COPYING.LIB README %{_bindir}/trace-cmd -%{_mandir}/man1/%{name}* -%{_mandir}/man5/%{name}* -%{_docdir}/trace-cmd/trace-cmd*.html -%{_sysconfdir}/bash_completion.d/trace-cmd.bash -%{_sysconfdir}/sysconfig/trace-cmd.conf -%{_unitdir}/trace-cmd.service -%{_udevrulesdir}/98-trace-cmd.rules +%{_libdir}/%{name} +%{_mandir}/man1/* +%{_mandir}/man5/* -%files python3 -%doc Documentation/README.PythonPlugin -%{_libdir}/%{name}/python/ +%files -n kernelshark +%{_bindir}/trace-view +%{_bindir}/trace-graph +%{_bindir}/kernelshark +%{_datadir}/kernelshark +%{_datadir}/applications/kernelshark.desktop +%{_sysconfdir}/bash_completion.d/trace-cmd.bash %changelog -* Fri Aug 15 2025 Zamir SUN - 3.3.1-4 -- Bump to build and run new gating -- Reolves: rhbz#2383087 - -* Fri Jul 25 2025 Fedora Release Engineering - 3.3.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Sun Jan 19 2025 Fedora Release Engineering - 3.3.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Thu Oct 17 2024 Zamir SUN - 3.3.1-1 -- Update to 3.3 - -* Sat Jul 20 2024 Fedora Release Engineering - 3.2-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Sun Jun 23 2024 Yaakov Selkowitz - 3.2-3 -- Rebuilt for Python 3.13 - -* Sat Jan 27 2024 Fedora Release Engineering - 3.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Tue Jan 23 2024 Zamir SUN - 3.2 -- Update to 3.2 (#2213350) - -* Sat Jul 22 2023 Fedora Release Engineering - 3.1.6-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Thu Jun 22 2023 Yaakov Selkowitz - 3.1.6-3 -- Remove lingering kernelshark dependencies - -* Mon Jun 05 2023 Zamir SUN - 3.1.6-2 -- SPDX migration - -* Tue Apr 18 2023 Zamir SUN - 3.1.6-1 -- Update to 3.1.6 - -* Fri Mar 31 2023 Jerome Marchand - 3.1.4-3 -- Fix build: RHBZ#2171770 -- Also remove explicit lib dependency that fedpkg lint complains about. - -* Sat Jan 21 2023 Fedora Release Engineering - 3.1.4-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Tue Oct 11 2022 Zamir SUN - 3.1.4-1 -- Update to 3.1.4 - -* Sat Jul 23 2022 Fedora Release Engineering - 3.0.3-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Fri Apr 15 2022 Zamir SUN - 3.0.3-2 -- Get rid of the libtracecmd man pages - -* Wed Apr 13 2022 Zamir SUN - 3.0.3-1 -- Update to 3.0.3 - -* Fri Mar 18 2022 KUDOH Takashi - 2.9.7-2 -- Add flight recoder service - -* Wed Feb 16 2022 Zamir SUN - 2.9.7-1 -- Update to 2.9.7 - -* Sat Jan 22 2022 Fedora Release Engineering - 2.9.2-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Fri Jul 23 2021 Fedora Release Engineering - 2.9.2-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Fri Apr 23 2021 Jerome Marchand - 2.9.2-3 -- Build w/o rpath as per Fedora packaging guideline - -* Mon Mar 29 2021 Zamir SUN - 2.9.2-2 -- Fix dependency of libtracecmd -- Resolves https://bugzilla.redhat.com/show_bug.cgi?id=1943919 - -* Fri Mar 26 2021 Zamir SUN - 2.9.2-1 -- Update to 2.9.2 - -* Wed Mar 24 2021 Jerome Marchand - 2.9.1-6 -- Build with external libtraceevent and libtracefs - -* Wed Jan 27 2021 Fedora Release Engineering - 2.9.1-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Wed Dec 02 2020 Zamir SUN - 2.9.1-4 -- Move %{_libdir}/trace-cmd/python/ to trace-cmd-python3 - -* Mon Oct 12 2020 Zamir SUN - 2.9.1-3 -- Temporary move libtraceevent back to trace-cmd/plugins to mitigate the conflicts - -* Tue Sep 29 2020 Zamir SUN - 2.9.1-2 -- Remove kernelsharl as it's now separate package - -* Fri Aug 07 2020 Zamir SUN - 2.9.1-1 -- Update to 2.9.1 - -* Wed Jul 29 2020 Fedora Release Engineering - 2.8.3-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Tue May 26 2020 Jeff Law - 2.8.3-3 -- TRACECMD_LIBRARY can reference things in TRACEEVENT_LIBRARY, so - link TRACEEVENT_LIBRARY after TRACECMD_LIBRARY. - -* Tue Apr 21 2020 Björn Esser - 2.8.3-2 -- Rebuild (json-c) - -* Sat Feb 08 2020 Zamir SUN - 2.8.3-1 -- Update to 2.8 -- Add workaround to resolve gcc 10 multiple definition of `common_type_field' problem -- Resolves 1794296 -- Resolves 1727368 - -* Fri Jan 31 2020 Fedora Release Engineering - 2.7-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Mon Aug 19 2019 Miro Hrončok - 2.7-8 -- Rebuilt for Python 3.8 - -* Wed Aug 07 2019 Zamir SUN - 2.7-7 -- Fix more python2 residuals. -- Fixes 1738158 - -* Sat Aug 03 2019 Zamir SUN - 2.7-6 -- Switch the python plugin to python3 - -* Sat Jul 27 2019 Fedora Release Engineering - 2.7-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Sun Feb 03 2019 Fedora Release Engineering - 2.7-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Sat Jul 14 2018 Fedora Release Engineering - 2.7-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Fri Mar 02 2018 Zamir SUN - 2.7-2 -- Add python plugins - -* Fri Mar 02 2018 Zamir SUN - 2.7-1 -- Update to 2.7 -- Remove Groups tag - -* Fri Feb 23 2018 Florian Weimer - 2.6.2-3 -- Use LDFLAGS from redhat-rpm-config - -* Fri Feb 09 2018 Fedora Release Engineering - 2.6.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Sat Nov 11 2017 Zamir SUN - 2.6.2-1 -- Rebase to 2.6.2. - -* Thu Aug 03 2017 Fedora Release Engineering - 2.6.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Thu Jul 27 2017 Fedora Release Engineering - 2.6.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - * Tue May 23 2017 Zamir SUN - 2.6.1-1 -- Rebase to 2.6.1. - -* Thu Mar 30 2017 Zamir SUN - 2.6-4.20170330git013205 -- Rebase to newest upstream version to include various bug fixes. +- Rebase to 2.6.1 * Mon Mar 27 2017 Zamir SUN - 2.6-4 - Fix bz1389219 segmentation fault in trace-cmd snapshot