Compare commits

..

12 Commits

Author SHA1 Message Date
openeuler-ci-bot 1a5330653d !34 Resolve stap-exporter.service chenge to disable when upgraded systemtap-stap-exporter package
From: @langfei295455 
Reviewed-by: @SuperSix173 
Signed-off-by: @SuperSix173
2022-12-20 08:00:35 +00:00
langfei cb4adcd896 Resolve stap-exporter.service chenge to disable when upgraded systemtap-stap-exporter package
Signed-off-by: langfei <langfei@huawei.com>
2022-12-20 02:27:21 +00:00
openeuler-ci-bot 4df82d4e31 !32 添加sw架构
From: @wuzx065891 
Reviewed-by: @liqingqing_1229 
Signed-off-by: @liqingqing_1229
2022-11-03 11:40:39 +00:00
wzx e19effe9cd Add sw64 architecture
Signed-off-by: wzx <wuzx1226@qq.com>
2022-11-03 18:16:01 +08:00
openeuler-ci-bot 14c5445fc7 !31 [sync] PR-30: Remove requires on gcc and systemtap-devel
From: @openeuler-sync-bot 
Reviewed-by: @liqingqing_1229 
Signed-off-by: @liqingqing_1229
2022-10-15 07:21:56 +00:00
zhouwenpei a6d8c4c9ba Remove requires on gcc and systemtap-devel
(cherry picked from commit 16a578054d)
2022-10-15 15:07:56 +08:00
openeuler-ci-bot b4fe448e1e !28 [sync] PR-27: 【轻量级PR】修正changelog中的错误日期
From: @openeuler-sync-bot 
Reviewed-by: @liqingqing_1229 
Signed-off-by: @liqingqing_1229
2022-06-20 01:17:32 +00:00
konglidong 11427e84cb modify bad date in changelog
(cherry picked from commit 5c059dba34)
2022-06-20 09:06:43 +08:00
openeuler-ci-bot f93df0a2a9 !23 ncurses升级到6.3后,wprintw函数的调用处会报出关于Wformat=的错误
From: @qwei_8848 
Reviewed-by: @SuperSix173 
Signed-off-by: @SuperSix173
2022-03-10 07:16:20 +00:00
Qwei 1525a2a518 Add int type cast to resolve gcc issue for option Wformat=2
In ncruses 6.3 version, there is type complain for function wprintw
  when gcc has option -Wformat=2.

Signed-off-by: Qwei <qiang.wei@suse.com>
2022-03-10 11:15:56 +08:00
openeuler-ci-bot 9f48cc21a9 !19 [sync] PR-18: update verion to 4.5
From: @openeuler-sync-bot
Reviewed-by: @liqingqing_1229
Signed-off-by: @liqingqing_1229
2021-12-03 01:01:16 +00:00
zhouwenpei 7062aa7cd7 update verion to 4.5
(cherry picked from commit 530b3c58ec)
2021-12-03 09:00:51 +08:00
8 changed files with 106 additions and 2616 deletions
@@ -0,0 +1,53 @@
From: Qiang Wei <qiang.wei@suse.com>
Subject: [PATCH] Add int type cast to resolve gcc issue for option
Wformat=2.
In ncruses 6.3 version, there is type complain for function wprintw
when gcc has option -Wformat=2.
Signed-off-by: Qiang Wei <qiang.wei@suse.com>
--- a/staprun/monitor.c 2022-03-09 06:45:30.534000000 +0000
+++ b/staprun/monitor.c 2022-03-09 06:48:49.804000000 +0000
@@ -448,12 +448,12 @@
if (active_window == 0)
wattron(status, A_BOLD);
wprintw(status, "\n%*s\t%*s\t%*s\t%*s\t%*s\t%*s\t%s\n",
- width[p_index], HIGHLIGHT("index", p_index, comp_fn_index),
- width[p_state], HIGHLIGHT("state", p_state, comp_fn_index),
- width[p_hits], HIGHLIGHT("hits", p_hits, comp_fn_index),
- width[p_min], HIGHLIGHT("min", p_min, comp_fn_index),
- width[p_avg], HIGHLIGHT("avg", p_avg, comp_fn_index),
- width[p_max], HIGHLIGHT("max", p_max, comp_fn_index),
+ (int)width[p_index], HIGHLIGHT("index", p_index, comp_fn_index),
+ (int)width[p_state], HIGHLIGHT("state", p_state, comp_fn_index),
+ (int)width[p_hits], HIGHLIGHT("hits", p_hits, comp_fn_index),
+ (int)width[p_min], HIGHLIGHT("min", p_min, comp_fn_index),
+ (int)width[p_avg], HIGHLIGHT("avg", p_avg, comp_fn_index),
+ (int)width[p_max], HIGHLIGHT("max", p_max, comp_fn_index),
HIGHLIGHT("name", p_name, comp_fn_index));
if (active_window == 0)
wattroff(status, A_BOLD);
@@ -466,17 +466,17 @@
json_object *probe, *field;
probe = json_object_array_get_idx(jso_probe_list, i);
json_object_object_get_ex(probe, "index", &field);
- wprintw(status, "%*s\t", width[p_index], json_object_get_string(field));
+ wprintw(status, "%*s\t", (int)width[p_index], json_object_get_string(field));
json_object_object_get_ex(probe, "state", &field);
- wprintw(status, "%*s\t", width[p_state], json_object_get_string(field));
+ wprintw(status, "%*s\t", (int)width[p_state], json_object_get_string(field));
json_object_object_get_ex(probe, "hits", &field);
- wprintw(status, "%*s\t", width[p_hits], json_object_get_string(field));
+ wprintw(status, "%*s\t", (int)width[p_hits], json_object_get_string(field));
json_object_object_get_ex(probe, "min", &field);
- wprintw(status, "%*s\t", width[p_min], json_object_get_string(field));
+ wprintw(status, "%*s\t", (int)width[p_min], json_object_get_string(field));
json_object_object_get_ex(probe, "avg", &field);
- wprintw(status, "%*s\t", width[p_avg], json_object_get_string(field));
+ wprintw(status, "%*s\t", (int)width[p_avg], json_object_get_string(field));
json_object_object_get_ex(probe, "max", &field);
- wprintw(status, "%*s\t", width[p_max], json_object_get_string(field));
+ wprintw(status, "%*s\t", (int)width[p_max], json_object_get_string(field));
getyx(status, discard, cur_x);
json_object_object_get_ex(probe, "name", &field);
wprintw(status, "%.*s", max_cols-cur_x-1, json_object_get_string(field));
File diff suppressed because it is too large Load Diff
-63
View File
@@ -1,63 +0,0 @@
From 5d0424e51857d5f706e78d6d962f380fa70f49f0 Mon Sep 17 00:00:00 2001
From: langfei <langfei@huawei.com>
Date: Wed, 5 Jul 2023 10:27:11 +0800
Subject: [PATCH] fix network tcp test error
Signed-off-by: langfei <langfei@huawei.com>
---
tapset/linux/ipmib.stp | 4 ++--
tapset/linux/linuxmib.stp | 2 +-
testsuite/systemtap.examples/network/tcp_trace.stp | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/tapset/linux/ipmib.stp b/tapset/linux/ipmib.stp
index 6f51dfd..603c5d4 100644
--- a/tapset/linux/ipmib.stp
+++ b/tapset/linux/ipmib.stp
@@ -271,7 +271,7 @@ probe ipmib.InAddrErrors=kernel.function("ip_route_input_noref").return!,
* IPSTATS_MIB_INUNKNOWNPROTOS)
*/
/* icmp_send() is called by ip_local_deliver_finish() */
-probe ipmib.InUnknownProtos=kernel.function("icmp_send")
+probe ipmib.InUnknownProtos=kernel.function("__icmp_send")
{
skb = $skb_in;
op = 1;
@@ -360,7 +360,7 @@ probe ipmib.OutRequests=kernel.function("ip_output"),
* counted in the global @ReasmTimeout (equivalent to SNMP's MIB
* IPSTATS_MIB_REASMTIMEOUT)
*/
-probe ipmib.ReasmTimeout=kernel.function("icmp_send")
+probe ipmib.ReasmTimeout=kernel.function("__icmp_send")
{
skb = $skb_in;
op = 0;
diff --git a/tapset/linux/linuxmib.stp b/tapset/linux/linuxmib.stp
index 63ec248..cb92875 100644
--- a/tapset/linux/linuxmib.stp
+++ b/tapset/linux/linuxmib.stp
@@ -30,7 +30,7 @@ probe linuxmib.DelayedACKs = _linuxmib.DelayedACKs.* {}
probe _linuxmib.DelayedACKs.A = kernel.function("tcp_send_ack")
{
- sk=$sk
+ sk=pointer_arg(1)
if ( !indelack_timer[sk] ) next
op=1
key = linuxmib_filter_key(sk,op);
diff --git a/testsuite/systemtap.examples/network/tcp_trace.stp b/testsuite/systemtap.examples/network/tcp_trace.stp
index 65a32f2..98c77c0 100755
--- a/testsuite/systemtap.examples/network/tcp_trace.stp
+++ b/testsuite/systemtap.examples/network/tcp_trace.stp
@@ -192,7 +192,7 @@ probe kernel.{function("tcp_rcv_established"),
}
}
-probe kernel.function("tcp_transmit_skb")
+probe kernel.function("__tcp_transmit_skb")
{
sk = $sk
key = filter_key(sk)
--
2.33.0
@@ -1,26 +0,0 @@
From cea3c6a744e5f0d2017e5cc11033b8d226b482f9 Mon Sep 17 00:00:00 2001
From: langfei <langfei@huawei.com>
Date: Wed, 5 Jul 2023 10:45:23 +0800
Subject: [PATCH] local is only valid in functions for shellcheck sc2168
Signed-off-by: langfei <langfei@huawei.com>
---
doc/Tapset_Reference_Guide/publicanize.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/Tapset_Reference_Guide/publicanize.sh b/doc/Tapset_Reference_Guide/publicanize.sh
index 330409e..97254fe 100755
--- a/doc/Tapset_Reference_Guide/publicanize.sh
+++ b/doc/Tapset_Reference_Guide/publicanize.sh
@@ -22,7 +22,7 @@ do
val=`printf %s $1 | awk -F= '{print $2}'`
shift
if test -z "$val"; then
- local possibleval=$1
+ possibleval=$1
printf %s $1 "$possibleval" | grep ^- >/dev/null 2>&1
if test "$?" != "0"; then
val=$possibleval
--
2.33.0
+31
View File
@@ -0,0 +1,31 @@
diff -Naur systemtap-4.5.org/m4/intdiv0.m4 systemtap-4.5.sw/m4/intdiv0.m4
--- systemtap-4.5.org/m4/intdiv0.m4 2022-02-26 07:18:18.530000000 +0000
+++ systemtap-4.5.sw/m4/intdiv0.m4 2022-02-26 07:21:23.240000000 +0000
@@ -69,7 +69,7 @@
# Guess based on the CPU.
changequote(,)dnl
case "$host_cpu" in
- alpha* | i[34567]86 | x86_64 | m68k | s390*)
+ sw_64* | alpha* | i[34567]86 | x86_64 | m68k | s390*)
gt_cv_int_divbyzero_sigfpe="guessing yes";;
*)
gt_cv_int_divbyzero_sigfpe="guessing no";;
diff -Naur systemtap-4.5.org/staplog.c systemtap-4.5.sw/staplog.c
--- systemtap-4.5.org/staplog.c 2022-02-26 07:18:18.510000000 +0000
+++ systemtap-4.5.sw/staplog.c 2022-02-26 07:22:44.880000000 +0000
@@ -22,12 +22,14 @@
/* crash/defs.h defines NR_CPUS based upon architecture macros
X86, X86_64, etc. See crash/configure.c (!). */
-#if !defined(X86) && !defined(X86_64) && !defined(ALPHA) && !defined(PPC) && \
+#if !defined(X86) && !defined(X86_64) && !defined(ALPHA) && !defined(SW_64) && !defined(PPC) && \
!defined(IA64) && !defined(PPC64) && !defined(S390) && !defined(S390X) && \
!defined(ARM) && !defined(ARM64)
#if defined(__alpha__)
#define ALPHA
+#elif defined(__sw_64__)
+#define SW_64
#elif defined(__x86_64__)
#define X86_64
#elif defined(__i386__)
Binary file not shown.
Binary file not shown.
+22 -85
View File
@@ -21,23 +21,22 @@
%undefine __brp_mangle_shebangs
Name: systemtap
Version: 5.2
Release: 1
Version: 4.5
Release: 5
Summary: Linux trace and probe tool
License: GPLv2+ and Public Domain
URL: http://sourceware.org/systemtap
Source: https://sourceware.org/systemtap/ftp/releases/%{name}-%{version}.tar.gz
Patch9000: huawei-fix-network-tcp-test-error.patch
Patch9001: huawei-local-is-only-valid-in-functions-for-shellche-sc2168.patch
Patch9002: Add-basic-LoongArch64-support.patch
Patch1: 0001-Add-init-type-cast-to-resolve-gcc-issue.patch
Patch2: systemtap-4.5-sw.patch
BuildRequires: gcc-c++ emacs systemd python3-setuptools
BuildRequires: gettext-devel rpm-devel readline-devel
BuildRequires: pkgconfig(nss) pkgconfig(avahi-client)
BuildRequires: pkgconfig(ncurses) pkgconfig(json-c)
BuildRequires: jpackage-utils python3-devel
BuildRequires: elfutils-devel >= 0.142 elfutils-debuginfod-client elfutils-debuginfod-client-devel
BuildRequires: elfutils-devel >= 0.142
BuildRequires: sqlite-devel > 3.7
%if %{with_dyninst}
BuildRequires: dyninst-devel >= 8.0
@@ -133,7 +132,6 @@ Requires: dejagnu which elfutils grep nc
Requires: gcc gcc-c++ make glibc-devel
Requires: strace nc avahi perf
Requires: systemtap-runtime-python3 = %{version}-%{release}
Requires: elfutils-debuginfod
%if %{with_crash}
Requires: crash
%endif
@@ -164,17 +162,6 @@ This package includes files for a systemd service that manages
systemtap sessions and relays prometheus metrics from the sessions
to remote requesters on demand.
%package jupyter
Summary: ISystemtap jupyter kernel and examples
License: GPLv2+
URL: http://sourceware.org/systemtap/
Requires: systemtap = %{version}-%{release}
%description jupyter
This package includes files needed to build and run
the interactive systemtap Jupyter kernel, either locally
or within a container.
%package help
Summary: systemtap manual
License: GPLv2+
@@ -195,7 +182,9 @@ This package include systemtap manual
--with-dracutstap=%{dracutstap} \
--with-dracutbindir=%{dracutbindir} \
--with-python3 \
%ifnarch sw_64
--with-python3-probes \
%endif
--enable-pie \
--with-rpm \
--enable-sqlite \
@@ -268,7 +257,9 @@ install -p -m 755 initscript/99stap/start-staprun.sh $RPM_BUILD_ROOT%{dracutstap
touch $RPM_BUILD_ROOT%{dracutstap}/params.conf
mkdir -p $RPM_BUILD_ROOT/stap-exporter
%ifnarch sw_64
install -p -m 755 stap-exporter/stap-exporter $RPM_BUILD_ROOT%{_bindir}
%endif
install -m 644 stap-exporter/stap-exporter.service $RPM_BUILD_ROOT%{_unitdir}
install -m 644 stap-exporter/stap-exporter.8* $RPM_BUILD_ROOT%{_mandir}/man8
@@ -276,10 +267,6 @@ install -m 644 stap-exporter/stap-exporter.8* $RPM_BUILD_ROOT%{_mandir}/man8
getent group stapusr >/dev/null || groupadd -g 156 -r stapusr 2>/dev/null || groupadd -r stapusr
getent group stapsys >/dev/null || groupadd -g 157 -r stapsys 2>/dev/null || groupadd -r stapsys
getent group stapdev >/dev/null || groupadd -g 158 -r stapdev 2>/dev/null || groupadd -r stapdev
getent group stapunpriv >/dev/null || groupadd -g 159 -r stapunpriv 2>/dev/null || groupadd -r stapunpriv
getent passwd stapunpriv >/dev/null || \
useradd -c "Systemtap Unprivileged User" -u 159 -g stapunpriv -d %{_localstatedir}/lib/stapunpriv -r -s /sbin/nologin stapunpriv 2>/dev/null || \
useradd -c "Systemtap Unprivileged User" -g stapunpriv -d %{_localstatedir}/lib/stapunpriv -r -s /sbin/nologin stapunpriv
exit 0
%pre server
@@ -404,7 +391,6 @@ exit 0
%files devel -f systemtap.lang
%{_bindir}/stap
%{_bindir}/stap-prep
%{_bindir}/stap-profile-annotate
%{_bindir}/stap-report
%dir %{_datadir}/systemtap
%{_datadir}/systemtap/runtime
@@ -414,7 +400,9 @@ exit 0
%{_emacs_sitelispdir}/*.el*
%{_emacs_sitestartdir}/systemtap-init.el
%{_datadir}/vim/vimfiles/*/*.vim
%ifnarch sw_64
%{_libexecdir}/systemtap/python/stap-resolve-module-function.py
%endif
%files runtime -f systemtap.lang
%defattr(-,root,root)
@@ -461,90 +449,39 @@ exit 0
%{_datadir}/systemtap/testsuite
%files runtime-python3
%ifnarch sw_64
%{python3_sitearch}/HelperSDT
%{python3_sitearch}/HelperSDT-*.egg-info
%endif
%files stap-exporter
%{_unitdir}/stap-exporter.service
%ifnarch sw_64
%{_bindir}/stap-exporter
/etc/stap-exporter/*
/usr/sbin/stap-exporter
/etc/sysconfig/stap-exporter
%files jupyter
%{_bindir}/stap-jupyter-container
%{_bindir}/stap-jupyter-install
%{_mandir}/man1/stap-jupyter.1*
%dir %{_datadir}/systemtap
%{_datadir}/systemtap/interactive-notebook
%endif
%files help
%{_mandir}/man[1378]/*
%changelog
* Thu Dec 05 2024 wangxiao <wangxiao184@h-partners.com> - 5.2-1
- Upgrade to 5.2
* Wed Sep 04 2024 wangxiao <wangxiao184@h-partners.com> - 5.0-3
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:Make stp_task_work compatible with 6.11 kernels
* Fri Jul 05 2024 wangqiang <wangqiang1@kylinos.cn> - 5.0-2
- Type:update
- CVE:NA
- SUG:NA
- DESC:Add basic loongarch64 support
* Wed Jan 24 2024 liuchao <liuchao173@huawei.com> - 5.0-1
- Upgrade to 5.0:
- Performance improvements in uprobe registration and module startup.
- More probe point process details are printed in "-L" list mode with more "-v".
- For the case where newer kernels may break systemtap runtime APIs, better pass-4 failure diagnostics are printed.
- Tapset function print_ubacktrace_fileline() now understands DWARF5.
- The target(s) of process probes may be specified by path name globs, as located selected debuginfod servers.
- The kernel-user message transport system added framing codes, making the transport more reliable, but becoming incompatible across pre-5.0 versions. Use matching versions of stap and staprun.
- The testsuite Makefile has been simplified to remove concurrency, so "parallel" and "resume" modes are gone.
- New runtime macro STP_TIMING_NSECS is now supported for reporting probe timing stats in nsecs instead of cycles. This may become default later.
- Add new runtime macro STP_FORCE_STDOUT_TTY to override STP_STDOUT_NOT_ATTY.
* Wed Sep 6 2023 langfei<langfei@huawei.com> - 4.9-1
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:Upgrade to 4.9
* Tue Aug 8 2023 langfei<langfei@huawei.com> - 4.5-7
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:Adapts to gcc 12 and python 3.11
* Wed Jul 5 2023 langfei<langfei@huawei.com> - 4.5-6
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:Fix some test cases fail to be executed, Resolve the sc2168 warning detected by the shellcheck tool.
* Mon Feb 6 2023 langfei<langfei@huawei.com> - 4.5-5
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:Solve systemtap build problem in openEuler:MultiLanguage
* Mon Dec 5 2022 langfei<langfei@huawei.com> - 4.5-4
* Mon Dec 5 2022 langfei<langfei@huawei.com> - 4.5-5
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:Resolve stap-exporter.service chenge to disable when upgraded systemtap-stap-exporter package
* Fri Apr 8 2022 zhouwenpei <zhouwenpei1@h-partners.com> - 4.5-3
- Add int type cast to resolve gcc issue for option Wformat=2
* Thu Oct 27 2022 wuzx<wuzx1226@qq.com> - 4.5-4
- Add sw64 architecture
* Tue Feb 15 2022 zhouwenpei <zhouwenpei1@h-partners.com> - 4.5-2
* Mon Jun 20 2022 zhouwenpei <zhouwenpei1@h-partners.com> - 4.5-3
- Remove requires on gcc and systemtap-devel
* Wed Mar 9 2022 - Qiang Wei <qiang.wei@suse.com> - 4.5-2
- Add int type cast to resolve gcc issue for option Wformat=2
* Thu Dec 2 2021 zhouwenpei <zhouwenpei1@huawei.com> - 4.5-1
- upgrade to 4.5