Compare commits
12 Commits
9990706047
...
f86e6442a1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f86e6442a1 | ||
|
|
46bc601add | ||
|
|
de3e48b729 | ||
|
|
c04303ea16 | ||
|
|
092c9691dc | ||
|
|
713dcc2b1f | ||
|
|
00098bc874 | ||
|
|
c6210db4df | ||
|
|
62b863f2f1 | ||
|
|
d2bcb15dc9 | ||
|
|
70be05b24e | ||
|
|
ff1c65752d |
28
0001-python313.patch
Normal file
28
0001-python313.patch
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
From 2ba15130fae66e19d4d75ab28ef448b0206235c4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Yaakov Selkowitz <yselkowi@redhat.com>
|
||||||
|
Date: Sun, 23 Jun 2024 13:04:28 -0400
|
||||||
|
Subject: [PATCH] trace-cmd library: fix compatibility with Python 3.13
|
||||||
|
|
||||||
|
PyEval_CallObject was deprecated in Python 3.9 and removed from 3.13.
|
||||||
|
|
||||||
|
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
|
||||||
|
---
|
||||||
|
python/ctracecmd.i | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/python/ctracecmd.i b/python/ctracecmd.i
|
||||||
|
index 6d0179e3..8757cbe4 100644
|
||||||
|
--- a/python/ctracecmd.i
|
||||||
|
+++ b/python/ctracecmd.i
|
||||||
|
@@ -214,7 +214,7 @@ static int python_callback(struct trace_seq *s,
|
||||||
|
SWIG_NewPointerObj(SWIG_as_voidptr(event),
|
||||||
|
SWIGTYPE_p_tep_event, 0));
|
||||||
|
|
||||||
|
- result = PyEval_CallObject(context, arglist);
|
||||||
|
+ result = PyObject_CallObject(context, arglist);
|
||||||
|
Py_XDECREF(arglist);
|
||||||
|
if (result && result != Py_None) {
|
||||||
|
if (!PyInt_Check(result)) {
|
||||||
|
--
|
||||||
|
2.45.2
|
||||||
|
|
||||||
1
98-trace-cmd.rules
Normal file
1
98-trace-cmd.rules
Normal file
@ -0,0 +1 @@
|
|||||||
|
SUBSYSTEM=="module", ACTION=="add", PROGRAM="/usr/bin/systemctl is-active trace-cmd.service", PROGRAM="/usr/bin/systemctl reload trace-cmd.service"
|
||||||
@ -1,41 +0,0 @@
|
|||||||
From 9fd5f8ecd0bb98b6fdcfe75118b535f613226b9f Mon Sep 17 00:00:00 2001
|
|
||||||
From: "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@gmail.com>
|
|
||||||
Date: Tue, 14 Sep 2021 16:12:13 +0300
|
|
||||||
Subject: [PATCH] trace-cmd report: Fix typos in error messages
|
|
||||||
|
|
||||||
Fixed typos in "trace-cmd report" messages that report reading and
|
|
||||||
parsing errors.
|
|
||||||
|
|
||||||
Link: https://lore.kernel.org/linux-trace-devel/20210914131232.3964615-3-tz.stoyanov@gmail.com
|
|
||||||
|
|
||||||
Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
|
|
||||||
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
|
|
||||||
---
|
|
||||||
tracecmd/trace-read.c | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/tracecmd/trace-read.c b/tracecmd/trace-read.c
|
|
||||||
index 6f43c1d2..31724b09 100644
|
|
||||||
--- a/tracecmd/trace-read.c
|
|
||||||
+++ b/tracecmd/trace-read.c
|
|
||||||
@@ -1290,7 +1290,7 @@ static void read_data_info(struct list_head *handle_list, enum output_type otype
|
|
||||||
die("error in reading buffer instance");
|
|
||||||
new_handle = tracecmd_buffer_instance_handle(handles->handle, i);
|
|
||||||
if (!new_handle) {
|
|
||||||
- warning("could not retreive handle %s", name);
|
|
||||||
+ warning("could not retrieve handle %s", name);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
add_handle(new_handle, name);
|
|
||||||
@@ -1324,7 +1324,7 @@ static void read_data_info(struct list_head *handle_list, enum output_type otype
|
|
||||||
if (last_record) {
|
|
||||||
int cpu = last_record->cpu;
|
|
||||||
if (cpu >= last_handle->cpus)
|
|
||||||
- die("cpu %d creater than %d\n", cpu, last_handle->cpus);
|
|
||||||
+ die("cpu %d greater than %d\n", cpu, last_handle->cpus);
|
|
||||||
if (tscheck &&
|
|
||||||
last_handle->last_timestamp[cpu] > last_record->ts) {
|
|
||||||
errno = 0;
|
|
||||||
--
|
|
||||||
2.33.0
|
|
||||||
|
|
||||||
Binary file not shown.
BIN
trace-cmd-v3.2.tar.gz
Normal file
BIN
trace-cmd-v3.2.tar.gz
Normal file
Binary file not shown.
4
trace-cmd.conf
Normal file
4
trace-cmd.conf
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# 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"
|
||||||
15
trace-cmd.service
Normal file
15
trace-cmd.service
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
[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
|
||||||
142
trace-cmd.spec
142
trace-cmd.spec
@ -1,72 +1,136 @@
|
|||||||
Name: trace-cmd
|
Name: trace-cmd
|
||||||
Version: 2.9.2
|
Version: 3.2
|
||||||
Release: 4
|
Release: 2
|
||||||
Summary: A front-end for Ftrace
|
Summary: A front-end for Ftrace
|
||||||
License: GPLv2 and LGPLv2
|
License: GPLv2 and LGPLv2
|
||||||
URL: http://git.kernel.org/?p=linux/kernel/git/rostedt/trace-cmd.git;a=summary
|
URL: http://git.kernel.org/?p=linux/kernel/git/rostedt/trace-cmd.git;a=summary
|
||||||
Source0: https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git/snapshot/%{name}-v%{version}.tar.gz
|
|
||||||
Source1: kernelshark.desktop
|
# If upstream does not provide tarballs, to generate:
|
||||||
|
# git clone https://git.kernel.org/pub/scm/utils/trace-cmd/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%{version}.tar.gz
|
||||||
|
Source1: trace-cmd.conf
|
||||||
|
Source2: trace-cmd.service
|
||||||
|
Source3: 98-trace-cmd.rules
|
||||||
|
Patch0: 0001-python313.patch
|
||||||
|
|
||||||
Patch0001: backport-trace-cmd-report-Fix-typos-in-error-messages.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: libtracecmd-devel
|
||||||
|
BuildRequires: libzstd-devel
|
||||||
|
BuildRequires: python3-devel
|
||||||
|
Requires: libtraceevent
|
||||||
|
|
||||||
BuildRequires: gcc xmlto asciidoc mlocate libxml2-devel chrpath
|
|
||||||
BuildRequires: gtk2-devel glib2-devel desktop-file-utils libtraceevent-devel
|
|
||||||
Provides: kernelshark
|
|
||||||
Obsoletes: kernelshark
|
|
||||||
%description
|
%description
|
||||||
This package is a user-space front-end command-line tool for Ftrace.
|
This package is a user-space front-end command-line tool for Ftrace.
|
||||||
|
|
||||||
%package_help
|
%package_help
|
||||||
|
|
||||||
|
%package python3
|
||||||
|
Summary: Python plugin support for trace-cmd
|
||||||
|
Requires: trace-cmd = %{version}-%{release}
|
||||||
|
|
||||||
|
%description python3
|
||||||
|
Python plugin support for trace-cmd
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{name}-v%{version} -p1
|
%autosetup -n %{name}-v%{version} -p1
|
||||||
|
cp %{SOURCE1} .
|
||||||
|
cp %{SOURCE2} .
|
||||||
|
cp %{SOURCE3} .
|
||||||
|
|
||||||
%build
|
%build
|
||||||
MANPAGE_DOCBOOK_XSL=`rpm -ql docbook-style-xsl | grep manpages/docbook.xsl`
|
MANPAGE_DOCBOOK_XSL=`rpm -ql docbook-style-xsl | grep manpages/docbook.xsl`
|
||||||
make V=1 MANPAGE_DOCBOOK_XSL=$MANPAGE_DOCBOOK_XSL prefix=%{_prefix} all doc
|
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
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make V=1 DESTDIR=$RPM_BUILD_ROOT/ prefix=%{_prefix} install install_doc
|
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
|
||||||
find $RPM_BUILD_ROOT%{_mandir} -type f | xargs chmod u-x,g-x,o-x
|
mkdir -p %{buildroot}/%{_libdir}/trace-cmd/python
|
||||||
find $RPM_BUILD_ROOT%{_datadir} -type f | xargs chmod u-x,g-x,o-x
|
find %{buildroot}%{_mandir} -type f | xargs chmod u-x,g-x,o-x
|
||||||
install -d -m 755 $RPM_BUILD_ROOT/%{_datadir}/applications
|
find %{buildroot}%{_datadir} -type f | xargs chmod u-x,g-x,o-x
|
||||||
install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT/%{_datadir}/applications/kernelshark.desktop
|
mkdir -p %{buildroot}/%{_libdir}
|
||||||
desktop-file-validate $RPM_BUILD_ROOT/%{_datadir}/applications/kernelshark.desktop
|
find %{buildroot}%{_libdir} -type f -name "*.so" -print0 | xargs -0 -r chmod 0755
|
||||||
|
chmod -R 0755 %{buildroot}/%{_libdir}/trace-cmd/python
|
||||||
chrpath -d $RPM_BUILD_ROOT%{_bindir}/trace-cmd
|
mkdir -p -m755 %{buildroot}/%{_sysconfdir}/sysconfig/
|
||||||
mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d
|
mkdir -p -m755 %{buildroot}/%{_unitdir}/
|
||||||
echo "%{_bindir}/%{name}" > $RPM_BUILD_ROOT/etc/ld.so.conf.d/%{name}-%{_arch}.conf
|
mkdir -p -m755 %{buildroot}/%{_udevrulesdir}/
|
||||||
|
install -p -m 644 trace-cmd.conf %{buildroot}/%{_sysconfdir}/sysconfig/
|
||||||
%pre
|
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
|
%preun
|
||||||
|
%systemd_preun %{name}.service
|
||||||
%post
|
|
||||||
/sbin/ldconfig
|
|
||||||
|
|
||||||
%postun
|
|
||||||
/sbin/ldconfig
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%doc COPYING COPYING.LIB README
|
||||||
%license COPYING COPYING.LIB
|
|
||||||
%doc README
|
|
||||||
%{_bindir}/trace-cmd
|
%{_bindir}/trace-cmd
|
||||||
%{_datadir}/applications/kernelshark.desktop
|
%{_mandir}/man1/%{name}*
|
||||||
|
%{_mandir}/man5/%{name}*
|
||||||
|
%{_docdir}/trace-cmd/trace-cmd*.html
|
||||||
%{_sysconfdir}/bash_completion.d/trace-cmd.bash
|
%{_sysconfdir}/bash_completion.d/trace-cmd.bash
|
||||||
%{_docdir}/libtracecmd-doc/libtracecmd-files.html
|
%{_sysconfdir}/sysconfig/trace-cmd.conf
|
||||||
%{_docdir}/libtracecmd-doc/libtracecmd-instances.html
|
%{_unitdir}/trace-cmd.service
|
||||||
%{_docdir}/libtracecmd-doc/libtracecmd-peer.html
|
%{_udevrulesdir}/98-trace-cmd.rules
|
||||||
%{_docdir}/libtracecmd-doc/libtracecmd-record.html
|
|
||||||
%{_docdir}/libtracecmd-doc/libtracecmd.html
|
|
||||||
%config(noreplace) /etc/ld.so.conf.d/*
|
|
||||||
|
|
||||||
%files help
|
%files help
|
||||||
%{_mandir}/man1/*
|
%{_mandir}/man1/*
|
||||||
%{_mandir}/man3/*
|
|
||||||
%{_mandir}/man5/*
|
%{_mandir}/man5/*
|
||||||
|
|
||||||
|
%files python3
|
||||||
|
%doc Documentation/README.PythonPlugin
|
||||||
|
%{_libdir}/%{name}/python/
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Nov 08 2024 wangkai <13474090681@163.com> - 3.2-2
|
||||||
|
- Fix uninstall trace-cmd error and service start fail
|
||||||
|
|
||||||
|
* Tue Oct 22 2024 shafeipaozi <sunbo.oerv@isrc.iscas.ac.cn> - 3.2-1
|
||||||
|
- update to 3.2
|
||||||
|
|
||||||
|
* Tue Dec 26 2023 meiyang666 <wangmeiyang@xfusion.com> - 2.9.2-12
|
||||||
|
- Fix spec file
|
||||||
|
|
||||||
|
* Tue Dec 26 2023 meiyang666 <wangmeiyang@xfusion.com> - 2.9.2-11
|
||||||
|
- trace-cmd record: Set sleep_time to zero at end of recording
|
||||||
|
|
||||||
|
* Tue Dec 26 2023 meiyang666 <wangmeiyang@xfusion.com> - 2.9.2-10
|
||||||
|
- trace-cmd stream: Set default sleep time to half a second
|
||||||
|
|
||||||
|
* Mon Jan 09 2023 Bolehu <heyaohua@xfusion.com> - 2.9.2-9
|
||||||
|
- Fix broken profile command
|
||||||
|
|
||||||
|
* Sat Jan 07 2023 Bolehu <heyaohua@xfusion.com> - 2.9.2-8
|
||||||
|
- Changing default install path of plugins
|
||||||
|
|
||||||
|
* Sat Jan 07 2023 Bolehu <heyaohua@xfusion.com> - 2.9.2-7
|
||||||
|
- Remove unneeded multiply in events timestamp reading
|
||||||
|
|
||||||
|
* Fri Jan 06 2023 Bolehu <heyaohua@xfusion.com> - 2.9.2-6
|
||||||
|
- trace-cmd library: Fixed a memory leak on input handler close
|
||||||
|
|
||||||
|
* Fri Jan 06 2023 Bolehu <heyaohua@xfusion.com> - 2.9.2-5
|
||||||
|
- trace-cmd library: Fix version string memory leak
|
||||||
|
|
||||||
* Fri Jan 06 2023 Bolehu <heyaohua@xfusion.com> - 2.9.2-4
|
* Fri Jan 06 2023 Bolehu <heyaohua@xfusion.com> - 2.9.2-4
|
||||||
- trace-cmd report: Fix typos in error messages
|
- trace-cmd report: Fix typos in error messages
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user