Upgrade to 2.9.2 version
(cherry picked from commit 1325ba10c5a9dddbb97e3d42abe962ade77de3fd)
This commit is contained in:
parent
b923268cbe
commit
7ff8ac27e1
@ -1,33 +0,0 @@
|
||||
From 7e8a6e3d03c0a6a7a5014ce488be1e16f99db006 Mon Sep 17 00:00:00 2001
|
||||
From: Zamir SUN <sztsian@gmail.com>
|
||||
Date: Sat, 11 Nov 2017 10:28:32 +0800
|
||||
Subject: [PATCH] trace-cmd: Figure out the arch and install library to the
|
||||
right place
|
||||
|
||||
Signed-off-by: Zamir SUN <sztsian@gmail.com>
|
||||
---
|
||||
Makefile | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 5c35143..d10e547 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -47,7 +47,13 @@ html_install = $(prefix)/share/kernelshark/html
|
||||
html_install_SQ = '$(subst ','\'',$(html_install))'
|
||||
img_install = $(prefix)/share/kernelshark/html/images
|
||||
img_install_SQ = '$(subst ','\'',$(img_install))'
|
||||
-libdir ?= $(prefix)/lib
|
||||
+
|
||||
+# figure out what arch we are on and install to the right place
|
||||
+ARCH = $(shell getconf LONG_BIT)
|
||||
+LIBDIR_32 = /lib
|
||||
+LIBDIR_64 = /lib64
|
||||
+
|
||||
+libdir ?= $(prefix)/$(LIBDIR_$(ARCH))
|
||||
libdir_SQ = '$(subst ','\'',$(libdir))'
|
||||
includedir = $(prefix)/include/trace-cmd
|
||||
includedir_SQ = '$(subst ','\'',$(includedir))'
|
||||
--
|
||||
2.13.4
|
||||
|
||||
@ -1,89 +0,0 @@
|
||||
From 0ea3f5c42ffad95ef55c8b269649a1135e5d02f9 Mon Sep 17 00:00:00 2001
|
||||
From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
|
||||
Date: Fri, 17 Apr 2020 21:39:14 +0100
|
||||
Subject: [PATCH] trace-cmd: Fix build with gcc-10
|
||||
|
||||
The build fails while building with gcc-10 with the error:
|
||||
multiple definition of `common_type_field'
|
||||
|
||||
Rename the field in trace-hist.c and trace-mem.c to satisfy gcc-10.
|
||||
|
||||
Link: http://lore.kernel.org/linux-trace-devel/20200417203914.26358-1-sudipm.mukherjee@gmail.com
|
||||
|
||||
Bug-Link: https://bugs.debian.org/957879
|
||||
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
|
||||
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
|
||||
---
|
||||
trace-hist.c | 8 ++++----
|
||||
trace-mem.c | 8 ++++----
|
||||
2 files changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/trace-hist.c b/trace-hist.c
|
||||
index 2a2e780..42cf154 100644
|
||||
--- a/trace-hist.c
|
||||
+++ b/trace-hist.c
|
||||
@@ -41,7 +41,7 @@ static int kernel_stack_type;
|
||||
|
||||
static int long_size;
|
||||
|
||||
-struct format_field *common_type_field;
|
||||
+struct format_field *common_type_hist;
|
||||
struct format_field *common_pid_field;
|
||||
struct format_field *sched_wakeup_comm_field;
|
||||
struct format_field *sched_wakeup_new_comm_field;
|
||||
@@ -582,7 +582,7 @@ process_record(struct pevent *pevent, struct pevent_record *record)
|
||||
unsigned long long val;
|
||||
int type;
|
||||
|
||||
- pevent_read_number_field(common_type_field, record->data, &val);
|
||||
+ pevent_read_number_field(common_type_hist, record->data, &val);
|
||||
type = val;
|
||||
|
||||
if (type == function_type)
|
||||
@@ -970,8 +970,8 @@ static void do_trace_hist(struct tracecmd_input *handle)
|
||||
|
||||
long_size = tracecmd_long_size(handle);
|
||||
|
||||
- common_type_field = pevent_find_common_field(event, "common_type");
|
||||
- if (!common_type_field)
|
||||
+ common_type_hist = pevent_find_common_field(event, "common_type");
|
||||
+ if (!common_type_hist)
|
||||
die("Can't find a 'type' field?");
|
||||
|
||||
common_pid_field = pevent_find_common_field(event, "common_pid");
|
||||
diff --git a/trace-mem.c b/trace-mem.c
|
||||
index a949b15..30f39ef 100644
|
||||
--- a/trace-mem.c
|
||||
+++ b/trace-mem.c
|
||||
@@ -44,7 +44,7 @@ static int kmem_cache_alloc_type;
|
||||
static int kmem_cache_alloc_node_type;
|
||||
static int kmem_cache_free_type;
|
||||
|
||||
-struct format_field *common_type_field;
|
||||
+struct format_field *common_type_mem;
|
||||
|
||||
struct format_field *kmalloc_callsite_field;
|
||||
struct format_field *kmalloc_bytes_req_field;
|
||||
@@ -383,7 +383,7 @@ process_record(struct pevent *pevent, struct pevent_record *record)
|
||||
unsigned long long val;
|
||||
int type;
|
||||
|
||||
- pevent_read_number_field(common_type_field, record->data, &val);
|
||||
+ pevent_read_number_field(common_type_mem, record->data, &val);
|
||||
type = val;
|
||||
|
||||
if (type == kmalloc_type)
|
||||
@@ -504,8 +504,8 @@ static void do_trace_mem(struct tracecmd_input *handle)
|
||||
ret = pevent_data_type(pevent, record);
|
||||
event = pevent_data_event_from_type(pevent, ret);
|
||||
|
||||
- common_type_field = pevent_find_common_field(event, "common_type");
|
||||
- if (!common_type_field)
|
||||
+ common_type_mem = pevent_find_common_field(event, "common_type");
|
||||
+ if (!common_type_mem)
|
||||
die("Can't find a 'type' field?");
|
||||
|
||||
update_kmalloc(pevent);
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,45 +0,0 @@
|
||||
From 2abc926978474c4588ad43fd49c54f6a7fa3abaf Mon Sep 17 00:00:00 2001
|
||||
From: "Vladislav Valtchev (VMware)" <vladislav.valtchev@gmail.com>
|
||||
Date: Tue, 6 Feb 2018 10:48:59 +0200
|
||||
Subject: [PATCH 01/25] trace-cmd: Fix the logic behind SWIG_DEFINED in the
|
||||
Makefile
|
||||
|
||||
At least on Ubuntu, the $(shell ...) command used in the master Makefile to test
|
||||
for the existence of the 'swig' command does not work in the negative case.
|
||||
That causes the build to report ugly errors in case 'swig' is not installed on
|
||||
the system.
|
||||
This one-line patch, fixes the problem by using the POSIX 'comamnd -v {CMD}'
|
||||
in $(shell ...) to detect the presence of the swig and restores this way the
|
||||
fake report_noswig target.
|
||||
|
||||
Signed-off-by: Vladislav Valtchev (VMware) <vladislav.valtchev@gmail.com>
|
||||
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
|
||||
---
|
||||
Makefile | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 6217037..85433b8 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -92,7 +92,7 @@ ifndef VERBOSE
|
||||
VERBOSE = 0
|
||||
endif
|
||||
|
||||
-SWIG_DEFINED := $(shell if swig -help &> /dev/null; then echo 1; else echo 0; fi)
|
||||
+SWIG_DEFINED := $(shell if command -v swig; then echo 1; else echo 0; fi)
|
||||
ifeq ($(SWIG_DEFINED), 0)
|
||||
BUILD_PYTHON := report_noswig
|
||||
NO_PYTHON = 1
|
||||
@@ -105,7 +105,7 @@ PYTHON_GUI := ctracecmd.so ctracecmdgui.so
|
||||
PYTHON_VERS ?= python
|
||||
|
||||
# Can build python?
|
||||
-ifeq ($(shell sh -c "pkg-config --cflags $(PYTHON_VERS) > /dev/null 2>&1 && which swig && echo y"), y)
|
||||
+ifeq ($(shell sh -c "pkg-config --cflags $(PYTHON_VERS) > /dev/null 2>&1 && echo y"), y)
|
||||
PYTHON_PLUGINS := plugin_python.so
|
||||
BUILD_PYTHON := $(PYTHON) $(PYTHON_PLUGINS)
|
||||
PYTHON_SO_INSTALL := ctracecmd.install
|
||||
--
|
||||
2.14.3
|
||||
|
||||
Binary file not shown.
BIN
trace-cmd-v2.9.2.tar.gz
Normal file
BIN
trace-cmd-v2.9.2.tar.gz
Normal file
Binary file not shown.
@ -1,16 +1,13 @@
|
||||
Name: trace-cmd
|
||||
Version: 2.7
|
||||
Release: 6
|
||||
Version: 2.9.2
|
||||
Release: 1
|
||||
Summary: A front-end for Ftrace
|
||||
License: GPLv2 and LGPLv2
|
||||
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
|
||||
Patch1: 0001-trace-cmd-Figure-out-the-arch-and-install-library-to.patch
|
||||
Patch2: 0002-trace-cmd-Fix-the-logic-behind-SWIG_DEFINED-in-the-M.patch
|
||||
Patch3: 0001-trace-cmd-Fix-build-with-gcc-10.patch
|
||||
BuildRequires: gcc xmlto asciidoc mlocate libxml2-devel
|
||||
BuildRequires: gtk2-devel glib2-devel desktop-file-utils
|
||||
BuildRequires: gtk2-devel glib2-devel desktop-file-utils libtraceevent-devel
|
||||
Provides: kernelshark
|
||||
Obsoletes: kernelshark
|
||||
%description
|
||||
@ -23,14 +20,12 @@ This package is a user-space front-end command-line tool for Ftrace.
|
||||
|
||||
%build
|
||||
MANPAGE_DOCBOOK_XSL=`rpm -ql docbook-style-xsl | grep manpages/docbook.xsl`
|
||||
make V=1 CFLAGS="%{optflags} -D_GNU_SOURCE" LDFLAGS="%{build_ldflags}" \
|
||||
MANPAGE_DOCBOOK_XSL=$MANPAGE_DOCBOOK_XSL prefix=%{_prefix} all doc gui python-plugin
|
||||
make V=1 MANPAGE_DOCBOOK_XSL=$MANPAGE_DOCBOOK_XSL prefix=%{_prefix} all doc
|
||||
|
||||
%install
|
||||
make V=1 DESTDIR=$RPM_BUILD_ROOT/ prefix=%{_prefix} install install_doc install_gui install_python
|
||||
make V=1 DESTDIR=$RPM_BUILD_ROOT/ prefix=%{_prefix} install install_doc
|
||||
find $RPM_BUILD_ROOT%{_mandir} -type f | xargs chmod u-x,g-x,o-x
|
||||
find $RPM_BUILD_ROOT%{_datadir} -type f | xargs chmod u-x,g-x,o-x
|
||||
find $RPM_BUILD_ROOT%{_libdir} -type f -iname "*.so" | xargs chmod 0755
|
||||
install -d -m 755 $RPM_BUILD_ROOT/%{_datadir}/applications
|
||||
install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT/%{_datadir}/applications/kernelshark.desktop
|
||||
desktop-file-validate $RPM_BUILD_ROOT/%{_datadir}/applications/kernelshark.desktop
|
||||
@ -48,33 +43,23 @@ desktop-file-validate $RPM_BUILD_ROOT/%{_datadir}/applications/kernelshark.deskt
|
||||
%license COPYING COPYING.LIB
|
||||
%doc README
|
||||
%{_bindir}/trace-cmd
|
||||
%dir %{_libdir}/%{name}
|
||||
%dir %{_libdir}/%{name}/plugins
|
||||
%{_libdir}/%{name}/plugins/plugin_blk.so
|
||||
%{_libdir}/%{name}/plugins/plugin_cfg80211.so
|
||||
%{_libdir}/%{name}/plugins/plugin_function.so
|
||||
%{_libdir}/%{name}/plugins/plugin_hrtimer.so
|
||||
%{_libdir}/%{name}/plugins/plugin_jbd2.so
|
||||
%{_libdir}/%{name}/plugins/plugin_kmem.so
|
||||
%{_libdir}/%{name}/plugins/plugin_kvm.so
|
||||
%{_libdir}/%{name}/plugins/plugin_mac80211.so
|
||||
%{_libdir}/%{name}/plugins/plugin_sched_switch.so
|
||||
%{_libdir}/%{name}/plugins/plugin_scsi.so
|
||||
%{_libdir}/%{name}/plugins/plugin_tlb.so
|
||||
%{_libdir}/%{name}/plugins/plugin_xen.so
|
||||
%{_bindir}/trace-view
|
||||
%{_bindir}/trace-graph
|
||||
%{_bindir}/kernelshark
|
||||
%{_datadir}/kernelshark
|
||||
%{_datadir}/applications/kernelshark.desktop
|
||||
%{_sysconfdir}/bash_completion.d/trace-cmd.bash
|
||||
|
||||
%{_docdir}/libtracecmd-doc/libtracecmd-files.html
|
||||
%{_docdir}/libtracecmd-doc/libtracecmd-instances.html
|
||||
%{_docdir}/libtracecmd-doc/libtracecmd-peer.html
|
||||
%{_docdir}/libtracecmd-doc/libtracecmd-record.html
|
||||
%{_docdir}/libtracecmd-doc/libtracecmd.html
|
||||
|
||||
%files help
|
||||
%{_mandir}/man1/*
|
||||
%{_mandir}/man3/*
|
||||
%{_mandir}/man5/*
|
||||
|
||||
%changelog
|
||||
* Tue Jan 18 2022 houyingchao <houyingchao@huawei.com> - 2.9.2-1
|
||||
- Upgrade to 2.9.2 version
|
||||
|
||||
* Fri July 30 2021 Guoxiaoqi <guoxiaoqi2@huawei.com> - 2.7-6
|
||||
- Fix build with gcc-10
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user