File perf-tools.spec of Package perf-tools
Summary: Performance analysis tools
Name: perf-tools
Version: 1.0+git23.cb42511
Release: 0
License: GPL-2.0
Group: System/Monitoring
URL: https://github.com/brendangregg/perf-tools
Source: %{name}-%{version}.tar.gz
BuildRequires: filesystem
Requires: bash
Requires: perf
BuildArch: noarch
%description
A miscellaneous collection of in-development and unsupported performance
analysis tools for Linux perf_events, aka the "perf" command, and ftrace. Both
perf_events and ftrace are core Linux tracing tools, and are included in the
Linux kernel source.
These tools are designed to be simple to use, easy to install, and provide
advanced performance observability. This collection was written by Brendan
Gregg (author of the DTraceToolkit).
Many of these tools employ workarounds so that functionality is possible on
existing Linux kernels. Because of this, many tools have caveats (see man
pages), and their implementation should be considered a placeholder until
future kernel features, or new tracing subsystems, are added.
Contents:
Using perf_events:
misc/perf-stat-hist: power-of aggregations for tracepoint variables.
syscount: count syscalls by syscall or process.
disk/bitesize: histogram summary of disk I/O size.
Using ftrace:
iosnoop: trace disk I/O with details including latency.
iolatency: summarize disk I/O latency as a histogram.
execsnoop: trace process exec() with command line argument details.
opensnoop: trace open() syscalls showing filenames.
kernel/funccount: count kernel functions that match a string.
kernel/functrace: trace kernel functions that match a string.
kernel/kprobe: trace a given kprobe definition.
tools/reset-ftrace: reset ftrace state if needed.
Prerequisites
The intent is as few as possible. Eg, a Linux 3.2 server without debuginfo.
perf_events
Requires the "perf" command to be installed. This is in the linux-tools-common package. After installing that, perf may tell you to install an additional linux-tools package (linux-tools-kernel-version). perf can also be built under tools/perf in the kernel source. See perf_events Prerequisites for more details.
ftrace
FTRACE configured in the kernel. You may already have this configured and available in your kernel version, as FTRACE was first added in 2.6.27. This requires CONFIG_FTRACE and other FTRACE options depending on the tool. Some tools (eg, funccount) require CONFIG_FUNCTION_PROFILER
%prep
%setup
%build
%install
install -d -m 0755 %{buildroot}/%{_sbindir}
install -m0755 bin/* %{buildroot}/%{_sbindir}/
install -d -m 0755 %{buildroot}/%{_mandir}/man8
install -m0644 man/man8/* %{buildroot}/%{_mandir}/man8/
install -d -m 0755 %{buildroot}/%{_docdir}/%{name}
install -d -m 0755 %{buildroot}/%{_docdir}/%{name}/examples
install -m 0644 examples/* %{buildroot}/%{_docdir}/%{name}/examples/
%clean
%{__rm} -rf %{buildroot}
%files
%defattr(-, root, root, -)
%doc %{_docdir}/%{name}
%{_mandir}/man8/*
%{_sbindir}/*
%changelog