auto spec version bump up: trace-cmd libtraceevent libtracefs
- trace-cmd: bump up to 3.1.4 - libtraceevent: bump up to 1.6.3 - libtracefs: bump up to 1.5.0 Change-Id: Id949ac992535b576e232347028d34d03091b01be Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com> Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/18361
This commit is contained in:
parent
9c65dc3944
commit
8570af3d9a
|
@ -0,0 +1,64 @@
|
|||
Summary: Linux kernel trace event library
|
||||
Name: libtraceevent
|
||||
Version: 1.6.3
|
||||
Release: 1%{?dist}
|
||||
License: GPL-2.0 and LGPL-2.1
|
||||
Group: Development/Tools
|
||||
URL: https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git
|
||||
Vendor: VMware, Inc.
|
||||
Distribution: Photon
|
||||
|
||||
Source0: https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/snapshot/%{name}-%{version}.tar.gz
|
||||
%define sha512 %{name}=8064eb18dda6fdbff020759ed92e785b87d34be9ebc30cb6085785edeb8d7252cabf8d33d8738a3ec407672a3d891884d0f0b4c551fce26c76fa8eaf61b9e2f5
|
||||
|
||||
%description
|
||||
The libtraceevent(3) library provides APIs to access kernel tracepoint events, located in the tracefs file system under the events directory.
|
||||
|
||||
%package devel
|
||||
Summary: Header files for libtraceevent
|
||||
Group: Development/Tools
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
These are the header files of libtraceevent.
|
||||
|
||||
%package -n traceevent-plugins
|
||||
Summary: traceevent-plugins
|
||||
Group: System/Tools
|
||||
Conflicts: linux-tools < 4.19.138-4
|
||||
|
||||
%description -n traceevent-plugins
|
||||
traceevent-plugins
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
|
||||
%build
|
||||
%make_build
|
||||
|
||||
%install
|
||||
%make_install %{?_smp_flags} libdir=%{_libdir} prefix=%{_prefix}
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%ldconfig_scriptlets
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/libtraceevent.so.*
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
%{_includedir}/traceevent/*.h
|
||||
%{_libdir}/libtraceevent.a
|
||||
%{_libdir}/libtraceevent.so
|
||||
%{_libdir}/pkgconfig/libtraceevent.pc
|
||||
|
||||
%files -n traceevent-plugins
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/traceevent/plugins/*.so
|
||||
|
||||
%changelog
|
||||
* Mon Nov 14 2022 Michelle Wang <michellew@vmware.com> 1.6.3-1
|
||||
- Initial Version
|
|
@ -0,0 +1,54 @@
|
|||
Summary: Linux kernel trace file system library
|
||||
Name: libtracefs
|
||||
Version: 1.5.0
|
||||
Release: 1%{?dist}
|
||||
License: GPL-2.0 and LGPL-2.1
|
||||
Group: Development/Tools
|
||||
URL: https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git
|
||||
Vendor: VMware, Inc.
|
||||
Distribution: Photon
|
||||
|
||||
Source0: https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/snapshot/%{name}-%{version}.tar.gz
|
||||
%define sha512 %{name}=5e936a788473c0eb373144231ef9ac139ae53b4685053dfed74157a9432d429f35b70290607679eae9f44fd858d2102a02c3beac35d8de35d856c3c1001644d3
|
||||
|
||||
BuildRequires: libtraceevent-devel
|
||||
|
||||
Requires: libtraceevent
|
||||
|
||||
%description
|
||||
The libtracefs(3) library provides APIs to access kernel trace file system.
|
||||
|
||||
%package devel
|
||||
Summary: Header files for libtracefs
|
||||
Group: Development/Tools
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
These are the header files of libtracefs.
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
|
||||
%build
|
||||
%make_build
|
||||
|
||||
%install
|
||||
%make_install %{?_smp_flags} prefix=%{_prefix} libdir=%{_libdir}
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%ldconfig_scriptlets
|
||||
|
||||
%files
|
||||
%{_libdir}/%{name}.so.*
|
||||
|
||||
%files devel
|
||||
%{_includedir}/tracefs/*.h
|
||||
%{_libdir}/%{name}.a
|
||||
%{_libdir}/%{name}.so
|
||||
%{_libdir}/pkgconfig/%{name}.pc
|
||||
|
||||
%changelog
|
||||
* Mon Nov 14 2022 Michelle Wang <michellew@vmware.com> 1.5.0-1
|
||||
- Initial Version
|
|
@ -319,8 +319,11 @@ Summary: This package contains the 'perf' performance analysis tools for
|
|||
Group: System/Tools
|
||||
Requires: (%{name} = %{version} or linux-esx = %{version} or linux-aws = %{version} or linux-rt = %{version})
|
||||
Requires: audit elfutils-libelf binutils-libs
|
||||
Requires: xz-libs libunwind slang
|
||||
Requires: python3 traceevent-plugins
|
||||
Requires: xz-libs
|
||||
Requires: libunwind
|
||||
Requires: slang
|
||||
Requires: python3
|
||||
Requires: traceevent-plugins
|
||||
%ifarch x86_64
|
||||
Requires: pciutils
|
||||
%endif
|
||||
|
|
|
@ -1,178 +0,0 @@
|
|||
From d222692ee2d2c7027e217578392521e2dd2b6e13 Mon Sep 17 00:00:00 2001
|
||||
From: Nicolas Saenz Julienne <nsaenzju@redhat.com>
|
||||
Date: Wed, 2 Jun 2021 11:08:03 +0200
|
||||
Subject: [PATCH] trace-cmd: Add option to poll trace buffers
|
||||
|
||||
upstream commit e7ffcbda9d62855ec30dc36ef5bebcb669321073
|
||||
|
||||
Waiting for data to be available on the trace ring-buffers may trigger
|
||||
IPIs. This might generate unacceptable trace noise when debugging low
|
||||
latency or real time systems. So introduce the poll option. When
|
||||
enabled, it forces trace-cmd to use O_NONBLOCK. The drawback to using it
|
||||
is that traces will be extracted by busy waiting, which will
|
||||
unnecessarily hog the CPUs, so only use when really needed.
|
||||
|
||||
Link: https://lore.kernel.org/linux-trace-devel/20210602090803.12233-1-nsaenzju@redhat.com
|
||||
|
||||
Signed-off-by: Nicolas Saenz Julienne <nsaenzju@redhat.com>
|
||||
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
|
||||
[ Sharan : backported changes to v2.9 ]
|
||||
Signed-off-by: Sharan Turlapati <sturlapati@vmware.com>
|
||||
---
|
||||
Documentation/trace-cmd-record.1.txt | 7 +++++++
|
||||
include/trace-cmd/trace-cmd.h | 3 ++-
|
||||
lib/trace-cmd/trace-recorder.c | 30 ++++++++++++++++------------
|
||||
tracecmd/trace-record.c | 8 +++++++-
|
||||
tracecmd/trace-usage.c | 1 +
|
||||
5 files changed, 34 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/Documentation/trace-cmd-record.1.txt b/Documentation/trace-cmd-record.1.txt
|
||||
index 99d1a15..6108190 100644
|
||||
--- a/Documentation/trace-cmd-record.1.txt
|
||||
+++ b/Documentation/trace-cmd-record.1.txt
|
||||
@@ -354,6 +354,13 @@ OPTIONS
|
||||
executed will not be changed. This is useful if you want to monitor the
|
||||
output of the command being executed, but not see the output from trace-cmd.
|
||||
|
||||
+*--poll*::
|
||||
+ Waiting for data to be available on the trace ring-buffers may trigger
|
||||
+ IPIs. This might generate unacceptable trace noise when tracing low latency
|
||||
+ or real time systems. The poll option forces trace-cmd to use O_NONBLOCK.
|
||||
+ Traces are extracted by busy waiting, which will hog the CPUs, so only use
|
||||
+ when really needed.
|
||||
+
|
||||
EXAMPLES
|
||||
--------
|
||||
|
||||
diff --git a/include/trace-cmd/trace-cmd.h b/include/trace-cmd/trace-cmd.h
|
||||
index f3c95f3..e8b7307 100644
|
||||
--- a/include/trace-cmd/trace-cmd.h
|
||||
+++ b/include/trace-cmd/trace-cmd.h
|
||||
@@ -326,8 +326,9 @@ struct tracecmd_output *tracecmd_get_output_handle_fd(int fd);
|
||||
enum {
|
||||
TRACECMD_RECORD_NOSPLICE = (1 << 0), /* Use read instead of splice */
|
||||
TRACECMD_RECORD_SNAPSHOT = (1 << 1), /* Extract from snapshot */
|
||||
- TRACECMD_RECORD_BLOCK = (1 << 2), /* Block on splice write */
|
||||
+ TRACECMD_RECORD_BLOCK_SPLICE = (1 << 2), /* Block on splice write */
|
||||
TRACECMD_RECORD_NOBRASS = (1 << 3), /* Splice directly without a brass pipe */
|
||||
+ TRACECMD_RECORD_POLL = (1 << 4), /* Use O_NONBLOCK, poll trace buffers */
|
||||
};
|
||||
|
||||
void tracecmd_free_recorder(struct tracecmd_recorder *recorder);
|
||||
diff --git a/lib/trace-cmd/trace-recorder.c b/lib/trace-cmd/trace-recorder.c
|
||||
index 2a6e2b6..ad587be 100644
|
||||
--- a/lib/trace-cmd/trace-recorder.c
|
||||
+++ b/lib/trace-cmd/trace-recorder.c
|
||||
@@ -111,6 +111,19 @@ void tracecmd_free_recorder(struct tracecmd_recorder *recorder)
|
||||
free(recorder);
|
||||
}
|
||||
|
||||
+static void set_nonblock(struct tracecmd_recorder *recorder)
|
||||
+{
|
||||
+ long flags;
|
||||
+
|
||||
+ /* Do not block on reads */
|
||||
+ flags = fcntl(recorder->trace_fd, F_GETFL);
|
||||
+ fcntl(recorder->trace_fd, F_SETFL, flags | O_NONBLOCK);
|
||||
+
|
||||
+ /* Do not block on streams */
|
||||
+ recorder->fd_flags |= SPLICE_F_NONBLOCK;
|
||||
+}
|
||||
+
|
||||
+
|
||||
struct tracecmd_recorder *
|
||||
tracecmd_create_buffer_recorder_fd2(int fd, int fd2, int cpu, unsigned flags,
|
||||
const char *buffer, int maxkb)
|
||||
@@ -129,7 +142,7 @@ tracecmd_create_buffer_recorder_fd2(int fd, int fd2, int cpu, unsigned flags,
|
||||
|
||||
recorder->fd_flags = SPLICE_F_MOVE;
|
||||
|
||||
- if (!(recorder->flags & TRACECMD_RECORD_BLOCK))
|
||||
+ if (!(recorder->flags & TRACECMD_RECORD_BLOCK_SPLICE))
|
||||
recorder->fd_flags |= SPLICE_F_NONBLOCK;
|
||||
|
||||
recorder->trace_fd_flags = SPLICE_F_MOVE;
|
||||
@@ -197,6 +210,9 @@ tracecmd_create_buffer_recorder_fd2(int fd, int fd2, int cpu, unsigned flags,
|
||||
recorder->pipe_size = pipe_size;
|
||||
}
|
||||
|
||||
+ if (recorder->flags & TRACECMD_RECORD_POLL)
|
||||
+ set_nonblock(recorder);
|
||||
+
|
||||
return recorder;
|
||||
|
||||
out_free:
|
||||
@@ -503,18 +519,6 @@ static long move_data(struct tracecmd_recorder *recorder)
|
||||
return splice_data(recorder);
|
||||
}
|
||||
|
||||
-static void set_nonblock(struct tracecmd_recorder *recorder)
|
||||
-{
|
||||
- long flags;
|
||||
-
|
||||
- /* Do not block on reads for flushing */
|
||||
- flags = fcntl(recorder->trace_fd, F_GETFL);
|
||||
- fcntl(recorder->trace_fd, F_SETFL, flags | O_NONBLOCK);
|
||||
-
|
||||
- /* Do not block on streams for write */
|
||||
- recorder->fd_flags |= SPLICE_F_NONBLOCK;
|
||||
-}
|
||||
-
|
||||
long tracecmd_flush_recording(struct tracecmd_recorder *recorder)
|
||||
{
|
||||
char buf[recorder->page_size];
|
||||
diff --git a/tracecmd/trace-record.c b/tracecmd/trace-record.c
|
||||
index bd00457..fa63774 100644
|
||||
--- a/tracecmd/trace-record.c
|
||||
+++ b/tracecmd/trace-record.c
|
||||
@@ -3440,7 +3440,7 @@ create_recorder_instance_pipe(struct buffer_instance *instance,
|
||||
int cpu, int *brass)
|
||||
{
|
||||
struct tracecmd_recorder *recorder;
|
||||
- unsigned flags = recorder_flags | TRACECMD_RECORD_BLOCK;
|
||||
+ unsigned flags = recorder_flags | TRACECMD_RECORD_BLOCK_SPLICE;
|
||||
char *path;
|
||||
|
||||
path = tracefs_instance_get_dir(instance->tracefs);
|
||||
@@ -5559,6 +5559,7 @@ enum {
|
||||
OPT_module = 256,
|
||||
OPT_nofifos = 257,
|
||||
OPT_cmdlines_size = 258,
|
||||
+ OPT_poll = 259,
|
||||
};
|
||||
|
||||
void trace_stop(int argc, char **argv)
|
||||
@@ -5884,6 +5885,7 @@ static void parse_record_options(int argc,
|
||||
{"module", required_argument, NULL, OPT_module},
|
||||
{"tsync-interval", required_argument, NULL, OPT_tsyncinterval},
|
||||
{"fork", no_argument, NULL, OPT_fork},
|
||||
+ {"poll", no_argument, NULL, OPT_poll},
|
||||
{NULL, 0, NULL, 0}
|
||||
};
|
||||
|
||||
@@ -6283,6 +6285,10 @@ static void parse_record_options(int argc,
|
||||
die("--fork option used for 'start' command only");
|
||||
fork_process = true;
|
||||
break;
|
||||
+ case OPT_poll:
|
||||
+ cmd_check_die(ctx, CMD_set, *(argv+1), "--poll");
|
||||
+ recorder_flags |= TRACECMD_RECORD_POLL;
|
||||
+ break;
|
||||
case OPT_quiet:
|
||||
case 'q':
|
||||
quiet = true;
|
||||
diff --git a/tracecmd/trace-usage.c b/tracecmd/trace-usage.c
|
||||
index 3f0b2d0..a29a16c 100644
|
||||
--- a/tracecmd/trace-usage.c
|
||||
+++ b/tracecmd/trace-usage.c
|
||||
@@ -65,6 +65,7 @@ static struct usage_help usage_help[] = {
|
||||
" If a negative number is specified, timestamps synchronization is disabled"
|
||||
" If 0 is specified, no loop is performed - timestamps offset is calculated only twice,"
|
||||
" at the beginnig and at the end of the trace\n"
|
||||
+ " --poll don't block while reading from the trace buffer\n"
|
||||
},
|
||||
{
|
||||
"set",
|
||||
--
|
||||
2.23.3
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
Summary: trace-cmd is a user-space front-end command-line tool for Ftrace
|
||||
Name: trace-cmd
|
||||
Version: 2.9
|
||||
Release: 4%{?dist}
|
||||
Version: 3.1.4
|
||||
Release: 1%{?dist}
|
||||
License: GPL-2.0 and LGPL-2.1
|
||||
Group: Development/Tools
|
||||
URL: https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git
|
||||
|
@ -9,9 +9,7 @@ Vendor: VMware, Inc.
|
|||
Distribution: Photon
|
||||
|
||||
Source0: https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/snapshot/%{name}-v%{version}.tar.gz
|
||||
%define sha512 %{name}=a37390e7ad29c9e7a97e5e7792505fe96a3802d6ea103e7c0f362a7b8cc29a102d483ec1a883b632fd9e0e7297f17866ae5eac59c825f08a8068b431a8f819e1
|
||||
|
||||
Patch0: 0001-trace-cmd-Add-option-to-poll-trace-buffers.patch
|
||||
%define sha512 %{name}=93ad775c1767d2a02b72386a29867c3bc141171403c152c0c4cb907da16b5ae69100924279d9529083449c1774c97c35d5b4790b188bcd4930cfa69076cef0b8
|
||||
|
||||
BuildRequires: audit-devel
|
||||
BuildRequires: swig
|
||||
|
@ -19,25 +17,20 @@ BuildRequires: python3-devel
|
|||
BuildRequires: libxml2-devel
|
||||
BuildRequires: libxslt-devel
|
||||
BuildRequires: gcc
|
||||
BuildRequires: libtraceevent-devel
|
||||
BuildRequires: libtracefs-devel
|
||||
|
||||
Requires: audit
|
||||
Requires: python3
|
||||
Requires: traceevent-plugins
|
||||
Requires: audit
|
||||
Requires: python3
|
||||
Requires: libtraceevent
|
||||
Requires: libtracefs
|
||||
Requires: zstd-libs
|
||||
|
||||
%description
|
||||
trace-cmd is a user-space command line tool that makes it convenient to use
|
||||
the Ftrace functionality in the kernel by providing appropriate command interfaces
|
||||
to record and analyze the traces.
|
||||
|
||||
%package -n traceevent-plugins
|
||||
Summary: This package contains shared-libraries used by trace-cmd
|
||||
Group: System/Tools
|
||||
Conflicts: linux-tools < 4.19.138-4
|
||||
%description -n traceevent-plugins
|
||||
This package contains the shared-libraries used by trace-cmd as well as
|
||||
other packages in the distro. The libraries include the plugins placed
|
||||
in the traceevent/ directory.
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n %{name}-v%{version}
|
||||
|
||||
|
@ -45,16 +38,12 @@ in the traceevent/ directory.
|
|||
%make_build
|
||||
|
||||
%install
|
||||
%make_install %{?_smp_mflags} prefix=%{_prefix} etcdir=%{_sysconfdir}
|
||||
%make_install %{?_smp_mflags} prefix=%{_prefix}
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
%post -n traceevent-plugins -p /sbin/ldconfig
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
%postun -n traceevent-plugins -p /sbin/ldconfig
|
||||
%ldconfig_scriptlets
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
|
@ -62,11 +51,9 @@ rm -rf %{buildroot}
|
|||
%{_bindir}/%{name}
|
||||
%{_sysconfdir}/bash_completion.d/%{name}.bash
|
||||
|
||||
%files -n traceevent-plugins
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/traceevent/plugins
|
||||
|
||||
%changelog
|
||||
* Mon Oct 31 2022 Gerrit Photon <photon-checkins@vmware.com> 3.1.4-1
|
||||
- Automatic Version Bump
|
||||
* Fri Oct 07 2022 Shreenidhi Shedi <sshedi@vmware.com> 2.9-4
|
||||
- Bump version as a part of libxslt upgrade
|
||||
* Thu Jun 16 2022 Ashwin Dayanand Kamat <kashwindayan@vmware.com> 2.9-3
|
||||
|
|
Loading…
Reference in New Issue