Showing preview only (1,568K chars total). Download the full file or copy to clipboard to get everything.
Repository: rostedt/trace-cmd
Branch: master
Commit: 3ce20923b3ef
Files: 166
Total size: 1.5 MB
Directory structure:
gitextract_wtq560wr/
├── .gitattributes
├── .gitignore
├── CODING_STYLE
├── CONTRIBUTE
├── COPYING
├── COPYING.LIB
├── DCO
├── Documentation/
│ ├── .gitignore
│ ├── Makefile
│ ├── README.PythonPlugin
│ ├── asciidoc.conf
│ ├── libtracecmd/
│ │ ├── Makefile
│ │ ├── install-docs.sh.in
│ │ ├── libtracecmd-files.txt
│ │ ├── libtracecmd-instances.txt
│ │ ├── libtracecmd-iterate.txt
│ │ ├── libtracecmd-log.txt
│ │ ├── libtracecmd-maps.txt
│ │ ├── libtracecmd-peer.txt
│ │ ├── libtracecmd-record.txt
│ │ ├── libtracecmd-timestamp.txt
│ │ ├── libtracecmd.txt
│ │ └── meson.build
│ ├── manpage-1.72.xsl
│ ├── manpage-base.xsl
│ ├── manpage-bold-literal.xsl
│ ├── manpage-normal.xsl
│ ├── manpage-suppress-sp.xsl
│ └── trace-cmd/
│ ├── Makefile
│ ├── install-docs.sh.in
│ ├── meson.build
│ ├── trace-cmd-agent.1.txt
│ ├── trace-cmd-attach.1.txt
│ ├── trace-cmd-check-events.1.txt
│ ├── trace-cmd-clear.1.txt
│ ├── trace-cmd-convert.1.txt
│ ├── trace-cmd-dump.1.txt
│ ├── trace-cmd-extract.1.txt
│ ├── trace-cmd-hist.1.txt
│ ├── trace-cmd-list.1.txt
│ ├── trace-cmd-listen.1.txt
│ ├── trace-cmd-mem.1.txt
│ ├── trace-cmd-options.1.txt
│ ├── trace-cmd-profile.1.txt
│ ├── trace-cmd-record.1.txt
│ ├── trace-cmd-report.1.txt
│ ├── trace-cmd-reset.1.txt
│ ├── trace-cmd-restore.1.txt
│ ├── trace-cmd-set.1.txt
│ ├── trace-cmd-show.1.txt
│ ├── trace-cmd-snapshot.1.txt
│ ├── trace-cmd-split.1.txt
│ ├── trace-cmd-sqlhist.1.txt
│ ├── trace-cmd-stack.1.txt
│ ├── trace-cmd-start.1.txt
│ ├── trace-cmd-stat.1.txt
│ ├── trace-cmd-stop.1.txt
│ ├── trace-cmd-stream.1.txt
│ ├── trace-cmd.1.txt
│ ├── trace-cmd.dat.v6.5.txt
│ └── trace-cmd.dat.v7.5.txt
├── LICENSES/
│ ├── GPL-2.0
│ └── LGPL-2.1
├── Makefile
├── Makefile.meson
├── PACKAGING
├── README
├── check-manpages.sh
├── features.mk
├── include/
│ ├── linux/
│ │ └── time64.h
│ ├── trace-cmd/
│ │ └── trace-cmd.h
│ └── version.h
├── lib/
│ ├── meson.build
│ ├── meson_options.txt
│ └── trace-cmd/
│ ├── Makefile
│ ├── include/
│ │ ├── meson.build
│ │ ├── private/
│ │ │ ├── meson.build
│ │ │ ├── trace-cmd-private-python.h
│ │ │ ├── trace-cmd-private.h
│ │ │ ├── trace-filter-hash.h
│ │ │ ├── trace-hash.h
│ │ │ ├── trace-msg.h
│ │ │ └── trace-rbtree.h
│ │ ├── trace-cmd-local.h
│ │ ├── trace-hash-local.h
│ │ ├── trace-tsync-local.h
│ │ └── trace-write-local.h
│ ├── meson.build
│ ├── plugins/
│ │ └── Makefile
│ ├── test.c
│ ├── trace-blk-hack.c
│ ├── trace-compress-zlib.c
│ ├── trace-compress-zstd.c
│ ├── trace-compress.c
│ ├── trace-filter-hash.c
│ ├── trace-filter.c
│ ├── trace-ftrace.c
│ ├── trace-hash.c
│ ├── trace-hooks.c
│ ├── trace-input.c
│ ├── trace-maps.c
│ ├── trace-msg.c
│ ├── trace-output.c
│ ├── trace-perf.c
│ ├── trace-plugin.c
│ ├── trace-rbtree.c
│ ├── trace-recorder.c
│ ├── trace-timesync-kvm.c
│ ├── trace-timesync-ptp.c
│ ├── trace-timesync.c
│ └── trace-util.c
├── libtracecmd.pc.template
├── make-trace-cmd.sh
├── meson-vcs-tag.sh
├── meson.build
├── meson_options.txt
├── python/
│ ├── Makefile
│ ├── ctracecmd.i
│ ├── event-viewer.py
│ ├── meson.build
│ ├── tracecmd.py
│ └── tracecmdgui.py
├── scripts/
│ ├── debug/
│ │ ├── tsync_hist.py
│ │ ├── tsync_readme
│ │ └── tsync_res.py
│ └── utils.mk
├── tracecmd/
│ ├── .gitignore
│ ├── Makefile
│ ├── include/
│ │ ├── bug.h
│ │ ├── list.h
│ │ └── trace-local.h
│ ├── meson.build
│ ├── trace-agent.c
│ ├── trace-attach.c
│ ├── trace-check-events.c
│ ├── trace-clear.c
│ ├── trace-cmd.bash
│ ├── trace-cmd.c
│ ├── trace-convert.c
│ ├── trace-dump.c
│ ├── trace-hist.c
│ ├── trace-list.c
│ ├── trace-listen.c
│ ├── trace-mem.c
│ ├── trace-profile.c
│ ├── trace-read.c
│ ├── trace-record.c
│ ├── trace-restore.c
│ ├── trace-setup-guest.c
│ ├── trace-show.c
│ ├── trace-snapshot.c
│ ├── trace-split.c
│ ├── trace-sqlhist.c
│ ├── trace-stack.c
│ ├── trace-stat.c
│ ├── trace-stream.c
│ ├── trace-tsync.c
│ ├── trace-usage.c
│ ├── trace-vm.c
│ └── trace-vsock.c
└── utest/
├── Makefile
├── README
├── meson.build
├── trace-utest.c
├── trace-utest.h
└── tracecmd-utest.c
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitattributes
================================================
.gitattributes export-ignore
.gitignore export-ignore
================================================
FILE: .gitignore
================================================
*.o
*.so
*.a
*.dat
*.data
*.patch
.*.d
*.orig
*.rej
.pc
*~
*.pyc
*.swp
\#*\#
patches/
tc_version.h
ks_version.h
ctracecmd_wrap.c
ctracecmdgui_wrap.c
tags
TAGS
cscope*
trace_python_dir
tracecmd_plugin_dir
libtracecmd.pc
build_prefix
build_install
build_libs_install
ltc_version.h
utest/trace-utest
================================================
FILE: CODING_STYLE
================================================
trace-cmd coding-style
======================
The coding style of trace-cmd and the tracing libraries (libtracefs and
libtraceevent) are very similar to the Linux kernel coding style:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst
Indentation
===========
Tabs are used for the start of indentation (the '\t' character), and should be
set to 8 characters. Spaces may be used at the end for continued lines where
having the start of text line up to braces in the previous line is not
divisible by 8.
Max line width
==============
All lines should not be more than 100 characters in length.
This is a guide, as readability is more important than breaking lines up into a
hard limit. Ideally, strings should never be broken up except for where a new
line is added.
printf("This is a line that may continue for a very long string.\n"
"This is another line, but after a new line\n");
But line breaks should not be:
printf("This is a line that may continue for a very"
"long string.\n This is another line,"
"but after a new line\n");
Not only is the above not as readable as the first version, it is not
even equivalent, because it is missing spaces between the line breaks.
For this reason, finish the string on the same line, even if that string
breaks the 100 character limit.
Brackets and braces
===================
For all conditionals, the braces start on the same line:
if (cond) {
}
And the ending brace is at the same indentation as the conditional.
while (cond) {
}
do {
} while (cond);
for (i = 0; i < 10; i++) {
}
The same is true for structures:
struct my_struct {
int field;
};
But for functions, the braces should start on the following line:
void my_function(void)
{
}
It is also fine to not use braces for simple conditionals and loops.
if (!x)
y = x;
else
y = 1;
for (i = 0; i < 10; i++)
foo(i);
while (getline(&line, &size, fp) > 0)
printf("%s", line);
But any complex or multiline conditional or loop should have braces even if it
is allowed not to by the C language.
if (x) {
for (i = 0; i < 10; i++)
foo(i);
} else {
foo(1);
}
Notice above that even though the else portion is simple, it too has braces as
the else and if blocks should match. If one is required to have braces, they
both should have braces.
Spaces
======
A single space should be used between C commands and their starting
parenthesis.
if (x)
for (i = 0; i < 10; i++)
while (getline(&line, &size, fp) > 0)
There should be no space between function or macros and the starting
parenthesis.
foo(x)
IS_VALID(y)
This includes prototypes and declarations.
void foo(int x)
A space should be before and after assignment, comparison and algorithmic
signs.
i = 0;
if (i < 10)
if (i == 5)
y = i + 10;
i += 5;
For structures, use tabs to make all the fields line up nicely.
struct {
int foo;
int bar;
unsigned long long time;
};
Variable declarations
=====================
The order of variables that are declared, should first keep the same types
together, but also should be ordered by their length such that the variables
are ordered in an "upside-down Christmas tree" fashion where the length gets
smaller.
int tracecmd_count_cpus(void)
{
static int once;
char buf[1024];
int cpus = 0;
char *pbuf;
size_t *pn;
FILE *fp;
size_t n;
int r;
The above shows that the order is done by length, and in the above example it
also shows that "int cpu = 0;" is not grouped next to "int r;". As this is more
of a guideline and made to be more aesthetic to the eye of the reader, both the
above and is acceptable as below.
int tracecmd_count_cpus(void)
{
static int once;
char buf[1024];
char *pbuf;
size_t *pn;
FILE *fp;
size_t n;
int cpus = 0;
int r;
Unless variables are tightly related, it is expected that each variable be on
its own line and not grouped by type. That is,
int r, cpus = 0;
is to be discouraged, as the two variables are not related to each other.
But if you had a bunch of counters:
int i, j, k;
That would be fine, as the variables are all related as they are all for the
same purpose (arbitrary counters). The same may go with pointers;
char *begin, *end;
Comments
========
Comments will use the "/* */" format and the C++ "//" style is discouraged.
If a comment is on one line, keep the "/*" and "*/" on the same line:
/* This is a single line comment. */
If a comment spans more than one line, then have the "/*" on a separate line
before the comment and the "*/" on a separate line at the end of the comment,
and each line starts with a "*" where all the "*" line up with each other.
/*
* This is a multi line comment, where all the '*'
* will line up, and the text is on a separate line
* as the start and end markers.
*/
Function documentation
======================
All global functions (and especially any APIs) should have a function
description in the form of "kernel doc":
https://www.kernel.org/doc/html/latest/doc-guide/kernel-doc.html
The form is:
/**
* function_name() - Brief description of function.
* @arg1: Describe the first argument.
* @arg2: Describe the second argument.
* One can provide multiple line descriptions
* for arguments.
*
* A longer description, with more discussion of the function function_name()
* that might be useful to those using or modifying it. Begins with an
* empty comment line, and may include additional embedded empty
* comment lines.
*
* The longer description may have multiple paragraphs.
*
* Context: Describes whether the function can sleep, what locks it takes,
* releases, or expects to be held. It can extend over multiple
* lines.
* Return: Describe the return value of function_name.
*
* The return value description can also have multiple paragraphs, and should
* be placed at the end of the comment block.
*/
Structure layout
================
This is more about compaction than coding style. When creating structures, be
aware that if the fields are placed together without being sized by alignment,
that the compiler will create "holes" in them.
struct {
int x;
char y;
unsigned long long f;
};
As int is 4 bytes in length, char is one byte, and unsigned long long is 8
bytes. The compiler will try to naturally align them by their size, and will
include padding (holes) inside the structure to do so. The above is equivalent
to:
struct {
int x;
char y;
char padding[3];
unsigned long long f;
};
It is best to try to organize the structure where there are no holes within
them.
struct {
unsigned long long f;
int x;
char y;
};
The above is better formatting, even if there may be padding outside the
structure, but the compiler will still have more flexibility to utilize the
space outside the structure than what it can do within it.
General
=======
As stated, this is a guide and may not be strictly enforced. The goal is to
have consistent and readable code. In general, try to have the coding style
match the surrounding code.
================================================
FILE: CONTRIBUTE
================================================
If you like to become part of the community and submit patches, here's how
to do so for trace-cmd.
If you only want to report a bug, or suggest an enhancement, you may do
so at:
https://bugzilla.kernel.org/buglist.cgi?component=Trace-cmd%2FKernelshark
All development is done via a mailing list:
http://vger.kernel.org/vger-lists.html#linux-trace-devel
Patches should be sent to linux-trace-devel@vger.kernel.org
Start by cloning the official repository:
git clone git://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git
Make your changes. When you are satisfied with them, commit them into git.
Here's some helpful hints for your git commits.
1) When making changes, please follow the coding style defined by the file
called CODING_STYLE in this directory.
2) Every commit should only do one thing.
That is, if your work requires some cleaning up of code, do that
clean up as a separate commit and not with your functional changes.
Find ways to take "steps" in modifying code. If you can break up
your changes in a series of steps, do so.
3) The commit log should start with a title. Like the below
trace-cmd: Add CONTRIBUTE file
Even though this repo is for trace-cmd, start the topic with
"trace-cmd:" because the commits will end up as patches to a mailing
list that handles other tracing repos, differentiating them with the subject
is useful. You can be more specific as well. If the change only affects the
"record" command, you may start the title with "trace-cmd record:".
4) The body of the commit (with a blank line from the title), should be self
contained, and explain why you are making the change. The title should hold
the "what" is changing, but the body contains the rationale for the change.
It should be a stand alone, and not state things like "See the next patch",
because when it is in git history, there's no knowing what the next patch
is. You can make statements like "This is needed for a <future-feature>
that will come later". Where "<future-feature>" is something that you are
working on and the current commit is one of the steps required to get there.
5) Add your Developer Certificate of Origin (DCO) at the bottom of the commit
log. That is "Signed-off-by: Full Name <email>" where your full name is your
real name (no pseudonyms). Optionally, if you are making the change on
behalf of your company, you may also add your company name, if you are not
using your company's email. "Signed-off-by: Full Name (Company) <email>".
Please note, the DCO is your statement that you have the legal right to
make these changes for the project you are submitting to.
You can use the Linux kernel "checkpatch.pl" script to help verify the formatting
of your patch:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/checkpatch.pl
Please note that checkpatch.pl is a guide and not a hard rule. If it reports a
fix that makes the code harder to read, that fix can probably be ignored.
git format-patch --stdout HEAD~1..HEAD | ./checkpatch.pl
Finally, you can use the git "send-email" functionality:
git send-email --from='<your-email> --to='linux-trace-devel@vger.kernel.org' HEAD~1..HEAD
If you are sending one patch, if you are adding more than one patch, also include
a cover letter:
git send-email --cover-letter --annotate --from='<your-email> --to='linux-trace-devel@vger.kernel.org' <first-commit>~1..HEAD
If you receive feedback on your patches, and plan on sending another version,
please use the '-v' option to mark your patches that they are a new version.
For example, if you add "-v2" to the above commands, instead of having:
"[PATCH]" in the subject, it will have "[PATCH v2]", letting the reviewers know
that this is a new version. If you send another version, use "-v3" and so on.
For more information about git send-email:
https://git-scm.com/docs/git-send-email
To keep track of the status of patches that have been submitted, check out:
https://patchwork.kernel.org/project/linux-trace-devel/list/
If you would like to apply patches from the mailing list, you can use
the "b4" utility.
$ pip install b4
Then from the mailing list archive, find a message id from a patch or patch
series. For example, to get the patch from:
https://lore.kernel.org/linux-trace-devel/20210205173713.132051-1-tz.stoyanov@gmail.com/
$ b4 am -o - 20210205173713.132051-1-tz.stoyanov@gmail.com > /tmp/p.mbox
$ git am /tmp/p.mbox
================================================
FILE: COPYING
================================================
There are two main licenses that the tools in this directory are covered
under. For the applications themselves, they are covered under GPL-2.0 (see
LICENSES/GPL-2.0). As for the exported headers and libraries, they are covered
under LPGL-2.1 (see LICENSES/LGPL-2.1).
================================================
FILE: COPYING.LIB
================================================
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations
below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
^L
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it
becomes a de-facto standard. To achieve this, non-free programs must
be allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
^L
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control
compilation and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
^L
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
^L
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at least
three years, to give the same user the materials specified in
Subsection 6a, above, for a charge no more than the cost of
performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
^L
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
^L
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply, and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License
may add an explicit geographical distribution limitation excluding those
countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
^L
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
^L
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms
of the ordinary General Public License).
To apply these terms, attach the following notices to the library.
It is safest to attach them to the start of each source file to most
effectively convey the exclusion of warranty; and each file should
have at least the "copyright" line and a pointer to where the full
notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or
your school, if any, to sign a "copyright disclaimer" for the library,
if necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James
Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!
================================================
FILE: DCO
================================================
(Copied from the Linux Kernel's Documentation/process/submitting-patches.rst)
Sign your work - the Developer's Certificate of Origin
------------------------------------------------------
The sign-off is a simple line at the end of the explanation for the
patch, which certifies that you wrote it or otherwise have the right to
pass it on as an open-source patch. The rules are pretty simple: if you
can certify the below:
Developer's Certificate of Origin 1.1
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
then you just add a line saying::
Signed-off-by: Random J Developer <random@developer.example.org>
using your real name (sorry, no pseudonyms or anonymous contributions.)
Some people also put extra tags at the end. They'll just be ignored for
now, but you can do this to mark internal company procedures or just
point out some special detail about the sign-off.
================================================
FILE: Documentation/.gitignore
================================================
*.[1-9]
*.m
*.html
================================================
FILE: Documentation/Makefile
================================================
# SPDX-License-Identifier: GPL-2.0
doc_dir:=$(src)/Documentation
export doc_dir
SUBDIR += trace-cmd
SUBDIR += libtracecmd
.PHONY: $(SUBDIR)
DOCDIR = $(src)/Documentation
ASCIIDOC=asciidoc
ASCIIDOC_CONF = $(DOCDIR)/asciidoc.conf
ASCIIDOC_EXTRA = --unsafe -f $(ASCIIDOC_CONF)
ASCIIDOC_HTML = xhtml11
MANPAGE_XSL = $(DOCDIR)/manpage-normal.xsl
XMLTO_EXTRA =
INSTALL?=install
RM ?= rm -f
ASCIIDOC_INSTALLED := $(shell command -v $(ASCIIDOC) 2> /dev/null)
ifndef ASCIIDOC_INSTALLED
missing_tools += $(ASCIIDOC)
endif
XMLTO=xmlto
XMLTO_INSTALLED := $(shell command -v $(XMLTO) 2> /dev/null)
ifndef XMLTO_INSTALLED
missing_tools += $(XMLTO)
endif
#
# For asciidoc ...
# -7.1.2, no extra settings are needed.
# 8.0-, set ASCIIDOC8.
#
#
# For docbook-xsl ...
# -1.68.1, set ASCIIDOC_NO_ROFF? (based on changelog from 1.73.0)
# 1.69.0, no extra settings are needed?
# 1.69.1-1.71.0, set DOCBOOK_SUPPRESS_SP?
# 1.71.1, no extra settings are needed?
# 1.72.0, set DOCBOOK_XSL_172.
# 1.73.0-, set ASCIIDOC_NO_ROFF
#
#
# If you had been using DOCBOOK_XSL_172 in an attempt to get rid
# of 'the ".ft C" problem' in your generated manpages, and you
# instead ended up with weird characters around callouts, try
# using ASCIIDOC_NO_ROFF instead (it works fine with ASCIIDOC8).
#
ifdef ASCIIDOC8
ASCIIDOC_EXTRA += -a asciidoc7compatible
endif
ifdef DOCBOOK_XSL_172
ASCIIDOC_EXTRA += -a libtracecmd-asciidoc-no-roff
MANPAGE_XSL = $(DOCDIR)/manpage-1.72.xsl
else
ifdef ASCIIDOC_NO_ROFF
# docbook-xsl after 1.72 needs the regular XSL, but will not
# pass-thru raw roff codes from asciidoc.conf, so turn them off.
ASCIIDOC_EXTRA += -a libtracecmd-asciidoc-no-roff
endif
endif
ifdef MAN_BOLD_LITERAL
XMLTO_EXTRA += -m $(DOCDIR)/manpage-bold-literal.xsl
endif
ifdef DOCBOOK_SUPPRESS_SP
XMLTO_EXTRA += -m $(DOCDIR)/manpage-suppress-sp.xsl
endif
ifdef USE_ASCIIDOCTOR
ASCIIDOC = asciidoctor
ASCIIDOC_EXTRA = -a compat-mode
ASCIIDOC_EXTRA += -I. -rasciidoctor-extensions
ASCIIDOC_HTML = xhtml5
endif
ifneq ($(findstring $(MAKEFLAGS),w),w)
PRINT_DIR = --no-print-directory
else # "make -w"
NO_SUBDIR = :
endif
export ASCIIDOC ASCIIDOC_CONF ASCIIDOC_EXTRA ASCIIDOC_HTML
export MANPAGE_XSL
export XMLTO XMLTO_INSTALLED XMLTO_EXTRA
export missing_tools
export RM
all: $(SUBDIR)
clean: $(SUBDIR)
install: $(SUBDIR)
$(SUBDIR):
make -C $@ $(MAKECMDGOALS)
================================================
FILE: Documentation/README.PythonPlugin
================================================
PYTHON PLUGIN DOCUMENTATION
=============================
With the python plugin (make python-plugin) you can now
write plugins in python. The API exported by the python
plugin itself (written in C) allows you to access most
information about a record from python.
To write a python plugin, put a new .py file into a new
~/.trace-cmd/python/ directory.
The most basic python plugin is this:
--- %< ---
def register(pevent):
pass
--- >% ---
which obviously does nothing at all.
To register a callback, use the pevent.register_event_handler
function:
--- %< ---
import tracecmd
def my_event_handler(trace_seq, event):
pass
def register(pevent):
pevent.register_event_handler("subsys", "event_name",
my_event_handler)
--- >% ---
There are four object types that you get, described below.
tracecmd.PEvent
-----------------
This is the class of the 'pevent' object above,
you get one of those via your register callback.
It has one method and one property:
* register_event_handler() - example above, to register
an event handler function
* file_endian - either '<' or '>' indicating
which endianness the file has,
to be used with struct.unpack()
tracecmd.TraceSeq
-------------------
This is the class of the 'trace_seq' parameter to your callback
function. It has only one method, puts(), to put data into the
buffer. Formatting must be done in python.
tracecmd.Event
----------------------
This is the class of the 'event' parameter to your callback
function. Note that it doesn't just contain the format, but
also the event data. As such, you can do much with this, and
this is what you'll usually use. Each instance of this allows
access to record items via the dict protocol, and you can get
the items via its keys() methods. So for example, your
callback could be
--- %< ---
def my_callback(trace_seq, event):
for fieldname in event.keys():
field = event[fieldname]
--- >% ---
Each field returned from the dict protocol is an instance of
the next (and last) class:
tracecmd.Field
----------------------
This is an instance of a field, including its data. It affords
numerous use cases and is what you'll be using most.
* If this is an integer field, i.e. 1, 2, 4 or 8 bytes long,
you can convert it to the number contained, according to
the file's endianness, by simply casting it to a long:
field = event['myint']
value = long(field)
* You can access the field's data, as field.data, and if the
data is really a "__data_loc" type that will be resolved
automatically. (If you don't know what this means, don't
worry about it and just use field.data)
This is it. It's pretty simple. A fully-featured plugin could
look like this:
--- %< ---
def my_event_handler(trace_seq, event):
trace_seq.puts("myev: %u", long(event['myfield']))
def register(pevent):
pevent.register_event_handler("subsys", "event_name",
my_event_handler)
--- >% ---
Tips and tricks
-----------------
Be familiar with the struct module and use it, always
checking endianness and potentially using pevent.file_endian.
If you need access to pevent in your callbacks, simply
pass it in yourself:
--- %< ---
def my_event_handler(pevent, trace_seq, event):
pass
def register(pevent):
pevent.register_event_handler("subsys", "event_name",
lambda *args: my_event_handler(pevent, *args)
)
--- >% ---
================================================
FILE: Documentation/asciidoc.conf
================================================
## linktep: macro
#
# Usage: linktep:command[manpage-section]
#
# Note, {0} is the manpage section, while {target} is the command.
#
# Show TEP link as: <command>(<section>); if section is defined, else just show
# the command.
[macros]
(?su)[\\]?(?P<name>linktep):(?P<target>\S*?)\[(?P<attrlist>.*?)\]=
[attributes]
asterisk=*
plus=+
caret=^
startsb=[
endsb=]
tilde=~
ifdef::backend-docbook[]
[linktep-inlinemacro]
{0%{target}}
{0#<citerefentry>}
{0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}
{0#</citerefentry>}
endif::backend-docbook[]
ifdef::backend-docbook[]
ifndef::tep-asciidoc-no-roff[]
# "unbreak" docbook-xsl v1.68 for manpages. v1.69 works with or without this.
# v1.72 breaks with this because it replaces dots not in roff requests.
[listingblock]
<example><title>{title}</title>
<literallayout>
ifdef::doctype-manpage[]
.ft C
endif::doctype-manpage[]
|
ifdef::doctype-manpage[]
.ft
endif::doctype-manpage[]
</literallayout>
{title#}</example>
endif::tep-asciidoc-no-roff[]
ifdef::tep-asciidoc-no-roff[]
ifdef::doctype-manpage[]
# The following two small workarounds insert a simple paragraph after screen
[listingblock]
<example><title>{title}</title>
<literallayout>
|
</literallayout><simpara></simpara>
{title#}</example>
[verseblock]
<formalpara{id? id="{id}"}><title>{title}</title><para>
{title%}<literallayout{id? id="{id}"}>
{title#}<literallayout>
|
</literallayout>
{title#}</para></formalpara>
{title%}<simpara></simpara>
endif::doctype-manpage[]
endif::tep-asciidoc-no-roff[]
endif::backend-docbook[]
ifdef::doctype-manpage[]
ifdef::backend-docbook[]
[header]
template::[header-declarations]
<refentry>
<refmeta>
<refentrytitle>{mantitle}</refentrytitle>
<manvolnum>{manvolnum}</manvolnum>
<refmiscinfo class="source">libtracefs</refmiscinfo>
<refmiscinfo class="version">{libtracefs_version}</refmiscinfo>
<refmiscinfo class="manual">libtracefs Manual</refmiscinfo>
</refmeta>
<refnamediv>
<refname>{manname1}</refname>
<refname>{manname2}</refname>
<refname>{manname3}</refname>
<refname>{manname4}</refname>
<refname>{manname5}</refname>
<refname>{manname6}</refname>
<refname>{manname7}</refname>
<refname>{manname8}</refname>
<refname>{manname9}</refname>
<refname>{manname10}</refname>
<refname>{manname11}</refname>
<refname>{manname12}</refname>
<refname>{manname13}</refname>
<refname>{manname14}</refname>
<refname>{manname15}</refname>
<refname>{manname16}</refname>
<refname>{manname17}</refname>
<refname>{manname18}</refname>
<refname>{manname19}</refname>
<refname>{manname20}</refname>
<refname>{manname21}</refname>
<refname>{manname22}</refname>
<refname>{manname23}</refname>
<refname>{manname24}</refname>
<refname>{manname25}</refname>
<refname>{manname26}</refname>
<refname>{manname27}</refname>
<refname>{manname28}</refname>
<refname>{manname29}</refname>
<refname>{manname30}</refname>
<refpurpose>{manpurpose}</refpurpose>
</refnamediv>
endif::backend-docbook[]
endif::doctype-manpage[]
ifdef::backend-xhtml11[]
[linktep-inlinemacro]
<a href="{target}.html">{target}{0?({0})}</a>
endif::backend-xhtml11[]
================================================
FILE: Documentation/libtracecmd/Makefile
================================================
# SPDX-License-Identifier: GPL-2.0
# Include the utils
include $(src)/scripts/utils.mk
# This Makefile and manpage XSL files were taken from libtracefs
# and modified for libtracecmd
MAN3_TXT= \
$(wildcard libtracecmd-*.txt) \
libtracecmd.txt
MAN_TXT = $(MAN3_TXT)
_MAN_XML=$(patsubst %.txt,%.xml,$(MAN_TXT))
_MAN_HTML=$(patsubst %.txt,%.html,$(MAN_TXT))
_DOC_MAN3=$(patsubst %.txt,%.m,$(MAN3_TXT))
MAN_XML=$(addprefix $(OUTPUT),$(_MAN_XML))
MAN_HTML=$(addprefix $(OUTPUT),$(_MAN_HTML))
DOC_MAN3=$(addprefix $(OUTPUT),$(_DOC_MAN3))
# Make the path relative to DESTDIR, not prefix
ifndef DESTDIR
prefix?=$(HOME)
endif
bindir?=$(prefix)/bin
htmldir?=$(prefix)/share/doc/libtracecmd-doc
pdfdir?=$(prefix)/share/doc/libtracecmd-doc
mandir?=$(prefix)/share/man
man3dir=$(mandir)/man3
ifdef USE_ASCIIDOCTOR
ASCIIDOC_EXTRA += -a mansource="libtracecmd" -a manmanual="libtracecmd Manual"
endif
all: check-man-tools html man
man: man3
man3: $(DOC_MAN3)
html: $(MAN_HTML)
$(MAN_HTML) $(DOC_MAN3): $(ASCIIDOC_CONF)
install: check-man-tools install-man install-html
check-man-tools:
ifdef missing_tools
$(error "You need to install $(missing_tools) for man pages")
endif
install-%.3: $(OUTPUT)%.3
$(Q)$(call do_install_docs,$<,$(man3dir),644);
do-install-man: man $(addprefix install-,$(wildcard $(OUTPUT)*.3))
install-man: man
$(Q)$(MAKE) -C . do-install-man
install-%.txt: $(OUTPUT)%.html
$(Q)$(call do_install_docs,$<,$(htmldir),644);
do-install-html: html $(addprefix install-,$(wildcard *.txt))
install-html: html do-install-html
uninstall: uninstall-man uninstall-html
uninstall-man:
$(Q)$(RM) $(addprefix $(DESTDIR)$(man3dir)/,$(DOC_MAN3))
uninstall-html:
$(Q)$(RM) $(addprefix $(DESTDIR)$(htmldir)/,$(MAN_HTML))
ifdef missing_tools
DO_INSTALL_MAN = $(warning Please install $(missing_tools) to have the man pages installed)
else
DO_INSTALL_MAN = do-install-man
endif
CLEAN_FILES = \
$(MAN_XML) $(addsuffix +,$(MAN_XML)) \
$(MAN_HTML) $(addsuffix +,$(MAN_HTML)) \
$(DOC_MAN3) *.3 *.m
clean:
$(Q) $(RM) $(CLEAN_FILES)
ifdef USE_ASCIIDOCTOR
$(OUTPUT)%.m : $(OUTPUT)%.txt
$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
$(ASCIIDOC) -b manpage -d manpage \
$(ASCIIDOC_EXTRA) -alibtracecmd_version=$(LIBTRACECMD_VERSION) -o $@+ $< && \
mv $@+ $@
endif
$(OUTPUT)%.m : $(OUTPUT)%.xml
$(QUIET_XMLTO)$(RM) $@ && \
$(XMLTO) -o $(OUTPUT). -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $<; \
touch $@
$(OUTPUT)%.xml : %.txt
$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
$(ASCIIDOC) -b docbook -d manpage \
$(ASCIIDOC_EXTRA) -alibtracecmd_version=$(LIBTRACECMD_VERSION) -o $@+ $< && \
mv $@+ $@
$(MAN_HTML): $(OUTPUT)%.html : %.txt
$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
$(ASCIIDOC) -b $(ASCIIDOC_HTML) -d manpage \
$(ASCIIDOC_EXTRA) -alibtracecmd_version=$(LIBTRACECMD_VERSION) -o $@+ $< && \
mv $@+ $@
================================================
FILE: Documentation/libtracecmd/install-docs.sh.in
================================================
#!/bin/bash
# SPDX-License-Identifier: LGPL-2.1
#
# Copyright (c) 2023 Daniel Wagner, SUSE LLC
for section in 1 3 5; do
while IFS= read -r -d '' man; do
[ ! -d "${DESTDIR}@MANDIR@/man${section}" ] && install -d "${DESTDIR}@MANDIR@/man${section}"
echo Installing "${man}" to "${DESTDIR}@MANDIR@/man${section}"
install -m 0644 "${man}" "${DESTDIR}@MANDIR@/man${section}/"
done< <(find "@SRCDIR@" -name "*\.${section}" -type f -print0)
done
while IFS= read -r -d '' html; do
[ ! -d "${DESTDIR}@HTMLDIR@" ] && install -d "${DESTDIR}@HTMLDIR@"
echo Installing "${html}" to "${DESTDIR}@HTMLDIR@"
install -m 0644 "${html}" "${DESTDIR}@HTMLDIR@"
done< <(find "@SRCDIR@" -name "*\.html" -type f -print0)
================================================
FILE: Documentation/libtracecmd/libtracecmd-files.txt
================================================
libtracecmd(3)
=============
NAME
----
tracecmd_open, tracecmd_open_fd, tracecmd_open_head, tracecmd_init_data,
tracecmd_close, tracecmd_set_private, tracecmd_get_private - Open and close a trace file.
SYNOPSIS
--------
[verse]
--
*#include <trace-cmd.h>*
struct tracecmd_input pass:[*]*tracecmd_open*(const char pass:[*]_file_, int _flags_);
struct tracecmd_input pass:[*]*tracecmd_open_fd*(int _fd_, int _flags_);
struct tracecmd_input pass:[*]*tracecmd_open_head*(const char pass:[*]_file_, int _flags_);
int *tracecmd_init_data*(struct tracecmd_input pass:[*]_handle_);
void *tracecmd_close*(struct tracecmd_input pass:[*]_handle_);
void *tracecmd_set_private*(struct tracecmd_input pass:[*]_handle_, void pass:[*]_data_);
void pass:[*]*tracecmd_get_private*(struct tracecmd_input pass:[*]_handle_);
--
DESCRIPTION
-----------
This set of APIs can be used to open and close a trace file recorded by
*trace-cmd(1)* and containing tracing information from ftrace, the official
Linux kernel tracer. The opened file is represented by a _tracecmd_input_
structure, all other library APIs that work with the file require a pointer
to the structure. The APIs for opening a trace file have a _flag_ input
parameter, which controls how the file will be opened and parsed. The _flag_
is a combination of these options:
TRACECMD_FL_LOAD_NO_PLUGINS - Do not load any plugins
TRACECMD_FL_LOAD_NO_SYSTEM_PLUGINS - Do not load system wide plugins, load only "local only"
plugins from user's home directory.
The *tracecmd_open()* function opens a given trace _file_, parses the
metadata headers from the file, allocates and initializes а _tracecmd_input_
handler structure representing the file. It also initializes the handler
for reading trace data from the file. The returned handler is ready to be
used with _tracecmd_read__ APIs.
The *tracecmd_open_fd()* function does the same as *tracecmd_open()*, but
works with a file descriptor to a trace file, opened for reading.
The *tracecmd_open_head()* function is the same as *tracecmd_open()*, but
does not initialize the handler for reading trace data. It reads and parses
the metadata headers only. The *tracecmd_init_data()* should be used before
using the _tracecmd_read__ APIs.
The *tracecmd_init_data()* function initializes a _handle_, allocated with
*tracecmd_open_head()*, for reading trace data from the file associated with
it. This API must be called before any of the _tracecmd_read__ APIs.
The *tracecmd_close()* function frees a _handle_, pointer to tracecmd_input
structure, previously allocated with *tracecmd_open()*, *tracecmd_open_fd()*
or *tracecmd_open_head()* APIs.
The *tracecmd_set_private()* function allows to add specific _data_ to the
_handle_ that can be retrieved later.
The *tracecmd_get_private()* function will retrieve the _data_ set by
*tracecmd_set_private()* for the given _handle_.
RETURN VALUE
------------
The *tracecmd_open()*, *tracecmd_open_fd()* and *tracecmd_open_head()*
functions return a pointer to tracecmd_input structure or NULL in case of
an error. The returned structure must be free with *tracecmd_close()*.
Note that if *tracecmd_open_fd()* is used to allocate a tracecmd_input handler,
when *tracecmd_close()* is called to close it, that fd will be closed also.
The *tracecmd_init_data()* function returns -1 in case of an error or
0 otherwise.
The *tracecmd_get_private()* returns the _data_ set by *tracecmd_set_private()*.
EXAMPLE
-------
[source,c]
--
The are two different use patterns for opening and reading trace data from
a trace file, which can be used depending on the use case.
1. Open and initialise the trace file in а single step:
#include <stdlib.h>
#include <trace-cmd.h>
static int print_events(struct tracecmd_input *handle, struct tep_record *record, int cpu, void *data)
{
static struct trace_seq seq;
struct tep_handle *tep = tracecmd_get_tep(handle);
const char *file = tracecmd_get_private(handle);
if (!seq.buffer)
trace_seq_init(&seq);
trace_seq_reset(&seq);
trace_seq_printf(&seq, "%s: ", file);
tep_print_event(tep, &seq, record, "%6.1000d [%03d] %s-%d %s: %s\n",
TEP_PRINT_TIME, TEP_PRINT_CPU, TEP_PRINT_COMM, TEP_PRINT_PID,
TEP_PRINT_NAME, TEP_PRINT_INFO);
trace_seq_terminate(&seq);
trace_seq_do_printf(&seq);
return 0;
}
int main(int argc, char **argv)
{
struct tracecmd_input *handle;
if (argc < 2) {
printf("usage: %s trace.dat\n", argv[0]);
exit(-1);
}
handle = tracecmd_open(argv[i], 0);
if (!handle)
exit(-1);
tracecmd_set_private(handles[nr_handles], argv[i]);
tracecmd_iterate_events(handles, NULL, 0, print_events, NULL);
tracecmd_close(handle);
}
2. Open and initialise the trace file in two steps. This allows to perform
some processing based on metadata, read from the file, before initialising
the trace data for reading. Example for such use case is when opening multiple
trace files recorded in a same trace session. In that case timestamps of all
trace events must be adjusted based on the information from the file's metadata
and before reading the trace data.
#include <trace-cmd.h>
...
struct tracecmd_input *handle = tracecmd_open_head("trace.dat");
if (!handle) {
/* Failed to open trace.dat file */
}
...
/* do some processing, before initialising the trace data for reading */
...
if (tracecmd_init_data(handle) < 0) {
/* Failed to initialize hadle for reading the trace data */
}
...
/* Read tracing data from the file, using the handle */
...
tracecmd_close(handle);
...
--
FILES
-----
[verse]
--
*trace-cmd.h*
Header file to include in order to have access to the library APIs.
*-ltracecmd*
Linker switch to add when building a program that uses the library.
--
SEE ALSO
--------
*libtracefs(3)*,
*libtraceevent(3)*,
*trace-cmd(1)*
*trace-cmd.dat(5)*
AUTHOR
------
[verse]
--
*Steven Rostedt* <rostedt@goodmis.org>
*Tzvetomir Stoyanov* <tz.stoyanov@gmail.com>
--
REPORTING BUGS
--------------
Report bugs to <linux-trace-devel@vger.kernel.org>
LICENSE
-------
libtracecmd is Free Software licensed under the GNU LGPL 2.1
RESOURCES
---------
https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/
COPYING
-------
Copyright \(C) 2020 VMware, Inc. Free use of this software is granted under
the terms of the GNU Public License (GPL).
================================================
FILE: Documentation/libtracecmd/libtracecmd-instances.txt
================================================
libtracecmd(3)
=============
NAME
----
tracecmd_buffer_instances, tracecmd_buffer_instance_name, tracecmd_buffer_instance_handle
- Read tracing instances from a trace file.
SYNOPSIS
--------
[verse]
--
*#include <trace-cmd.h>*
int *tracecmd_buffer_instances*(struct tracecmd_input pass:[*]_handle_);
const char pass:[*]*tracecmd_buffer_instance_name*(struct tracecmd_input pass:[*]_handle_, int _indx_);
struct tracecmd_input pass:[*]*tracecmd_buffer_instance_handle*(struct tracecmd_input pass:[*]_handle_, int _indx_);
--
DESCRIPTION
-----------
This set of APIs can be used to get information and read tracing data
from tracing instances stored in a trace file.
The *tracecmd_buffer_instances()* function gets the number of tracing
instances recorded in a trace file. The top instance is not counted.
The _handle_ is a tracecmd_input handler returned by
*tracecmd_open_head()*.
The *tracecmd_buffer_instance_name()* function gets the name of the
tracing instance with given index _indx_, recorded in a trace file.
The _indx_ is a number in the interval [0 .. count-1], where count
is the number returned by *tracecmd_buffer_instances()*. The _handle_
is a tracecmd_input handler returned by *tracecmd_open_head()*.
The *tracecmd_buffer_instance_handle()* allocates and initializes a
tracecmd_input handle, associated with trace instance with index
_indx_ from a trace file. The _handle_ is a tracecmd_input handler
returned by *tracecmd_open_head()*. The _indx_ is a number in the
interval [0 .. count-1], where count is the number returned by
*tracecmd_buffer_instances()*.
RETURN VALUE
------------
The *tracecmd_buffer_instances()* function returns the number of tracing
instances recorded in a trace file.
The *tracecmd_buffer_instance_name()* function returns a string, the name
of a tracing instance, or NULL in case of an error The string must *not*
be freed.
The *tracecmd_buffer_instance_handle()* function returns a pointer to
newly allocated tracecmd_input handler or NULL in case if an error. The
returned handler must be closed by *tracecmd_close()(3)*
EXAMPLE
-------
[source,c]
--
#include <trace-cmd.h>
...
struct tracecmd_input *handle = tracecmd_open_head("trace.dat");
if (!handle) {
/* Failed to open trace.dat file */
}
...
int num = tracecmd_buffer_instances(handle);
while(num) {
struct tracecmd_input *h;
char *name;
name = tracecmd_buffer_instance_name(handle, num);
if (!name) {
/* Failed to get name of instance num */
}
h = tracecmd_buffer_instance_handle(handle, num);
if (!h) {
/* Failed to initialize handler for instance num */
}
...
tracecmd_close(h);
num--;
}
...
tracecmd_close(handle);
--
FILES
-----
[verse]
--
*trace-cmd.h*
Header file to include in order to have access to the library APIs.
*-ltracecmd*
Linker switch to add when building a program that uses the library.
--
SEE ALSO
--------
*libtracefs(3)*,
*libtraceevent(3)*,
*trace-cmd(1)*
*trace-cmd.dat(5)*
AUTHOR
------
[verse]
--
*Steven Rostedt* <rostedt@goodmis.org>
*Tzvetomir Stoyanov* <tz.stoyanov@gmail.com>
--
REPORTING BUGS
--------------
Report bugs to <linux-trace-devel@vger.kernel.org>
LICENSE
-------
libtracecmd is Free Software licensed under the GNU LGPL 2.1
RESOURCES
---------
https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/
COPYING
-------
Copyright \(C) 2020 VMware, Inc. Free use of this software is granted under
the terms of the GNU Public License (GPL).
================================================
FILE: Documentation/libtracecmd/libtracecmd-iterate.txt
================================================
libtracecmd(3)
=============
NAME
----
tracecmd_iterate_events, tracecmd_iterate_events_multi, tracecmd_follow_event,
tracecmd_follow_missed_events, tracecmd_filter_add, tracecmd_iterate_reset - Read events from a trace file
SYNOPSIS
--------
[verse]
--
*#include <trace-cmd.h>*
int *tracecmd_iterate_events*(struct tracecmd_input pass:[*]_handle_,
cpu_set_t pass:[*]_cpus_, int _cpu_size_,
int (pass:[*]_callback_)(struct tracecmd_input pass:[*],
struct tep_record pass:[*],
int, void pass:[*]),
void pass:[*]_callback_data_);
int *tracecmd_iterate_events_multi*(struct tracecmd_input pass:[**]_handles_,
int _nr_handles_,
int (pass:[*]_callback_)(struct tracecmd_input pass:[*],
struct tep_record pass:[*],
int, void pass:[*]),
void pass:[*]_callback_data_);
int *tracecmd_iterate_events_reverse*(struct tracecmd_input pass:[*]_handle_,
cpu_set_t pass:[*]_cpus_, int _cpu_size_,
int (pass:[*]_callback_)(struct tracecmd_input pass:[*],
struct tep_record pass:[*],
int, void pass:[*]),
void pass:[*]_callback_data_, bool _cont_);
int *tracecmd_follow_event*(struct tracecmd_input pass:[*]_handle_,
const char pass:[*]_system_, const char pass:[*]_event_name_,
int (pass:[*]_callback_)(struct tracecmd_input pass:[*],
struct tep_event pass:[*],
struct tep_record pass:[*],
int, void pass:[*]),
void pass:[*]_callback_data_);
int *tracecmd_follow_missed_events*(struct tracecmd_input pass:[*]_handle_,
int (pass:[*]_callback_)(struct tracecmd_input pass:[*],
struct tep_event pass:[*],
struct tep_record pass:[*],
int, void pass:[*]),
void pass:[*]_callback_data_);
struct tracecmd_filter pass:[*]*tracecmd_filter_add*(struct tracecmd_input *_handle_,
const char pass:[*]_filter_str_, bool _neg_);
int *tracecmd_iterate_reset*(struct tracecmd_input pass:[*]_handle_);
--
DESCRIPTION
-----------
This set of APIs can be used to iterate over events after opening a trace file
using one of the open functions like *tracecmd_open(3)* or *tracecmd_open_fd(3)*.
The function *tracecmd_iterate_events()* will iterate through all the
events in the trace file defined by _handle_, where _handle_ is returned from
one of the *tracecmd_open(3)* functions. It will call the _callback_() function
on the events on the CPUs defined by _cpus_. The _cpu_size_ must be the size of
_cpus_ (see *CPU_SET(3)*). If _cpus_ is NULL, then _cpu_size_ is ignored and _callback()_
will be called for all events on all CPUs in the trace file. The _callback_data_
is passed to the _callback()_ as its last parameter. _callback_ may be NULL, which
is useful if *tracecmd_follow_event()* is used, but note if _callback_ is NULL, then
_callback_data_ is ignored and not sent to the _callback_ of *tracecmd_follow_event()*.
The function *tracecmd_iterate_events_multi()* is similar to *tracecmd_iterate_events()*
except that it allows to iterate over more than one trace file. If *tracecmd agent(1)*
is used to get a trace file for both the host and guest, make sure that the host trace
file is the first entry in _handles_ and *tracecmd_iterate_events_multi()* will do
the synchronization of the meta data for the guest files that come later in _handles_.
_handles_ is an array of trace file descriptors that were opened by *tracecmd_open(3)*
and friends. Note, unlike *tracecmd_iterate_events()*, *tracecmd_iterate_events_multi()*
does not filter on CPUs, as it will cause the API to become too complex in knowing which
handle to filter the CPUs on. If CPU filtering is desired, then the _callback_ should check
the _record_->cpu to and return 0 if it is not the desired CPU to process. _nr_handles_
denotes the number of elements in _handles_. The _callback_data_ is passed to the _callback_
as its last parameter. _callback_ may be NULL, which is useful if *tracecmd_follow_event()*
is used, but note if _callback_ is NULL, then _callback_data_ is ignored and not sent to the
_callback_ of *tracecmd_follow_event()*.
The function *tracecmd_iterate_events_reverse()* works pretty much the same way as
*tracecmd_iterate_events()* works, but instead of calling the _callback_() function for
each event in order of the timestamp, it will call the _callback_() function for
each event in reverse order of the timestamp. If _cont_ is false, it will start by
calling the event with the oldest timestamp in the trace.dat file. If _cont_ is set
to true, then it will start whereever the current position of the tracing data is.
For instance, if the _callback()_ return something other than zero it will exit the
iteration. If *tracecmd_iterate_events_reverse()* is called again with _cont_ to true
it will continue where it left off. If _cont_ is false, it will start again at the event
with the oldest timestamp. The _handle_, _cpus_, _cpu_size_, and _callback_data_ act the
same as *tracecmd_iterate_events()*.
The _callback()_ for both *tracecmd_iterate_events()*, *tracecmd_iterate_events_reverse()*
and *tracecmd_iterate_events_multi()* is of the prototype:
int _callback()_(struct tracecmd_input pass:[*]_handle_, struct tep_record pass:[*]_record_,
int _cpu_, void pass:[*]_data_);
The _handle_ is the same _handle_ passed to *tracecmd_iterate_events()* or the current
handle of _handles_ passed to *tracecmd_iterate_events_multi()* that the _record_ belongs to.
The _record_ is the current event record. The _cpu_ is the current CPU being processed. Note, for
*tracecmd_iterate_events_multi()* it may not be the actual CPU of the file, but the nth
CPU of all the _handles_ put together. Use _record_->cpu to get the actual CPU that the
event is on.
The *tracecmd_follow_event()* function will attach to a trace file descriptor _handle_
and call the _callback_ when the event described by _system_ and _name_ matches an event
in the iteration of *tracecmd_iterate_events()* or *tracecmd_iterate_events_multi()*.
Note, the _cpu_ is the nth CPU for both *tracecmd_iterate_events()* and
*tracecmd_iterate_events_multi()*. If the actual CPU of the _record_ is needed, use
_record_->cpu.
For *tracecmd_iterate_events_multi()*, the _callback_ is only called if the _handle_
matches the current trace file descriptor within _handles_. The _callback_data_ is
passed as the last parameter to the _callback()_ function. Note, this _callback()_
function will be called before the _callback()_ function of either *tracecmd_iterate_events()* or *tracecmd_iterate_events_multi()*.
The _callback()_ prototype for *tracecmd_follow_event()_ is:
int _callback()_(struct tracecmd_input pass:[*]_handle_, struct tep_event pass:[*]_event,
struct tep_record pass:[*]_record_, int _cpu_, void pass:[*]_data_);
The *tracecmd_follow_missed_events()* function will attach to a trace file descriptor
_handle_ and call the _callback_ when missed events are detected. The _event_ will
hold the type of event that the _record_ is. The _record_ will hold the information
of the missed events. The _cpu_ is the nth CPU for both *tracecmd_iterate_events()*
and *tracecmd_iterate_events_multi()*. If the CPU that the missed events are for is
needed, use _record_->cpu. If _record_->missed_events is a positive number, then it
holds the number of missed events since the last event on its CPU, otherwise it
will be negative, and that will mean that the number of missed events is unknown but
missed events exist since the last event on the CPU.
The _callback_ and _callback_data_ is the same format as *tracecmd_follow_event()* above.
The missed events _callback_ is called before any of the other _callbacks_ and any
filters that were added by *tracecmd_filter_add()* are ignored.
If _callback_ returns a non zero, it will stop the iterator before it calls any of the
other iterator callbacks for the given record.
The *tracecmd_filter_add()* function, adds a filter to _handle_ that affects
both *tracecmd_iterate_events()* and *tracecmd_iterate_events_multi()*.
The _filter_str_ is a character string defining a filter in a format that
is defined by *tep_filter_add_filter_str(3)*. If _neg_ is true, then the events
that match the filter will be skipped, otherwise the events that match will execute
the _callback()_ function in the iterators.
The *tracecmd_iterate_reset()* sets the _handle_ back to start at the beginning, so that
the next call to *tracecmd_iterate_events()* starts back at the first event again, instead
of continuing where it left off.
RETURN VALUE
------------
Both *tracecmd_iterate_events()*, *tracecmd_iterate_events_reverse()* and
*tracecmd_iterate_events_multi()* return zero if they successfully iterated all events
(handling the follow and filters appropriately). Or an error value, which can include
returning a non-zero result from the _callback()_ function.
*tracecmd_iterate_reset()* returns 0 on success and -1 if an error occurred. Note,
if -1 is returned, a partial reset may have also happened.
EXAMPLE
-------
[source,c]
--
#define _GNU_SOURCE
#include <sched.h>
#include <stdlib.h>
#include <getopt.h>
#include <trace-cmd.h>
struct private_data {
int cpu;
const char *file;
};
static int print_events(struct tracecmd_input *handle, struct tep_record *record, int cpu, void *data)
{
static struct trace_seq seq;
struct tep_handle *tep = tracecmd_get_tep(handle);
struct private_data *pdata = tracecmd_get_private(handle);
/* For multi handles we need this */
if (pdata->cpu >= 0 && pdata->cpu != record->cpu)
return 0;
if (!seq.buffer)
trace_seq_init(&seq);
trace_seq_reset(&seq);
trace_seq_printf(&seq, "%s: ", pdata->file);
tep_print_event(tep, &seq, record, "%6.1000d [%03d] %s-%d %s: %s\n",
TEP_PRINT_TIME, TEP_PRINT_CPU, TEP_PRINT_COMM, TEP_PRINT_PID,
TEP_PRINT_NAME, TEP_PRINT_INFO);
trace_seq_terminate(&seq);
trace_seq_do_printf(&seq);
return 0;
}
static int print_event(struct tracecmd_input *handle, struct tep_event *event,
struct tep_record *record, int cpu, void *data)
{
return print_events(handle, record, cpu, data);
}
static int missed_events(struct tracecmd_input *handle, struct tep_event *event,
struct tep_record *record, int cpu, void *data)
{
if (record->missed_events > 0)
printf("CPU [%03d] has %d missed events\n",
record->cpu, record->missed_events);
else
printf("CPU [%03d] has missed events\n", record->cpu);
return 0;
}
static void usage(const char *argv0)
{
printf("usage: [-c cpu][-f filter][-e event] %s trace.dat [trace.dat ...]\n",
argv0);
exit(-1);
}
int main(int argc, char **argv)
{
struct tracecmd_input **handles = NULL;
const char *filter_str = NULL;
const char *argv0 = argv[0];
struct private_data *priv;
cpu_set_t *cpuset = NULL;
char *event = NULL;
size_t cpusize = 0;
int nr_handles = 0;
int cpu = -1;
int i;
int c;
while ((c = getopt(argc, argv, "c:f:e:")) >= 0) {
switch (c) {
case 'c':
/* filter all trace data to this one CPU. */
cpu = atoi(optarg);
break;
case 'f':
filter_str = optarg;
break;
case 'e':
event = optarg;
break;
default:
usage(argv0);
}
}
argc -= optind;
argv += optind;
if (argc == 0)
usage(argv0);
for (i = 0; i < argc; i++) {
handles = realloc(handles, sizeof(*handles) * (nr_handles + 1));
if (!handles)
exit(-1);
handles[nr_handles] = tracecmd_open(argv[i], 0);
if (!handles[nr_handles]) {
perror(argv[i]);
exit(-1);
}
if (filter_str) {
if (tracecmd_filter_add(handles[nr_handles], filter_str, false) == NULL) {
perror("adding filter");
exit(-1);
}
}
priv = calloc(1, sizeof(*priv));
if (!priv)
exit(-1);
priv->file = argv[i];
priv->cpu = cpu;
tracecmd_set_private(handles[nr_handles], priv);
if (event) {
if (tracecmd_follow_event(handles[nr_handles], NULL, event, print_event, NULL) < 0) {
printf("Could not follow event %s for file %s\n", event, argv[i]);
exit(-1);
}
}
tracecmd_follow_missed_events(handles[nr_handles], missed_events, NULL);
nr_handles++;
}
/* Shortcut */
if (nr_handles == 1) {
if (cpu >= 0) {
cpuset = CPU_ALLOC(cpu + 1);
if (!cpuset)
exit(-1);
cpusize = CPU_ALLOC_SIZE(cpu + 1);
CPU_SET_S(cpu, cpusize, cpuset);
}
if (event)
tracecmd_iterate_events(handles[0], cpuset, cpusize, NULL, NULL);
else
tracecmd_iterate_events(handles[0], cpuset, cpusize, print_events, NULL);
} else {
if (event)
tracecmd_iterate_events_multi(handles, nr_handles, NULL, NULL);
else
tracecmd_iterate_events_multi(handles, nr_handles, print_events, NULL);
}
for (i = 0; i < nr_handles; i++) {
priv = tracecmd_get_private(handles[i]);
free(priv);
tracecmd_close(handles[i]);
}
free(handles);
}
--
FILES
-----
[verse]
--
*trace-cmd.h*
Header file to include in order to have access to the library APIs.
*-ltracecmd*
Linker switch to add when building a program that uses the library.
--
SEE ALSO
--------
*libtracefs(3)*,
*libtraceevent(3)*,
*trace-cmd(1)*
*trace-cmd.dat(5)*
AUTHOR
------
[verse]
--
*Steven Rostedt* <rostedt@goodmis.org>
*Tzvetomir Stoyanov* <tz.stoyanov@gmail.com>
--
REPORTING BUGS
--------------
Report bugs to <linux-trace-devel@vger.kernel.org>
LICENSE
-------
libtracecmd is Free Software licensed under the GNU LGPL 2.1
RESOURCES
---------
https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/
COPYING
-------
Copyright \(C) 2020 VMware, Inc. Free use of this software is granted under
the terms of the GNU Public License (GPL).
================================================
FILE: Documentation/libtracecmd/libtracecmd-log.txt
================================================
libtracecmd(3)
=============
NAME
----
tracecmd_set_loglevel - Set log level of the library
SYNOPSIS
--------
[verse]
--
*#include <trace-cmd.h>*
int *tracecmd_set_loglevel*(enum tep_loglevel _level_);
--
DESCRIPTION
-----------
The *tracecmd_set_loglevel()* function sets the level of the library logs that will be printed on
the console. See *libtraceevent(3)* for detailed desciription of the log levels. Setting the log
level to specific value means that logs from the previous levels will be printed too. For example
_TEP_LOG_WARNING_ will print any logs with severity _TEP_LOG_WARNING_, _TEP_LOG_ERROR_ and
_TEP_LOG_CRITICAL_. The default log level is _TEP_LOG_CRITICAL_. When a new level is set, it is
also propagated to the libtracefs and libtraceevent.
EXAMPLE
-------
[source,c]
--
#include <trace-cmd.h>
...
tracecmd_set_loglevel(TEP_LOG_ALL);
...
/* call libtracecmd, libtracefs or libtraceevent APIs and observe any logs they produce */
...
tracecmd_set_loglevel(TEP_LOG_CRITICAL);
--
FILES
-----
[verse]
--
*trace-cmd.h*
Header file to include in order to have access to the library APIs.
*-ltracecmd*
Linker switch to add when building a program that uses the library.
--
SEE ALSO
--------
*libtracefs(3)*,
*libtraceevent(3)*,
*trace-cmd(1)*
*trace-cmd.dat(5)*
AUTHOR
------
[verse]
--
*Steven Rostedt* <rostedt@goodmis.org>
*Tzvetomir Stoyanov* <tz.stoyanov@gmail.com>
--
REPORTING BUGS
--------------
Report bugs to <linux-trace-devel@vger.kernel.org>
LICENSE
-------
libtracecmd is Free Software licensed under the GNU LGPL 2.1
RESOURCES
---------
https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/
COPYING
-------
Copyright \(C) 2021 VMware, Inc. Free use of this software is granted under
the terms of the GNU Public License (GPL).
================================================
FILE: Documentation/libtracecmd/libtracecmd-maps.txt
================================================
libtracecmd(3)
=============
NAME
----
tracecmd_map_vcpus, tracecmd_get_cpu_map, tracecmd_map_find_by_host_pid, tracecmd_map_get_host_pid,
tracecmd_map_get_guest, tracecmd_map_set_private, tracecmd_map_get_private - Mapping host and guest data
SYNOPSIS
--------
[verse]
--
*#include <trace-cmd.h>*
int *tracecmd_map_vcpus*(struct tracecmd_input pass:[**]handles, int nr_handles);
struct tracecmd_cpu_map pass:[*]*tracecmd_get_cpu_map*(struct tracecmd_input pass:[*]handle, int cpu);
struct tracecmd_cpu_map pass:[*]*tracecmd_map_find_by_host_pid*(struct tracecmd_input pass:[*]handle,
int host_pid);
int *tracecmd_map_get_host_pid*(struct tracecmd_cpu_map pass:[*]map);
struct tracecmd_input pass:[*]*tracecmd_map_get_guest*(struct tracecmd_cpu_map pass:[*]map);
void *tracecmd_map_set_private*(struct tracecmd_cpu_map pass:[*]map, void pass:[*]priv);
void pass:[*]*tracecmd_map_get_private*(struct tracecmd_cpu_map pass:[*]map);
--
DESCRIPTION
-----------
This set of APIs is used to map host and guest trace files for to facilitate
further tracing analysis.
The *tracecmd_map_vcpus()* takes an array of _handles_ where each item in that
array was created by one of the *tracecmd_open(3)* functions, and the number
of handles as _nr_handles_. The first handle in the array of _handles_ is expected
to be the descriptor for the host tracing file, and the rest are guest trace
files that run on the host, and were created by the *trace-cmd record(1)* and
*trace-cmd agent(1)* interactions. It returns the number of guests found in
_handles_ that were associated with the host, or negative on error.
The *tracecmd_get_cpu_map()* returns a descriptor for a given CPU for a handle.
If the _handle_ was a guest defined from *tracecmd_map_vcpus()* then the mapping
created from that function that is associated to this particular vCPU (denoted by
_cpu_) from _handle_. This destriptor can be used by *tarcecmd_map_get_guest()*,
*tracecmd_map_set_private()* and *tracecmd_map_get_private()* functions.
The *tracecmd_map_find_by_host_pid()* will return a mapping for a guest virtual
CPU that is handled by the given _host_pid_. Note, the _handle_ passed in can be
either the host handle or one of the guest's handles for that host that was
mapped by *tracecmd_map_vcpus()*, even if the guest handle does not have the vCPU
that the _host_pid_ represents.
The *tracecmd_map_get_host_pid()* will recturn the host_pid for a given _map_
that was retrieved by one of the above functions.
The *tracecmd_map_get_guest()* will recturn the guest_handle for a given _map_
that was retrieved by one of the above functions.
The *tracecmd_map_set_private()* allows the application to assign private data
for a given guest vCPU to host thread mapping defined by _map_.
The *tracecmd_map_get_private()* retrieves the _priv_ data from _map_ that was
set by *tracecmd_map_set_private()*.
RETURN VALUE
------------
*tracecmd_map_vcpus()* returns the number of guests in the _handles_ array that
were mapped to the host handle that is the first entry in _handles_. It returns
-1 on error.
*tracecmd_get_cpu_map()* returns a map created by *tracecmd_map_vcpus()* for
a given _cpu_ for a given _handle_, or NULL if it is not found.
*tracecmd_map_find_by_host_pid()* returns a map that is associated by the host
task with _host_pid_ as its process ID. _handle_ can be either a the host
handle, or one of the guest handles that were mapped to the host via
*tracecmd_map_vcpus()*, even if the guest handle is another guest than
the one that the mapping is for. It returns NULL if not found.
*tracecmd_map_get_host_pid()* returns the host process ID for an associated
mapping defined by _map_.
*tracecmd_map_get_guest()* returns the guest handle for an associated
mapping defined by _map_.
*tracecmd_map_get_private()* returns the private data of a mapping defined
by _map_ that was set by *tracecmd_map_set_private()*.
EXAMPLE
-------
[source,c]
--
#include <stdlib.h>
#include <errno.h>
#include <trace-cmd.h>
int main(int argc, char **argv)
{
struct tracecmd_input **handles = NULL;
int nr_handles;
int i;
if (argc < 2) {
printf("usage: host_trace.dat guest1_trace.dat [guest2_trace.dat ...]\n");
exit(-1);
}
for (i = 1; i < argc; i++) {
handles = realloc(handles, sizeof(*handles) * (nr_handles + 1));
if (!handles)
exit(-1);
handles[nr_handles] = tracecmd_open(argv[i], 0);
if (!handles[nr_handles]) {
perror(argv[1]);
exit(-1);
}
tracecmd_set_private(handles[nr_handles], argv[i]);
nr_handles++;
}
tracecmd_map_vcpus(handles, nr_handles);
for (i = 1; i < nr_handles; i++) {
struct tracecmd_cpu_map *map;
struct tep_handle *tep;
const char *file = tracecmd_get_private(handles[i]);
int cpus, cpu;
printf("Mappings for guest %s:\n", file);
tep = tracecmd_get_tep(handles[i]);
cpus = tep_get_cpus(tep);
for (cpu = 0; cpu < cpus; cpu++) {
printf(" [%03d] ", cpu);
map = tracecmd_get_cpu_map(handles[i], cpu);
if (!map) {
printf("Has no mapping!\n");
continue;
}
printf("host_pid: %d\n", tracecmd_map_get_host_pid(map));
}
}
for (i = 0; i < nr_handles; i++)
tracecmd_close(handles[i]);
free(handles);
exit(0);
}
--
FILES
-----
[verse]
--
*trace-cmd.h*
Header file to include in order to have access to the library APIs.
*-ltracecmd*
Linker switch to add when building a program that uses the library.
--
SEE ALSO
--------
*libtracefs(3)*,
*libtraceevent(3)*,
*trace-cmd(1)*
*trace-cmd.dat(5)*
REPORTING BUGS
--------------
Report bugs to <linux-trace-devel@vger.kernel.org>
LICENSE
-------
libtracecmd is Free Software licensed under the GNU LGPL 2.1
RESOURCES
---------
https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/
COPYING
-------
Copyright \(C) 2020 VMware, Inc. Free use of this software is granted under
the terms of the GNU Public License (GPL).
================================================
FILE: Documentation/libtracecmd/libtracecmd-peer.txt
================================================
libtracecmd(3)
=============
NAME
----
tracecmd_get_traceid, tracecmd_get_guest_cpumap - Manage trace session with multiple trace peers,
recorded in multiple trace files.
SYNOPSIS
--------
[verse]
--
*#include <trace-cmd.h>*
unsigned long long *tracecmd_get_traceid*(struct tracecmd_input pass:[*]_handle_);
int *tracecmd_get_guest_cpumap*(struct tracecmd_input pass:[*]_handle_, unsigned long long _trace_id_, const char pass:[*]pass:[*]_name_, int pass:[*]_vcpu_count_, const int pass:[*]pass:[*]_cpu_pid_);
--
DESCRIPTION
-----------
This set of APIs can be used to manage a trace session with multiple trace
peers, for example, tracing both a host and one or more guest virtual machines.
The trace data of each peer from the session is recorded in separate trace files.
Information about peers from the session is stored in the metadata of each
trace file. These APIs use that information to extract and synchronize
the trace data.
The *tracecmd_get_traceid()* function returns the trace ID stored in
the trace file metadata associated with _handle_. Each peer from a trace
session has an ID unique for that peer and that trace session only.
This ID is used to match multiple trace files recorded in a same trace
session.
The *tracecmd_get_guest_cpumap()* function gets the mapping of guest
virtual CPUs (VCPU) to the host process that represents those VCPUs and is
stored in the metadata of the trace file associated with _handle_. This
information is gathered during a host-guest trace session and is stored
in the host trace file. The _trace_id_ parameter is the trace ID of the guest
in this particular trace session. If a guest with that ID was part of that
session, its VCPU to host process mapping is in the host trace file and the
information is returned in _name_, _vcpu_count_ and _cpu_pid_ parameters.
The _name_ parameter contains the name of the guest, the _vcpu_count_ contains
the count of VCPUs of that guest and the _cpu_pid_ array contains the VCPU to
host process mapping. The array is of size _vcpu_count_ where the index is VCPU
and the value is the process ID (PID) of the host process, running that VCPU.
The _name_, _vcpu_count_ and _cpu_pid_ values must *not* be freed.
RETURN VALUE
------------
The *tracecmd_get_traceid()* function returns a 64 bit trace ID.
The *tracecmd_get_guest_cpumap()* function returns -1 in case of
an error or 0 otherwise. If 0 is returned, then the _name_, _vcpu_count_
and _cpu_pid_ parameters contain the requested information.
EXAMPLE
-------
[source,c]
--
#include <trace-cmd.h>
...
struct tracecmd_input *host = tracecmd_open("trace.dat");
if (!host) {
/* Failed to open host trace file */
}
struct tracecmd_input *guest1 = tracecmd_open_head("trace-Guest1.dat");
if (!guest1) {
/* Failed to open guest1 trace file */
}
struct tracecmd_input *guest2 = tracecmd_open_head("trace-Guest2.dat");
if (!guest2) {
/* Failed to open guest2 trace file */
}
unsigned long long guest_id_1 = tracecmd_get_traceid(guest1);
unsigned long long guest_id_2 = tracecmd_get_traceid(guest2);
int *cpu_pid_1, *cpu_pid_2;
int vcount_1, vcount_2;
char *name_1, *name_2;
if (!tracecmd_get_guest_cpumap(host, guest_id_1, &name_1, &vcount_1, &cpu_pid_1)) {
/* The Host and a guest1 with name_1 are part of the same trace session.
* Got guest1 VCPU to host PID mapping.
*/
}
if (!tracecmd_get_guest_cpumap(host, guest_id_2, &name_2, &vcount_2, &cpu_pid_2)) {
/* The Host and a guest2 with name_2 are part of the same trace session.
* Got guest2 VCPU to host PID mapping.
*/
}
...
tracecmd_close(guest1);
tracecmd_close(guest2);
tracecmd_close(handle);
--
FILES
-----
[verse]
--
*trace-cmd.h*
Header file to include in order to have access to the library APIs.
*-ltracecmd*
Linker switch to add when building a program that uses the library.
--
SEE ALSO
--------
*libtracefs(3)*,
*libtraceevent(3)*,
*trace-cmd(1)*
*trace-cmd.dat(5)*
AUTHOR
------
[verse]
--
*Steven Rostedt* <rostedt@goodmis.org>
*Tzvetomir Stoyanov* <tz.stoyanov@gmail.com>
--
REPORTING BUGS
--------------
Report bugs to <linux-trace-devel@vger.kernel.org>
LICENSE
-------
libtracecmd is Free Software licensed under the GNU LGPL 2.1
RESOURCES
---------
https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/
COPYING
-------
Copyright \(C) 2020 VMware, Inc. Free use of this software is granted under
the terms of the GNU Public License (GPL).
================================================
FILE: Documentation/libtracecmd/libtracecmd-record.txt
================================================
libtracecmd(3)
=============
NAME
----
tracecmd_read_cpu_first, tracecmd_read_data, tracecmd_read_at,
tracecmd_free_record, tracecmd_get_tep - Read recorded events from a trace file.
SYNOPSIS
--------
[verse]
--
*#include <trace-cmd.h>*
struct tep_record pass:[*]*tracecmd_read_cpu_first*(struct tracecmd_input pass:[*]_handle_, int _cpu_);
struct tep_record pass:[*]*tracecmd_read_data*(struct tracecmd_input pass:[*]_handle_, int _cpu_);
struct tep_record pass:[*]*tracecmd_read_at*(struct tracecmd_input pass:[*]_handle_, unsigned long long _offset_, int pass:[*]_cpu_);
void *tracecmd_free_record*(struct tep_record pass:[*]_record_);
struct tep_handle pass:[*]*tracecmd_get_tep*(struct tracecmd_input pass:[*]_handle_);
--
DESCRIPTION
-----------
This set of APIs can be used to read tracing data from a trace file opened
with *tracecmd_open()(3)*, *tracecmd_open_fd()(3)* or *tracecmd_open_head()(3)*.
The *tracecmd_read_cpu_first()* function reads the first trace record
for a given _cpu_ from a trace file associated with _handle_. The returned
record must be freed with *tracecmd_free_record()*.
The *tracecmd_read_data()* function reads the next trace record for
a given _cpu_ from a trace file associated with _handle_ and increments
the read location pointer, so that the next call to *tracecmd_read_data()*
will not read the same record again. The returned record must be freed
with *tracecmd_free_record()*.
The *tracecmd_read_at()* function reads a trace record from a specific
_offset_ within the file associated with _handle_. The CPU on which the
recorded event occurred is stored in the _cpu_. The function does not
change the current read location pointer. The returned record must be
freed with *tracecmd_free_record()*.
The *tracecmd_free_record()* function frees a _record_ returned by any
of the _tracecmd_read__ APIs.
The *tracecmd_get_tep()* function returns a tep context for a given
_handle_.
RETURN VALUE
------------
The *tracecmd_read_cpu_first()*, *tracecmd_read_data()* and
*tracecmd_read_at()* functions return a pointer to struct tep_record or
NULL in case of an error.The returned record must be freed with
*tracecmd_free_record()*.
The *tracecmd_get_tep()* function returns a pointer to tep context or
NULL if there is no tep context for the given _handle_. The returned
tep pointer must *not* be freed.
EXAMPLE
-------
[source,c]
--
#include <trace-cmd.h>
...
struct tracecmd_input *handle = tracecmd_open("trace.dat");
if (!handle) {
/* Failed to open trace.dat file */
}
...
unsigned long long offset = 0;
struct tep_record *rec;
int cpu = 0;
rec = tracecmd_read_cpu_first(handle, cpu);
while (rec) {
...
if ( /* some interesting record noticed */) {
/* store the offset of the interesting record */
offset = rec->offset;
}
...
tracecmd_free_record(rec);
rec = tracecmd_read_data(handle, cpu);
}
...
if (offset) {
rec = tracecmd_read_at(handle, offset, &cpu);
if (rec) {
/* Got record at offset on cpu */
...
tracecmd_free_record(rec);
}
}
...
tracecmd_close(hadle);
--
FILES
-----
[verse]
--
*trace-cmd.h*
Header file to include in order to have access to the library APIs.
*-ltracecmd*
Linker switch to add when building a program that uses the library.
--
SEE ALSO
--------
*libtracefs(3)*,
*libtraceevent(3)*,
*trace-cmd(1)*
*trace-cmd.dat(5)*
AUTHOR
------
[verse]
--
*Steven Rostedt* <rostedt@goodmis.org>
*Tzvetomir Stoyanov* <tz.stoyanov@gmail.com>
--
REPORTING BUGS
--------------
Report bugs to <linux-trace-devel@vger.kernel.org>
LICENSE
-------
libtracecmd is Free Software licensed under the GNU LGPL 2.1
RESOURCES
---------
https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/
COPYING
-------
Copyright \(C) 2020 VMware, Inc. Free use of this software is granted under
the terms of the GNU Public License (GPL).
================================================
FILE: Documentation/libtracecmd/libtracecmd-timestamp.txt
================================================
libtracecmd(3)
=============
NAME
----
tracecmd_get_first_ts, tracecmd_add_ts_offset, tracecmd_get_tsc2nsec - Handle time stamps from a trace file.
SYNOPSIS
--------
[verse]
--
*#include <trace-cmd.h>*
unsigned long long *tracecmd_get_first_ts*(struct tracecmd_input pass:[*]_handle_);
void *tracecmd_add_ts_offset*(struct tracecmd_input pass:[*]_handle_, long long _offset_);
int *tracecmd_get_tsc2nsec*(struct tracecmd_input pass:[*]_handle_, int pass:[*]_mult_, int pass[*]_shift_, unsigned long long pass:[*]_offset_);
--
DESCRIPTION
-----------
This set of APIs can be used to read tracing data from a trace file opened
with _tracecmd_open()(3)_, _tracecmd_open_fd()(3)_ or _tracecmd_open_head()(3)_.
The *tracecmd_get_first_ts()* function returns the time stamp of the first
record in the _handle_.
The *tracecmd_add_ts_offset()* function adds an offset to each of the records
in the _handle_ that represents a trace file. This is useful for associating two
different tracing files by their offset (for example a trace file from a host
and a trace file from a guest that were not synchronized when created).
The *tracecmd_get_tsc2nsec* returns the calculation values that convert the
raw timestamp into nanoseconds. The parameters are pointers to the storage to save
the values, or NULL to ignore them. The multiplier will be saved in _mult_, the
shift value will be saved in _shift_, and the offset value will be saved in
_offset_, if the corresponding parameters are not NULL.
RETURN VALUE
------------
The *tracecmd_get_first_ts()* function returns the timestamp of the first
record in a trace file for the given _handle_.
The *tracecmd_get_tsc2nsec*() returns 0 if the tracing clock supports the
shift values and -1 otherwise. Note, that if the trace file has the TSC2NSEC
option, the values returned in the parameters may still be valid even if the
function itself returns -1. The return value only notes if the values will
be used in the calculations of the given clock.
EXAMPLE
-------
[source,c]
--
#include <stdlib.h>
#include <trace-cmd.h>
static int print_events(struct tracecmd_input *handle, struct tep_record *record, int cpu, void *data)
{
static struct trace_seq seq;
struct tep_handle *tep = tracecmd_get_tep(handle);
const char *file = tracecmd_get_private(handle);
if (!seq.buffer)
trace_seq_init(&seq);
trace_seq_reset(&seq);
trace_seq_printf(&seq, "%s: ", file);
tep_print_event(tep, &seq, record, "%6.1000d [%03d] %s-%d %s: %s\n",
TEP_PRINT_TIME, TEP_PRINT_CPU, TEP_PRINT_COMM, TEP_PRINT_PID,
TEP_PRINT_NAME, TEP_PRINT_INFO);
trace_seq_terminate(&seq);
trace_seq_do_printf(&seq);
return 0;
}
int main(int argc, char **argv)
{
struct tracecmd_input **handles = NULL;
unsigned long long ts, first_ts = 0;
unsigned long long offset;
int multi;
int shift;
int nr_handles = 0;
int ret;
int i;
if (argc < 2) {
printf("usage: %s trace.dat [trace.dat ...]\n", argv[0]);
exit(-1);
}
for (i = 1; i < argc; i++) {
handles = realloc(handles, sizeof(*handles) * (nr_handles + 1));
if (!handles)
exit(-1);
handles[nr_handles] = tracecmd_open(argv[i], 0);
if (!handles[nr_handles])
exit(-1);
ret = tracecmd_get_tsc2nsec(handles[nr_handles], &multi, &shift, &offset);
if (!ret)
printf(" %s has tsc2nsec calculations of mult:%d shift:%d offset:%lld\n",
argv[i], multi, shift, offset);
tracecmd_set_private(handles[nr_handles], argv[i]);
ts = tracecmd_get_first_ts(handles[nr_handles]);
if (!first_ts || ts < first_ts)
first_ts = ts;
nr_handles++;
}
/* Set the time stamp to start at the first record found */
for (i = 0; i < nr_handles; i++)
tracecmd_add_ts_offset(handles[i], -first_ts);
tracecmd_iterate_events_multi(handles, nr_handles, print_events, NULL);
for (i = 0; i < nr_handles; i++)
tracecmd_close(handles[i]);
free(handles);
}
--
FILES
-----
[verse]
--
*trace-cmd.h*
Header file to include in order to have access to the library APIs.
*-ltracecmd*
Linker switch to add when building a program that uses the library.
--
SEE ALSO
--------
_libtracefs(3)_,
_libtraceevent(3)_,
_trace-cmd(1)_
_trace-cmd.dat(5)_
AUTHOR
------
[verse]
--
*Steven Rostedt* <rostedt@goodmis.org>
*Tzvetomir Stoyanov* <tz.stoyanov@gmail.com>
--
REPORTING BUGS
--------------
Report bugs to <linux-trace-devel@vger.kernel.org>
LICENSE
-------
libtracecmd is Free Software licensed under the GNU LGPL 2.1
RESOURCES
---------
https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/
COPYING
-------
Copyright \(C) 2020 VMware, Inc. Free use of this software is granted under
the terms of the GNU Public License (GPL).
================================================
FILE: Documentation/libtracecmd/libtracecmd.txt
================================================
libtracecmd(3)
=============
NAME
----
libtracecmd - trace-cmd library APIs
SYNOPSIS
--------
[verse]
--
*#include <trace-cmd.h>*
Open and close trace file:
struct tracecmd_input pass:[*]*tracecmd_open*(const char pass:[*]_file_, int _flags_);
struct tracecmd_input pass:[*]*tracecmd_open_fd*(int _fd_, int _flags_);
struct tracecmd_input pass:[*]*tracecmd_open_head*(const char pass:[*]_file_, int _flags_);
void *tracecmd_close*(struct tracecmd_input pass:[*]_handle_);
void *tracecmd_set_private*(struct tracecmd_input pass:[*]_handle_, void pass:[*]_data_);
void pass:[*]*tracecmd_get_private*(struct tracecmd_input pass:[*]_handle_);
Read tracing records from a trace file:
int *tracecmd_init_data*(struct tracecmd_input pass:[*]_handle_);
struct tep_record pass:[*]*tracecmd_read_cpu_first*(struct tracecmd_input pass:[*]_handle_, int _cpu_);
struct tep_record pass:[*]*tracecmd_read_data*(struct tracecmd_input pass:[*]_handle_, int _cpu_);
struct tep_record pass:[*]*tracecmd_read_at*(struct tracecmd_input pass:[*]_handle_, unsigned long long _offset_, int pass:[*]_cpu_);
void *tracecmd_free_record*(struct tep_record pass:[*]_record_);
struct tep_handle pass:[*]*tracecmd_get_tep*(struct tracecmd_input pass:[*]_handle_);
Iterating over events in a trace file:
int *tracecmd_iterate_events*(struct tracecmd_input pass:[*]_handle_,
cpu_set_t pass:[*]_cpus_, int _cpu_size_,
int (pass:[*]_callback_)(struct tracecmd_input pass:[*],
struct tep_record pass:[*],
int, void pass:[*]),
void pass:[*]_callback_data_);
int *tracecmd_iterate_events_multi*(struct tracecmd_input pass:[**]_handles_,
int _nr_handles_,
int (pass:[*]_callback_)(struct tracecmd_input pass:[*],
struct tep_record pass:[*],
int, void pass:[*]),
void pass:[*]_callback_data_);
int *tracecmd_iterate_events_reverse*(struct tracecmd_input pass:[*]_handle_,
cpu_set_t pass:[*]_cpus_, int _cpu_size_,
int (pass:[*]_callback_)(struct tracecmd_input pass:[*],
struct tep_record pass:[*],
int, void pass:[*]),
void pass:[*]_callback_data_, bool _cont_);
int *tracecmd_follow_event*(struct tracecmd_input pass:[*]_handle_,
const char pass:[*]_system_, const char pass:[*]_event_name_,
int (pass:[*]_callback_)(struct tracecmd_input pass:[*],
struct tep_event pass:[*],
struct tep_record pass:[*],
int, void pass:[*]),
void pass:[*]_callback_data_);
int *tracecmd_follow_missed_events*(struct tracecmd_input pass:[*]_handle_,
int (pass:[*]_callback_)(struct tracecmd_input pass:[*],
struct tep_event pass:[*],
struct tep_record pass:[*],
int, void pass:[*]),
void pass:[*]_callback_data_);
struct tracecmd_filter pass:[*]*tracecmd_filter_add*(struct tracecmd_input *_handle_,
const char pass:[*]_filter_str_, bool _neg_);
int *tracecmd_iterate_reset*(struct tracecmd_input pass:[*]_handle_);
Read tracing instances from a trace file:
int *tracecmd_buffer_instances*(struct tracecmd_input pass:[*]_handle_);
const char pass:[*]*tracecmd_buffer_instance_name*(struct tracecmd_input pass:[*]_handle_, int _indx_);
struct tracecmd_input pass:[*]*tracecmd_buffer_instance_handle*(struct tracecmd_input pass:[*]_handle_, int _indx_);
Handle time stamps from a trace file:
unsigned long long *tracecmd_get_first_ts*(struct tracecmd_input pass:[*]_handle_);
void *tracecmd_add_ts_offset*(struct tracecmd_input pass:[*]_handle_, long long _offset_);
int *tracecmd_get_tsc2nsec*(struct tracecmd_input pass:[*]_handle_, int pass:[*]_mult_, int pass[*]_shift_, unsigned long long pass:[*]_offset_);
Get traceing peer information from a trace file:
unsigned long long *tracecmd_get_traceid*(struct tracecmd_input pass:[*]_handle_);
int *tracecmd_get_guest_cpumap*(struct tracecmd_input pass:[*]_handle_, unsigned long long _trace_id_, const char pass:[*]pass:[*]_name_, int pass:[*]_vcpu_count_, const int pass:[*]pass:[*]_cpu_pid_);
Mapping host and guest trace files:
int *tracecmd_map_vcpus*(struct tracecmd_input pass:[**]handles, int nr_handles);
struct tracecmd_cpu_map pass:[*]*tracecmd_get_cpu_map*(struct tracecmd_input pass:[*]handle, int cpu);
struct tracecmd_cpu_map pass:[*]*tracecmd_map_find_by_host_pid*(struct tracecmd_input pass:[*]handle,
int host_pid);
int *tracecmd_map_get_host_pid*(struct tracecmd_cpu_map pass:[*]map);
struct tracecmd_input pass:[*]*tracecmd_map_get_guest*(struct tracecmd_cpu_map pass:[*]map);
void *tracecmd_map_set_private*(struct tracecmd_cpu_map pass:[*]map, void pass:[*]priv);
void pass:[*]*tracecmd_map_get_private*(struct tracecmd_cpu_map pass:[*]map);
Control library logs:
int *tracecmd_set_loglevel*(enum tep_loglevel _level_);
--
DESCRIPTION
-----------
The libtracecmd(3) library provides APIs to read, parse and write
_trace-cmd.dat(5)_ files, recorded with _trace-cmd(1)_ application and containing
tracing information from ftrace, the official Linux kernel tracer.
FILES
-----
[verse]
--
*trace-cmd.h*
Header file to include in order to have access to the library APIs.
*-ltracecmd*
Linker switch to add when building a program that uses the library.
--
SEE ALSO
--------
*libtraceevent(3)*
*libtracefs(3)*
*trace-cmd(1)*
*trace-cmd.dat(5)*
AUTHOR
------
[verse]
--
*Steven Rostedt* <rostedt@goodmis.org>
*Tzvetomir Stoyanov* <tz.stoyanov@gmail.com>
--
REPORTING BUGS
--------------
Report bugs to <linux-trace-devel@vger.kernel.org>
LICENSE
-------
libtracecmd is Free Software licensed under the GNU LGPL 2.1
RESOURCES
---------
https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/
COPYING
-------
Copyright \(C) 2020 VMware, Inc. Free use of this software is granted under
the terms of the GNU Public License (GPL).
================================================
FILE: Documentation/libtracecmd/meson.build
================================================
# SPDX-License-Identifier: LGPL-2.1
#
# Copyright (c) 2023 Daniel Wagner, SUSE LLC
# input text file: man page section
sources = {
'libtracecmd-files.txt': '3',
'libtracecmd-instances.txt': '3',
'libtracecmd-iterate.txt': '3',
'libtracecmd-log.txt': '3',
'libtracecmd-maps.txt': '3',
'libtracecmd-peer.txt': '3',
'libtracecmd-record.txt': '3',
'libtracecmd-timestamp.txt': '3',
'libtracecmd.txt': '3',
}
confdir = meson.current_source_dir() + '/../'
top_source_dir = meson.current_source_dir() + '/../../'
#
# For asciidoc ...
# -7.1.2, no extra settings are needed.
# 8.0-, set ASCIIDOC8.
#
#
# For docbook-xsl ...
# -1.68.1, set ASCIIDOC_NO_ROFF? (based on changelog from 1.73.0)
# 1.69.0, no extra settings are needed?
# 1.69.1-1.71.0, set DOCBOOK_SUPPRESS_SP?
# 1.71.1, no extra settings are needed?
# 1.72.0, set DOCBOOK_XSL_172.
# 1.73.0-, set ASCIIDOC_NO_ROFF
#
#
# If you had been using DOCBOOK_XSL_172 in an attempt to get rid
# of 'the ".ft C" problem' in your generated manpages, and you
# instead ended up with weird characters around callouts, try
# using ASCIIDOC_NO_ROFF instead (it works fine with ASCIIDOC8).
#
if get_option('asciidoctor')
asciidoc = find_program('asciidoctor')
asciidoc_extra = ['-a', 'compat-mode']
asciidoc_extra += ['-I.']
asciidoc_extra += ['-r', 'asciidoctor-extensions']
asciidoc_extra += ['-a', 'mansource=libtraceevent']
asciidoc_extra += ['-a', 'manmanual="libtraceevent Manual"']
asciidoc_html = 'xhtml5'
else
asciidoc = find_program('asciidoc')
asciidoc_extra = ['--unsafe']
asciidoc_extra += ['-f', confdir + 'asciidoc.conf']
asciidoc_html = 'xhtml11'
r = run_command(asciidoc, '--version', check: true)
v = r.stdout().strip()
if v.version_compare('>=8.0')
asciidoc_extra += ['-a', 'asciidoc7compatible']
endif
endif
manpage_xsl = confdir + 'manpage-normal.xsl'
if get_option('docbook-xls-172')
asciidoc_extra += ['-a', 'libtraceevent-asciidoc-no-roff']
manpage_xsl = confdir + 'manpage-1.72.xsl'
elif get_option('asciidoc-no-roff')
# docbook-xsl after 1.72 needs the regular XSL, but will not
# pass-thru raw roff codes from asciidoc.conf, so turn them off.
asciidoc_extra += ['-a', 'libtraceevent-asciidoc-no-roff']
endif
xmlto = find_program('xmlto')
xmlto_extra = []
if get_option('man-bold-literal')
xmlto_extra += ['-m ', confdir + 'manpage-bold-literal.xsl']
endif
if get_option('docbook-suppress-sp')
xmlto_extra += ['-m ', confdir + 'manpage-suppress-sp.xsl']
endif
check_doc = custom_target(
'check-doc',
output: 'dummy',
command : [
top_source_dir + 'check-manpages.sh',
meson.current_source_dir()])
gen = generator(
asciidoc,
output: '@BASENAME@.xml',
arguments: [
'-b', 'docbook',
'-d', 'manpage',
'-a', 'libtraceevent_version=' + meson.project_version(),
'-o', '@OUTPUT@']
+ asciidoc_extra
+ ['@INPUT@'])
man = []
html = []
foreach txt, section : sources
# build man page(s)
xml = gen.process(txt)
man += custom_target(
txt.underscorify() + '_man',
input: xml,
output: '@BASENAME@.' + section,
depends: check_doc,
command: [
xmlto,
'-m', manpage_xsl,
'man',
'-o', '@OUTPUT@']
+ xmlto_extra
+ ['@INPUT@'])
# build html pages
html += custom_target(
txt.underscorify() + '_html',
input: txt,
output: '@BASENAME@.html',
depends: check_doc,
command: [
asciidoc,
'-b', asciidoc_html,
'-d', 'manpage',
'-a', 'libtraceevent_version=' + meson.project_version(),
'-o', '@OUTPUT@']
+ asciidoc_extra
+ ['@INPUT@'])
endforeach
# Install path workaround because:
#
# - xmlto might generate more than one file and we would to tell meson
# about those output files. We could figure out which files are generated
# (see sed match in check-manpages.sh).
#
# - The man page generation puts all the generated files under sub dirs
# and it's not obvious how to tell Meson it should not do this without
# causing the install step to fail (confusion where the generated files
# are stored)
#
# - The documentation build is not part of the 'build' target. The user
# has explicitly to trigger the doc build. Hence the documentation is
# not added to the 'install' target.
#
# Thus just use a plain old shell script to move the generated files to the
# right location.
conf = configuration_data()
conf.set('SRCDIR', meson.current_build_dir())
conf.set('MANDIR', mandir)
conf.set('HTMLDIR', htmldir)
configure_file(
input: 'install-docs.sh.in',
output: 'install-docs.sh',
configuration: conf)
meson.add_install_script(
join_paths(meson.current_build_dir(), 'install-docs.sh'))
================================================
FILE: Documentation/manpage-1.72.xsl
================================================
<!-- manpage-1.72.xsl:
special settings for manpages rendered from asciidoc+docbook
handles peculiarities in docbook-xsl 1.72.0 -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:import href="manpage-base.xsl"/>
<!-- these are the special values for the roff control characters
needed for docbook-xsl 1.72.0 -->
<xsl:param name="git.docbook.backslash">▓</xsl:param>
<xsl:param name="git.docbook.dot" >⌂</xsl:param>
</xsl:stylesheet>
================================================
FILE: Documentation/manpage-base.xsl
================================================
<!-- manpage-base.xsl:
special formatting for manpages rendered from asciidoc+docbook -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- these params silence some output from xmlto -->
<xsl:param name="man.output.quietly" select="1"/>
<xsl:param name="refentry.meta.get.quietly" select="1"/>
<!-- convert asciidoc callouts to man page format;
git.docbook.backslash and git.docbook.dot params
must be supplied by another XSL file or other means -->
<xsl:template match="co">
<xsl:value-of select="concat(
$git.docbook.backslash,'fB(',
substring-after(@id,'-'),')',
$git.docbook.backslash,'fR')"/>
</xsl:template>
<xsl:template match="calloutlist">
<xsl:value-of select="$git.docbook.dot"/>
<xsl:text>sp </xsl:text>
<xsl:apply-templates/>
<xsl:text> </xsl:text>
</xsl:template>
<xsl:template match="callout">
<xsl:value-of select="concat(
$git.docbook.backslash,'fB',
substring-after(@arearefs,'-'),
'. ',$git.docbook.backslash,'fR')"/>
<xsl:apply-templates/>
<xsl:value-of select="$git.docbook.dot"/>
<xsl:text>br </xsl:text>
</xsl:template>
</xsl:stylesheet>
================================================
FILE: Documentation/manpage-bold-literal.xsl
================================================
<!-- manpage-bold-literal.xsl:
special formatting for manpages rendered from asciidoc+docbook -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- render literal text as bold (instead of plain or monospace);
this makes literal text easier to distinguish in manpages
viewed on a tty -->
<xsl:template match="literal">
<xsl:value-of select="$git.docbook.backslash"/>
<xsl:text>fB</xsl:text>
<xsl:apply-templates/>
<xsl:value-of select="$git.docbook.backslash"/>
<xsl:text>fR</xsl:text>
</xsl:template>
</xsl:stylesheet>
================================================
FILE: Documentation/manpage-normal.xsl
================================================
<!-- manpage-normal.xsl:
special settings for manpages rendered from asciidoc+docbook
handles anything we want to keep away from docbook-xsl 1.72.0 -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:import href="manpage-base.xsl"/>
<!-- these are the normal values for the roff control characters -->
<xsl:param name="git.docbook.backslash">\</xsl:param>
<xsl:param name="git.docbook.dot" >.</xsl:param>
</xsl:stylesheet>
================================================
FILE: Documentation/manpage-suppress-sp.xsl
================================================
<!-- manpage-suppress-sp.xsl:
special settings for manpages rendered from asciidoc+docbook
handles erroneous, inline .sp in manpage output of some
versions of docbook-xsl -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- attempt to work around spurious .sp at the tail of the line
that some versions of docbook stylesheets seem to add -->
<xsl:template match="simpara">
<xsl:variable name="content">
<xsl:apply-templates/>
</xsl:variable>
<xsl:value-of select="normalize-space($content)"/>
<xsl:if test="not(ancestor::authorblurb) and
not(ancestor::personblurb)">
<xsl:text> </xsl:text>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
================================================
FILE: Documentation/trace-cmd/Makefile
================================================
# SPDX-License-Identifier: GPL-2.0
# Include the utils
include $(src)/scripts/utils.mk
# This Makefile and manpage XSL files were taken from libtracefs
# and modified for libtracecmd
MAN1_TXT= \
$(wildcard trace-cmd*.1.txt)
MAN5_TXT= \
$(wildcard trace-cmd*.5.txt)
MAN_TXT = $(MAN1_TXT) $(MAN5_TXT)
_MAN_XML=$(patsubst %.txt,%.xml,$(MAN_TXT))
_MAN_HTML=$(patsubst %.txt,%.html,$(MAN_TXT))
_DOC_MAN1=$(patsubst %.1.txt,%.1,$(MAN1_TXT))
_DOC_MAN5=$(patsubst %.5.txt,%.5,$(MAN5_TXT))
MAN_XML=$(addprefix $(OUTPUT),$(_MAN_XML))
MAN_HTML=$(addprefix $(OUTPUT),$(_MAN_HTML))
DOC_MAN1=$(addprefix $(OUTPUT),$(_DOC_MAN1))
DOC_MAN5=$(addprefix $(OUTPUT),$(_DOC_MAN5))
# Make the path relative to DESTDIR, not prefix
ifndef DESTDIR
prefix?=$(HOME)
endif
bindir?=$(prefix)/bin
htmldir?=$(prefix)/share/doc/trace-cmd
pdfdir?=$(prefix)/share/doc/trace-cmd
mandir?=$(prefix)/share/man
man1dir=$(mandir)/man1
man5dir=$(mandir)/man5
ifdef USE_ASCIIDOCTOR
ASCIIDOC_EXTRA += -a mansource="libtracecmd" -a manmanual="libtracecmd Manual"
endif
all: check-man-tools html man
man: man1 man5
man1: $(DOC_MAN1)
man5: $(DOC_MAN5)
html: $(MAN_HTML)
$(MAN_HTML) $(DOC_MAN1) $(DOC_MAN5): $(ASCIIDOC_CONF)
install: check-man-tools install-man install-html
check-man-tools:
ifdef missing_tools
$(error "You need to install $(missing_tools) for man pages")
endif
install-%.1: $(OUTPUT)%.1
$(Q)$(call do_install_docs,$<,$(man1dir),644);
install-%.5: $(OUTPUT)%.5
$(Q)$(call do_install_docs,$<,$(man5dir),644);
do-install-man: man $(addprefix install-,$(wildcard $(OUTPUT)*.1)) \
$(addprefix install-,$(wildcard $(OUTPUT)*.5))
install-man: man
$(Q)$(MAKE) -C . do-install-man
install-%.txt: $(OUTPUT)%.html
$(Q)$(call do_install_docs,$<,$(htmldir),644);
do-install-html: html $(addprefix install-,$(wildcard *.txt))
install-html: html do-install-html
uninstall: uninstall-man uninstall-html
uninstall-man:
$(Q)$(RM) $(addprefix $(DESTDIR)$(man1dir)/,$(DOC_MAN1))
$(Q)$(RM) $(addprefix $(DESTDIR)$(man5dir)/,$(DOC_MAN5))
uninstall-html:
$(Q)$(RM) $(addprefix $(DESTDIR)$(htmldir)/,$(MAN_HTML))
ifdef missing_tools
DO_INSTALL_MAN = $(warning Please install $(missing_tools) to have the man pages installed)
else
DO_INSTALL_MAN = do-install-man
endif
CLEAN_FILES = \
$(MAN_XML) $(addsuffix +,$(MAN_XML)) \
$(MAN_HTML) $(addsuffix +,$(MAN_HTML)) \
$(DOC_MAN1) $(DOC_MAN5) *.1 *.5
clean:
$(Q) $(RM) $(CLEAN_FILES)
ifdef USE_ASCIIDOCTOR
$(OUTPUT)%.1 : $(OUTPUT)%.1.txt
$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
$(ASCIIDOC) -b manpage -d manpage \
$(ASCIIDOC_EXTRA) -atracecmd_version=$(TRACECMD_VERSION) -o $@+ $< && \
mv $@+ $@
$(OUTPUT)%.5 : $(OUTPUT)%.5.txt
$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
$(ASCIIDOC) -b manpage -d manpage \
$(ASCIIDOC_EXTRA) -atracecmd_version=$(TRACECMD_VERSION) -o $@+ $< && \
mv $@+ $@
endif
$(OUTPUT)%.1 : $(OUTPUT)%.1.xml
$(QUIET_XMLTO)$(RM) $@ && \
$(XMLTO) -o $(OUTPUT). -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $<; \
$(OUTPUT)%.5 : $(OUTPUT)%.5.xml
$(QUIET_XMLTO)$(RM) $@ && \
$(XMLTO) -o $(OUTPUT). -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $<; \
$(OUTPUT)%.xml : %.txt
$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
$(ASCIIDOC) -b docbook -d manpage \
$(ASCIIDOC_EXTRA) -atracecmd_version=$(TRACECMD_VERSION) -o $@+ $< && \
mv $@+ $@
$(MAN_HTML): $(OUTPUT)%.html : %.txt
$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
$(ASCIIDOC) -b $(ASCIIDOC_HTML) -d manpage \
$(ASCIIDOC_EXTRA) -atracecmd_version=$(TRACECMD_VERSION) -o $@+ $< && \
mv $@+ $@
================================================
FILE: Documentation/trace-cmd/install-docs.sh.in
================================================
#!/bin/bash
# SPDX-License-Identifier: LGPL-2.1
#
# Copyright (c) 2023 Daniel Wagner, SUSE LLC
for section in 1 3 5; do
while IFS= read -r -d '' man; do
[ ! -d "${DESTDIR}@MANDIR@/man${section}" ] && install -d "${DESTDIR}@MANDIR@/man${section}"
echo Installing "${man}" to "${DESTDIR}@MANDIR@/man${section}"
install -m 0644 "${man}" "${DESTDIR}@MANDIR@/man${section}/"
done< <(find "@SRCDIR@" -name "*\.${section}" -type f -print0)
done
while IFS= read -r -d '' html; do
[ ! -d "${DESTDIR}@HTMLDIR@" ] && install -d "${DESTDIR}@HTMLDIR@"
echo Installing "${html}" to "${DESTDIR}@HTMLDIR@"
install -m 0644 "${html}" "${DESTDIR}@HTMLDIR@"
done< <(find "@SRCDIR@" -name "*\.html" -type f -print0)
================================================
FILE: Documentation/trace-cmd/meson.build
================================================
# SPDX-License-Identifier: LGPL-2.1
#
# Copyright (c) 2023 Daniel Wagner, SUSE LLC
# input text file: man page section
sources = {
'trace-cmd.1.txt': '1',
'trace-cmd-agent.1.txt': '1',
'trace-cmd-check-events.1.txt': '1',
'trace-cmd-clear.1.txt': '1',
'trace-cmd-convert.1.txt': '1',
'trace-cmd.dat.v6.5.txt': '5',
'trace-cmd.dat.v7.5.txt': '5',
'trace-cmd-dump.1.txt': '1',
'trace-cmd-extract.1.txt': '1',
'trace-cmd-hist.1.txt': '1',
'trace-cmd-list.1.txt': '1',
'trace-cmd-listen.1.txt': '1',
'trace-cmd-mem.1.txt': '1',
'trace-cmd-options.1.txt': '1',
'trace-cmd-profile.1.txt': '1',
'trace-cmd-record.1.txt': '1',
'trace-cmd-report.1.txt': '1',
'trace-cmd-reset.1.txt': '1',
'trace-cmd-restore.1.txt': '1',
'trace-cmd-set.1.txt': '1',
'trace-cmd-show.1.txt': '1',
'trace-cmd-snapshot.1.txt': '1',
'trace-cmd-split.1.txt': '1',
'trace-cmd-stack.1.txt': '1',
'trace-cmd-start.1.txt': '1',
'trace-cmd-stat.1.txt': '1',
'trace-cmd-stop.1.txt': '1',
'trace-cmd-stream.1.txt': '1',
}
confdir = meson.current_source_dir() + '/../'
top_source_dir = meson.current_source_dir() + '/../../'
#
# For asciidoc ...
# -7.1.2, no extra settings are needed.
# 8.0-, set ASCIIDOC8.
#
#
# For docbook-xsl ...
# -1.68.1, set ASCIIDOC_NO_ROFF? (based on changelog from 1.73.0)
# 1.69.0, no extra settings are needed?
# 1.69.1-1.71.0, set DOCBOOK_SUPPRESS_SP?
# 1.71.1, no extra settings are needed?
# 1.72.0, set DOCBOOK_XSL_172.
# 1.73.0-, set ASCIIDOC_NO_ROFF
#
#
# If you had been using DOCBOOK_XSL_172 in an attempt to get rid
# of 'the ".ft C" problem' in your generated manpages, and you
# instead ended up with weird characters around callouts, try
# using ASCIIDOC_NO_ROFF instead (it works fine with ASCIIDOC8).
#
if get_option('asciidoctor')
asciidoc = find_program('asciidoctor')
asciidoc_extra = ['-a', 'compat-mode']
asciidoc_extra += ['-I.']
asciidoc_extra += ['-r', 'asciidoctor-extensions']
asciidoc_extra += ['-a', 'mansource=libtraceevent']
asciidoc_extra += ['-a', 'manmanual="libtraceevent Manual"']
asciidoc_html = 'xhtml5'
else
asciidoc = find_program('asciidoc')
asciidoc_extra = ['--unsafe']
asciidoc_extra += ['-f', confdir + 'asciidoc.conf']
asciidoc_html = 'xhtml11'
r = run_command(asciidoc, '--version', check: true)
v = r.stdout().strip()
if v.version_compare('>=8.0')
asciidoc_extra += ['-a', 'asciidoc7compatible']
endif
endif
manpage_xsl = confdir + 'manpage-normal.xsl'
if get_option('docbook-xls-172')
asciidoc_extra += ['-a', 'libtraceevent-asciidoc-no-roff']
manpage_xsl = confdir + 'manpage-1.72.xsl'
elif get_option('asciidoc-no-roff')
# docbook-xsl after 1.72 needs the regular XSL, but will not
# pass-thru raw roff codes from asciidoc.conf, so turn them off.
asciidoc_extra += ['-a', 'libtraceevent-asciidoc-no-roff']
endif
xmlto = find_program('xmlto')
xmlto_extra = []
if get_option('man-bold-literal')
xmlto_extra += ['-m ', confdir + 'manpage-bold-literal.xsl']
endif
if get_option('docbook-suppress-sp')
xmlto_extra += ['-m ', confdir + 'manpage-suppress-sp.xsl']
endif
gen = generator(
asciidoc,
output: '@BASENAME@.xml',
arguments: [
'-b', 'docbook',
'-d', 'manpage',
'-a', 'libtraceevent_version=' + meson.project_version(),
'-o', '@OUTPUT@']
+ asciidoc_extra
+ ['@INPUT@'])
man = []
html = []
foreach txt, section : sources
# build man page(s)
xml = gen.process(txt)
man += custom_target(
txt.underscorify() + '_man',
input: xml,
output: '@BASENAME@.' + section,
command: [
xmlto,
'-m', manpage_xsl,
'man',
'-o', '@OUTPUT@']
+ xmlto_extra
+ ['@INPUT@'])
# build html pages
html += custom_target(
txt.underscorify() + '_html',
input: txt,
output: '@BASENAME@.html',
command: [
asciidoc,
'-b', asciidoc_html,
'-d', 'manpage',
'-a', 'libtraceevent_version=' + meson.project_version(),
'-o', '@OUTPUT@']
+ asciidoc_extra
+ ['@INPUT@'])
endforeach
# Install path workaround because:
#
# - xmlto might generate more than one file and we would to tell meson
# about those output files. We could figure out which files are generated
# (see sed match in check-manpages.sh).
#
# - The man page generation puts all the generated files under sub dirs
# and it's not obvious how to tell Meson it should not do this without
# causing the install step to fail (confusion where the generated files
# are stored)
#
# - The documentation build is not part of the 'build' target. The user
# has explicitly to trigger the doc build. Hence the documentation is
# not added to the 'install' target.
#
# Thus just use a plain old shell script to move the generated files to the
# right location.
conf = configuration_data()
conf.set('SRCDIR', meson.current_build_dir())
conf.set('MANDIR', mandir)
conf.set('HTMLDIR', htmldir)
configure_file(
input: 'install-docs.sh.in',
output: 'install-docs.sh',
configuration: conf)
meson.add_install_script(
join_paths(meson.current_build_dir(), 'install-docs.sh'))
================================================
FILE: Documentation/trace-cmd/trace-cmd-agent.1.txt
================================================
TRACE-CMD-AGENT(1)
==================
NAME
----
trace-cmd-agent - Run as an agent on a machine (to be controlled by another machine)
SYNOPSIS
--------
*trace-cmd agent* ['OPTIONS']
DESCRIPTION
-----------
The trace-cmd(1) agent listens over a vsocket (for virtual machines) or a TCP port
for connections to control the tracing of the machine. The agent will then start
tracing on the local machine and pass the data to the controlling connection.
OPTIONS
-------
*-N* 'client'::
Listen over TCP instead of a vsocket. Must pass in a client host name or IP address
to allow connection to. It will only connect to the specified client. Note, any process
on that client can control the agent.
*This is a very insecure setting. Only use on a trusted network*
*Only use if the client machine is totally trusted*
*-p* 'port'::
This option will specify the port to listen to.
*-D*::
This options causes trace-cmd agent to go into a daemon mode and run in
the background.
*-P* 'cid'::
Allow an agent to also act as a proxy server, where it can be run on a host
and connect with a guest. 'cid' is the context ID (see *vsock*(7)) of the
client (e.g., guest VM) it will allow to connect.
*--verbose*[='level']::
Set the log level. Supported log levels are "none", "critical", "error", "warning",
"info", "debug", "all" or their identifiers "0", "1", "2", "3", "4", "5", "6". Setting the log
level to specific value enables all logs from that and all previous levels.
The level will default to "info" if one is not specified.
Example: enable all critical, error and warning logs
trace-cmd listen --verbose=warning
SEE ALSO
--------
trace-cmd(1), trace-cmd-record(1), trace-cmd-report(1), trace-cmd-start(1),
trace-cmd-stop(1), trace-cmd-extract(1), trace-cmd-reset(1),
trace-cmd-split(1), trace-cmd-list(1)
AUTHOR
------
Written by Steven Rostedt, <rostedt@goodmis.org>
RESOURCES
---------
https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/
COPYING
-------
Copyright \(C) 2010 Red Hat, Inc. Free use of this software is granted under
the terms of the GNU Public License (GPL).
================================================
FILE: Documentation/trace-cmd/trace-cmd-attach.1.txt
================================================
TRACE-CMD-ATTACH(1)
===================
NAME
----
trace-cmd-attach - attach a guest trace.dat file to a host trace.dat file
SYNOPSIS
--------
*trace-cmd attach* ['OPTIONS'] host-trace-file guest-trace-file guest-pid [guest-pid ...]
DESCRIPTION
-----------
The trace-cmd(1) attach is used to take a trace.dat file created on a guest and
attach it to a trace.dat file that was created on the host. In most cases,
trace-cmd-agent(1) can be used to automate this, but if for some reason, the
agent isn't appropriate, it may be required to start trace-cmd recording on
the guest with trace-cmd-record(1). If the host recording is activated at the
same time, one can use trace-cmd attach(1) to connect the guest and host files
as if they were created by the trace-cmd agent.
*host-trace-file*::
The trace.dat file created by the host. Must have kvm_exit and kvm_entry
events, and use the "tsc2nsec" clock.
*guest-trace-file*::
The trace.dat file created by the guest. Must use the "x86-tsc" clock.
For now, this is only supported on x86, it may support other achitectures
later.
*guest-pid*::
The process ID of the host thread that represents the guests threads.
Each process ID that represents all of the guest vCPUs should be listed.
Note, you can add more than just the threads that represent the guest
vCPUs, as the tool will search the *host-trace-file* for kvm_exit and
kvm_entry events to match these PIDs with the vCPUs that they represent.
OPTIONS
-------
*-c* 'cpus'::
Specify a the number of CPUS the guest has.
*-s* 'timeshift'::
A comma separated list of the format _offset_,_scale_,_frac_,_timestamp_
These values map to what are given in /sys/kernel/kvm/<pid>/vcpu/*
*offset*: Is the offset of the guest. "tsc-offest" in the directory. Note
that the value listed here is the negative of what is listed in
the directory.
*scale*: The scaling factor. "tsc-scaling-ratio"
*frac*: The fraction bits. "tsc-scaling-ratio-frac-bits"
*timestamp*: The timestamp to start using the above. In some cases, the
values may change over time. By adding a timestamp, it will
take effect after the timestamp has been hit. Normally
this would be zero.
Currently, only one timeshift is given per CPU. One *-s* option should be
given for each CPU. If there are less options than CPUs, then the last option
given will be used for the rest of the CPUs. If only one option is given, then
the values for that option will be used for all CPUs.
EXAMPLES
--------
Enable all events for tracing:
[source,shell]
----
$ # find the process for a given guest
$ ps aux |grep qemu
libvirt+ 63170 5.6 1.6 13994848 4257540 ? Sl May02 2884:49 /usr/bin/qemu-system-x86_64...
$ # Use 63170 to find all the PIDs for the give guest
$ ls /proc/63170/task
1541591 63170 63198 63209 63211 63213 63214 63215 63216 63217 63218 63219 63234
$ # Find the tsc offset
$ su
# cat /sys/kernel/debug/kvm/63170-15/vcpu0/tsc-offset
-27950965013436847
# trace-cmd record -C tsc2nsec -e kvm -e sched -e irq -e timer
# on guest:
# trace-cmd record -C x86-tsc -e sched -e irq -e timer sleep 10
# back on host, hit Ctrl^C to stop tracing after the guest is done
# # Make the trace.dat user owned by your user account.
# chown user.user trace.dat
# exit
$ scp root@guest:trace.dat trace-guest.dat
$ # now attach the two files (guest has 8 CPUs)
$ trace-cmd attach -c 8 -s 27950965013436847 trace.dat trace-guest.dat 1541591 63170 63198 63209 63211 63213 63214 63215 63216 63217 63218 63219 63234
$ trace-cmd report -i trace.dat -i trace-guest.dat
$ # now you should see the guest trace interleaved within the host trace.
----
SEE ALSO
--------
trace-cmd(1), trace-cmd-report(1), trace-cmd-start(1), trace-cmd-stop(1),
trace-cmd-extract(1), trace-cmd-reset(1), trace-cmd-split(1),
trace-cmd-list(1), trace-cmd-listen(1), trace-cmd-profile(1)
AUTHOR
------
Written by Steven Rostedt (Google) <rostedt@goodmis.org>
RESOURCES
---------
https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/
COPYING
-------
Copyright \(C) 2010 Red Hat, Inc. Free use of this software is granted under
the terms of the GNU Public License (GPL).
================================================
FILE: Documentation/trace-cmd/trace-cmd-check-events.1.txt
================================================
TRACE-CMD-CHECK_EVENTS(1)
=========================
NAME
----
trace-cmd-check-events - parse the event formats on local system
SYNOPSIS
--------
*trace-cmd check-events* ['OPTIONS']
DESCRIPTION
-----------
The trace-cmd(1) check-events parses format strings for all the events on the
local system. It returns whether all the format strings can be parsed
correctly. It will load plugins unless specified otherwise.
This is useful to check for any trace event format strings which may contain
some internal kernel function references which cannot be decoded outside of
the kernel. This may mean that either the unparsed format strings of the trace
events need to be changed or that a plugin needs to be created to parse them.
OPTIONS
-------
*-N* - Don't load plugins
*--verbose*[='level']::
Set the log level. Supported log levels are "none", "critical", "error", "warning",
"info", "debug", "all" or their identifiers "0", "1", "2", "3", "4", "5", "6". Setting the log
level to specific value enables all logs from that and all previous levels.
The level will default to "info" if one is not specified.
Example: enable all critical, error and warning logs
trace-cmd check-events --verbose=warning
SEE ALSO
--------
trace-cmd(1), trace-cmd-record(1), trace-cmd-report(1), trace-cmd-stop(1),
trace-cmd-extract(1), trace-cmd-reset(1), trace-cmd-split(1),
trace-cmd-list(1), trace-cmd-listen(1), trace-cmd-start(1)
AUTHOR
------
Written by Vaibhav Nagarnaik, <vnagarnaik@google.com>
RESOURCES
---------
https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/
COPYING
-------
Copyright \(C) 2011 Google, Inc. Free use of this software is granted under
the terms of the GNU Public License (GPL).
================================================
FILE: Documentation/trace-cmd/trace-cmd-clear.1.txt
================================================
TRACE-CMD-CLEAR(1)
=================
NAME
----
trace-cmd-clear - clear the Ftrace buffer.
SYNOPSIS
--------
*trace-cmd clear* ['OPTIONS']
DESCRIPTION
-----------
The *trace-cmd(1) clear* clears the content of the Ftrace ring buffer.
OPTIONS
-------
*-B* 'buffer-name'::
If the kernel supports multiple buffers, this will clear only the given
buffer. It does not affect any other buffers. This may be used multiple
times to specify different buffers. The top level buffer will not be
clearded if this option is given.
*-a*::
Clear all existing buffers, including the top level one.
SEE ALSO
--------
trace-cmd(1), trace-cmd-record(1), trace-cmd-report(1), trace-cmd-start(1),
trace-cmd-extract(1), trace-cmd-reset(1), trace-cmd-split(1),
trace-cmd-list(1), trace-cmd-listen(1)
AUTHOR
------
[verse]
--
*Steven Rostedt* <rostedt@goodmis.org>, author of *trace-cmd*.
*Tzvetomir Stoyanov* <tz.stoyanov@gmail.com>, author of this man page.
--
REPORTING BUGS
--------------
Report bugs to <linux-trace-devel@vger.kernel.org>
LICENSE
-------
trace-cmd is Free Software licensed under the terms of the
GNU Public License (GPL).
RESOURCES
---------
https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/
================================================
FILE: Documentation/trace-cmd/trace-cmd-convert.1.txt
================================================
TRACE-CMD-CONVERT(1)
===================
NAME
----
trace-cmd-convert - convert trace files
SYNOPSIS
--------
*trace-cmd convert* ['OPTIONS'] ['output-file']
DESCRIPTION
-----------
The trace-cmd(1) convert command converts trace file. It reads the input file and copies the data
into an output file. The output file may be in different format, depending on the command line
arguments. The default output is in version 7 and compressed (if
compiled with compression support).
OPTIONS
-------
*-i* 'input-file'::
By default, trace-cmd convert will read the file 'trace.dat'. But the *-i*
option open up the given 'input-file' instead.
*-o* 'out-file'::
The name of the output file, this parameter is mandatory. Note, the output file may also be
specified as the last item on the command line.
*--file-version*::
Desired version of the output file. Supported versions are 6 or 7.
*--compression*::
Compression of the trace output file, one of these strings can be passed:
'any' - auto select the best available compression algorithm
'none' - do not compress the trace file
'name' - the name of the desired compression algorithms. Available algorithms can be listed with
trace-cmd list -c
*--help*::
Print usage information.
EXAMPLES
--------
# trace-cmd convert --compression any trace_compress.dat
SEE ALSO
--------
trace-cmd(1), trace-cmd.dat(1)
AUTHOR
------
*Steven Rostedt* <rostedt@goodmis.org>, author of *trace-cmd*.
*Tzvetomir Stoyanov* <tz.stoyanov@gmail.com>, author of this man page.
RESOURCES
---------
https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/
COPYING
-------
Copyright \(C) 2021 VMware. Free use of this software is granted under
the terms of the GNU Public License (GPL).
================================================
FILE: Documentation/trace-cmd/trace-cmd-dump.1.txt
================================================
TRACE-CMD-DUMP(1)
===================
NAME
----
trace-cmd-dump - show a meta data from a trace file, created by trace-cmd record
SYNOPSIS
--------
*trace-cmd dump* ['OPTIONS'] ['input-file']
DESCRIPTION
-----------
The trace-cmd(1) dump command will display the meta data from a trace file
created by trace-cmd record.
OPTIONS
-------
*-i* 'input-file'::
By default, trace-cmd dump will read the file 'trace.dat'. But the *-i*
option open up the given 'input-file' instead. Note, the input file may
also be specified as the last item on the command line.
*-v*, *--validate*::
Check if the input file is a valid trace file, created by trace-cmd.
*--summary*::
Print a meta data summary - initial format and a short description of each
file section. This is the default action, if no arguments are specified.
*--head-page*::
Print the header page information, stored in the file.
*--head-event*::
Print the event header information, stored in the file.
*--ftrace-events*::
Print formats of ftrace specific events.
*--systems*::
Print information of event systems, stored in the file - name and number of
events for each system.
*--events*::
Print formats of all events, stored in the file.
*--kallsyms*::
Print information of the mapping of function addresses to the function names.
*--printk*::
Print trace_printk() format strings, stored in the file.
*--cmd-lines*::
Print mapping a PID to a process name.
*--options*::
Print all options, stored in the file.
*--flyrecord*::
Print the offset and the size of tracing data per each CPU.
*--clock*::
Print the trace clock, used for timestamp of the tracing events, stored in the file.
*--all*::
Print all meta data from the file.
*--help*::
Print usage information.
*--verbose*[='level']::
Set the log level. Supported log levels are "none", "critical", "error", "warning",
"info", "debug", "all" or their identifiers "0", "1", "2", "3", "4", "5", "6". Setting the log
level to specific value enables all logs from that and all previous levels.
The level will default to "info" if one is not specified.
Example: enable all critical, error and warning logs
trace-cmd report --verbose=warning
EXAMPLES
--------
[source,shell]
----
# trace-cmd dump --summary -i trace.dat
Tracing meta data in file trace.dat:
[Initial format]
6 [Version]
0 [Little endian]
8 [Bytes in a long]
4096 [Page size, bytes]
[Header info, 205 bytes]
[Header event, 205 bytes]
[Ftrace format, 15 events]
[Events format, 2 systems]
[Kallsyms, 7144493 bytes]
[Trace printk, 2131 bytes]
[Saved command lines, 117 bytes]
8 [CPUs with tracing data]
[12 options]
[Flyrecord tracing data]
----
[source,shell]
----
# trace-cmd dump --flyrecord -i trace.dat
[Flyrecord tracing data]
7176192 0 [offset, size of cpu 0]
7176192 0 [offset, size of cpu 1]
7176192 0 [offset, size of cpu 2]
7176192 4096 [offset, size of cpu 3]
7180288 4096 [offset, size of cpu 4]
7184384 0 [offset, size of cpu 5]
7184384 0 [offset, size of cpu 6]
7184384 0 [offset, size of cpu 7]
----
[source,shell]
----
# trace-cmd dump --summary --systems -i trace.dat
Tracing meta data in file trace.dat:
[Initial format]
6 [Version]
0 [Little endian]
8 [Bytes in a long]
4096 [Page size, bytes]
[Header info, 205 bytes]
[Header event, 205 bytes]
[Ftrace format, 15 events]
[Events format, 3 systems]
sched 23 [system, events]
irq 5 [system, events]
kvm 70 [system, events]
[Kallsyms, 7144493 bytes]
[Trace printk, 2131 bytes]
[Saved command lines, 157 bytes]
8 [CPUs with tracing data]
[11 options]
[Flyrecord tracing data]
----
[source,shell]
----
# trace-cmd dump --summary --systems -i trace.dat
File trace.dat is a valid trace-cmd file
----
SEE ALSO
--------
trace-cmd(1), trace-cmd.dat(1)
AUTHOR
------
*Steven Rostedt* <rostedt@goodmis.org>, author of *trace-cmd*.
*Tzvetomir Stoyanov* <tz.stoyanov@gmail.com>, author of this man page.
RESOURCES
---------
https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/
COPYING
-------
Copyright \(C) 2010 Red Hat, Inc. Free use of this software is granted under
the terms of the GNU Public License (GPL).
================================================
FILE: Documentation/trace-cmd/trace-cmd-extract.1.txt
================================================
TRACE-CMD-EXTRACT(1)
====================
NAME
----
trace-cmd-extract - extract out the data from the Ftrace Linux tracer.
SYNOPSIS
--------
*trace-cmd extract ['OPTIONS']*
DESCRIPTION
-----------
The trace-cmd(1) extract is usually used after 'trace-cmd-start(1)' and
'trace-cmd-stop(1)'. It can be used after the Ftrace tracer has been started
manually through the Ftrace pseudo file system.
The extract command creates a trace.dat file that can be used by
'trace-cmd-report(1)' to read from. It reads the kernel internal ring buffer
to produce the trace.dat file.
OPTIONS
-------
*-p* 'plugin'::
Although *extract* does not start any traces, some of the plugins require
just reading the output in ASCII format. These are the latency tracers,
since the latency tracers have a separate internal buffer. The plugin
option is therefore only necessary for the 'wakeup', 'wakeup-rt',
'irqsoff', 'preemptoff' and 'preemptirqsoff' plugins.
With out this option, the extract command will extract from the internal
Ftrace buffers.
*-O* 'option'::
If a latency tracer is being extracted, and the *-p* option is used, then
there are some Ftrace options that can change the format. This will update
those options before extracting. To see the list of options see
'trace-cmd-list'. To enable an option, write its name, to disable the
option append the characters 'no' to it. For example: 'noprint-parent'
will disable the 'print-parent' option that prints the parent function in
printing a function event.
*-o* 'outputfile'::
By default, the extract command will create a 'trace.dat' file. This
option will change where the file is written to.
*-s*::
Extract from the snapshot buffer (if the kernel supports it).
*--date*::
This is the same as the trace-cmd-record(1) --date option, but it
does cause the extract routine to disable all tracing. That is,
the end of the extract will perform something similar to trace-cmd-reset(1).
*-B* 'buffer-name'::
If the kernel supports multiple buffers, this will extract the trace for
only the given buffer. It does not affect any other buffer. This may be
used multiple times to specify different buffers. When this option is
used, the top level instance will not be extracted unless *-t* is given.
*-a*::
Extract all existing buffer instances. When this option is used, the
top level instance will not be extracted unless *-t* is given.
*-t*::
Extracts the top level instance buffer. Without the *-B* or *-a* option
this is the same as the default. But if *-B* or *-a* is used, this is
required if the top level instance buffer should also be extracted.
*--verbose*[='level']::
Set the log level. Supported log levels are "none", "critical", "error", "warning",
"info", "debug", "all" or their identifiers "0", "1", "2", "3", "4", "5", "6". Setting the log
level to specific value enables all logs from that and all previous levels.
The level will default to "info" if one is not specified.
Example: enable all critical, error and warning logs
trace-cmd extract --verbose=warning
SEE ALSO
--------
trace-cmd(1), trace-cmd-record(1), trace-cmd-report(1), trace-cmd-start(1),
trace-cmd-stop(1), trace-cmd-reset(1), trace-cmd-split(1),
trace-cmd-list(1), trace-cmd-listen(1)
AUTHOR
------
Written by Steven Rostedt, <rostedt@goodmis.org>
RESOURCES
---------
https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/
COPYING
-------
Copyright \(C) 2010 Red Hat, Inc. Free use of this software is granted under
the terms of the GNU Public License (GPL).
================================================
FILE: Documentation/trace-cmd/trace-cmd-hist.1.txt
================================================
TRACE-CMD-HIST(1)
=================
NAME
----
trace-cmd-hist - show histogram of events in trace.dat file
SYNOPSIS
--------
*trace-cmd hist* ['OPTIONS']['input-file']
DESCRIPTION
-----------
The trace-cmd(1) hist displays a histogram form from the trace.dat file.
Instead of showing the events as they were ordered, it creates a histogram
that can be displayed per task or for all tasks where the most common
events appear first. It uses the function tracer and call stacks that it
finds to try to put together a call graph of the events.
OPTIONS
-------
*-i* 'input-file'::
By default, trace-cmd hist will read the file 'trace.dat'. But the *-i*
option open up the given 'input-file' instead. Note, the input file may
also be specified as the last item on the command line.
*-P*::
To compact all events and show the call graphs by ignoring tasks
and different PIDs, add the *-P* to do so. Instead of showing the
task name, it will group all chains together and show "<all pids>".
SEE ALSO
--------
trace-cmd(1), trace-cmd-record(1), trace-cmd-report(1), trace-cmd-start(1),
trace-cmd-stop(1), trace-cmd-extract(1), trace-cmd-reset(1),
trace-cmd-split(1), trace-cmd-listen(1)
AUTHOR
------
Written by Steven Rostedt, <rostedt@goodmis.org>
RESOURCES
---------
https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/
COPYING
-------
Copyright \(C) 2010 Red Hat, Inc. Free use of this software is granted under
the terms of the GNU Public License (GPL).
================================================
FILE: Documentation/trace-cmd/trace-cmd-list.1.txt
================================================
TRACE-CMD-LIST(1)
=================
NAME
----
trace-cmd-list - list available plugins, events or options for Ftrace.
SYNOPSIS
--------
*trace-cmd list* ['OPTIONS']
DESCRIPTION
-----------
The trace-cmd(1) list displays the available plugins, events or Ftrace options
that are configured on the current machine. If no option is given, then it
lists all plugins, event systems, events and Ftrace options to standard output.
OPTIONS
-------
*-e* ['regex']::
This option will list the available events that are enabled on the
local system.
It takes an optional argument that uses 'regcomp(3)' expressions to seach.
trace-cmd list -e '^sys.*'
*-F*::
Used with *-e* 'regex' to show the fields of the event.
*--full*::
Used with *-F* which will show the "print fmt" of the event along with the fields.
*-l*::
Used with *-e* 'regex' to show those events filters.
*-R*::
Used with *-e* 'regex' to show those events triggers.
*-s*::
This option will list the available event systems.
*-t*::
This option will list the available tracers that are enabled on the
local system.
*-p*::
Same as *-t* and only for legacy purposes.
*-o*::
This option will list the available Ftrace options that are configured on
the local system.
*-f* ['regex']::
This option will list the available filter functions. These are the list of
functions on the system that you can trace, or filter on.
It takes an optional argument that uses 'regcomp(3)' expressions to seach.
trace-cmd list -f '^sched.*'
If *--proto* is also added to the command line, the functions will also have
show their prototypes if BTF is available.
*--proto*::
If BTF is available on the running kernel, it will also show the function
parameters with *-f*.
*-P*::
List the plugin files that get loaded on trace-cmd report.
*-O*::
List plugin options that can be used by trace-cmd report *-O* option.
*-B*::
List defined buffer instances (sub buffers).
*-C*::
List defined clocks that can be used with trace-cmd record -C.
The one in brackets ([]) is the active clock.
*-c*::
List the available trace file compression algorithms.
SEE ALSO
--------
trace-cmd(1), trace-cmd-record(1), trace-cmd-report(1), trace-cmd-start(1),
trace-cmd-stop(1), trace-cmd-extract(1), trace-cmd-reset(1),
trace-cmd-split(1), trace-cmd-listen(1)
AUTHOR
------
Written by Steven Rostedt, <rostedt@goodmis.org>
RESOURCES
---------
https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/
COPYING
-------
Copyright \(C) 2010 Red Hat, Inc. Free use of this software is granted under
the terms of the GNU Public License (GPL).
================================================
FILE: Documentation/trace-cmd/trace-cmd-listen.1.txt
================================================
TRACE-CMD-LISTEN(1)
===================
NAME
----
trace-cmd-listen - listen for incoming connection to record tracing.
SYNOPSIS
--------
*trace-cmd listen* -p 'port' ['OPTIONS']
DESCRIPTION
-----------
The trace-cmd(1) listen sets up a port to listen to waiting for connections
from other hosts that run 'trace-cmd-record(1)' with the *-N* option. When a
connection is made, and the remote host sends data, it will create a file
called 'trace.HOST:PORT.dat'. Where HOST is the name of the remote host, and
PORT is the port that the remote host used to connect with.
OPTIONS
-------
*-p* 'port'::
This option will specify the port to listen to.
*-D*::
This options causes trace-cmd listen to go into a daemon mode and run in
the background.
*-V*::
Listen on a vsocket instead. This is useful for tracing between host and
guest VMs.
*-d* 'dir'::
This option specifies a directory to write the data files into.
*-o* 'filename'::
This option overrides the default 'trace' in the 'trace.HOST:PORT.dat' that
is created when a remote host connects.
*-l* 'filename'::
This option writes the output messages to a log file instead of standard output.
*--verbose*[='level']::
Set the log level. Supported log levels are "none", "critical", "error", "warning",
"info", "debug", "all" or their identifiers "0", "1", "2", "3", "4", "5", "6". Setting the log
level to specific value enables all logs from that and all previous levels.
The level will default to "info" if one is not specified.
Example: enable all critical, error and warning logs
trace-cmd listen --verbose=warning
SEE ALSO
--------
trace-cmd(1), trace-cmd-record(1), trace-cmd-report(1), trace-cmd-start(1),
trace-cmd-stop(1), trace-cmd-extract(1), trace-cmd-reset(1),
trace-cmd-split(1), trace-cmd-list(1)
AUTHOR
------
Written by Steven Rostedt, <rostedt@goodmis.org>
RESOURCES
---------
https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/
COPYING
-------
Copyright \(C) 2010 Red Hat, Inc. Free use of this software is granted under
the terms of the GNU Public License (GPL).
================================================
FILE: Documentation/trace-cmd/trace-cmd-mem.1.txt
================================================
TRACE-CMD-MEM(1)
================
NAME
----
trace-cmd-mem - show memory usage of certain kmem events
SYNOPSIS
--------
*trace-cmd mem* ['OPTIONS']['input-file']
DESCRIPTION
-----------
The trace-cmd(1) mem requires a trace-cmd record that enabled the following
events:
kmalloc
kmalloc_node
kfree
kmem_cache_alloc
kmem_cache_alloc_node
kmem_cache_alloc_free
It then reads the amount requested and the ammount freed as well as the
functions that called the allocation. It then reports the final amount
of bytes requested and allocated, along with the total amount allocated
and requested, as well as the max allocation and requested during the run.
It reports the amount of wasted bytes (allocated - requested) that was
not freed, as well as the max wasted amount during the run. The list is
sorted by descending order of wasted bytes after the run.
Function Waste Alloc req TotAlloc TotReq MaxAlloc MaxReq MaxWaste
-------- ----- ----- --- -------- ------ -------- ------ --------
rb_allocate_cpu_buffer 768 2304 1536 2304 1536 2304 1536 768
alloc_pipe_info 400 1152 752 1152 752 1152 752 400
instance_mkdir 252 544 292 544 292 544 292 252
__d_alloc 215 1086560 1086345 1087208 1086993 1086560 1086345 215
get_empty_filp 72 2304 2232 4864 4712 4864 4712 152
mm_alloc 40 960 920 960 920 960 920 40
prepare_creds 32 192 160 1728 1440 1728 1440 288
tracing_buffers_open 8 32 24 32 24 32 24 8
do_brk 0 0 0 368 368 368 368 0
journal_add_journal_head 0 6048 6048 6048 6048 6048 6048 0
journal_start 0 0 0 1224 1224 48 48 0
__rb_allocate_pages 0 3289856 3289856 3289856 3289856 3289856 3289856 0
anon_vma_alloc 0 0 0 936 936 864 864 0
[...]
OPTIONS
-------
*-i* 'input-file'::
By default, trace-cmd hist will read the file 'trace.dat'. But the *-i*
option open up the given 'input-file' instead. Note, the input file may
also be specified as the last item on the command line.
SEE ALSO
--------
trace-cmd(1), trace-cmd-record(1), trace-cmd-report(1), trace-cmd-start(1),
trace-cmd-stop(1), trace-cmd-extract(1), trace-cmd-reset(1), trace-cmd-hist(1),
trace-cmd-split(1), trace-cmd-listen(1)
AUTHOR
------
Written by Steven Rostedt, <rostedt@goodmis.org>
RESOURCES
---------
https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/
COPYING
-------
Copyright \(C) 2013 Red Hat, Inc. Free use of this software is granted under
the terms of the GNU Public License (GPL).
================================================
FILE: Documentation/trace-cmd/trace-cmd-options.1.txt
================================================
TRACE-CMD-OPTIONS(1)
====================
NAME
----
trace-cmd-options - list available options from trace-cmd plugins
SYNOPSIS
--------
*trace-cmd options*
DESCRIPTION
-----------
The trace-cmd(1) options command will examine all the trace-cmd plugins
that are used by *trace-cmd report(1)* and list them.
SEE ALSO
--------
trace-cmd(1), trace-cmd-record(1), trace-cmd-start(1), trace-cmd-stop(1),
trace-cmd-extract(1), trace-cmd-reset(1), trace-cmd-split(1),
trace-cmd-list(1), trace-cmd-listen(1)
AUTHOR
------
Written by Steven Rostedt, <rostedt@goodmis.org>
RESOURCES
---------
https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/
COPYING
-------
Copyright \(C) 2011 Red Hat, Inc. Free use of this software is granted under
the terms of the GNU Public License (GPL).
================================================
FILE: Documentation/trace-cmd/trace-cmd-profile.1.txt
================================================
TRACE-CMD-PROFILE(1)
====================
NAME
----
trace-cmd-profile - profile tasks running live
SYNOPSIS
--------
*trace-cmd profile ['OPTIONS']* ['command']
DESCRIPTION
-----------
The trace-cmd(1) profile will start tracing just like trace-cmd-record(1),
with the *--profile* option, except that it does not write to a file,
but instead, it will read the events as they happen and will update the accounting
of the events. When the trace is finished, it will report the results just like
trace-cmd-report(1) would do with its *--profile* option. In other words,
the profile command does the work of trace-cmd record --profile, and trace-cmd
report --profile without having to record the data to disk, in between.
The advantage of using the profile command is that the profiling can be done
over a long period of time where recording all events would take up too much
disk space.
This will enable several events as well as the function graph tracer
with a depth of one (if the kernel supports it). This is to show where
tasks enter and exit the kernel and how long they were in the kernel.
To disable calling function graph, use the *-p* option to enable another
tracer. To not enable any tracer, use *-p nop*.
All timings are currently in nanoseconds.
OPTIONS
-------
These are the same as trace-cmd-record(1) with the *--profile* option.
*-p* 'tracer'::
Set a tracer plugin to run instead of function graph tracing set to
depth of 1. To not run any tracer, use *-p nop*.
*-S*::
Only enable the tracer or events speficied on the command line.
With this option, the function_graph tracer is not enabled, nor are
any events (like sched_switch), unless they are specifically specified
on the command line (i.e. -p function -e sched_switch -e sched_wakeup)
*-G*::
Set interrupt (soft and hard) events as global (associated to CPU
instead of tasks).
*-o* 'file'::
Write the output of the profile to 'file'. This supersedes *--stderr*
*-H* 'event-hooks'::
Add custom event matching to connect any two events together. Format is:
[<start_system>:]<start_event>,<start_match>[,<start_pid>]/
[<end_system>:]<end_event>,<end_match>[,<flags>]
The start_system:start_event (start_system is optional), is the event that
starts the timing.
start_match is the field in the start event that is to match with the
end_match in the end event.
start_pid is optional, as matches are attached to the tasks that run
the events, if another field should be used to find that task, then
it is specified with start_pid.
end_system:end_event is the event that ends the timing (end_system is
optional).
end_match is the field in end_match that wil match the start event field
start_match.
flags are optional and can be the following (case insensitive):
p : The two events are pinned to the same CPU (start and end happen
on the same CPU always).
s : The event should have a stack traced with it (enable stack tracing
for the start event).
g : The event is global (not associated to a task). start_pid is
not applicable with this flag.
*--stderr*::
Redirect the output to stderr. The output of the command being executed
is not changed. This allows watching the command execute and saving the
output of the profile to another file.
*--verbose*[='level']::
Set the log level. Supported log levels are "none", "critical", "error", "warning",
"info", "debug", "all" or their identifiers "0", "1", "2", "3", "4", "5", "6". Setting the log
level to specific value enables all logs from that and all previous levels.
The level will default to "info" if one is not specified.
Example: enable all critical, error and warning logs
trace-cmd profile --verbose=warning
EXAMPLES
--------
---
# trace-cmd profile -F sleep 1
[..]
task: sleep-1121
Event: sched_switch:R (2) Total: 234559 Avg: 117279 Max: 129886 Min:104673
|
+ ftrace_raw_event_sched_switch (0xffffffff8109f310)
100% (2) time:234559 max:129886 min:104673 avg:117279
__schedule (0xffffffff816c1e81)
preempt_schedule (0xffffffff816c236e)
___preempt_schedule (0xffffffff81351a59)
|
+ unmap_single_vma (0xffffffff81198c05)
| 55% (1) time:129886 max:129886 min:0 avg:129886
| stop_one_cpu (0xffffffff8110909a)
| sched_exec (0xffffffff810a119b)
| do_execveat_common.isra.31 (0xffffffff811de528)
| do_execve (0xffffffff811dea8c)
| SyS_execve (0xffffffff811ded1e)
| return_to_handler (0xffffffff816c8458)
| stub_execve (0xffffffff816c6929)
|
+ unmap_single_vma (0xffffffff81198c05)
45% (1) time:104673 max:104673 min:0 avg:104673
unmap_vmas (0xffffffff81199174)
exit_mmap (0xffffffff811a1f5b)
mmput (0xffffffff8107699a)
flush_old_exec (0xffffffff811ddb75)
load_elf_binary (0xffffffff812287df)
search_binary_handler (0xffffffff811dd3e0)
do_execveat_common.isra.31 (0xffffffff811de8bd)
do_execve (0xffffffff811dea8c)
SyS_execve (0xffffffff811ded1e)
return_to_handler (0xffffffff816c8458)
stub_execve (0xffffffff816c6929)
Event: sched_switch:S (1) Total: 1000513242 Avg: 1000513242 Max: 1000513242 Min:1000513242
|
+ ftrace_raw_event_sched_switch (0xffffffff8109f310)
100% (1) time:1000513242 max:1000513242 min:0 avg:1000513242
__schedule (0xffffffff816c1e81)
schedule (0xffffffff816c23b9)
do_nanosleep (0xffffffff816c4f1c)
hrtimer_nanosleep (0xffffffff810dcd86)
SyS_nanosleep (0xffffffff810dcea6)
return_to_handler (0xffffffff816c8458)
tracesys_phase2 (0xffffffff816c65b0)
Event: sched_wakeup:1121 (1) Total: 43405 Avg: 43405 Max: 43405 Min:43405
|
+ ftrace_raw_event_sched_wakeup_template (0xffffffff8109d960)
100% (1) time:43405 max:43405 min:0 avg:43405
ttwu_do_wakeup (0xffffffff810a01a2)
ttwu_do_activate.constprop.122 (0xffffffff810a0236)
try_to_wake_up (0xffffffff810a3ec3)
wake_up_process (0xffffffff810a4057)
hrtimer_wakeup (0xffffffff810db772)
__run_hrtimer (0xffffffff810dbd91)
hrtimer_interrupt (0xffffffff810dc6b7)
local_apic_timer_interrupt (0xffffffff810363e7)
smp_trace_apic_timer_interrupt (0xffffffff816c8c6a)
trace_apic_timer_interrupt (0xffffffff816c725a)
finish_task_switch (0xffffffff8109c3a4)
__schedule (0xffffffff816c1e01)
schedule (0xffffffff816c23b9)
ring_buffer_wait (0xffffffff811323a3)
wait_on_pipe (0xffffffff81133d93)
tracing_buffers_splice_read (0xffffffff811350b0)
do_splice_to (0xffffffff8120476f)
SyS_splice (0xffffffff81206c1f)
tracesys_phase2 (0xffffffff816c65b0)
Event: func: sys_nanosleep() (1) Total: 1000598016 Avg: 1000598016 Max: 1000598016 Min:1000598016
Event: func: sys_munmap() (1) Total: 14300 Avg: 14300 Max: 14300 Min:14300
Event: func: sys_arch_prctl() (1) Total: 571 Avg: 571 Max: 571 Min:571
Event: func: sys_mprotect() (4) Total: 14382 Avg: 3595 Max: 7196 Min:2190
Event: func: SyS_read() (1) Total: 2640 Avg: 2640 Max: 2640 Min:2640
Event: func: sys_close() (5) Total: 4001 Avg: 800 Max: 1252 Min:414
Event: func: sys_newfstat() (3) Total: 11684 Avg: 3894 Max: 10206 Min:636
Event: func: SyS_open() (3) Total: 23615 Avg: 7871 Max: 10535 Min:4743
Event: func: sys_access() (1) Total: 5924 Avg: 5924 Max: 5924 Min:5924
Event: func: SyS_mmap() (8) Total: 39153 Avg: 4894 Max: 12354 Min:1518
Event: func: smp_trace_apic_timer_interrupt() (1) Total: 10298 Avg: 10298 Max: 10298 Min:10298
Event: func: SyS_brk() (4) Total: 2407 Avg: 601 Max: 1564 Min:206
Event: func: do_notify_resume() (2) Total: 4095 Avg: 2047 Max: 2521 Min:1574
Event: func: sys_execve() (5) Total: 1625251 Avg: 325050 Max: 1605698 Min:3570
|
+ ftrace_raw_event_sched_wakeup_template (0xffffffff8109d960)
100% (1) time:1605698 max:1605698 min:0 avg:1605698
ttwu_do_wakeup (0xffffffff810a01a2)
ttwu_do_activate.constprop.122 (0xffffffff810a0236)
try_to_wake_up (0xffffffff810a3ec3)
wake_up_process (0xffffffff810a4057)
cpu_stop_queue_work (0xffffffff81108df8)
stop_one_cpu (0xffffffff8110909a)
sched_exec (0xffffffff810a119b)
do_execveat_common.isra.31 (0xffffffff811de528)
do_execve (0xffffffff811dea8c)
SyS_execve (0xffffffff811ded1e)
return_to_handler (0xffffffff816c8458)
stub_execve (0xffffffff816c6929)
stub_execve (0xffffffff816c6929)
Event: func: syscall_trace_enter_phase2() (38) Total: 21544 Avg: 566 Max: 1066 Min:329
Event: func: syscall_trace_enter_phase1() (38) Total: 9202 Avg: 242 Max: 376 Min:150
Event: func: __do_page_fault() (53) Total: 257672 Avg: 4861 Max: 27745 Min:458
|
+ ftrace_raw_event_sched_wakeup_template (0xffffffff8109d960)
100% (1) time:27745 max:27745 min:0 avg:27745
ttwu_do_wakeup (0xffffffff810a01a2)
ttwu_do_activate.constprop.122 (0xffffffff810a0236)
try_to_wake_up (0xffffffff810a3ec3)
default_wake_function (0xffffffff810a4002)
autoremove_wake_function (0xffffffff810b50fd)
__wake_up_common (0xffffffff810b4958)
__wake_up (0xffffffff810b4cb8)
rb_wake_up_waiters (0xffffffff8112f126)
irq_work_run_list (0xffffffff81157d0f)
irq_work_run (0xffffffff81157d5e)
smp_trace_irq_work_interrupt (0xffffffff810082fc)
trace_irq_work_interrupt (0xffffffff816c7aaa)
return_to_handler (0xffffffff816c8458)
trace_do_page_fault (0xffffffff810478b2)
trace_page_fault (0xffffffff816c7dd2)
Event: func: syscall_trace_leave() (38) Total: 26145 Avg: 688 Max: 1264 Min:381
Event: func: __sb_end_write() (1) Total: 373 Avg: 373 Max: 373 Min:373
Event: func: fsnotify() (1) Total: 598 Avg: 598 Max: 598 Min:598
Event: func: __fsnotify_parent() (1) Total: 286 Avg: 286 Max: 286 Min:286
Event: func: mutex_unlock() (2) Total: 39636 Avg: 19818 Max: 39413 Min:223
Event: func: smp_trace_irq_work_interrupt() (6) Total: 236459 Avg: 39409 Max: 100671 Min:634
|
+ ftrace_raw_event_sched_wakeup_template (0xffffffff8109d960)
100% (4) time:234348 max:100671 min:38745 avg:58587
ttwu_do_wakeup (0xffffffff810a01a2)
ttwu_do_activate.constprop.122 (0xffffffff810a0236)
try_to_wake_up (0xffffffff810a3ec3)
default_wake_function (0xffffffff810a4002)
autoremove_wake_function (0xffffffff810b50fd)
__wake_up_common (0xffffffff810b4958)
__wake_up (0xffffffff810b4cb8)
rb_wake_up_waiters (0xffffffff8112f126)
irq_work_run_list (0xffffffff81157d0f)
irq_work_run (0xffffffff81157d5e)
smp_trace_irq_work_interrupt (0xffffffff810082fc)
return_to_handler (0xffffffff816c8458)
trace_irq_work_interrupt (0xffffffff816c7aaa)
|
+ ftrace_return_to_handler (0xffffffff81140840)
| 84% (3) time:197396 max:100671 min:38745 avg:65798
| return_to_handler (0xffffffff816c846d)
| trace_page_fault (0xffffffff816c7dd2)
|
+ ftrace_return_to_handler (0xffffffff81140840)
16% (1) time:36952 max:36952 min:0 avg:36952
ftrace_graph_caller (0xffffffff816c8428)
mutex_unlock (0xffffffff816c3f75)
rb_simple_write (0xffffffff81133142)
vfs_write (0xffffffff811d7727)
SyS_write (0xffffffff811d7acf)
tracesys_phase2 (0xffffffff816c65b0)
Event: sys_enter:35 (1) Total: 1000599765 Avg: 1000599765 Max: 1000599765 Min:1000599765
Event: sys_enter:11 (1) Total: 55025 Avg: 55025 Max: 55025 Min:55025
Event: sys_enter:158 (1) Total: 1584 Avg: 1584 Max: 1584 Min:1584
Event: sys_enter:10 (4) Total: 18359 Avg: 4589 Max: 8764 Min:2933
Event: sys_enter:0 (1) Total: 4223 Avg: 4223 Max: 4223 Min:4223
Event: sys_enter:3 (5) Total: 9948 Avg: 1989 Max: 2606 Min:1203
Event: sys_enter:5 (3) Total: 15530 Avg: 5176 Max: 11840 Min:1405
Event: sys_enter:2 (3) Total: 28002 Avg: 9334 Max: 12035 Min:5656
Event: sys_enter:21 (1) Total: 7814 Avg: 7814 Max: 7814 Min:7814
Event: sys_enter:9 (8) Total: 49583 Avg: 6197 Max: 14137 Min:2362
Event: sys_enter:12 (4) Total: 108493 Avg: 27123 Max: 104079 Min:922
Event: sys_enter:59 (5) Total: 1631608 Avg: 326321 Max: 1607529 Min:4563
Event: page_fault_user:0x398d86b630 (1)
Event: page_fault_user:0x398d844de0 (1)
Event: page_fault_user:0x398d8d9020 (1)
Event: page_fault_user:0x1d37008 (1)
Event: page_fault_user:0x7f0b89e91074 (1)
Event: page_fault_user:0x7f0b89d98ed0 (1)
Event: page_fault_user:0x7f0b89ec8950 (1)
Event: page_fault_user:0x7f0b89d83644 (1)
Event: page_fault_user:0x7f0b89d622a8 (1)
Event: page_fault_user:0x7f0b89d5a560 (1)
Event: page_fault_user:0x7f0b89d34010 (1)
Event: page_fault_user:0x1d36008 (1)
Event: page_fault_user:0x398d900510 (1)
Event: page_fault_user:0x398dbb3ae8 (1)
Event: page_fault_user:0x398d87f490 (1)
Event: page_fault_user:0x398d8eb660 (1)
Event: page_fault_user:0x398d8bd730 (1)
Event: page_fault_user:0x398d9625d9 (1)
Event: page_fault_user:0x398d931810 (1)
Event: page_fault_user:0x398dbb7114 (1)
Event: page_fault_user:0x398d837610 (1)
Event: page_fault_user:0x398d89e860 (1)
Event: page_fault_user:0x398d8f23b0 (1)
Event: page_fault_user:0x398dbb4510 (1)
Event: page_fault_user:0x398dbad6f0 (1)
Event: page_fault_user:0x398dbb1018 (1)
Event: page_fault_user:0x398d977b37 (1)
Event: page_fault_user:0x398d92eb60 (1)
Event: page_fault_user:0x398d8abff0 (1)
Event: page_fault_user:0x398dbb0d30 (1)
Event: page_fault_user:0x398dbb6c24 (1)
Event: page_fault_user:0x398d821c50 (1)
Event: page_fault_user:0x398dbb6c20 (1)
Event: page_fault_user:0x398d886350 (1)
Event: page_fault_user:0x7f0b90125000 (1)
Event: page_fault_user:0x7f0b90124740 (1)
Event: page_fault_user:0x7f0b90126000 (1)
Event: page_fault_user:0x398d816230 (1)
Event: page_fault_user:0x398d8002b8 (1)
Event: page_fault_user:0x398dbb0b40 (1)
Event: page_fault_user:0x398dbb2880 (1)
Event: page_fault_user:0x7f0b90141cc6 (1)
Event: page_fault_user:0x7f0b9013b85c (1)
Event: page_fault_user:0x7f0b90127000 (1)
Event: page_fault_user:0x606e70 (1)
Event: page_fault_user:0x7f0b90144010 (1)
Event: page_fault_user:0x7fffcb31b038 (1)
Event: page_fault_user:0x606da8 (1)
Event: page_fault_user:0x400040 (1)
Event: page_fault_user:0x398d222218 (1)
Event: page_fault_user:0x398d015120 (1)
Event: page_fault_user:0x398d220ce8 (1)
Event: page_fault_user:0x398d220b80 (1)
Event: page_fault_user:0x7fffcb2fcff8 (1)
Event: page_fault_user:0x398d001590 (1)
Event: page_fault_user:0x398d838490 (1)
Event: softirq_raise:RCU (3) Total: 252931 Avg: 84310 Max: 243288 Min:4639
Event: softirq_raise:SCHED (2) Total: 241249 Avg: 120624 Max: 239076 Min:2173
|
+ ftrace_raw_event_sched_wakeup_template (0xffffffff8109d960)
100% (1) time:239076 max:239076 min:0 avg:239076
ttwu_do_wakeup (0xffffffff810a01a2)
ttwu_do_activate.constprop.122 (0xffffffff810a0236)
try_to_wake_up (0xffffffff810a3ec3)
default_wake_function (0xffffffff810a4002)
autoremove_wake_function (0xffffffff810b50fd)
__wake_up_common (0xffffffff810b4958)
__wake_up (0xffffffff810b4cb8)
rb_wake_up_waiters (0xffffffff8112f126)
irq_work_run_list (0xffffffff81157d0f)
irq_work_run (0xffffffff81157d5e)
smp_trace_irq_work_interrupt (0xffffffff810082fc)
trace_irq_work_interrupt (0xffffffff816c7aaa)
irq_exit (0xffffffff8107dd66)
smp_trace_apic_timer_interrupt (0xffffffff816c8c7a)
trace_apic_timer_interrupt (0xffffffff816c725a)
prepare_ftrace_return (0xffffffff8103d4fd)
ftrace_graph_caller (0xffffffff816c8428)
mem_cgroup_begin_page_stat (0xffffffff811cfd25)
page_remove_rmap (0xffffffff811a4fc5)
stub_execve (0xffffffff816c6929)
unmap_single_vma (0xffffffff81198b1c)
unmap_vmas (0xffffffff81199174)
exit_mmap (0xffffffff811a1f5b)
mmput (0xffffffff8107699a)
flush_old_exec (0xffffffff811ddb75)
load_elf_binary (0xffffffff812287df)
search_binary_handler (0xffffffff811dd3e0)
do_execveat_common.isra.31 (0xffffffff811de8bd)
do_execve (0xffffffff811dea8c)
SyS_execve (0xffffffff811ded1e)
return_to_handler (0xffffffff816c8458)
Event: softirq_raise:HI (3) Total: 72472 Avg: 24157 Max: 64186 Min:3430
Event: softirq_entry:RCU (2) Total: 3191 Avg: 1595 Max: 1788 Min:1403
|
+ ftrace_raw_event_sched_wakeup_template (0xffffffff8109d960)
100% (1) time:1788 max:1788 min:0 avg:1788
ttwu_do_wakeup (0xffffffff810a01a2)
ttwu_do_activate.constprop.122 (0xffffffff810a0236)
try_to_wake_up (0xffffffff810a3ec3)
default_wake_function (0xffffffff810a4002)
autoremove_wake_function (0xffffffff810b50fd)
__wake_up_common (0xffffffff810b4958)
__wake_up (0xffffffff810b4cb8)
rb_wake_up_waiters (0xffffffff8112f126)
irq_work_run_list (0xffffffff81157d0f)
irq_work_run (0xffffffff81157d5e)
smp_trace_irq_work_interrupt (0xffffffff810082fc)
trace_irq_work_interrupt (0xffffffff816c7aaa)
irq_work_queue (0xffffffff81157e95)
ring_buffer_unlock_commit (0xffffffff8113039f)
__buffer_unlock_commit (0xffffffff811367d5)
trace_buffer_unlock_commit (0xffffffff811376a2)
ftrace_event_buffer_commit (0xffffffff81146d5f)
ftrace_raw_event_sched_process_exec (0xffffffff8109c511)
do_execveat_common.isra.31 (0xffffffff811de9a3)
do_execve (0xffffffff811dea8c)
SyS_execve (0xffffffff811ded1e)
return_to_handler (0xffffffff816c8458)
stub_execve (0xffffffff816c6929)
Event: softirq_entry:SCHED (2) Total: 2289 Avg: 1144 Max: 1350 Min:939
Event: softirq_entry:HI (3) Total: 180146 Avg: 60048 Max: 178969 Min:499
|
+ ftrace_raw_event_sched_wakeup_template (0xffffffff8109d960)
100% (1) time:178969 max:178969 min:0 avg:178969
ttwu_do_wakeup (0xffffffff810a01a2)
ttwu_do_activate.constprop.122 (0xffffffff810a0236)
try_to_wake_up (0xffffffff810a3ec3)
wake_up_process (0xffffffff810a4057)
wake_up_worker (0xffffffff8108de74)
insert_work (0xffffffff8108fca6)
__queue_work (0xffffffff8108fe12)
delayed_work_timer_fn (0xffffffff81090088)
call_timer_fn (0xffffffff810d8f89)
run_timer_softirq (0xffffffff810da8a1)
__do_softirq (0xffffffff8107d8fa)
irq_exit (0xffffffff8107dd66)
smp_trace_apic_timer_interrupt (0xffffffff816c8c7a)
trace_apic_timer_interrupt (0xffffffff816c725a)
prepare_ftrace_return (0xffffffff8103d4fd)
ftrace_graph_caller (0xffffffff816c8428)
mem_cgroup_begin_page_stat (0xffffffff811cfd25)
page_remove_rmap (0xffffffff811a4fc5)
stub_execve (0xffffffff816c6929)
unmap_single_vma (0xffffffff81198b1c)
unmap_vmas (0xffffffff81199174)
exit_mmap (0xffffffff811a1f5b)
mmput (0xffffffff8107699a)
flush_old_exec (0xffffffff811ddb75)
load_elf_binary (0xffffffff812287df)
search_binary_handler (0xffffffff811dd3e0)
do_execveat_common.isra.31 (0xffffffff811de8bd)
do_execve (0xffffffff811dea8c)
SyS_execve (0xffffffff811ded1e)
return_to_handler (0xffffffff816c8458)
---
The above uses *-F* to follow the sleep task. It filters only on events
that pertain to sleep. Note, in order to follow forks, you need to also
include the *-c* flag.
Other tasks will appear in the profile as well if events reference more
than one task (like sched_switch and sched_wakeup do. The "prev_pid" and
"next_pid" of sched_switch, and the "common_pid" and "pid" of sched_wakeup).
Stack traces are attached to events that are related to them.
Taking a look at the above output:
Event: sched_switch:R (2) Total: 234559 Avg: 117279 Max: 129886 Min:104673
This shows that task was preempted (it's in the running 'R' state).
It was preempted twice '(2)' for a total of 234,559 nanoseconds, with a average
preempt time of 117,279 ns, and maximum of 128,886 ns and minimum of 104,673 ns.
The tree shows where it was preempted:
|
+ ftrace_raw_event_sched_switch (0xffffffff8109f310)
100% (2) time:234559 max:129886 min:104673 avg:117279
__schedule (0xffffffff816c1e81)
preempt_schedule (0xffffffff816c236e)
___preempt_schedule (0xffffffff81351a59)
|
+ unmap_single_vma (0xffffffff81198c05)
| 55% (1) time:129886 max:129886 min:0 avg:129886
| stop_one_cpu (0xffffffff8110909a)
| sched_exec (0xffffffff810a119b)
| do_execveat_common.isra.31 (0xffffffff811de528)
| do_execve (0xffffffff811dea8c)
| SyS_execve (0xffffffff811ded1e)
| return_to_handler (0xffffffff816c8458)
| stub_execve (0xffffffff816c6929)
|
+ unmap_single_vma (0xffffffff81198c05)
45% (1) time:104673 max:104673 min:0 avg:104673
unmap_vmas (0xffffffff81199174)
exit_mmap (0xffffffff811a1f5b)
mmput (0xffffffff8107699a)
flush_old_exec (0xffffffff811ddb75)
load_elf_binary (0xffffffff812287df)
search_binary_handler (0xffffffff811dd3e0)
do_execveat_common.isra.31 (0xffffffff811de8bd)
do_execve (0xffffffff811dea8c)
SyS_execve (0xffffffff811ded1e)
return_to_handler (0xffffffff816c8458)
stub_execve (0xffffffff816c6929)
Event: sched_switch:S (1) Total: 1000513242 Avg: 1000513242 Max: 1000513242 Min:10005132
This shows that the task was scheduled out in the INTERRUPTIBLE state once
for a total of 1,000,513,242 ns (~1s), which makes sense as the task was a
"sleep 1".
After the schedule events, the function events are shown. By default the
profiler will use the function graph tracer if the depth setting is supported
by the kernel. It will set the depth to one which will only trace the first
function that enters the kernel. It will also record the amount of time
it was in the kernel.
Event: func: sys_nanosleep() (1) Total: 1000598016 Avg: 1000598016 Max: 1000598016 Min:1000598016
Event: func: sys_munmap() (1) Total: 14300 Avg: 14300 Max: 14300 Min:14300
Event: func: sys_arch_prctl() (1) Total: 571 Avg: 571 Max: 571 Min:571
Event: func: sys_mprotect() (4) Total: 14382 Avg: 3595 Max: 7196 Min:2190
Event: func: SyS_read() (1) Total: 2640 Avg: 2640 Max: 2640 Min:2640
Event: func: sys_close() (5) Total: 4001 Avg: 800 Max: 1252 Min:414
Event: func: sys_newfstat() (3) Total: 11684 Avg: 3894 Max: 10206 Min:636
Event: func: SyS_open() (3) Total: 23615 Avg: 7871 Max: 10535 Min:4743
Event: func: sys_access() (1) Total: 5924 Avg: 5924 Max: 5924 Min:5924
Event: func: SyS_mmap() (8) Total: 39153 Avg: 4894 Max: 12354 Min:1518
Event: func: smp_trace_apic_timer_interrupt() (1) Total: 10298 Avg: 10298 Max: 10298 Min:10298
Event: func: SyS_brk() (4) Total: 2407 Avg: 601 Max: 1564 Min:206
Event: func: do_notify_resume() (2) Total: 4095 Avg: 2047 Max: 2521 Min:1574
Event: func: sys_execve() (5) Total: 1625251 Avg: 325050 Max: 1605698 Min:3570
Count of times the event was hit is always in parenthesis '(5)'.
The function graph trace may produce too much overhead as it is still
triggering (just not tracing) on all functions. To limit functions just to
system calls (not interrupts), add the following option:
-l 'sys_*' -l 'SyS_*'
To disable function graph tracing totally, use:
-p nop
To use function tracing instead (note, this will not record timings, but just
the count of times a function is hit):
-p function
Following the functions are the events that are recorded.
Event: sys_enter:35 (1) Total: 1000599765 Avg: 1000599765 Max: 1000599765 Min:1000599765
Event: sys_enter:11 (1) Total: 55025 Avg: 55025 Max: 55025 Min:55025
Event: sys_enter:158 (1) Total: 1584 Avg: 1584 Max: 1584 Min:1584
Event: sys_enter:10 (4) Total: 18359 Avg: 4589 Max: 8764 Min:2933
Event: sys_enter:0 (1) Total: 4223 Avg: 4223 Max: 4223 Min:4223
Event: sys_enter:3 (5) Total: 9948 Avg: 1989 Max: 2606 Min:1203
Event: sys_enter:5 (3) Total: 15530 Avg: 5176 Max: 11840 Min:1405
Event: sys_enter:2 (3) Total: 28002 Avg: 9334 Max: 12035 Min:5656
Event: sys_enter:21 (1) Total: 7814 Avg: 7814 Max: 7814 Min:7814
Event: sys_enter:9 (8) Total: 49583 Avg: 6197 Max: 14137 Min:2362
Event: sys_enter:12 (4) Total: 108493 Avg: 27123 Max: 104079 Min:922
Event: sys_enter:59 (5) Total: 1631608 Avg: 326321 Max: 1607529 Min:4563
These are the raw system call events, with the raw system call ID after
the "sys_enter:" For example, "59" is execve(2). Why did it execute 5 times?
Looking at a strace of this run, we can see:
execve("/usr/lib64/ccache/sleep", ["sleep", "1"], [/* 27 vars */] <unfinished ...>
<... execve resumed> ) = -1 ENOENT (No such file or directory)
execve("/usr/local/sbin/sleep", ["sleep", "1"], [/* 27 vars */] <unfinished ...>
<... execve resumed> ) = -1 ENOENT (No such file or directory)
execve("/usr/local/bin/sleep", ["sleep", "1"], [/* 27 vars */] <unfinished ...>
<... execve resumed> ) = -1 ENOENT (No such file or directory)
execve("/usr/sbin/sleep", ["sleep", "1"], [/* 27 vars */] <unfinished ...>
<... execve resumed> ) = -1 ENOENT (No such file or directory)
execve("/usr/bin/sleep", ["sleep", "1"], [/* 27 vars */] <unfinished ...>
<... execve resumed> ) = 0
It attempted to execve the "sleep" command for each path in $PATH until it found
one.
The page_fault_user events show what userspace address took a page fault.
Event: softirq_raise:RCU (3) Total: 252931 Avg: 84310 Max: 243288 Min:4639
Event: softirq_raise:SCHED (2) Total: 241249 Avg: 120624 Max: 239076 Min:2173
|
+ ftrace_raw_event_sched_wakeup_template (0xffffffff8109d960)
100% (1) time:239076 max:239076 min:0 avg:239076
ttwu_do_wakeup (0xffffffff810a01a2)
ttwu_do_activate.constprop.122 (0xffffffff810a0236)
try_to_wake_up (0xffffffff810a3ec3)
default_wake_function (0xffffffff810a4002)
autoremove_wake_function (0xffffffff810b50fd)
__wake_up_common (0xffffffff810b4958)
__wake_up (0xffffffff810b4cb8)
rb_wake_up_waiters (0xffffffff8112f126)
irq_work_run_list (0xffffffff81157d0f)
irq_work_run (0xffffffff81157d5e)
smp_trace_irq_work_interrupt (0xffffffff810082fc)
trace_irq_work_interrupt (0xffffffff816c7aaa)
irq_exit (0xffffffff8107dd66)
The timings for the softirq_raise events measure the time it took from the raised
softirq to the time it executed.
The timings for the softirq_entry events measure the time the softirq took to
execute.
The stack traces for the softirqs (and possibly other events) are used when
an event has a stack attached to it. This can happen if the profile ran
more stacks than just the sched events, or when events are dropped and
stacks
To have full control of what gets traced, use the *-S* option that will have
trace-cmd not enable any events or the function_graph tracer. Only the events
listed on the command line are shown.
If only the time of kmalloc is needed to be seen, and where it was recorded,
using the *-S* option and enabling function_graph and stack tracing for just
the function needed will give the profile of only that function.
---
# trace-cmd profile -S -p function_graph -l '*kmalloc*' -l '*kmalloc*:stacktrace' sleep 1
task: sshd-11786
Event: func: __kmalloc_reserve.isra.59() (2) Total: 149684 Avg: 74842 Max: 75598 Min:74086
|
+ __alloc_skb (0xffffffff815a8917)
| 67% (2) time:149684 max:75598 min:74086 avg:74842
| __kmalloc_node_track_caller (0xffffffff811c6635)
| __kmalloc_reserve.isra.59 (0xffffffff815a84ac)
| return_to_handler (0xffffffff816c8458)
| sk_stream_alloc_skb (0xffffffff81604ea1)
| tcp_sendmsg (0xffffffff8160592c)
| inet_sendmsg (0xffffffff8162fed1)
| sock_aio_write (0xffffffff8159f9fc)
| do_sync_write (0xffffffff811d694a)
| vfs_write (0xffffffff811d7825)
| SyS_write (0xffffffff811d7adf)
| system_call_fastpath (0xffffffff816c63d2)
|
+ __alloc_skb (0xffffffff815a8917)
33% (1) time:74086 max:74086 min:74086 avg:74086
__alloc_skb (0xffffffff815a8917)
sk_stream_alloc_skb (0xffffffff81604ea1)
tcp_sendmsg (0xffffffff8160592c)
inet_sendmsg (0xffffffff8162fed1)
sock_aio_write (0xffffffff8159f9fc)
do_sync_write (0xffffffff811d694a)
vfs_write (0xffffffff811d7825)
SyS_write (0xffffffff811d7adf)
system_call_fastpath (0xffffffff816c63d2)
[..]
---
To watch the command run but save the output of the profile to a file
use --stderr, and redirect stderr to a file
# trace-cmd profile --stderr cyclictest -p 80 -n -t1 2> profile.out
Or simple use *-o*
# trace-cmd profile -o profile.out cyclictest -p 80 -n -t1
SEE ALSO
--------
trace-cmd(1), trace-cmd-record(1), trace-cmd-report(1), trace-cmd-start(1),
trace-cmd-stop(1), trace-cmd-reset(1), trace-cmd-split(1),
trace-cmd-list(1), trace-cmd-listen(1)
AUTHOR
------
Written by Steven Rostedt, <rostedt@goodmis.org>
RESOURCES
---------
https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/
COPYING
-------
Copyright \(C) 2014 Red Hat, Inc. Free use of this software is granted under
the terms of the GNU Public License (GPL).
================================================
FILE: Documentation/trace-cmd/trace-cmd-record.1.txt
================================================
TRACE-CMD-RECORD(1)
===================
NAME
----
trace-cmd-record - record a trace from the Ftrace Linux internal tracer
SYNOPSIS
--------
*trace-cmd record* ['OPTIONS'] ['command']
DESCRIPTION
-----------
The trace-cmd(1) record command will set up the Ftrace Linux kernel tracer to
record the specified plugins or events that happen while the 'command'
executes. If no command is given, then it will record until the user hits
Ctrl-C.
The record command of trace-cmd will set up the Ftrace tracer to start tracing
the various events or plugins that are given on the command line. It will then
create a number of tracing processes (one per CPU) that will start recording
from the kernel ring buffer straight into temporary files. When the command is
complete (or Ctrl-C is hit) all the files will be combined into a trace.dat
file that can later be read (see trace-cmd-report(1)).
OPTIONS
-------
*-p* 'tracer'::
Specify a tracer. Tracers usually do more than just trace an event.
Common tracers are: *function*, *function_graph*, *preemptirqsoff*,
*irqsoff*, *preemptoff* and *wakeup*. A tracer must be supported by the
running kernel. To see a list of available tracers, see trace-cmd-list(1).
*-e* 'event'::
Specify an event to trace. Various static trace points have been added to
the Linux kernel. They are grouped by subsystem where you can enable all
events of a given subsystem or specify specific events to be enabled. The
'event' is of the format "subsystem:event-name". You can also just specify
the subsystem without the ':event-name' or the event-name without the
"subsystem:". Using "-e sched_switch" will enable the "sched_switch" event
where as, "-e sched" will enable all events under the "sched" subsystem.
The 'event' can also contain glob expressions. That is, "*stat*" will
select all events (or subsystems) that have the characters "stat" in their
names.
The keyword 'all' can be used to enable all events.
*-a*::
Every event that is being recorded has its output format file saved
in the output file to be able to display it later. But if other
events are enabled in the trace without trace-cmd's knowledge, the
formats of those events will not be recorded and trace-cmd report will
not be able to display them. If this is the case, then specify the
*-a* option and the format for all events in the system will be saved.
*-T*::
Enable a stacktrace on each event. For example:
<idle>-0 [003] 58549.289091: sched_switch: kworker/0:1:0 [120] R ==> trace-cmd:2603 [120]
<idle>-0 [003] 58549.289092: kernel_stack: <stack trace>
=> schedule (ffffffff814b260e)
=> cpu_idle (ffffffff8100a38c)
=> start_secondary (ffffffff814ab828)
*--func-stack*::
Enable a stack trace on all functions. Note this is only applicable
for the "function" plugin tracer, and will only take effect if the
-l option is used and succeeds in limiting functions. If the function
tracer is not filtered, and the stack trace is enabled, you can live
lock the machine.
*-f* 'filter'::
Specify a filter for the previous event. This must come after a *-e*. This
will filter what events get recorded based on the content of the event.
Filtering is passed to the kernel directly so what filtering is allowed
may depend on what version of the kernel you have. Basically, it will
let you use C notation to check if an event should be processed or not.
[source,bison]
----
==, >=, <=, >, <, &, |, && and ||
----
The above are usually safe to use to compare fields.
*--no-filter*::
Do not filter out the trace-cmd threads. By default, the threads are
filtered out to not be traced by events. This option will have the trace-cmd
threads also be traced.
*-R* 'trigger'::
Specify a trigger for the previous event. This must come after a *-e*.
This will add a given trigger to the given event. To only enable the trigger
and not the event itself, then place the event after the *-v* option.
See Documentation/trace/events.txt in the Linux kernel source for more
information on triggers.
*-v*::
This will cause all events specified after it on the command line to not
be traced. This is useful for selecting a subsystem to be traced but to
leave out various events. For Example: "-e sched -v -e "\*stat\*"" will
enable all events in the sched subsystem except those that have "stat" in
their names.
Note: the *-v* option was taken from the way grep(1) inverts the following
matches.
*-F*::
This will filter only the executable that is given on the command line. If
no command is given, then it will filter itself (pretty pointless).
Using *-F* will let you trace only events that are caused by the given
command.
*-P* 'pid'::
Similar to *-F* but lets you specify a process ID to trace.
*-c*::
Used with either *-F* (or *-P* if kernel supports it) to trace the process'
children too.
*--user*::
Execute the specified *command* as given user.
*-C* 'clock'::
Set the trace clock to "clock".
Use trace-cmd(1) list -C to see what clocks are available.
*-o* 'output-file'::
By default, trace-cmd report will create a 'trace.dat' file. You can
specify a different file to write to with the *-o* option.
*-l* 'function-name'::
This will limit the 'function' and 'function_graph' tracers to only trace
the given function name. More than one *-l* may be specified on the
command line to trace more than one function. This supports both full
regex(3) parsing, or basic glob parsing. If the filter has only alphanumeric,
'_', '*', '?' and '.' characters, then it will be parsed as a basic glob.
to force it to be a regex, prefix the filter with '^' or append it with '$'
and it will then be parsed as a regex.
*-g* 'function-name'::
This option is for the function_graph plugin. It will graph the given
function. That is, it will only trace the function and all functions that
it calls. You can have more than one *-g* on the command line.
*-n* 'function-name'::
This has the opposite effect of *-l*. The function given with the *-n*
option will not be traced. This takes precedence, that is, if you include
the same function for both *-n* and *-l*, it will not be traced.
*-d*::
Some tracer plugins enable the function tracer by default. Like the
latency tracers. This option prevents the function tracer from being
enabled at start up.
*-D*::
The option *-d* will try to use the function-trace option to disable the
function tracer (if available), otherwise it defaults to the proc file:
/proc/sys/kernel/ftrace_enabled, but will not touch it if the function-trace
option is available. The *-D* option will disable both the ftrace_enabled
proc file as well as the function-trace option if it exists.
Note, this disable function tracing for all users, which includes users
outside of ftrace tracers (stack_tracer, perf, etc).
*-O* 'option'::
Ftrace has various options that can be enabled or disabled. This allows
you to set them. Appending the text 'no' to an option disables it.
For example: "-O nograph-time" will disable the "graph-time" Ftrace
option.
*-s* 'interval'::
The processes that trace-cmd creates to record from the ring buffer need
to wake up to do the recording. Setting the 'interval' to zero will cause
the processes to wakeup every time new data is written into the buffer.
But since Ftrace is recording kernel activity, the act of this processes
going back to sleep may cause new events into the ring buffer which will
wake the process back up. This will needlessly add extra data into the
ring buffer.
The 'interval' metric is microseconds. The default is set to 1000 (1 ms).
This is the time each recording process will sleep before waking up to
record any new data that was written to the ring buffer.
*-r* 'priority'::
The priority to run the capture threads at. In a busy system the trace
capturing threads may be staved and events can be lost. This increases
the priority of those threads to the real time (FIFO) priority.
But use this option with care, it can also change the behaviour of
the system being traced.
*-b* 'size'::
This sets the ring buffer size to 'size' kilobytes. Because the Ftrace
ring buffer is per CPU, this size is the size of each per CPU ring buffer
inside the kernel. Using "-b 10000" on a machine with 4 CPUs will make
Ftrace have a total buffer size of 40 Megs.
*--subbuf-size*::
The Linux kernel tracing ring buffer is broken up into sub-buffers.
These sub-buffers are typically the size of the architecture "page-size".
(4096 or x86). An event can only be as big as the data portion of a
sub-buffer, but in most cases that's not an issue. But the time the
writer takes to switch from one sub-buffer to the next has a bit more
overhead than adding events within the sub-buffer. By increasing its
size, it will allow bigger events (although that is seldom an issue)
but also speed up the tracing itself.
The downside of larger sub-buffers is that a "read" of the ring buffer
will pull the sub-buffer size out of the ring buffer and replace it
with a new sub-buffer. This may not have any real impact, but it may
change the behavior slightly. Or it may not!
*-B* 'buffer-name'::
If the kernel supports multiple buffers, this will add a buffer with
the given name. If the buffer name already exists, that buffer is just
reset and will not be deleted at the end of record execution. If the
buffer is created, it will be removed at the end of execution (unless
the *-k* is set, or 'start' command was used).
After a buffer name is stated, a
gitextract_wtq560wr/
├── .gitattributes
├── .gitignore
├── CODING_STYLE
├── CONTRIBUTE
├── COPYING
├── COPYING.LIB
├── DCO
├── Documentation/
│ ├── .gitignore
│ ├── Makefile
│ ├── README.PythonPlugin
│ ├── asciidoc.conf
│ ├── libtracecmd/
│ │ ├── Makefile
│ │ ├── install-docs.sh.in
│ │ ├── libtracecmd-files.txt
│ │ ├── libtracecmd-instances.txt
│ │ ├── libtracecmd-iterate.txt
│ │ ├── libtracecmd-log.txt
│ │ ├── libtracecmd-maps.txt
│ │ ├── libtracecmd-peer.txt
│ │ ├── libtracecmd-record.txt
│ │ ├── libtracecmd-timestamp.txt
│ │ ├── libtracecmd.txt
│ │ └── meson.build
│ ├── manpage-1.72.xsl
│ ├── manpage-base.xsl
│ ├── manpage-bold-literal.xsl
│ ├── manpage-normal.xsl
│ ├── manpage-suppress-sp.xsl
│ └── trace-cmd/
│ ├── Makefile
│ ├── install-docs.sh.in
│ ├── meson.build
│ ├── trace-cmd-agent.1.txt
│ ├── trace-cmd-attach.1.txt
│ ├── trace-cmd-check-events.1.txt
│ ├── trace-cmd-clear.1.txt
│ ├── trace-cmd-convert.1.txt
│ ├── trace-cmd-dump.1.txt
│ ├── trace-cmd-extract.1.txt
│ ├── trace-cmd-hist.1.txt
│ ├── trace-cmd-list.1.txt
│ ├── trace-cmd-listen.1.txt
│ ├── trace-cmd-mem.1.txt
│ ├── trace-cmd-options.1.txt
│ ├── trace-cmd-profile.1.txt
│ ├── trace-cmd-record.1.txt
│ ├── trace-cmd-report.1.txt
│ ├── trace-cmd-reset.1.txt
│ ├── trace-cmd-restore.1.txt
│ ├── trace-cmd-set.1.txt
│ ├── trace-cmd-show.1.txt
│ ├── trace-cmd-snapshot.1.txt
│ ├── trace-cmd-split.1.txt
│ ├── trace-cmd-sqlhist.1.txt
│ ├── trace-cmd-stack.1.txt
│ ├── trace-cmd-start.1.txt
│ ├── trace-cmd-stat.1.txt
│ ├── trace-cmd-stop.1.txt
│ ├── trace-cmd-stream.1.txt
│ ├── trace-cmd.1.txt
│ ├── trace-cmd.dat.v6.5.txt
│ └── trace-cmd.dat.v7.5.txt
├── LICENSES/
│ ├── GPL-2.0
│ └── LGPL-2.1
├── Makefile
├── Makefile.meson
├── PACKAGING
├── README
├── check-manpages.sh
├── features.mk
├── include/
│ ├── linux/
│ │ └── time64.h
│ ├── trace-cmd/
│ │ └── trace-cmd.h
│ └── version.h
├── lib/
│ ├── meson.build
│ ├── meson_options.txt
│ └── trace-cmd/
│ ├── Makefile
│ ├── include/
│ │ ├── meson.build
│ │ ├── private/
│ │ │ ├── meson.build
│ │ │ ├── trace-cmd-private-python.h
│ │ │ ├── trace-cmd-private.h
│ │ │ ├── trace-filter-hash.h
│ │ │ ├── trace-hash.h
│ │ │ ├── trace-msg.h
│ │ │ └── trace-rbtree.h
│ │ ├── trace-cmd-local.h
│ │ ├── trace-hash-local.h
│ │ ├── trace-tsync-local.h
│ │ └── trace-write-local.h
│ ├── meson.build
│ ├── plugins/
│ │ └── Makefile
│ ├── test.c
│ ├── trace-blk-hack.c
│ ├── trace-compress-zlib.c
│ ├── trace-compress-zstd.c
│ ├── trace-compress.c
│ ├── trace-filter-hash.c
│ ├── trace-filter.c
│ ├── trace-ftrace.c
│ ├── trace-hash.c
│ ├── trace-hooks.c
│ ├── trace-input.c
│ ├── trace-maps.c
│ ├── trace-msg.c
│ ├── trace-output.c
│ ├── trace-perf.c
│ ├── trace-plugin.c
│ ├── trace-rbtree.c
│ ├── trace-recorder.c
│ ├── trace-timesync-kvm.c
│ ├── trace-timesync-ptp.c
│ ├── trace-timesync.c
│ └── trace-util.c
├── libtracecmd.pc.template
├── make-trace-cmd.sh
├── meson-vcs-tag.sh
├── meson.build
├── meson_options.txt
├── python/
│ ├── Makefile
│ ├── ctracecmd.i
│ ├── event-viewer.py
│ ├── meson.build
│ ├── tracecmd.py
│ └── tracecmdgui.py
├── scripts/
│ ├── debug/
│ │ ├── tsync_hist.py
│ │ ├── tsync_readme
│ │ └── tsync_res.py
│ └── utils.mk
├── tracecmd/
│ ├── .gitignore
│ ├── Makefile
│ ├── include/
│ │ ├── bug.h
│ │ ├── list.h
│ │ └── trace-local.h
│ ├── meson.build
│ ├── trace-agent.c
│ ├── trace-attach.c
│ ├── trace-check-events.c
│ ├── trace-clear.c
│ ├── trace-cmd.bash
│ ├── trace-cmd.c
│ ├── trace-convert.c
│ ├── trace-dump.c
│ ├── trace-hist.c
│ ├── trace-list.c
│ ├── trace-listen.c
│ ├── trace-mem.c
│ ├── trace-profile.c
│ ├── trace-read.c
│ ├── trace-record.c
│ ├── trace-restore.c
│ ├── trace-setup-guest.c
│ ├── trace-show.c
│ ├── trace-snapshot.c
│ ├── trace-split.c
│ ├── trace-sqlhist.c
│ ├── trace-stack.c
│ ├── trace-stat.c
│ ├── trace-stream.c
│ ├── trace-tsync.c
│ ├── trace-usage.c
│ ├── trace-vm.c
│ └── trace-vsock.c
└── utest/
├── Makefile
├── README
├── meson.build
├── trace-utest.c
├── trace-utest.h
└── tracecmd-utest.c
SYMBOL INDEX (2441 symbols across 68 files)
FILE: include/trace-cmd/trace-cmd.h
type tracecmd_input (line 16) | struct tracecmd_input
type tracecmd_open_flags (line 18) | enum tracecmd_open_flags {
type tracecmd_section_flags (line 23) | enum tracecmd_section_flags {
type tracecmd_input (line 27) | struct tracecmd_input
type tracecmd_input (line 28) | struct tracecmd_input
type tracecmd_input (line 29) | struct tracecmd_input
type tracecmd_input (line 31) | struct tracecmd_input
type tracecmd_input (line 33) | struct tracecmd_input
type tep_record (line 34) | struct tep_record
type tracecmd_input (line 35) | struct tracecmd_input
type tep_record (line 36) | struct tep_record
type tracecmd_input (line 37) | struct tracecmd_input
type tep_record (line 38) | struct tep_record
type tracecmd_input (line 39) | struct tracecmd_input
type tep_record (line 41) | struct tep_record
type tep_handle (line 43) | struct tep_handle
type tracecmd_input (line 43) | struct tracecmd_input
type tracecmd_input (line 44) | struct tracecmd_input
type tracecmd_input (line 45) | struct tracecmd_input
type tracecmd_input (line 49) | struct tracecmd_input
type tracecmd_input (line 50) | struct tracecmd_input
type tracecmd_input (line 51) | struct tracecmd_input
type tracecmd_input (line 53) | struct tracecmd_input
type tracecmd_input (line 54) | struct tracecmd_input
type tracecmd_input (line 55) | struct tracecmd_input
type tracecmd_input (line 55) | struct tracecmd_input
type tracecmd_input (line 57) | struct tracecmd_input
type tracecmd_input (line 58) | struct tracecmd_input
type tracecmd_input (line 60) | struct tracecmd_input
type tracecmd_input (line 62) | struct tracecmd_input
type tep_event (line 63) | struct tep_event
type tep_record (line 64) | struct tep_record
type tracecmd_input (line 68) | struct tracecmd_input
type tracecmd_input (line 69) | struct tracecmd_input
type tep_event (line 70) | struct tep_event
type tep_record (line 71) | struct tep_record
type tracecmd_input (line 75) | struct tracecmd_input
type tracecmd_input (line 77) | struct tracecmd_input
type tracecmd_input (line 79) | struct tracecmd_input
type tep_record (line 80) | struct tep_record
type tracecmd_input (line 83) | struct tracecmd_input
type tracecmd_input (line 85) | struct tracecmd_input
type tep_record (line 86) | struct tep_record
type tracecmd_input (line 89) | struct tracecmd_input
type tracecmd_input (line 91) | struct tracecmd_input
type tep_record (line 92) | struct tep_record
type tep_loglevel (line 96) | enum tep_loglevel
type tracecmd_filters (line 98) | enum tracecmd_filters {
type tracecmd_filter (line 105) | struct tracecmd_filter
type tracecmd_filter (line 106) | struct tracecmd_filter
type tracecmd_input (line 106) | struct tracecmd_input
type tracecmd_cpu_map (line 109) | struct tracecmd_cpu_map
type tracecmd_input (line 110) | struct tracecmd_input
type tracecmd_cpu_map (line 111) | struct tracecmd_cpu_map
type tracecmd_input (line 111) | struct tracecmd_input
type tracecmd_cpu_map (line 112) | struct tracecmd_cpu_map
type tracecmd_input (line 112) | struct tracecmd_input
type tracecmd_input (line 114) | struct tracecmd_input
type tracecmd_cpu_map (line 114) | struct tracecmd_cpu_map
type tracecmd_cpu_map (line 115) | struct tracecmd_cpu_map
type tracecmd_cpu_map (line 116) | struct tracecmd_cpu_map
type tracecmd_cpu_map (line 117) | struct tracecmd_cpu_map
FILE: lib/trace-cmd/include/private/trace-cmd-private-python.h
type tracecmd_input (line 9) | struct tracecmd_input
type tracecmd_input (line 10) | struct tracecmd_input
type tep_record (line 12) | struct tep_record
type tracecmd_input (line 13) | struct tracecmd_input
type tep_record (line 15) | struct tep_record
type tracecmd_input (line 16) | struct tracecmd_input
type tep_record (line 18) | struct tep_record
type tracecmd_input (line 19) | struct tracecmd_input
type tep_record (line 21) | struct tep_record
FILE: lib/trace-cmd/include/private/trace-cmd-private.h
type tep_plugin_list (line 31) | struct tep_plugin_list
type tep_handle (line 31) | struct tep_handle
type tep_record (line 50) | struct tep_record
type tracecmd_output (line 61) | struct tracecmd_output
type tracecmd_recorder (line 62) | struct tracecmd_recorder
type hook_list (line 63) | struct hook_list
type tracecmd_context (line 67) | enum tracecmd_context {
type tracecmd_plugin_flag (line 72) | enum tracecmd_plugin_flag {
type trace_plugin_context (line 77) | struct trace_plugin_context
type trace_plugin_context (line 79) | struct trace_plugin_context
type tracecmd_context (line 80) | enum tracecmd_context
type trace_plugin_context (line 82) | struct trace_plugin_context
type tracecmd_plugin_flag (line 83) | enum tracecmd_plugin_flag
type trace_plugin_context (line 94) | struct trace_plugin_context
type trace_plugin_context (line 95) | struct trace_plugin_context
type tracecmd_input (line 97) | struct tracecmd_input
type trace_plugin_context (line 98) | struct trace_plugin_context
type tracecmd_output (line 99) | struct tracecmd_output
type trace_plugin_context (line 100) | struct trace_plugin_context
type tracecmd_output (line 102) | struct tracecmd_output
type tracecmd_output (line 103) | struct tracecmd_output
type tracecmd_output (line 104) | struct tracecmd_output
type tracecmd_input (line 105) | struct tracecmd_input
type tracecmd_input (line 107) | struct tracecmd_input
type tracecmd_input (line 108) | struct tracecmd_input
type tracecmd_input (line 109) | struct tracecmd_input
type tracecmd_input (line 110) | struct tracecmd_input
function tracecmd_host_bigendian (line 112) | static inline int tracecmd_host_bigendian(void)
type tracecmd_file_states (line 123) | enum tracecmd_file_states {
type tracecmd_ftrace (line 177) | struct tracecmd_ftrace {
type tracecmd_proc_addr_map (line 184) | struct tracecmd_proc_addr_map {
type tracecmd_input (line 190) | struct tracecmd_input
type tep_record (line 191) | struct tep_record
type tracecmd_input (line 192) | struct tracecmd_input
type hook_list (line 193) | struct hook_list
type tracecmd_input (line 195) | struct tracecmd_input
type tracecmd_input (line 196) | struct tracecmd_input
type tracecmd_input (line 197) | struct tracecmd_input
type tracecmd_input (line 198) | struct tracecmd_input
type tracecmd_file_states (line 199) | enum tracecmd_file_states
type tracecmd_input (line 200) | struct tracecmd_input
type tracecmd_input (line 201) | struct tracecmd_input
type tracecmd_input (line 202) | struct tracecmd_input
type tracecmd_output (line 203) | struct tracecmd_output
type tracecmd_file_states (line 204) | enum tracecmd_file_states
type tracecmd_file_states (line 205) | enum tracecmd_file_states
type tracecmd_input (line 206) | struct tracecmd_input
type tracecmd_output (line 207) | struct tracecmd_output
type tracecmd_input (line 208) | struct tracecmd_input
type tracecmd_output (line 209) | struct tracecmd_output
type tracecmd_input (line 210) | struct tracecmd_input
type tracecmd_output (line 211) | struct tracecmd_output
type tracecmd_input (line 212) | struct tracecmd_input
type tracecmd_input (line 213) | struct tracecmd_input
type tracecmd_input (line 214) | struct tracecmd_input
type tracecmd_file_states (line 215) | enum tracecmd_file_states
type tracecmd_input (line 215) | struct tracecmd_input
type tracecmd_input (line 216) | struct tracecmd_input
type tracecmd_input (line 218) | struct tracecmd_input
type tracecmd_input (line 220) | struct tracecmd_input
type tracecmd_input (line 222) | struct tracecmd_input
type tracecmd_input (line 224) | struct tracecmd_input
type tracecmd_input (line 225) | struct tracecmd_input
type tracecmd_input (line 227) | struct tracecmd_input
type hook_list (line 229) | struct hook_list
type tracecmd_input (line 229) | struct tracecmd_input
type tracecmd_input (line 231) | struct tracecmd_input
type tracecmd_input (line 232) | struct tracecmd_input
type tracecmd_input (line 233) | struct tracecmd_input
type tracecmd_input (line 235) | struct tracecmd_input
type tep_record (line 237) | struct tep_record
type tracecmd_input (line 238) | struct tracecmd_input
type tep_record (line 238) | struct tep_record
type tep_record (line 240) | struct tep_record
type tracecmd_input (line 241) | struct tracecmd_input
type tep_record (line 243) | struct tep_record
type tracecmd_input (line 244) | struct tracecmd_input
type tep_record (line 246) | struct tep_record
type tracecmd_input (line 247) | struct tracecmd_input
type tracecmd_input (line 248) | struct tracecmd_input
type tep_record (line 249) | struct tep_record
type tracecmd_input (line 251) | struct tracecmd_input
type tracecmd_input (line 254) | struct tracecmd_input
type tracecmd_input (line 257) | struct tracecmd_input
type tracecmd_input (line 260) | struct tracecmd_input
type tracecmd_input (line 262) | struct tracecmd_input
type tracecmd_input (line 263) | struct tracecmd_input
type tracecmd_input (line 264) | struct tracecmd_input
type tracecmd_input (line 267) | struct tracecmd_input
type tracecmd_ftrace (line 267) | struct tracecmd_ftrace
type tracecmd_input (line 268) | struct tracecmd_input
type tracecmd_input (line 270) | struct tracecmd_input
type tracecmd_input (line 271) | struct tracecmd_input
type tracecmd_input (line 274) | struct tracecmd_input
type tep_record (line 274) | struct tep_record
type tracecmd_input (line 275) | struct tracecmd_input
type tep_record (line 276) | struct tep_record
type tracecmd_input (line 277) | struct tracecmd_input
type tep_record (line 278) | struct tep_record
type tracecmd_proc_addr_map (line 280) | struct tracecmd_proc_addr_map
type tracecmd_input (line 281) | struct tracecmd_input
type tracecmd_input (line 285) | struct tracecmd_input
type tracecmd_event_list (line 291) | struct tracecmd_event_list {
type tracecmd_option (line 296) | struct tracecmd_option
type tracecmd_msg_handle (line 297) | struct tracecmd_msg_handle
type tracecmd_output (line 299) | struct tracecmd_output
type tracecmd_msg_handle (line 300) | struct tracecmd_msg_handle
type tracecmd_output (line 301) | struct tracecmd_output
type tracecmd_output (line 302) | struct tracecmd_output
type tracecmd_output (line 303) | struct tracecmd_output
type tracecmd_input (line 303) | struct tracecmd_input
type tracecmd_output (line 304) | struct tracecmd_output
type tracecmd_output (line 305) | struct tracecmd_output
type tracecmd_output (line 306) | struct tracecmd_output
type tracecmd_event_list (line 307) | struct tracecmd_event_list
type tracecmd_output (line 309) | struct tracecmd_output
type tracecmd_output (line 310) | struct tracecmd_output
type tracecmd_output (line 311) | struct tracecmd_output
type tracecmd_option (line 314) | struct tracecmd_option
type tracecmd_output (line 314) | struct tracecmd_output
type tracecmd_option (line 317) | struct tracecmd_option
type tracecmd_output (line 318) | struct tracecmd_output
type iovec (line 319) | struct iovec
type tracecmd_output (line 321) | struct tracecmd_output
type tracecmd_output (line 322) | struct tracecmd_output
type tracecmd_output (line 324) | struct tracecmd_output
type tracecmd_output (line 325) | struct tracecmd_output
type tracecmd_output (line 326) | struct tracecmd_output
type tracecmd_output (line 327) | struct tracecmd_output
type tracecmd_output (line 328) | struct tracecmd_output
type tracecmd_output (line 329) | struct tracecmd_output
type tracecmd_output (line 330) | struct tracecmd_output
type tracecmd_output (line 331) | struct tracecmd_output
type tracecmd_output (line 332) | struct tracecmd_output
type tracecmd_output (line 333) | struct tracecmd_output
type tracecmd_input (line 333) | struct tracecmd_input
type tracecmd_file_states (line 334) | enum tracecmd_file_states
type tracecmd_output (line 337) | struct tracecmd_output
type tracecmd_output (line 339) | struct tracecmd_output
type tracecmd_output (line 341) | struct tracecmd_output
type tracecmd_output (line 343) | struct tracecmd_output
type tracecmd_output (line 344) | struct tracecmd_output
type tracecmd_output (line 345) | struct tracecmd_output
type tracecmd_output (line 346) | struct tracecmd_output
type tracecmd_output (line 347) | struct tracecmd_output
type tracecmd_recorder (line 359) | struct tracecmd_recorder
type tracecmd_recorder (line 360) | struct tracecmd_recorder
type tracecmd_recorder (line 361) | struct tracecmd_recorder
type tracecmd_recorder (line 362) | struct tracecmd_recorder
type tracecmd_recorder (line 363) | struct tracecmd_recorder
type tracecmd_recorder (line 364) | struct tracecmd_recorder
type tracefs_instance (line 364) | struct tracefs_instance
type tracecmd_recorder (line 365) | struct tracecmd_recorder
type tracefs_instance (line 365) | struct tracefs_instance
type tracecmd_recorder (line 366) | struct tracecmd_recorder
type tracefs_instance (line 366) | struct tracefs_instance
type tracecmd_recorder (line 368) | struct tracecmd_recorder
type tracecmd_recorder (line 369) | struct tracecmd_recorder
type tracecmd_recorder (line 370) | struct tracecmd_recorder
type tracecmd_msg_flags (line 372) | enum tracecmd_msg_flags {
type tracecmd_msg_handle (line 381) | struct tracecmd_msg_handle {
type tracecmd_tsync_protos (line 395) | struct tracecmd_tsync_protos {
type tracecmd_msg_handle (line 399) | struct tracecmd_msg_handle
type tracecmd_msg_handle (line 401) | struct tracecmd_msg_handle
type tracecmd_msg_handle (line 404) | struct tracecmd_msg_handle
type tracecmd_msg_handle (line 407) | struct tracecmd_msg_handle
type tracecmd_msg_handle (line 409) | struct tracecmd_msg_handle
type tracecmd_msg_handle (line 411) | struct tracecmd_msg_handle
type tracecmd_msg_handle (line 412) | struct tracecmd_msg_handle
type tracecmd_msg_handle (line 413) | struct tracecmd_msg_handle
type tracecmd_msg_handle (line 414) | struct tracecmd_msg_handle
type tracecmd_msg_handle (line 415) | struct tracecmd_msg_handle
type tracecmd_msg_handle (line 416) | struct tracecmd_msg_handle
type tracecmd_msg_handle (line 417) | struct tracecmd_msg_handle
type tracecmd_msg_handle (line 418) | struct tracecmd_msg_handle
type tracecmd_msg_handle (line 421) | struct tracecmd_msg_handle
type tracecmd_msg_handle (line 422) | struct tracecmd_msg_handle
type tracecmd_msg_handle (line 424) | struct tracecmd_msg_handle
type tracecmd_msg_handle (line 425) | struct tracecmd_msg_handle
type tracecmd_msg_handle (line 426) | struct tracecmd_msg_handle
type tracecmd_msg_handle (line 427) | struct tracecmd_msg_handle
type tracecmd_msg_handle (line 428) | struct tracecmd_msg_handle
type tracecmd_output (line 429) | struct tracecmd_output
type tracecmd_msg_handle (line 430) | struct tracecmd_msg_handle
type tracecmd_output (line 431) | struct tracecmd_output
type tracecmd_msg_handle (line 433) | struct tracecmd_msg_handle
type tracecmd_tsync_protos (line 436) | struct tracecmd_tsync_protos
type tracecmd_msg_handle (line 437) | struct tracecmd_msg_handle
type tracecmd_tsync_protos (line 440) | struct tracecmd_tsync_protos
type tracecmd_msg_handle (line 443) | struct tracecmd_msg_handle
type tracecmd_tsync_protos (line 446) | struct tracecmd_tsync_protos
type tracecmd_msg_handle (line 447) | struct tracecmd_msg_handle
type tracecmd_tsync_protos (line 450) | struct tracecmd_tsync_protos
type tracecmd_msg_handle (line 453) | struct tracecmd_msg_handle
type tracecmd_msg_handle (line 458) | struct tracecmd_msg_handle
type tracecmd_msg_handle (line 465) | struct tracecmd_msg_handle
type tracecmd_msg_handle (line 468) | struct tracecmd_msg_handle
type tracecmd_clocks (line 473) | enum tracecmd_clocks {
type tracecmd_clocks (line 486) | enum tracecmd_clocks
type tracecmd_clocks (line 487) | enum tracecmd_clocks
type tracecmd_time_sync (line 491) | struct tracecmd_time_sync
type tracecmd_time_sync_role (line 500) | enum tracecmd_time_sync_role {
type tracecmd_tsync_protos (line 511) | struct tracecmd_tsync_protos
type tracecmd_time_sync (line 513) | struct tracecmd_time_sync
type tracecmd_time_sync (line 516) | struct tracecmd_time_sync
type tracecmd_time_sync (line 517) | struct tracecmd_time_sync
type tracecmd_time_sync (line 521) | struct tracecmd_time_sync
type tracecmd_time_sync (line 522) | struct tracecmd_time_sync
type tracecmd_tsync_protos (line 525) | struct tracecmd_tsync_protos
type tracecmd_time_sync_role (line 526) | enum tracecmd_time_sync_role
type tracecmd_time_sync (line 527) | struct tracecmd_time_sync
type tracecmd_output (line 528) | struct tracecmd_output
type tracecmd_time_sync (line 529) | struct tracecmd_time_sync
type tracecmd_compress_chunk (line 532) | struct tracecmd_compress_chunk {
type tracecmd_compression (line 538) | struct tracecmd_compression
type tracecmd_compression_proto (line 539) | struct tracecmd_compression_proto {
type tracecmd_compression (line 551) | struct tracecmd_compression
type tep_handle (line 552) | struct tep_handle
type tracecmd_msg_handle (line 553) | struct tracecmd_msg_handle
type tracecmd_compression (line 554) | struct tracecmd_compression
type tracecmd_compression (line 555) | struct tracecmd_compression
type tracecmd_compression (line 556) | struct tracecmd_compression
type tracecmd_compression (line 557) | struct tracecmd_compression
type tracecmd_compression (line 558) | struct tracecmd_compression
type tracecmd_compression (line 559) | struct tracecmd_compression
type tracecmd_compression (line 560) | struct tracecmd_compression
type tracecmd_compression (line 562) | struct tracecmd_compression
type tracecmd_compression (line 563) | struct tracecmd_compression
type tracecmd_compression_proto (line 567) | struct tracecmd_compression_proto
type tracecmd_compression (line 568) | struct tracecmd_compression
type tracecmd_compression (line 570) | struct tracecmd_compression
type tracecmd_compression (line 572) | struct tracecmd_compression
type tracecmd_compress_chunk (line 573) | struct tracecmd_compress_chunk
type tracecmd_compression (line 574) | struct tracecmd_compression
type tracecmd_compress_chunk (line 575) | struct tracecmd_compress_chunk
type tracecmd_compression (line 576) | struct tracecmd_compression
type tep_plugin_option (line 578) | struct tep_plugin_option
type hook_list (line 588) | struct hook_list {
type hook_list (line 605) | struct hook_list
type hook_list (line 606) | struct hook_list
type tracecmd_input (line 617) | struct tracecmd_input
type kbuffer (line 623) | struct kbuffer
type tracecmd_input (line 623) | struct tracecmd_input
type tep_record (line 624) | struct tep_record
type tracecmd_input (line 625) | struct tracecmd_input
type tep_record (line 626) | struct tep_record
type tracecmd_input (line 627) | struct tracecmd_input
type tep_record (line 628) | struct tep_record
type trace_perf (line 634) | struct trace_perf {
type trace_perf (line 642) | struct trace_perf
type trace_perf (line 643) | struct trace_perf
type trace_perf (line 644) | struct trace_perf
FILE: lib/trace-cmd/include/private/trace-filter-hash.h
type tracecmd_filter_id_item (line 12) | struct tracecmd_filter_id_item {
type tracecmd_filter_id (line 17) | struct tracecmd_filter_id {
function tracecmd_quick_hash (line 36) | static inline uint32_t tracecmd_quick_hash(uint32_t val, unsigned int bits)
type tracecmd_filter_id_item (line 46) | struct tracecmd_filter_id_item
type tracecmd_filter_id (line 47) | struct tracecmd_filter_id
type tracecmd_filter_id (line 48) | struct tracecmd_filter_id
type tracecmd_filter_id (line 49) | struct tracecmd_filter_id
type tracecmd_filter_id (line 50) | struct tracecmd_filter_id
type tracecmd_filter_id (line 51) | struct tracecmd_filter_id
type tracecmd_filter_id (line 52) | struct tracecmd_filter_id
type tracecmd_filter_id (line 53) | struct tracecmd_filter_id
type tracecmd_filter_id (line 54) | struct tracecmd_filter_id
type tracecmd_filter_id (line 55) | struct tracecmd_filter_id
type tracecmd_filter_id (line 56) | struct tracecmd_filter_id
type tracecmd_filter_id (line 57) | struct tracecmd_filter_id
function tracecmd_filter_task_count (line 59) | static inline int tracecmd_filter_task_count(struct tracecmd_filter_id *...
FILE: lib/trace-cmd/include/private/trace-hash.h
type trace_hash_item (line 9) | struct trace_hash_item {
type trace_hash (line 15) | struct trace_hash {
type trace_hash (line 21) | struct trace_hash
type trace_hash (line 22) | struct trace_hash
type trace_hash (line 23) | struct trace_hash
type trace_hash_item (line 23) | struct trace_hash_item
type trace_hash (line 24) | struct trace_hash
function trace_hash_del (line 26) | static inline void trace_hash_del(struct trace_hash_item *item)
type trace_hash_item (line 49) | struct trace_hash_item
type trace_hash_item (line 51) | struct trace_hash_item
type trace_hash (line 52) | struct trace_hash
FILE: lib/trace-cmd/include/private/trace-rbtree.h
type trace_rbtree_node (line 9) | struct trace_rbtree_node {
type trace_rbtree_node (line 16) | struct trace_rbtree_node
type trace_rbtree_node (line 16) | struct trace_rbtree_node
type trace_rbtree_node (line 18) | struct trace_rbtree_node
type trace_rbtree (line 20) | struct trace_rbtree {
type trace_rbtree (line 27) | struct trace_rbtree
type trace_rbtree_node (line 29) | struct trace_rbtree_node
type trace_rbtree (line 29) | struct trace_rbtree
type trace_rbtree (line 30) | struct trace_rbtree
type trace_rbtree_node (line 30) | struct trace_rbtree_node
type trace_rbtree (line 31) | struct trace_rbtree
type trace_rbtree_node (line 31) | struct trace_rbtree_node
type trace_rbtree_node (line 32) | struct trace_rbtree_node
type trace_rbtree (line 32) | struct trace_rbtree
FILE: lib/trace-cmd/include/trace-cmd-local.h
function tracecmd_zstd_init (line 36) | static inline int tracecmd_zstd_init(void)
type data_file_write (line 42) | struct data_file_write {
type tracecmd_filters (line 52) | enum tracecmd_filters
type tracecmd_filter (line 52) | struct tracecmd_filter
type tep_record (line 53) | struct tep_record
type tracecmd_input (line 55) | struct tracecmd_input
type tracecmd_cpu_map (line 55) | struct tracecmd_cpu_map
type tracecmd_cpu_map (line 56) | struct tracecmd_cpu_map
type tracecmd_input (line 56) | struct tracecmd_input
type tracecmd_input (line 57) | struct tracecmd_input
type tracecmd_input (line 58) | struct tracecmd_input
type tracecmd_cpu_map (line 59) | struct tracecmd_cpu_map
type tracecmd_output (line 65) | struct tracecmd_output
type tracecmd_output (line 67) | struct tracecmd_output
type tracecmd_output (line 68) | struct tracecmd_output
type tracecmd_output (line 69) | struct tracecmd_output
type tracecmd_output (line 70) | struct tracecmd_output
type tracecmd_output (line 72) | struct tracecmd_output
type tracecmd_output (line 73) | struct tracecmd_output
type tracecmd_output (line 75) | struct tracecmd_output
type tracecmd_input (line 78) | struct tracecmd_input
type tracecmd_input (line 79) | struct tracecmd_input
type tracecmd_output (line 82) | struct tracecmd_output
type tracecmd_output (line 84) | struct tracecmd_output
type tracecmd_output (line 86) | struct tracecmd_output
type tracecmd_option (line 88) | struct tracecmd_option
type tracecmd_output (line 89) | struct tracecmd_output
type data_file_write (line 91) | struct data_file_write
type cpu_data_source (line 93) | struct cpu_data_source {
type tracecmd_output (line 99) | struct tracecmd_output
type cpu_data_source (line 100) | struct cpu_data_source
type tracecmd_output (line 101) | struct tracecmd_output
type tracecmd_msg_handle (line 102) | struct tracecmd_msg_handle
type tracecmd_input (line 103) | struct tracecmd_input
type tracecmd_input (line 104) | struct tracecmd_input
type tracecmd_output (line 105) | struct tracecmd_output
type tracecmd_output (line 106) | struct tracecmd_output
type tracecmd_filter (line 109) | struct tracecmd_filter
type tracecmd_input (line 109) | struct tracecmd_input
type tracecmd_input (line 110) | struct tracecmd_input
type tracecmd_filter (line 110) | struct tracecmd_filter
type tracecmd_filter (line 111) | struct tracecmd_filter
FILE: lib/trace-cmd/include/trace-hash-local.h
function trace_hash (line 9) | static inline unsigned int trace_hash(unsigned int val)
function trace_hash_str (line 37) | static inline unsigned int trace_hash_str(char *str)
FILE: lib/trace-cmd/include/trace-tsync-local.h
type tsync_proto (line 11) | struct tsync_proto
type tracecmd_time_sync (line 13) | struct tracecmd_time_sync {
type clock_sync_offsets (line 32) | struct clock_sync_offsets {
type clock_sync_context (line 46) | struct clock_sync_context {
type tracecmd_time_sync (line 64) | struct tracecmd_time_sync
type tracecmd_time_sync (line 65) | struct tracecmd_time_sync
type tracecmd_time_sync (line 66) | struct tracecmd_time_sync
function kvm_clock_sync_register (line 75) | static inline int kvm_clock_sync_register(void)
FILE: lib/trace-cmd/include/trace-write-local.h
function __do_write (line 11) | static inline ssize_t __do_write(int fd, const void *data, size_t size)
function __do_write_check (line 29) | static inline ssize_t
FILE: lib/trace-cmd/test.c
function main (line 3) | int main()
FILE: lib/trace-cmd/trace-blk-hack.c
function tracecmd_blk_hack (line 32) | int tracecmd_blk_hack(struct tracecmd_input *handle)
FILE: lib/trace-cmd/trace-compress-zlib.c
function zlib_compress (line 16) | static int zlib_compress(void *ctx, const void *in, int in_bytes, void *...
function zlib_decompress (line 45) | static int zlib_decompress(void *ctx, const void *in, int in_bytes, void...
function zlib_compress_bound (line 74) | static unsigned int zlib_compress_bound(void *ctx, unsigned int in_bytes)
function zlib_is_supported (line 79) | static bool zlib_is_supported(const char *name, const char *version)
function tracecmd_zlib_init (line 102) | int tracecmd_zlib_init(void)
FILE: lib/trace-cmd/trace-compress-zstd.c
type zstd_context (line 15) | struct zstd_context {
function zstd_compress (line 20) | static int zstd_compress(void *ctx, const void *in, int in_bytes, void *...
function zstd_decompress (line 35) | static int zstd_decompress(void *ctx, const void *in, int in_bytes, void...
function zstd_compress_bound (line 52) | static unsigned int zstd_compress_bound(void *ctx, unsigned int in_bytes)
function zstd_is_supported (line 57) | static bool zstd_is_supported(const char *name, const char *version)
type zstd_context (line 69) | struct zstd_context
function free_zstd_context (line 92) | static void free_zstd_context(void *ctx)
function tracecmd_zstd_init (line 104) | int tracecmd_zstd_init(void)
FILE: lib/trace-cmd/trace-compress.c
type compress_proto (line 16) | struct compress_proto {
type compress_proto (line 30) | struct compress_proto
type tracecmd_compression (line 32) | struct tracecmd_compression {
function read_fd (line 44) | static ssize_t read_fd(int fd, char *dst, int len)
function write_fd (line 63) | static ssize_t write_fd(int fd, const void *data, size_t size)
function read_size_val (line 81) | static int read_size_val(struct tep_handle *tep, size_t size, int *endian4)
function do_write (line 91) | static ssize_t do_write(struct tracecmd_compression *handle,
function buffer_extend (line 105) | static inline int buffer_extend(struct tracecmd_compression *handle, siz...
function off_t (line 131) | off_t tracecmd_compress_lseek(struct tracecmd_compression *handle, off_t...
function compress_read (line 163) | static ssize_t compress_read(struct tracecmd_compression *handle, char *...
function tracecmd_compress_pread (line 189) | ssize_t tracecmd_compress_pread(struct tracecmd_compression *handle, cha...
function tracecmd_compress_buffer_read (line 212) | ssize_t tracecmd_compress_buffer_read(struct tracecmd_compression *handl...
function tracecmd_compress_reset (line 234) | void tracecmd_compress_reset(struct tracecmd_compression *handle)
function tracecmd_uncompress_block (line 256) | int tracecmd_uncompress_block(struct tracecmd_compression *handle)
function tracecmd_compress_block (line 318) | int tracecmd_compress_block(struct tracecmd_compression *handle)
type tracecmd_compression (line 380) | struct tracecmd_compression
function tracecmd_compress_buffer_write (line 406) | int tracecmd_compress_buffer_write(struct tracecmd_compression *handle,
function tracecmd_compress_init (line 426) | void tracecmd_compress_init(void)
type compress_proto (line 439) | struct compress_proto
type compress_proto (line 441) | struct compress_proto
type compress_proto (line 442) | struct compress_proto
type tracecmd_compression (line 465) | struct tracecmd_compression
type tep_handle (line 466) | struct tep_handle
type tracecmd_msg_handle (line 467) | struct tracecmd_msg_handle
type tracecmd_compression (line 469) | struct tracecmd_compression
type compress_proto (line 470) | struct compress_proto
function tracecmd_compress_destroy (line 503) | void tracecmd_compress_destroy(struct tracecmd_compression *handle)
function tracecmd_compress_is_supported (line 524) | bool tracecmd_compress_is_supported(const char *name, const char *version)
function tracecmd_compress_proto_get_name (line 549) | int tracecmd_compress_proto_get_name(struct tracecmd_compression *compress,
function tracecmd_compress_proto_register (line 578) | int tracecmd_compress_proto_register(struct tracecmd_compression_proto *...
function tracecmd_compress_free (line 622) | void tracecmd_compress_free(void)
function tracecmd_compress_protos_get (line 648) | int tracecmd_compress_protos_get(char ***names, char ***versions)
function tracecmd_compress_copy_from (line 710) | int tracecmd_compress_copy_from(struct tracecmd_compression *handle, int...
function tracecmd_load_chunks_info (line 840) | int tracecmd_load_chunks_info(struct tracecmd_compression *handle,
function tracecmd_uncompress_chunk (line 913) | int tracecmd_uncompress_chunk(struct tracecmd_compression *handle,
function tracecmd_uncompress_copy_to (line 961) | int tracecmd_uncompress_copy_to(struct tracecmd_compression *handle, int...
FILE: lib/trace-cmd/trace-filter-hash.c
type tracecmd_filter_id_item (line 18) | struct tracecmd_filter_id_item
type tracecmd_filter_id (line 19) | struct tracecmd_filter_id
type tracecmd_filter_id_item (line 22) | struct tracecmd_filter_id_item
function tracecmd_filter_id_add (line 33) | void tracecmd_filter_id_add(struct tracecmd_filter_id *hash, int id)
function tracecmd_filter_id_remove (line 48) | void tracecmd_filter_id_remove(struct tracecmd_filter_id *hash, int id)
function tracecmd_filter_id_clear (line 73) | void tracecmd_filter_id_clear(struct tracecmd_filter_id *hash)
type tracecmd_filter_id (line 94) | struct tracecmd_filter_id
type tracecmd_filter_id (line 96) | struct tracecmd_filter_id
function tracecmd_filter_id_hash_free (line 106) | void tracecmd_filter_id_hash_free(struct tracecmd_filter_id *hash)
type tracecmd_filter_id (line 116) | struct tracecmd_filter_id
type tracecmd_filter_id (line 117) | struct tracecmd_filter_id
type tracecmd_filter_id (line 119) | struct tracecmd_filter_id
type tracecmd_filter_id_item (line 120) | struct tracecmd_filter_id_item
type tracecmd_filter_id (line 150) | struct tracecmd_filter_id
type tracecmd_filter_id_item (line 152) | struct tracecmd_filter_id_item
function tracecmd_filter_id_compare (line 183) | int tracecmd_filter_id_compare(struct tracecmd_filter_id *hash1,
FILE: lib/trace-cmd/trace-filter.c
type filter (line 9) | struct filter {
type tracecmd_filter (line 13) | struct tracecmd_filter {
function test_stacktrace (line 25) | static bool test_stacktrace(struct tracecmd_filter *filter, struct tep_r...
function test_stacktraces (line 41) | static bool test_stacktraces(struct tracecmd_filter *filter, struct tep_...
function tracecmd_filters (line 47) | tracecmd_filters
type tracecmd_filter (line 121) | struct tracecmd_filter
type tracecmd_input (line 121) | struct tracecmd_input
type tracecmd_filter (line 124) | struct tracecmd_filter
type tep_handle (line 125) | struct tep_handle
type filter (line 126) | struct filter
type filter (line 127) | struct filter
type filter (line 128) | struct filter
function free_filters (line 179) | static void free_filters (struct filter **filter, int nr)
function __hidden (line 191) | __hidden void tcmd_filter_free(struct tracecmd_filter *trace_filter)
FILE: lib/trace-cmd/trace-ftrace.c
type tep_plugin_option (line 16) | struct tep_plugin_option
type tep_plugin_option (line 52) | struct tep_plugin_option
type tep_plugin_option (line 53) | struct tep_plugin_option
type tep_plugin_option (line 54) | struct tep_plugin_option
type tep_plugin_option (line 55) | struct tep_plugin_option
type tep_plugin_option (line 56) | struct tep_plugin_option
function find_ret_event (line 58) | static int find_ret_event(struct tracecmd_ftrace *finfo, struct tep_hand...
function function_handler (line 78) | static int function_handler(struct trace_seq *s, struct tep_record *record,
type tep_record (line 108) | struct tep_record
type trace_seq (line 109) | struct trace_seq
type tep_record (line 110) | struct tep_record
type tracecmd_ftrace (line 111) | struct tracecmd_ftrace
function print_graph_overhead (line 142) | static void print_graph_overhead(struct trace_seq *s,
function print_graph_duration (line 168) | static void print_graph_duration(struct trace_seq *s, unsigned long long...
function print_args (line 202) | static bool print_args(struct trace_seq *s, struct tep_event *event,
function print_graph_entry_leaf (line 228) | static int
function print_graph_nested (line 313) | static int print_graph_nested(struct trace_seq *s,
function fgraph_ent_handler (line 368) | static int
function fgraph_ret_handler (line 410) | static int
function tracecmd_ftrace_load_options (line 492) | void tracecmd_ftrace_load_options(void)
function tracecmd_ftrace_overrides (line 497) | int tracecmd_ftrace_overrides(struct tracecmd_input *handle,
FILE: lib/trace-cmd/trace-hash.c
function tcmd_hash_init (line 15) | int __hidden tcmd_hash_init(struct trace_hash *hash, int buckets)
function tcmd_hash_free (line 31) | void __hidden tcmd_hash_free(struct trace_hash *hash)
function tcmd_hash_empty (line 36) | int __hidden tcmd_hash_empty(struct trace_hash *hash)
function tcmd_hash_add (line 46) | int __hidden tcmd_hash_add(struct trace_hash *hash, struct trace_hash_it...
function trace_hash_item (line 66) | trace_hash_item *
FILE: lib/trace-cmd/trace-hooks.c
type hook_list (line 15) | struct hook_list
type hook_list (line 17) | struct hook_list
function tracecmd_free_hooks (line 159) | void tracecmd_free_hooks(struct hook_list *hooks)
FILE: lib/trace-cmd/trace-input.c
type page_map (line 38) | struct page_map {
type follow_event (line 46) | struct follow_event {
type page (line 55) | struct page {
type zchunk_cache (line 69) | struct zchunk_cache {
type cpu_zdata (line 76) | struct cpu_zdata {
type cpu_data (line 87) | struct cpu_data {
type cpu_file_data (line 108) | struct cpu_file_data {
type input_buffer_instance (line 114) | struct input_buffer_instance {
type ts_offset_sample (line 124) | struct ts_offset_sample {
type guest_trace_info (line 131) | struct guest_trace_info {
type timesync_offsets (line 139) | struct timesync_offsets {
type host_trace_info (line 144) | struct host_trace_info {
type tsc2nsec (line 154) | struct tsc2nsec {
type file_section (line 160) | struct file_section {
type tracecmd_input (line 168) | struct tracecmd_input {
type tracecmd_input (line 238) | struct tracecmd_input
type tracecmd_input (line 244) | struct tracecmd_input
function tracecmd_set_flag (line 246) | void tracecmd_set_flag(struct tracecmd_input *handle, int flag)
function tracecmd_clear_flag (line 251) | void tracecmd_clear_flag(struct tracecmd_input *handle, int flag)
function tracecmd_get_flags (line 256) | unsigned long tracecmd_get_flags(struct tracecmd_input *handle)
function tracecmd_get_file_state (line 261) | enum tracecmd_file_states tracecmd_get_file_state(struct tracecmd_input ...
function tracecmd_set_private (line 266) | void tracecmd_set_private(struct tracecmd_input *handle, void *data)
type tracecmd_input (line 271) | struct tracecmd_input
function remove_record (line 277) | static void remove_record(struct page *page, struct tep_record *record)
function add_record (line 286) | static void add_record(struct page *page, struct tep_record *record)
type page (line 294) | struct page
type tep_record (line 297) | struct tep_record
type page (line 298) | struct page
function remove_record (line 319) | static inline void remove_record(struct page *page, struct tep_record *r...
function add_record (line 320) | static inline void add_record(struct page *page, struct tep_record *reco...
type page (line 321) | struct page
function __hidden (line 334) | __hidden void tcmd_set_guest_map(struct tracecmd_input *handle,
function tracecmd_cpu_map (line 340) | tracecmd_cpu_map *tcmd_get_guest_map(struct tracecmd_input *handle)
function __hidden (line 345) | __hidden void tcmd_set_guest_map_cnt(struct tracecmd_input *handle, int ...
function __hidden (line 350) | __hidden int tcmd_get_guest_map_cnt(struct tracecmd_input *handle)
type tracecmd_input (line 355) | struct tracecmd_input
function do_read_fd (line 357) | static ssize_t do_read_fd(int fd, void *data, size_t size)
function do_lseek (line 375) | static inline int do_lseek(struct tracecmd_input *handle, int offset, in...
function do_read (line 383) | static inline ssize_t do_read(struct tracecmd_input *handle, void *data,...
function do_read_check (line 391) | static ssize_t
type tracecmd_input (line 405) | struct tracecmd_input
function read2 (line 467) | static int read2(struct tracecmd_input *handle, unsigned short *size)
function read4 (line 479) | static int read4(struct tracecmd_input *handle, unsigned int *size)
function read8 (line 491) | static int read8(struct tracecmd_input *handle, unsigned long long *size)
function __hidden (line 503) | __hidden void tcmd_in_uncompress_reset(struct tracecmd_input *handle)
function __hidden (line 511) | __hidden int tcmd_in_uncompress_block(struct tracecmd_input *handle)
type file_section (line 523) | struct file_section
type tracecmd_input (line 523) | struct tracecmd_input
type file_section (line 525) | struct file_section
type file_section (line 535) | struct file_section
type tracecmd_input (line 535) | struct tracecmd_input
type file_section (line 537) | struct file_section
function section_close (line 551) | static void section_close(struct tracecmd_input *handle, struct file_sec...
function section_add_or_update (line 557) | static int section_add_or_update(struct tracecmd_input *handle, int id, ...
function read_header_files (line 582) | static int read_header_files(struct tracecmd_input *handle)
function regex_event_buf (line 648) | static int regex_event_buf(const char *file, int size, regex_t *epreg)
function read_ftrace_file (line 681) | static int read_ftrace_file(struct tracecmd_input *handle,
function read_event_file (line 708) | static int read_event_file(struct tracecmd_input *handle,
function make_preg_files (line 742) | static int make_preg_files(const char *regex, regex_t *system,
function read_ftrace_files (line 785) | static int read_ftrace_files(struct tracecmd_input *handle, const char *...
function read_event_files (line 855) | static int read_event_files(struct tracecmd_input *handle, const char *r...
function read_proc_kallsyms (line 954) | static int read_proc_kallsyms(struct tracecmd_input *handle)
function read_ftrace_printk (line 991) | static int read_ftrace_printk(struct tracecmd_input *handle)
function read_btf (line 1029) | static int read_btf(struct tracecmd_input *handle)
function read_modules (line 1044) | static int read_modules(struct tracecmd_input *handle)
type tracecmd_input (line 1059) | struct tracecmd_input
function tracecmd_get_parsing_failures (line 1067) | int tracecmd_get_parsing_failures(struct tracecmd_input *handle)
function read_cpus (line 1074) | static int read_cpus(struct tracecmd_input *handle)
function read_headers_v6 (line 1092) | static int read_headers_v6(struct tracecmd_input *handle, enum tracecmd_...
type tracecmd_input (line 1159) | struct tracecmd_input
type tracecmd_input (line 1161) | struct tracecmd_input
function read_section_header (line 1169) | static int read_section_header(struct tracecmd_input *handle, unsigned s...
function handle_section (line 1198) | static int handle_section(struct tracecmd_input *handle, struct file_sec...
function read_headers (line 1253) | static int read_headers(struct tracecmd_input *handle, const char *regex)
function tracecmd_read_headers (line 1293) | int tracecmd_read_headers(struct tracecmd_input *handle,
function calc_page_offset (line 1301) | static unsigned long long calc_page_offset(struct tracecmd_input *handle,
function read_page (line 1307) | static int read_page(struct tracecmd_input *handle, off_t offset,
function normalize_size (line 1345) | static unsigned long long normalize_size(unsigned long long size)
function free_page_map (line 1359) | static void free_page_map(struct page_map *page_map)
function chunk_cmp (line 1372) | static int chunk_cmp(const void *A, const void *B)
type tracecmd_compress_chunk (line 1386) | struct tracecmd_compress_chunk
type cpu_data (line 1386) | struct cpu_data
type cpu_zdata (line 1388) | struct cpu_zdata
type tracecmd_compress_chunk (line 1389) | struct tracecmd_compress_chunk
type tracecmd_compress_chunk (line 1390) | struct tracecmd_compress_chunk
function free_zpage (line 1417) | static void free_zpage(struct cpu_data *cpu_data, off_t offset)
type tracecmd_input (line 1441) | struct tracecmd_input
type cpu_data (line 1443) | struct cpu_data
type tracecmd_compress_chunk (line 1444) | struct tracecmd_compress_chunk
type trace_rbtree_node (line 1445) | struct trace_rbtree_node
type zchunk_cache (line 1446) | struct zchunk_cache
type zchunk_cache (line 1473) | struct zchunk_cache
type tracecmd_input (line 1491) | struct tracecmd_input
type page (line 1492) | struct page
type cpu_data (line 1494) | struct cpu_data
type page_map (line 1495) | struct page_map
type page_map (line 1576) | struct page_map
type page (line 1587) | struct page
type tracecmd_input (line 1587) | struct tracecmd_input
type cpu_data (line 1590) | struct cpu_data
type page (line 1591) | struct page
type page (line 1592) | struct page
function __free_page (line 1633) | static void __free_page(struct tracecmd_input *handle, struct page *page)
function free_page (line 1675) | static void free_page(struct tracecmd_input *handle, int cpu)
function __free_record (line 1686) | static void __free_record(struct tep_record *record)
function tracecmd_free_record (line 1697) | void tracecmd_free_record(struct tep_record *record)
function tracecmd_record_ref (line 1722) | void tracecmd_record_ref(struct tep_record *record)
function free_next (line 1731) | static void free_next(struct tracecmd_input *handle, int cpu)
function mul_u64_u32_shr (line 1749) | static unsigned long long mul_u64_u32_shr(unsigned long long a,
function timestamp_correction_calc (line 1765) | static inline unsigned long long
function timestamp_host_sync (line 1789) | static unsigned long long timestamp_host_sync(unsigned long long ts, int...
function timestamp_calc (line 1836) | static unsigned long long timestamp_calc(unsigned long long ts, int cpu,
function update_page_info (line 1864) | static int update_page_info(struct tracecmd_input *handle, int cpu)
function get_page (line 1894) | static int get_page(struct tracecmd_input *handle, int cpu,
function get_next_page (line 1937) | static int get_next_page(struct tracecmd_input *handle, int cpu)
type tep_record (line 1956) | struct tep_record
type tracecmd_input (line 1957) | struct tracecmd_input
type tep_record (line 1960) | struct tep_record
type tep_record (line 1980) | struct tep_record
type tracecmd_input (line 1981) | struct tracecmd_input
type tep_record (line 1984) | struct tep_record
type tep_record (line 1992) | struct tep_record
type tracecmd_input (line 1993) | struct tracecmd_input
type tep_record (line 2024) | struct tep_record
type tracecmd_input (line 2025) | struct tracecmd_input
type tep_record (line 2028) | struct tep_record
type tep_record (line 2053) | struct tep_record
type tracecmd_input (line 2054) | struct tracecmd_input
function tracecmd_refresh_record (line 2094) | int tracecmd_refresh_record(struct tracecmd_input *handle,
type tep_record (line 2129) | struct tep_record
type tracecmd_input (line 2130) | struct tracecmd_input
function tracecmd_iterate_reset (line 2160) | int tracecmd_iterate_reset(struct tracecmd_input *handle)
type tep_record (line 2194) | struct tep_record
type tracecmd_input (line 2195) | struct tracecmd_input
type tep_record (line 2197) | struct tep_record
function tracecmd_set_cpu_to_timestamp (line 2254) | int
function tracecmd_set_all_cpus_to_timestamp (line 2352) | void
function tracecmd_set_cursor (line 2381) | int tracecmd_set_cursor(struct tracecmd_input *handle, int cpu, size_t o...
function tracecmd_get_cursor (line 2411) | unsigned long long
type tep_record (line 2458) | struct tep_record
type tracecmd_input (line 2459) | struct tracecmd_input
type tep_handle (line 2462) | struct tep_handle
type tep_record (line 2463) | struct tep_record
type tep_record (line 2496) | struct tep_record
type tracecmd_input (line 2497) | struct tracecmd_input
type tep_record (line 2499) | struct tep_record
type kbuffer (line 2501) | struct kbuffer
type page (line 2502) | struct page
type tep_record (line 2591) | struct tep_record
type tracecmd_input (line 2592) | struct tracecmd_input
type tep_record (line 2594) | struct tep_record
type tep_record (line 2627) | struct tep_record
type tracecmd_input (line 2628) | struct tracecmd_input
type tep_record (line 2630) | struct tep_record
function tracecmd_follow_event (line 2666) | int tracecmd_follow_event(struct tracecmd_input *handle,
function tracecmd_follow_missed_events (line 2729) | int tracecmd_follow_missed_events(struct tracecmd_input *handle,
function call_followers (line 2754) | static int call_followers(struct tracecmd_input *handle,
function call_missed_events (line 2776) | static int call_missed_events(struct tracecmd_input *handle,
function call_callbacks (line 2797) | static int call_callbacks(struct tracecmd_input *handle, struct tep_reco...
function tracecmd_iterate_events (line 2840) | int tracecmd_iterate_events(struct tracecmd_input *handle,
type tep_record (line 2925) | struct tep_record
type tracecmd_input (line 2926) | struct tracecmd_input
type tep_record (line 2929) | struct tep_record
type tep_record (line 2930) | struct tep_record
function initialize_last_events (line 2962) | static void initialize_last_events(struct tracecmd_input *handle,
type tep_record (line 2997) | struct tep_record
type tracecmd_input (line 2997) | struct tracecmd_input
type tep_record (line 2998) | struct tep_record
type tep_record (line 3000) | struct tep_record
type page (line 3001) | struct page
type tep_record (line 3019) | struct tep_record
type tracecmd_input (line 3019) | struct tracecmd_input
type tep_record (line 3020) | struct tep_record
type tep_record (line 3022) | struct tep_record
type page (line 3023) | struct page
function free_last_events (line 3034) | static void free_last_events(struct tracecmd_input *handle,
function tracecmd_iterate_events_reverse (line 3067) | int tracecmd_iterate_events_reverse(struct tracecmd_input *handle,
type record_handle (line 3135) | struct record_handle {
function tracecmd_iterate_events_multi (line 3153) | int tracecmd_iterate_events_multi(struct tracecmd_input **handles,
type tep_record (line 3243) | struct tep_record
type tracecmd_input (line 3244) | struct tracecmd_input
type tep_record (line 3247) | struct tep_record
type tep_record (line 3292) | struct tep_record
type tracecmd_input (line 3293) | struct tracecmd_input
type tep_record (line 3293) | struct tep_record
type cpu_data (line 3296) | struct cpu_data
function init_cpu_zfile (line 3373) | static int init_cpu_zfile(struct tracecmd_input *handle, int cpu)
function init_cpu_zpage (line 3405) | static int init_cpu_zpage(struct tracecmd_input *handle, int cpu)
function compress_cmp (line 3434) | static int compress_cmp(const struct trace_rbtree_node *A,
function compress_search (line 3446) | static int compress_search(const struct trace_rbtree_node *A,
function init_cpu (line 3463) | static int init_cpu(struct tracecmd_input *handle, int cpu)
function tracecmd_set_ts_offset (line 3548) | void tracecmd_set_ts_offset(struct tracecmd_input *handle,
function tracecmd_add_ts_offset (line 3560) | void tracecmd_add_ts_offset(struct tracecmd_input *handle,
function tracecmd_set_ts2secs (line 3566) | void tracecmd_set_ts2secs(struct tracecmd_input *handle,
function tsync_offset_cmp (line 3576) | static int tsync_offset_cmp(const void *a, const void *b)
function tsync_cpu_offsets_load (line 3604) | static int tsync_cpu_offsets_load(struct tracecmd_input *handle, char *b...
function trace_tsync_offset_free (line 3649) | static void trace_tsync_offset_free(struct host_trace_info *host)
function trace_pid_map_cmp (line 3661) | static int trace_pid_map_cmp(const void *a, const void *b)
function procmap_free (line 3672) | static void procmap_free(struct pid_addr_maps *maps)
function trace_guests_free (line 3687) | static void trace_guests_free(struct tracecmd_input *handle)
function trace_guest_load (line 3700) | static int trace_guest_load(struct tracecmd_input *handle, char *buf, in...
function trace_pid_map_load (line 3769) | static int trace_pid_map_load(struct tracecmd_input *handle, char *buf)
function trace_pid_map_free (line 3840) | static void trace_pid_map_free(struct pid_addr_maps *maps)
function trace_pid_map_search (line 3851) | static int trace_pid_map_search(const void *a, const void *b)
type tracecmd_proc_addr_map (line 3876) | struct tracecmd_proc_addr_map
type tracecmd_input (line 3877) | struct tracecmd_input
type tracecmd_proc_addr_map (line 3880) | struct tracecmd_proc_addr_map
type tracecmd_proc_addr_map (line 3881) | struct tracecmd_proc_addr_map
type pid_addr_maps (line 3882) | struct pid_addr_maps
function tcmd_get_meta_strings_size (line 3902) | __hidden unsigned int tcmd_get_meta_strings_size(struct tracecmd_input *...
function tcmd_get_last_option_offset (line 3907) | __hidden unsigned long long tcmd_get_last_option_offset(struct tracecmd_...
function handle_option_done (line 3912) | static int handle_option_done(struct tracecmd_input *handle, char *buf, ...
function save_read_number (line 3933) | static inline int save_read_number(struct tep_handle *tep, char *data, i...
function handle_buffer_option (line 3965) | static int handle_buffer_option(struct tracecmd_input *handle,
function handle_options (line 4070) | static int handle_options(struct tracecmd_input *handle)
function read_options_type (line 4288) | static int read_options_type(struct tracecmd_input *handle)
function tracecmd_latency_data_read (line 4320) | int tracecmd_latency_data_read(struct tracecmd_input *handle, char **buf...
function init_cpu_data (line 4373) | static int init_cpu_data(struct tracecmd_input *handle)
function init_latency_data (line 4436) | int init_latency_data(struct tracecmd_input *handle)
function init_buffer_cpu_data (line 4464) | static int init_buffer_cpu_data(struct tracecmd_input *handle, struct in...
function read_cpu_data (line 4512) | static int read_cpu_data(struct tracecmd_input *handle)
function read_data_and_size (line 4575) | static int read_data_and_size(struct tracecmd_input *handle,
function read_and_parse_cmdlines (line 4591) | static int read_and_parse_cmdlines(struct tracecmd_input *handle)
function extract_trace_clock (line 4616) | static void extract_trace_clock(struct tracecmd_input *handle, char *line)
function tracecmd_parse_trace_clock (line 4646) | void tracecmd_parse_trace_clock(struct tracecmd_input *handle,
function read_and_parse_trace_clock (line 4661) | static int read_and_parse_trace_clock(struct tracecmd_input *handle,
function init_data_v6 (line 4675) | static int init_data_v6(struct tracecmd_input *handle)
function init_data (line 4700) | static int init_data(struct tracecmd_input *handle)
function tracecmd_init_data (line 4712) | int tracecmd_init_data(struct tracecmd_input *handle)
function tracecmd_make_pipe (line 4745) | int tracecmd_make_pipe(struct tracecmd_input *handle, int cpu, int fd, i...
function tracecmd_print_events (line 4800) | void tracecmd_print_events(struct tracecmd_input *handle, const char *re...
function show_cpu_stats (line 4812) | static void show_cpu_stats(struct tracecmd_input *handle)
function tracecmd_print_stats (line 4832) | void tracecmd_print_stats(struct tracecmd_input *handle)
function tracecmd_print_uname (line 4849) | void tracecmd_print_uname(struct tracecmd_input *handle)
function tracecmd_print_version (line 4864) | void tracecmd_print_version(struct tracecmd_input *handle)
type hook_list (line 4881) | struct hook_list
type tracecmd_input (line 4881) | struct tracecmd_input
function init_metadata_strings (line 4886) | static int init_metadata_strings(struct tracecmd_input *handle, int size)
function read_metadata_strings (line 4903) | static int read_metadata_strings(struct tracecmd_input *handle)
type tracecmd_input (line 4957) | struct tracecmd_input
type tracecmd_input (line 4959) | struct tracecmd_input
type tracecmd_input (line 5104) | struct tracecmd_input
type tracecmd_input (line 5120) | struct tracecmd_input
type tracecmd_input (line 5122) | struct tracecmd_input
type tracecmd_input (line 5147) | struct tracecmd_input
type tracecmd_input (line 5164) | struct tracecmd_input
type tracecmd_input (line 5166) | struct tracecmd_input
function tracecmd_ref (line 5195) | void tracecmd_ref(struct tracecmd_input *handle)
function free_buffer (line 5203) | static inline void free_buffer(struct input_buffer_instance *buf)
function tracecmd_close (line 5217) | void tracecmd_close(struct tracecmd_input *handle)
function read_copy_size8 (line 5322) | static int read_copy_size8(struct tracecmd_input *in_handle,
function read_copy_size4 (line 5336) | static int read_copy_size4(struct tracecmd_input *in_handle, struct trac...
function read_copy_data (line 5350) | static int read_copy_data(struct tracecmd_input *in_handle,
function check_in_state (line 5375) | static bool check_in_state(struct tracecmd_input *handle, int new_state)
function copy_header_files (line 5380) | static int copy_header_files(struct tracecmd_input *in_handle,
function copy_ftrace_files (line 5436) | static int copy_ftrace_files(struct tracecmd_input *in_handle, struct tr...
function copy_event_files (line 5486) | static int copy_event_files(struct tracecmd_input *in_handle, struct tra...
function copy_proc_kallsyms (line 5551) | static int copy_proc_kallsyms(struct tracecmd_input *in_handle, struct t...
function copy_ftrace_printk (line 5595) | static int copy_ftrace_printk(struct tracecmd_input *in_handle, struct t...
function copy_command_lines (line 5642) | static int copy_command_lines(struct tracecmd_input *in_handle, struct t...
function copy_cpu_count (line 5688) | static int copy_cpu_count(struct tracecmd_input *in_handle, struct trace...
function tracecmd_copy_headers (line 5731) | int tracecmd_copy_headers(struct tracecmd_input *in_handle,
function tracecmd_copy_buffer_descr (line 5835) | int tracecmd_copy_buffer_descr(struct tracecmd_input *in_handle,
function copy_options_recursive (line 5849) | static int copy_options_recursive(struct tracecmd_input *in_handle,
function copy_options (line 5930) | static int copy_options(struct tracecmd_input *in_handle, struct tracecm...
function tracecmd_copy_options (line 5988) | int tracecmd_copy_options(struct tracecmd_input *in_handle,
function copy_trace_latency (line 6007) | static int copy_trace_latency(struct tracecmd_input *in_handle,
function copy_trace_flyrecord_data (line 6044) | static int copy_trace_flyrecord_data(struct tracecmd_input *in_handle,
function copy_flyrecord_buffer (line 6083) | static int copy_flyrecord_buffer(struct tracecmd_input *in_handle,
function copy_trace_data_from_v6 (line 6110) | static int copy_trace_data_from_v6(struct tracecmd_input *in_handle,
function copy_trace_data_from_v7 (line 6142) | static int copy_trace_data_from_v7(struct tracecmd_input *in_handle,
function __hidden (line 6172) | __hidden int tcmd_copy_trace_data(struct tracecmd_input *in_handle,
function tracecmd_record_at_buffer_start (line 6196) | int tracecmd_record_at_buffer_start(struct tracecmd_input *handle,
function tracecmd_page_ts (line 6210) | unsigned long long tracecmd_page_ts(struct tracecmd_input *handle,
function tracecmd_record_ts_delta (line 6222) | unsigned int tracecmd_record_ts_delta(struct tracecmd_input *handle,
type kbuffer (line 6237) | struct kbuffer
type tracecmd_input (line 6237) | struct tracecmd_input
type tep_record (line 6238) | struct tep_record
type tracecmd_input (line 6243) | struct tracecmd_input
type tep_record (line 6244) | struct tep_record
type page (line 6246) | struct page
type tracecmd_input (line 6251) | struct tracecmd_input
type tep_record (line 6252) | struct tep_record
type page (line 6254) | struct page
function tracecmd_buffer_instances (line 6265) | int tracecmd_buffer_instances(struct tracecmd_input *handle)
type tracecmd_input (line 6270) | struct tracecmd_input
type tracecmd_input (line 6278) | struct tracecmd_input
type tracecmd_input (line 6279) | struct tracecmd_input
type tracecmd_input (line 6281) | struct tracecmd_input
type input_buffer_instance (line 6282) | struct input_buffer_instance
function tracecmd_is_buffer_instance (line 6369) | int tracecmd_is_buffer_instance(struct tracecmd_input *handle)
function tracecmd_long_size (line 6378) | int tracecmd_long_size(struct tracecmd_input *handle)
function tracecmd_page_size (line 6387) | int tracecmd_page_size(struct tracecmd_input *handle)
function tracecmd_cpus (line 6396) | int tracecmd_cpus(struct tracecmd_input *handle)
type tep_handle (line 6405) | struct tep_handle
type tracecmd_input (line 6405) | struct tracecmd_input
function tracecmd_get_in_file_version (line 6414) | unsigned long tracecmd_get_in_file_version(struct tracecmd_input *handle)
function tracecmd_get_file_compress_proto (line 6431) | int tracecmd_get_file_compress_proto(struct tracecmd_input *handle,
function tracecmd_get_use_trace_clock (line 6441) | bool tracecmd_get_use_trace_clock(struct tracecmd_input *handle)
function tracecmd_get_options_offset (line 6450) | size_t tracecmd_get_options_offset(struct tracecmd_input *handle)
type tracecmd_input (line 6463) | struct tracecmd_input
function tracecmd_get_tsc2nsec (line 6480) | int tracecmd_get_tsc2nsec(struct tracecmd_input *handle,
type tracecmd_input (line 6505) | struct tracecmd_input
type tracecmd_input (line 6521) | struct tracecmd_input
type tracecmd_input (line 6536) | struct tracecmd_input
function off_t (line 6551) | off_t tracecmd_get_cpu_file_size(struct tracecmd_input *handle, int cpu)
function tracecmd_show_data_func (line 6562) | tracecmd_show_data_func
function tracecmd_set_show_data_func (line 6572) | void tracecmd_set_show_data_func(struct tracecmd_input *handle,
function tracecmd_get_traceid (line 6584) | unsigned long long tracecmd_get_traceid(struct tracecmd_input *handle)
function tracecmd_get_first_ts (line 6595) | unsigned long long tracecmd_get_first_ts(struct tracecmd_input *handle)
function tracecmd_get_guest_cpumap (line 6627) | int tracecmd_get_guest_cpumap(struct tracecmd_input *handle,
function tracecmd_enable_tsync (line 6662) | int tracecmd_enable_tsync(struct tracecmd_input *handle, bool enable)
function tracecmd_filter (line 6673) | tracecmd_filter *tcmd_filter_get(struct tracecmd_input *handle)
function __hidden (line 6678) | __hidden void tcmd_filter_set(struct tracecmd_input *handle,
FILE: lib/trace-cmd/trace-maps.c
type tracecmd_cpu_map (line 15) | struct tracecmd_cpu_map {
function cmp_map (line 24) | static int cmp_map(const void *A, const void *B)
function tracecmd_map_vcpus (line 34) | int tracecmd_map_vcpus(struct tracecmd_input **handles, int nr_handles)
function __hidden (line 109) | __hidden void tcmd_guest_map_free(struct tracecmd_cpu_map *map)
type tracecmd_cpu_map (line 114) | struct tracecmd_cpu_map
type tracecmd_input (line 114) | struct tracecmd_input
type tracecmd_cpu_map (line 117) | struct tracecmd_cpu_map
type tracecmd_cpu_map (line 118) | struct tracecmd_cpu_map
function tracecmd_map_set_private (line 142) | void tracecmd_map_set_private(struct tracecmd_cpu_map *map, void *priv)
type tracecmd_cpu_map (line 149) | struct tracecmd_cpu_map
type tracecmd_input (line 156) | struct tracecmd_input
type tracecmd_cpu_map (line 156) | struct tracecmd_cpu_map
function tracecmd_map_get_host_pid (line 161) | int tracecmd_map_get_host_pid(struct tracecmd_cpu_map *map)
type tracecmd_cpu_map (line 166) | struct tracecmd_cpu_map
type tracecmd_input (line 166) | struct tracecmd_input
type tracecmd_cpu_map (line 168) | struct tracecmd_cpu_map
FILE: lib/trace-cmd/trace-msg.c
type __u32 (line 32) | typedef __u32 u32;
type __be32 (line 33) | typedef __be32 be32;
type tracecmd_msg_tinit (line 46) | struct tracecmd_msg_tinit {
type tracecmd_msg_rinit (line 52) | struct tracecmd_msg_rinit {
type trace_req_params (line 57) | enum trace_req_params {
type tracecmd_msg_trace_req_param (line 62) | struct tracecmd_msg_trace_req_param {
type tracecmd_msg_trace_req (line 68) | struct tracecmd_msg_trace_req {
type tracecmd_msg_trace_proxy (line 74) | struct tracecmd_msg_trace_proxy {
type tracecmd_msg_trace_resp (line 80) | struct tracecmd_msg_trace_resp {
type tracecmd_msg_tsync (line 89) | struct tracecmd_msg_tsync {
type tracecmd_msg_header (line 94) | struct tracecmd_msg_header {
type tracecmd_msg_cmd (line 117) | enum tracecmd_msg_cmd {
type tracecmd_msg (line 139) | struct tracecmd_msg {
function msg_buf_len (line 152) | static inline int msg_buf_len(struct tracecmd_msg *msg)
function __msg_write (line 157) | static int __msg_write(int fd, struct tracecmd_msg *msg, bool network)
function __hidden (line 186) | __hidden off_t tcmd_msg_lseek(struct tracecmd_msg_handle *msg_handle, of...
function msg_write (line 211) | static int msg_write(struct tracecmd_msg_handle *msg_handle, struct trac...
type msg_trace_flags (line 220) | enum msg_trace_flags {
function make_tinit (line 224) | static int make_tinit(struct tracecmd_msg_handle *msg_handle,
function tatou (line 251) | static int tatou(const char *s, unsigned int *res)
function write_uints (line 263) | static int write_uints(char *buf, size_t buf_len,
function make_rinit (line 287) | static int make_rinit(struct tracecmd_msg *msg, int cpus, unsigned int *...
function tracecmd_msg_init (line 303) | static void tracecmd_msg_init(u32 cmd, struct tracecmd_msg *msg)
function msg_free (line 311) | static void msg_free(struct tracecmd_msg *msg)
function tracecmd_msg_send (line 317) | static int tracecmd_msg_send(struct tracecmd_msg_handle *msg_handle, str...
function msg_send_nofree (line 330) | static int msg_send_nofree(struct tracecmd_msg_handle *msg_handle, struc...
function msg_read (line 341) | static int msg_read(int fd, void *buf, u32 size, int *n)
function msg_read_extra (line 362) | static int msg_read_extra(int fd, struct tracecmd_msg *msg,
function tracecmd_msg_recv (line 406) | static int tracecmd_msg_recv(int fd, struct tracecmd_msg *msg)
function tracecmd_msg_done (line 439) | bool tracecmd_msg_done(struct tracecmd_msg_handle *msg_handle)
function tracecmd_msg_set_done (line 444) | void tracecmd_msg_set_done(struct tracecmd_msg_handle *msg_handle)
function error_operation (line 449) | static void error_operation(struct tracecmd_msg *msg)
function tracecmd_msg_recv_wait (line 457) | static int tracecmd_msg_recv_wait(int fd, struct tracecmd_msg *msg)
function tracecmd_msg_wait_for_msg (line 473) | static int tracecmd_msg_wait_for_msg(int fd, struct tracecmd_msg *msg)
function tracecmd_msg_send_notsupp (line 492) | static int tracecmd_msg_send_notsupp(struct tracecmd_msg_handle *msg_han...
function handle_unexpected_msg (line 500) | static int handle_unexpected_msg(struct tracecmd_msg_handle *msg_handle,
function tracecmd_msg_send_init_data (line 511) | int tracecmd_msg_send_init_data(struct tracecmd_msg_handle *msg_handle,
function process_option (line 584) | static bool process_option(struct tracecmd_msg_handle *msg_handle,
type tracecmd_msg_handle (line 598) | struct tracecmd_msg_handle
type tracecmd_msg_handle (line 601) | struct tracecmd_msg_handle
type tracecmd_msg_handle (line 603) | struct tracecmd_msg_handle
function tracecmd_msg_handle_cache (line 614) | int tracecmd_msg_handle_cache(struct tracecmd_msg_handle *msg_handle)
function flush_cache (line 633) | static int flush_cache(struct tracecmd_msg_handle *msg_handle)
function tracecmd_msg_handle_close (line 662) | void tracecmd_msg_handle_close(struct tracecmd_msg_handle *msg_handle)
function tracecmd_msg_initial_setting (line 673) | int tracecmd_msg_initial_setting(struct tracecmd_msg_handle *msg_handle)
function tracecmd_msg_send_port_array (line 753) | int tracecmd_msg_send_port_array(struct tracecmd_msg_handle *msg_handle,
function tracecmd_msg_send_close_msg (line 771) | int tracecmd_msg_send_close_msg(struct tracecmd_msg_handle *msg_handle)
function tracecmd_msg_send_close_resp_msg (line 779) | int tracecmd_msg_send_close_resp_msg(struct tracecmd_msg_handle *msg_han...
function tracecmd_msg_cont (line 787) | int tracecmd_msg_cont(struct tracecmd_msg_handle *msg_handle)
function tracecmd_msg_data_send (line 795) | int tracecmd_msg_data_send(struct tracecmd_msg_handle *msg_handle,
function tracecmd_msg_send_options (line 850) | int tracecmd_msg_send_options(struct tracecmd_msg_handle *msg_handle,
function tracecmd_msg_flush_data (line 878) | int tracecmd_msg_flush_data(struct tracecmd_msg_handle *msg_handle)
function tracecmd_msg_finish_sending_data (line 891) | int tracecmd_msg_finish_sending_data(struct tracecmd_msg_handle *msg_han...
function read_msg_data (line 904) | static int read_msg_data(struct tracecmd_msg_handle *msg_handle,
function tracecmd_msg_read_options (line 940) | int tracecmd_msg_read_options(struct tracecmd_msg_handle *msg_handle,
function tracecmd_msg_read_data (line 976) | int tracecmd_msg_read_data(struct tracecmd_msg_handle *msg_handle, int ofd)
function tracecmd_msg_collect_data (line 1015) | int tracecmd_msg_collect_data(struct tracecmd_msg_handle *msg_handle, in...
function tracecmd_msg_wait_for_cmd (line 1026) | static int tracecmd_msg_wait_for_cmd(struct tracecmd_msg_handle *msg_han...
function tracecmd_msg_wait (line 1055) | int tracecmd_msg_wait(struct tracecmd_msg_handle *msg_handle)
function tracecmd_msg_wait_close (line 1060) | int tracecmd_msg_wait_close(struct tracecmd_msg_handle *msg_handle)
function tracecmd_msg_wait_close_resp (line 1065) | int tracecmd_msg_wait_close_resp(struct tracecmd_msg_handle *msg_handle)
function make_trace_req_protos (line 1070) | static int make_trace_req_protos(char **buf, int *size,
function make_trace_req_args (line 1111) | static int make_trace_req_args(char **buf, int *size, int argc, char **a...
function make_trace_req (line 1146) | static int make_trace_req(struct tracecmd_msg *msg, int argc, char **argv,
function tracecmd_msg_send_trace_req (line 1170) | int tracecmd_msg_send_trace_req(struct tracecmd_msg_handle *msg_handle,
function tracecmd_msg_send_trace_proxy (line 1186) | int tracecmd_msg_send_trace_proxy(struct tracecmd_msg_handle *msg_handle,
function get_trace_req_protos (line 1206) | static int get_trace_req_protos(char *buf, int length,
function get_trace_req_args (line 1247) | static int get_trace_req_args(char *buf, int length, int *argc, char ***...
function msg_recv_trace_req_proxy (line 1298) | static int msg_recv_trace_req_proxy(struct tracecmd_msg_handle *msg_handle,
function tracecmd_msg_recv_trace_req (line 1382) | int tracecmd_msg_recv_trace_req(struct tracecmd_msg_handle *msg_handle,
function tracecmd_msg_recv_trace_proxy (line 1397) | int tracecmd_msg_recv_trace_proxy(struct tracecmd_msg_handle *msg_handle,
function tracecmd_msg_send_time_sync (line 1418) | int tracecmd_msg_send_time_sync(struct tracecmd_msg_handle *msg_handle,
function tracecmd_msg_recv_time_sync (line 1462) | int tracecmd_msg_recv_time_sync(struct tracecmd_msg_handle *msg_handle,
function make_trace_resp (line 1517) | static int make_trace_resp(struct tracecmd_msg *msg, int page_size, int ...
function tracecmd_msg_send_trace_resp (line 1547) | int tracecmd_msg_send_trace_resp(struct tracecmd_msg_handle *msg_handle,
function tracecmd_msg_recv_trace_resp (line 1565) | int tracecmd_msg_recv_trace_resp(struct tracecmd_msg_handle *msg_handle,
FILE: lib/trace-cmd/trace-output.c
type tsize_t (line 30) | typedef unsigned long long tsize_t;
type stsize_t (line 31) | typedef long long stsize_t;
type tracecmd_option (line 33) | struct tracecmd_option {
type tracecmd_buffer (line 41) | struct tracecmd_buffer {
type tracecmd_output (line 53) | struct tracecmd_output {
type list_event (line 85) | struct list_event {
type list_event_system (line 91) | struct list_event_system {
type tracecmd_output (line 99) | struct tracecmd_output
type tracecmd_output (line 100) | struct tracecmd_output
function tcmd_do_write_check (line 102) | __hidden long long
function off_t (line 114) | static inline off_t do_lseek(struct tracecmd_output *handle, off_t offse...
function do_preed (line 125) | static inline int do_preed(struct tracecmd_output *handle, void *dst, in...
function convert_endian_2 (line 133) | static short convert_endian_2(struct tracecmd_output *handle, short val)
function convert_endian_4 (line 141) | static int convert_endian_4(struct tracecmd_output *handle, int val)
function convert_endian_8 (line 149) | static unsigned long long convert_endian_8(struct tracecmd_output *handle,
function __hidden (line 158) | __hidden void tcmd_out_compression_reset(struct tracecmd_output *handle)
function __hidden (line 167) | __hidden int tcmd_out_uncompress_block(struct tracecmd_output *handle)
function __hidden (line 181) | __hidden int tcmd_out_compression_start(struct tracecmd_output *handle)
function __hidden (line 192) | __hidden int tcmd_out_compression_end(struct tracecmd_output *handle)
function add_string (line 201) | static long add_string(struct tracecmd_output *handle, const char *string)
function tracecmd_set_quiet (line 222) | void tracecmd_set_quiet(struct tracecmd_output *handle, bool set_quiet)
function tracecmd_set_out_clock (line 228) | void tracecmd_set_out_clock(struct tracecmd_output *handle, const char *...
function tracecmd_get_quiet (line 241) | bool tracecmd_get_quiet(struct tracecmd_output *handle)
function tracecmd_output_free (line 248) | void tracecmd_output_free(struct tracecmd_output *handle)
function tracecmd_output_flush (line 283) | void tracecmd_output_flush(struct tracecmd_output *handle)
function tracecmd_output_close (line 297) | void tracecmd_output_close(struct tracecmd_output *handle)
function get_size_fd (line 311) | static unsigned long get_size_fd(int fd)
function get_size (line 328) | static unsigned long get_size(const char *file)
function tsize_t (line 344) | static tsize_t copy_file_fd(struct tracecmd_output *handle, int fd, unsi...
function tsize_t (line 371) | static tsize_t copy_file(struct tracecmd_output *handle,
function tcmd_out_copy_fd_compress (line 389) | __hidden unsigned long long
function tsize_t (line 419) | static tsize_t copy_file_compress(struct tracecmd_output *handle,
type tracecmd_output (line 443) | struct tracecmd_output
type tracecmd_output (line 454) | struct tracecmd_output
function put_tracing_file (line 471) | static void put_tracing_file(char *file)
function tracecmd_ftrace_enable (line 476) | int tracecmd_ftrace_enable(int set)
function tcmd_out_write_section_header (line 502) | __hidden unsigned long long
function write_compress_section_header (line 552) | static unsigned long long
function __hidden (line 560) | __hidden int tcmd_out_update_section_header(struct tracecmd_output *hand...
function update_endian_4 (line 595) | static int update_endian_4(struct tracecmd_output *handle,
function save_string_section (line 621) | static int save_string_section(struct tracecmd_output *handle)
function read_header_files (line 661) | static int read_header_files(struct tracecmd_output *handle)
function copy_event_system (line 773) | static int copy_event_system(struct tracecmd_output *handle,
function add_list_event_system (line 812) | static void add_list_event_system(struct list_event_system **systems,
function free_list_events (line 862) | static void free_list_events(struct list_event_system *list)
function glob_events (line 882) | static void glob_events(struct tracecmd_output *handle,
function create_event_list_item (line 952) | static void
function read_ftrace_files (line 999) | static int read_ftrace_files(struct tracecmd_output *handle)
type list_event_system (line 1037) | struct list_event_system
type tracecmd_output (line 1038) | struct tracecmd_output
type tracecmd_event_list (line 1039) | struct tracecmd_event_list
type list_event_system (line 1041) | struct list_event_system
type tracecmd_event_list (line 1042) | struct tracecmd_event_list
function read_event_files (line 1050) | static int read_event_files(struct tracecmd_output *handle,
function set_proc_kptr_restrict (line 1124) | static void set_proc_kptr_restrict(int reset)
function read_proc_kallsyms (line 1162) | static int read_proc_kallsyms(struct tracecmd_output *handle)
function read_ftrace_printk (line 1226) | static int read_ftrace_printk(struct tracecmd_output *handle)
function save_tracing_file_data (line 1286) | static int save_tracing_file_data(struct tracecmd_output *handle,
function write_compression_header (line 1325) | static int write_compression_header(struct tracecmd_output *handle)
function get_trace_page_size (line 1346) | static int get_trace_page_size(struct tracecmd_output *handle, const cha...
type tracecmd_output (line 1393) | struct tracecmd_output
type tracecmd_output (line 1395) | struct tracecmd_output
function tracecmd_output_set_msg (line 1431) | int tracecmd_output_set_msg(struct tracecmd_output *handle, struct trace...
function tracecmd_output_set_trace_dir (line 1458) | int tracecmd_output_set_trace_dir(struct tracecmd_output *handle, const ...
function tracecmd_output_set_kallsyms (line 1487) | int tracecmd_output_set_kallsyms(struct tracecmd_output *handle, const c...
function tracecmd_output_set_from_input (line 1523) | int tracecmd_output_set_from_input(struct tracecmd_output *handle, struc...
function tracecmd_output_set_version (line 1561) | int tracecmd_output_set_version(struct tracecmd_output *handle, int file...
function tracecmd_output_set_compression (line 1587) | int tracecmd_output_set_compression(struct tracecmd_output *handle, cons...
function output_write_init (line 1638) | static int output_write_init(struct tracecmd_output *handle)
function tracecmd_output_write_headers (line 1707) | int tracecmd_output_write_headers(struct tracecmd_output *handle,
type tracecmd_option (line 1743) | struct tracecmd_option
type tracecmd_output (line 1744) | struct tracecmd_output
type iovec (line 1745) | struct iovec
type tracecmd_option (line 1748) | struct tracecmd_option
type tracecmd_option (line 1804) | struct tracecmd_option
type tracecmd_output (line 1805) | struct tracecmd_output
type iovec (line 1808) | struct iovec
function tracecmd_write_cpus (line 1815) | int tracecmd_write_cpus(struct tracecmd_output *handle, int cpus)
function write_options_v6 (line 1838) | static int write_options_v6(struct tracecmd_output *handle)
function update_options_start (line 1883) | static int update_options_start(struct tracecmd_output *handle, off_t of...
function tracecmd_prepare_options (line 1908) | int tracecmd_prepare_options(struct tracecmd_output *handle, off_t offse...
function tsize_t (line 1943) | static tsize_t write_options_start(struct tracecmd_output *handle)
function tsize_t (line 1975) | static tsize_t write_options_end(struct tracecmd_output *handle, tsize_t...
function write_options (line 1997) | static int write_options(struct tracecmd_output *handle)
function __hidden (line 2059) | __hidden void *tcmd_get_options(struct tracecmd_output *handle, size_t *...
function __hidden (line 2127) | __hidden int tcmd_append_options(struct tracecmd_output *handle, void *buf,
function tracecmd_write_meta_strings (line 2142) | int tracecmd_write_meta_strings(struct tracecmd_output *handle)
function tracecmd_write_options (line 2150) | int tracecmd_write_options(struct tracecmd_output *handle)
function append_options_v6 (line 2157) | static int append_options_v6(struct tracecmd_output *handle)
function tracecmd_append_options (line 2208) | int tracecmd_append_options(struct tracecmd_output *handle)
type tracecmd_option (line 2215) | struct tracecmd_option
type tracecmd_output (line 2216) | struct tracecmd_output
type tracecmd_option (line 2218) | struct tracecmd_option
function tracecmd_add_buffer_info (line 2244) | int tracecmd_add_buffer_info(struct tracecmd_output *handle, const char ...
function tracecmd_write_buffer_info (line 2261) | int tracecmd_write_buffer_info(struct tracecmd_output *handle)
function tsize_t (line 2279) | static tsize_t get_buffer_file_offset(struct tracecmd_output *handle, co...
function tracecmd_write_cmdlines (line 2293) | int tracecmd_write_cmdlines(struct tracecmd_output *handle)
function tracecmd_append_modules_file (line 2329) | int tracecmd_append_modules_file(struct tracecmd_output *handle)
function tracecmd_append_btf_file (line 2361) | int tracecmd_append_btf_file(struct tracecmd_output *handle)
type tracecmd_output (line 2423) | struct tracecmd_output
type tracefs_instance (line 2425) | struct tracefs_instance
function tracecmd_option (line 2447) | tracecmd_option *
type tracecmd_output (line 2533) | struct tracecmd_output
type tracecmd_output (line 2536) | struct tracecmd_output
function save_clock (line 2609) | static int save_clock(struct tracecmd_output *handle, char *clock)
function update_buffer_cpu_offset_v6 (line 2630) | static int update_buffer_cpu_offset_v6(struct tracecmd_output *handle,
function __hidden (line 2664) | __hidden int tcmd_out_write_emty_cpu_data(struct tracecmd_output *handle...
function __hidden (line 2703) | __hidden int tcmd_out_write_cpu_data(struct tracecmd_output *handle,
function tracecmd_write_cpu_data (line 2855) | int tracecmd_write_cpu_data(struct tracecmd_output *handle,
function tracecmd_append_cpu_data (line 2900) | int tracecmd_append_cpu_data(struct tracecmd_output *handle,
function tracecmd_append_buffer_cpu_data (line 2918) | int tracecmd_append_buffer_cpu_data(struct tracecmd_output *handle,
type tracecmd_output (line 2924) | struct tracecmd_output
type tracecmd_output (line 2926) | struct tracecmd_output
type tracecmd_input (line 2927) | struct tracecmd_input
type tracecmd_output (line 2995) | struct tracecmd_output
type tracecmd_output (line 2997) | struct tracecmd_output
type tracecmd_output (line 3030) | struct tracecmd_output
type tracecmd_input (line 3030) | struct tracecmd_input
type tracecmd_file_states (line 3031) | enum tracecmd_file_states
type tracecmd_file_states (line 3034) | enum tracecmd_file_states
type tracecmd_output (line 3035) | struct tracecmd_output
function __hidden (line 3080) | __hidden void tcmd_out_set_file_state(struct tracecmd_output *handle, in...
function __hidden (line 3085) | __hidden bool tcmd_check_out_state(struct tracecmd_output *handle, int n...
function __hidden (line 3090) | __hidden int tcmd_out_save_options_offset(struct tracecmd_output *handle...
function tracecmd_get_out_file_version (line 3121) | unsigned long tracecmd_get_out_file_version(struct tracecmd_output *handle)
function tracecmd_get_out_file_offset (line 3126) | size_t tracecmd_get_out_file_offset(struct tracecmd_output *handle)
FILE: lib/trace-cmd/trace-perf.c
function default_perf_init_pe (line 12) | static void default_perf_init_pe(struct perf_event_attr *pe)
function tcmd_perf_init (line 47) | int __hidden tcmd_perf_init(struct trace_perf *perf, int pages, int cpu,...
function tcmd_perf_close (line 69) | void __hidden tcmd_perf_close(struct trace_perf *perf)
function tcmd_perf_open (line 88) | int __hidden tcmd_perf_open(struct trace_perf *perf)
FILE: lib/trace-cmd/trace-plugin.c
type trace_plugin_list (line 17) | struct trace_plugin_list {
type trace_plugin_context (line 23) | struct trace_plugin_context {
type trace_plugin_context (line 41) | struct trace_plugin_context
type tracecmd_context (line 42) | enum tracecmd_context
type trace_plugin_context (line 44) | struct trace_plugin_context
type trace_plugin_context (line 46) | struct trace_plugin_context
function tracecmd_plugin_set_flag (line 60) | void tracecmd_plugin_set_flag(struct trace_plugin_context *context,
type tracecmd_input (line 74) | struct tracecmd_input
type trace_plugin_context (line 75) | struct trace_plugin_context
type tracecmd_output (line 89) | struct tracecmd_output
type trace_plugin_context (line 90) | struct trace_plugin_context
function load_plugin (line 97) | static void
function load_plugins_dir (line 153) | static void
function load_plugins_hook (line 217) | static void
type trace_plugin_list (line 283) | struct trace_plugin_list
type trace_plugin_context (line 284) | struct trace_plugin_context
type trace_plugin_list (line 286) | struct trace_plugin_list
function tracecmd_unload_plugins (line 299) | void
FILE: lib/trace-cmd/trace-rbtree.c
function tcmd_rbtree_init (line 16) | void __hidden tcmd_rbtree_init(struct trace_rbtree *tree, trace_rbtree_c...
function is_left (line 24) | static bool is_left(struct trace_rbtree_node *node)
type trace_rbtree_node (line 29) | struct trace_rbtree_node
type trace_rbtree (line 29) | struct trace_rbtree
type trace_rbtree_node (line 30) | struct trace_rbtree_node
function rotate_left (line 40) | static void rotate_left(struct trace_rbtree *tree,
function rotate_right (line 57) | static void rotate_right(struct trace_rbtree *tree,
function insert_tree (line 74) | static void insert_tree(struct trace_rbtree *tree,
function check_node (line 106) | static int check_node(struct trace_rbtree *tree, struct trace_rbtree_nod...
function check_tree (line 124) | static void check_tree(struct trace_rbtree *tree)
function check_tree (line 163) | static inline void check_tree(struct trace_rbtree *tree) { }
function tcmd_rbtree_insert (line 166) | int __hidden tcmd_rbtree_insert(struct trace_rbtree *tree,
type trace_rbtree_node (line 220) | struct trace_rbtree_node
type trace_rbtree (line 220) | struct trace_rbtree
type trace_rbtree_node (line 222) | struct trace_rbtree_node
type trace_rbtree_node (line 237) | struct trace_rbtree_node
type trace_rbtree_node (line 237) | struct trace_rbtree_node
function tree_fixup (line 252) | static void tree_fixup(struct trace_rbtree *tree, struct trace_rbtree_no...
function trace_rbtree_delete (line 312) | void trace_rbtree_delete(struct trace_rbtree *tree, struct trace_rbtree_...
function trace_rbtree_node (line 374) | trace_rbtree_node *
type trace_rbtree_node (line 419) | struct trace_rbtree_node
type trace_rbtree (line 419) | struct trace_rbtree
type trace_rbtree_node (line 421) | struct trace_rbtree_node
FILE: lib/trace-cmd/trace-recorder.c
type tracecmd_recorder (line 33) | struct tracecmd_recorder {
function append_file (line 48) | static int append_file(int size, int dst, int src)
function tracecmd_free_recorder (line 67) | void tracecmd_free_recorder(struct tracecmd_recorder *recorder)
function set_nonblock (line 104) | static int set_nonblock(struct tracecmd_recorder *recorder)
type tracecmd_recorder (line 109) | struct tracecmd_recorder
type tracefs_instance (line 111) | struct tracefs_instance
type tracecmd_recorder (line 113) | struct tracecmd_recorder
type tracecmd_recorder (line 163) | struct tracecmd_recorder
type tracefs_instance (line 165) | struct tracefs_instance
type tracecmd_recorder (line 170) | struct tracecmd_recorder
type tracefs_instance (line 171) | struct tracefs_instance
type tracecmd_recorder (line 176) | struct tracecmd_recorder
type tracefs_instance (line 178) | struct tracefs_instance
type tracecmd_recorder (line 180) | struct tracecmd_recorder
type tracecmd_recorder (line 225) | struct tracecmd_recorder
type tracefs_instance (line 227) | struct tracefs_instance
type tracecmd_recorder (line 229) | struct tracecmd_recorder
type tracecmd_recorder (line 270) | struct tracecmd_recorder
type tracefs_instance (line 272) | struct tracefs_instance
type tracecmd_recorder (line 285) | struct tracecmd_recorder
type tracecmd_recorder (line 292) | struct tracecmd_recorder
type tracecmd_recorder (line 297) | struct tracecmd_recorder
type tracecmd_recorder (line 302) | struct tracecmd_recorder
function update_fd (line 308) | static inline void update_fd(struct tracecmd_recorder *recorder, int size)
function read_data (line 346) | static long read_data(struct tracecmd_recorder *recorder)
function direct_splice_data (line 376) | static long direct_splice_data(struct tracecmd_recorder *recorder)
function move_data (line 382) | static long move_data(struct tracecmd_recorder *recorder)
function tracecmd_flush_recording (line 399) | long tracecmd_flush_recording(struct tracecmd_recorder *recorder, bool f...
function tracecmd_start_recording (line 431) | int tracecmd_start_recording(struct tracecmd_recorder *recorder, unsigne...
function tracecmd_stop_recording (line 471) | int tracecmd_stop_recording(struct tracecmd_recorder *recorder)
FILE: lib/trace-cmd/trace-timesync-kvm.c
type __s64 (line 32) | typedef __s64 s64;
type kvm_clock_files (line 37) | struct kvm_clock_files {
type kvm_clock_sync (line 44) | struct kvm_clock_sync {
type kvm_clock_offset_msg (line 53) | struct kvm_clock_offset_msg {
function read_ll_from_file (line 60) | static int read_ll_from_file(char *file, long long *res)
function kvm_scaling_check_vm_cpu (line 86) | static bool kvm_scaling_check_vm_cpu(char *vname, char *cpu)
function kvm_scaling_check_vm (line 139) | static bool kvm_scaling_check_vm(char *name)
function kvm_scaling_check (line 178) | static bool kvm_scaling_check(void)
function kvm_support_check (line 204) | static bool kvm_support_check(bool guest)
function kvm_open_vcpu_dir (line 219) | static int kvm_open_vcpu_dir(struct kvm_clock_sync *kvm, int i, char *di...
function cmp_clock (line 264) | static int cmp_clock(const void *A, const void *B)
function kvm_open_debug_files (line 274) | static int kvm_open_debug_files(struct kvm_clock_sync *kvm, int pid)
function kvm_clock_sync_init_host (line 334) | static int kvm_clock_sync_init_host(struct tracecmd_time_sync *tsync,
function kvm_clock_sync_init_guest (line 350) | static int kvm_clock_sync_init_guest(struct tracecmd_time_sync *tsync,
function kvm_clock_sync_init (line 391) | static int kvm_clock_sync_init(struct tracecmd_time_sync *tsync)
function kvm_clock_sync_free (line 422) | static int kvm_clock_sync_free(struct tracecmd_time_sync *tsync)
function kvm_clock_host (line 446) | static int kvm_clock_host(struct tracecmd_time_sync *tsync,
function kvm_marker_find (line 509) | static int kvm_marker_find(struct tep_event *event, struct tep_record *r...
function kvm_clock_guest (line 534) | static int kvm_clock_guest(struct tracecmd_time_sync *tsync,
function kvm_clock_sync_calc (line 583) | static int kvm_clock_sync_calc(struct tracecmd_time_sync *tsync,
function kvm_clock_sync_register (line 602) | int kvm_clock_sync_register(void)
function kvm_clock_sync_unregister (line 618) | int kvm_clock_sync_unregister(void)
FILE: lib/trace-cmd/trace-timesync-ptp.c
type __be32 (line 24) | typedef __be32 be32;
type __u64 (line 25) | typedef __u64 u64;
type __s64 (line 26) | typedef __s64 s64;
type ptp_clock_sync (line 39) | struct ptp_clock_sync {
type ptp_clock_start_msg (line 73) | struct ptp_clock_start_msg {
type ptp_clock_sample (line 78) | struct ptp_clock_sample {
type ptp_clock_result_msg (line 83) | struct ptp_clock_result_msg {
type ptp_clock_offset_msg (line 89) | struct ptp_clock_offset_msg {
type ptp_markers_context (line 94) | struct ptp_markers_context {
type ptp_marker_buf (line 101) | struct ptp_marker_buf {
type ptp_marker (line 108) | struct ptp_marker {
function ptp_clock_sync_init (line 113) | static int ptp_clock_sync_init(struct tracecmd_time_sync *tsync)
function ptp_clock_sync_free (line 185) | static int ptp_clock_sync_free(struct tracecmd_time_sync *tsync)
function ptp_probe_store (line 215) | static void ptp_probe_store(struct ptp_markers_context *ctx,
function ptp_marker_find (line 236) | static int ptp_marker_find(struct tep_event *event, struct tep_record *r...
function good_probe (line 259) | static inline bool good_probe(struct ptp_clock_sample *server_sample,
function ptp_calc_offset_fastest (line 272) | static int ptp_calc_offset_fastest(struct clock_sync_context *clock,
function ptp_calc_offset_hist (line 322) | static int ptp_calc_offset_hist(struct clock_sync_context *clock,
function ntoh_ptp_results (line 386) | static void ntoh_ptp_results(struct ptp_clock_result_msg *msg)
function hton_ptp_results (line 399) | static void hton_ptp_results(struct ptp_clock_result_msg *msg)
function ptp_track_clock (line 411) | static inline void ptp_track_clock(struct ptp_markers_context *ctx,
function ptp_clock_client (line 427) | static int ptp_clock_client(struct tracecmd_time_sync *tsync,
function ptp_clock_server (line 521) | static int ptp_clock_server(struct tracecmd_time_sync *tsync,
function ptp_clock_sync_calc (line 666) | static int ptp_clock_sync_calc(struct tracecmd_time_sync *tsync,
function ptp_clock_sync_register (line 703) | int ptp_clock_sync_register(void)
function ptp_clock_sync_unregister (line 717) | int ptp_clock_sync_unregister(void)
FILE: lib/trace-cmd/trace-timesync.c
type tsync_proto (line 25) | struct tsync_proto {
type tsync_probe_request_msg (line 40) | struct tsync_probe_request_msg {
type tsync_proto (line 44) | struct tsync_proto
type tsync_proto (line 46) | struct tsync_proto
type tsync_proto (line 48) | struct tsync_proto
function tracecmd_tsync_init (line 63) | void tracecmd_tsync_init(void)
function tracecmd_tsync_proto_register (line 69) | int tracecmd_tsync_proto_register(const char *proto_name, int accuracy, ...
function tracecmd_tsync_proto_unregister (line 98) | int tracecmd_tsync_proto_unregister(char *proto_name)
function tcmd_tsync_proto_is_supported (line 119) | bool __hidden tcmd_tsync_proto_is_supported(const char *proto_name)
function tracecmd_tsync_get_offsets (line 139) | int tracecmd_tsync_get_offsets(struct tracecmd_time_sync *tsync, int cpu,
function tsync_get_proto_flags (line 172) | static int tsync_get_proto_flags(struct tracecmd_time_sync *tsync,
type tracecmd_tsync_protos (line 205) | struct tracecmd_tsync_protos
type tracecmd_time_sync_role (line 206) | enum tracecmd_time_sync_role
type tsync_proto (line 208) | struct tsync_proto
type tsync_proto (line 209) | struct tsync_proto
function __hidden (line 251) | __hidden const char *
function tracecmd_tsync_proto_getall (line 270) | int tracecmd_tsync_proto_getall(struct tracecmd_tsync_protos **protos, c...
function get_first_cpu (line 315) | static int get_first_cpu(cpu_set_t **pin_mask, size_t *m_size)
type tracefs_instance (line 358) | struct tracefs_instance
type tracefs_instance (line 361) | struct tracefs_instance
function clock_synch_delete_instance (line 376) | static void
function clock_context_init (line 385) | static int clock_context_init(struct tracecmd_time_sync *tsync, bool guest)
function tracecmd_tsync_free (line 438) | void tracecmd_tsync_free(struct tracecmd_time_sync *tsync)
function cpu_set_t (line 491) | static cpu_set_t *pin_to_cpu(int cpu)
function restore_pin_to_cpu (line 530) | static void restore_pin_to_cpu(cpu_set_t *mask)
function tsync_send (line 541) | static int tsync_send(struct tracecmd_time_sync *tsync, unsigned int cpu)
function tsync_with_host (line 559) | static void tsync_with_host(struct tracecmd_time_sync *tsync)
function record_sync_sample (line 585) | static int record_sync_sample(struct clock_sync_offsets *offsets, int ar...
function tsync_get_sample (line 626) | static int tsync_get_sample(struct tracecmd_time_sync *tsync, unsigned i...
function get_ts_loop_delay (line 652) | static inline void get_ts_loop_delay(struct timespec *timeout, int delay...
function tsync_with_guest (line 666) | static int tsync_with_guest(struct tracecmd_time_sync *tsync)
type tracecmd_time_sync (line 724) | struct tracecmd_time_sync
type tracecmd_time_sync (line 746) | struct tracecmd_time_sync
type tracecmd_time_sync (line 751) | struct tracecmd_time_sync
function tracecmd_write_guest_time_shift (line 825) | int tracecmd_write_guest_time_shift(struct tracecmd_output *handle,
function tracecmd_tsync_with_guest_stop (line 917) | int tracecmd_tsync_with_guest_stop(struct tracecmd_time_sync *tsync)
type tracecmd_time_sync (line 932) | struct tracecmd_time_sync
type tracecmd_time_sync (line 953) | struct tracecmd_time_sync
type tracecmd_time_sync (line 957) | struct tracecmd_time_sync
type tracecmd_time_sync (line 963) | struct tracecmd_time_sync
function tracecmd_tsync_with_host_stop (line 1020) | int tracecmd_tsync_with_host_stop(struct tracecmd_time_sync *tsync)
FILE: lib/trace-cmd/trace-util.c
type tracecmd_clocks (line 39) | enum tracecmd_clocks
function tracecmd_clock_str2id (line 58) | enum tracecmd_clocks tracecmd_clock_str2id(const char *clock)
type tracecmd_clocks (line 78) | enum tracecmd_clocks
function tracecmd_set_debug (line 94) | void tracecmd_set_debug(bool set_debug)
function tracecmd_get_debug (line 109) | bool tracecmd_get_debug(void)
function tracecmd_set_notimeout (line 123) | void tracecmd_set_notimeout(bool set_notimeout)
function tracecmd_get_notimeout (line 133) | bool tracecmd_get_notimeout(void)
function tracecmd_parse_proc_kallsyms (line 138) | void tracecmd_parse_proc_kallsyms(struct tep_handle *pevent,
function tracecmd_parse_ftrace_printk (line 187) | void tracecmd_parse_ftrace_printk(struct tep_handle *pevent,
type add_plugin_data (line 243) | struct add_plugin_data {
function add_plugin_file (line 249) | static void add_plugin_file(struct tep_handle *pevent, const char *path,
function __hidden (line 296) | __hidden char **tcmd_util_find_plugin_files(const char *suffix)
function tcmd_util_free_plugin_files (line 316) | void __hidden tcmd_util_free_plugin_files(char **files)
function tep_plugin_list (line 351) | tep_plugin_list *
function tracecmd_set_loglevel (line 376) | void tracecmd_set_loglevel(enum tep_loglevel level)
function tracecmd_warning (line 381) | void __weak tracecmd_warning(const char *fmt, ...)
function tracecmd_info (line 393) | void __weak tracecmd_info(const char *fmt, ...)
function tracecmd_critical (line 405) | void __weak tracecmd_critical(const char *fmt, ...)
function tracecmd_debug (line 424) | void __weak tracecmd_debug(const char *fmt, ...)
function __plog (line 437) | static void __plog(const char *prefix, const char *fmt, va_list ap, FILE...
function tracecmd_plog (line 456) | void tracecmd_plog(const char *fmt, ...)
function tracecmd_plog_error (line 467) | void tracecmd_plog_error(const char *fmt, ...)
function tracecmd_set_logfile (line 489) | int tracecmd_set_logfile(char *logfile)
function tracecmd_stack_tracer_status (line 508) | int tracecmd_stack_tracer_status(int *status)
function tracecmd_count_cpus (line 554) | int tracecmd_count_cpus(void)
function tracecmd_generate_traceid (line 607) | unsigned long long tracecmd_generate_traceid(void)
function tracecmd_default_file_version (line 640) | int tracecmd_default_file_version(void)
function tracecmd_is_version_supported (line 645) | bool tracecmd_is_version_supported(unsigned int version)
function tracecmd_lib_init (line 652) | static void __attribute__ ((constructor)) tracecmd_lib_init(void)
function tracecmd_lib_free (line 657) | static void __attribute__((destructor)) tracecmd_lib_free(void)
function __hidden (line 662) | __hidden bool tcmd_check_file_state(unsigned long file_version, int curr...
FILE: python/event-viewer.py
function timing (line 21) | def timing(func):
class EventStore (line 31) | class EventStore(gtk.GenericTreeModel):
class EventRef (line 32) | class EventRef(object):
method __init__ (line 34) | def __init__(self, index, timestamp, offset, cpu):
method __cmp__ (line 40) | def __cmp__(self, other):
method __init__ (line 56) | def __init__(self, trace):
method _load_trace (line 65) | def _load_trace(self):
method _sort (line 79) | def _sort(self):
method _reindex (line 83) | def _reindex(self):
method on_get_flags (line 87) | def on_get_flags(self):
method on_get_n_columns (line 90) | def on_get_n_columns(self):
method on_get_column_type (line 93) | def on_get_column_type(self, col):
method on_get_iter (line 96) | def on_get_iter(self, path):
method on_get_path (line 99) | def on_get_path(self, ref):
method on_get_value (line 102) | def on_get_value(self, ref, col):
method on_iter_next (line 112) | def on_iter_next(self, ref):
method on_iter_children (line 118) | def on_iter_children(self, ref):
method on_iter_has_child (line 123) | def on_iter_has_child(self, ref):
method on_iter_n_children (line 126) | def on_iter_n_children(self, ref):
method on_iter_nth_child (line 131) | def on_iter_nth_child(self, ref, n):
method on_iter_parent (line 139) | def on_iter_parent(self, child):
method get_event (line 142) | def get_event(self, iter):
class EventView (line 152) | class EventView(gtk.TreeView):
method __init__ (line 153) | def __init__(self, model):
method data_func (line 197) | def data_func(self, col, cell, model, iter, data):
class EventViewerApp (line 226) | class EventViewerApp(gtk.Window):
method __init__ (line 227) | def __init__(self, trace):
method inc_data_func (line 256) | def inc_data_func(self):
FILE: python/tracecmd.py
class Event (line 37) | class Event(Mapping):
method __init__ (line 42) | def __init__(self, pevent, record, format):
method __str__ (line 47) | def __str__(self):
method __del__ (line 52) | def __del__(self):
method __getitem__ (line 55) | def __getitem__(self, n):
method __iter__ (line 64) | def __iter__(self):
method __len__ (line 67) | def __len__(self):
method common_keys (line 71) | def common_keys(self):
method keys (line 75) | def keys(self):
method comm (line 79) | def comm(self):
method cpu (line 83) | def cpu(self):
method name (line 87) | def name(self):
method pid (line 91) | def pid(self):
method ts (line 95) | def ts(self):
method type (line 99) | def type(self):
method num_field (line 102) | def num_field(self, name):
method str_field (line 111) | def str_field(self, name):
method stack_field (line 117) | def stack_field(self, long_size):
class TraceSeq (line 121) | class TraceSeq(object):
method __init__ (line 122) | def __init__(self, trace_seq):
method puts (line 125) | def puts(self, s):
class FieldError (line 128) | class FieldError(Exception):
class Field (line 131) | class Field(object):
method __init__ (line 132) | def __init__(self, record, field):
method data (line 137) | def data(self):
method __long__ (line 140) | def __long__(self):
method __str__ (line 148) | def __str__(self):
class PEvent (line 151) | class PEvent(object):
method __init__ (line 152) | def __init__(self, pevent):
method _handler (line 155) | def _handler(self, cb, s, record, event_fmt):
method register_event_handler (line 158) | def register_event_handler(self, subsys, event_name, callback):
method file_endian (line 165) | def file_endian(self):
class FileFormatError (line 171) | class FileFormatError(Exception):
class Trace (line 174) | class Trace(object):
method __init__ (line 181) | def __init__(self, filename):
method cpus (line 186) | def cpus(self):
method long_size (line 190) | def long_size(self):
method read_event (line 193) | def read_event(self, cpu):
method read_event_at (line 202) | def read_event_at(self, offset):
method read_next_event (line 213) | def read_next_event(self):
method peek_event (line 222) | def peek_event(self, cpu):
FILE: python/tracecmdgui.py
function timing (line 46) | def timing(func):
class EventStore (line 56) | class EventStore(gtk.GenericTreeModel):
method __init__ (line 59) | def __init__(self, trace):
method on_get_flags (line 67) | def on_get_flags(self):
method on_get_n_columns (line 70) | def on_get_n_columns(self):
method on_get_column_type (line 73) | def on_get_column_type(self, col):
method on_get_iter (line 80) | def on_get_iter(self, path):
method on_get_path (line 87) | def on_get_path(self, rec):
method on_get_value (line 93) | def on_get_value(self, rec, col):
method on_iter_next (line 99) | def on_iter_next(self, rec):
method on_iter_children (line 104) | def on_iter_children(self, rec):
method on_iter_has_child (line 109) | def on_iter_has_child(self, rec):
method on_iter_n_children (line 112) | def on_iter_n_children(self, rec):
method on_iter_nth_child (line 117) | def on_iter_nth_child(self, rec, n):
method on_iter_parent (line 122) | def on_iter_parent(self, child):
method get_event (line 125) | def get_event(self, iter):
class EventView (line 136) | class EventView(gtk.TreeView):
method __init__ (line 137) | def __init__(self, model):
method data_func (line 181) | def data_func(self, col, cell, model, iter, data):
class EventViewerApp (line 205) | class EventViewerApp(gtk.Window):
method __init__ (line 206) | def __init__(self, trace):
FILE: scripts/debug/tsync_hist.py
function newline (line 12) | def newline(p1, p2):
FILE: scripts/debug/tsync_res.py
function newline (line 12) | def newline(p1, p2):
FILE: tracecmd/include/list.h
type list_head (line 12) | struct list_head {
function list_head_init (line 17) | static inline void list_head_init(struct list_head *list)
function list_add (line 23) | static inline void list_add(struct list_head *p, struct list_head *head)
function list_add_tail (line 33) | static inline void list_add_tail(struct list_head *p, struct list_head *...
function list_del (line 43) | static inline void list_del(struct list_head *p)
function list_empty (line 52) | static inline int list_empty(struct list_head *list)
FILE: tracecmd/include/trace-local.h
type u64 (line 29) | typedef unsigned long long u64;
type buffer_instance (line 31) | struct buffer_instance
type port_type (line 48) | enum port_type {
type pid_record_data (line 54) | struct pid_record_data {
type tracecmd_input (line 66) | struct tracecmd_input
type tracecmd_msg_handle (line 129) | struct tracecmd_msg_handle
type tracecmd_time_sync (line 132) | struct tracecmd_time_sync
type hook_list (line 135) | struct hook_list
type tracecmd_input (line 137) | struct tracecmd_input
type hook_list (line 137) | struct hook_list
type tracecmd_input (line 142) | struct tracecmd_input
type buffer_instance (line 143) | struct buffer_instance
type hook_list (line 144) | struct hook_list
type pid_record_data (line 146) | struct pid_record_data
type tracecmd_input (line 148) | struct tracecmd_input
type tep_record (line 148) | struct tep_record
type event_process (line 157) | enum event_process {
type process_type (line 163) | enum process_type {
type event_iter (line 168) | struct event_iter {
type event_iter_type (line 175) | enum event_iter_type {
type event_iter (line 181) | struct event_iter
type event_iter_type (line 182) | enum event_iter_type
type event_iter (line 182) | struct event_iter
type event_iter (line 184) | struct event_iter
type buffer_instance_flags (line 193) | enum buffer_instance_flags {
type func_list (line 204) | struct func_list {
type pid_addr_maps (line 210) | struct pid_addr_maps {
type opt_list (line 218) | struct opt_list {
type filter_pids (line 223) | struct filter_pids {
type tsc_nsec (line 229) | struct tsc_nsec {
type buffer_instance (line 235) | struct buffer_instance {
type buffer_instance (line 316) | struct buffer_instance
type buffer_instance (line 317) | struct buffer_instance
type buffer_instance (line 318) | struct buffer_instance
type sockaddr_storage (line 335) | struct sockaddr_storage
type port_type (line 337) | enum port_type
type port_type (line 338) | enum port_type
type sockaddr_storage (line 340) | struct sockaddr_storage
type buffer_instance (line 343) | struct buffer_instance
type buffer_instance (line 344) | struct buffer_instance
type buffer_instance (line 345) | struct buffer_instance
type buffer_instance (line 347) | struct buffer_instance
type buffer_instance (line 348) | struct buffer_instance
type trace_guest (line 350) | struct trace_guest {
type trace_guest (line 360) | struct trace_guest
type tracecmd_output (line 365) | struct tracecmd_output
type buffer_instance (line 365) | struct buffer_instance
type tracecmd_time_sync (line 367) | struct tracecmd_time_sync
type tracecmd_time_sync (line 373) | struct tracecmd_time_sync
type trace_seq (line 386) | struct trace_seq
type buffer_instance (line 388) | struct buffer_instance
type buffer_instance (line 390) | struct buffer_instance
type tracecmd_tsync_protos (line 391) | struct tracecmd_tsync_protos
function tcmd_vsock_open (line 413) | static inline int tcmd_vsock_open(unsigned int cid, unsigned int port)
function tcmd_vsock_make (line 418) | static inline int tcmd_vsock_make(unsigned int port)
function tcmd_vsock_make_any (line 424) | static inline int tcmd_vsock_make_any(void)
function get_vsocket_params (line 430) | static inline int get_vsocket_params(int fd, unsigned int *lcid, unsigne...
function tcmd_vsock_get_port (line 435) | static inline int tcmd_vsock_get_port(int sd, unsigned int *port)
function tcmd_vsock_can_splice_read (line 440) | static inline bool tcmd_vsock_can_splice_read(void)
function tcmd_vsock_local_cid (line 445) | static inline int tcmd_vsock_local_cid(void)
function trace_vsock_print_connection (line 449) | static inline int trace_vsock_print_connection(int fd)
function is_digits (line 463) | static inline bool is_digits(const char *s)
function set_tcp_no_delay (line 477) | static inline void set_tcp_no_delay(int sockfd, int socktype)
FILE: tracecmd/trace-agent.c
function make_vsocks (line 29) | static void make_vsocks(int nr, int *fds, unsigned int *ports)
function make_net (line 48) | static void make_net(int nr, int *fds, unsigned int *ports)
function make_sockets (line 67) | static void make_sockets(int nr, int *fds, unsigned int *ports,
function open_agent_fifos (line 76) | static int open_agent_fifos(int nr_cpus, int *fds)
function trace_print_connection (line 115) | static void trace_print_connection(int fd, const char *network)
function wait_for_connection (line 127) | static int wait_for_connection(int fd)
function agent_handle (line 149) | static void agent_handle(int sd, int nr_cpus, int page_size,
function handle_sigchld (line 280) | static void handle_sigchld(int sig)
function pid_t (line 295) | static pid_t do_fork()
function agent_serve (line 304) | static void agent_serve(unsigned int port, bool do_daemon, int proxy_id,
function trace_agent (line 398) | void trace_agent(int argc, char **argv)
FILE: tracecmd/trace-attach.c
type timeshift_sample (line 14) | struct timeshift_sample {
type vcpu_pid (line 22) | struct vcpu_pid {
type timeshift_sample (line 32) | struct timeshift_sample
type timeshift_sample (line 33) | struct timeshift_sample
function u64 (line 35) | static u64 set_value(const char *str, const char *type, u64 def)
function add_timeshift (line 46) | static void add_timeshift(char *shift)
function free_timeshifts (line 85) | static void free_timeshifts(void)
function add_vcpu_pid (line 96) | static void add_vcpu_pid(const char *pid)
function free_vcpu_pids (line 107) | static void free_vcpu_pids(void)
function test_vcpu_id (line 118) | static inline int test_vcpu_id(struct tep_format_field **vcpu_id_field,
function entry_callback (line 159) | static int entry_callback(struct tracecmd_input *handle, struct tep_even...
function exit_callback (line 167) | static int exit_callback(struct tracecmd_input *handle, struct tep_event...
function cmp_vcpus (line 175) | static int cmp_vcpus(const void *A, const void *B)
function update_end (line 186) | static void update_end(char **end, void *data, int size, const char *stop)
function add_guest_to_host (line 197) | static void add_guest_to_host(struct tracecmd_output *host_ohandle,
function add_timeshift_to_guest (line 261) | static void add_timeshift_to_guest(struct tracecmd_output *guest_ohandle,
function add_tsc2nsec_to_guest (line 358) | static void add_tsc2nsec_to_guest(struct tracecmd_output *guest_ohandle,
function map_cpus (line 385) | static void map_cpus(struct tracecmd_input *handle)
function trace_attach (line 399) | void trace_attach(int argc, char **argv)
FILE: tracecmd/trace-check-events.c
function trace_check_events (line 17) | void trace_check_events(int argc, char **argv)
FILE: tracecmd/trace-clear.c
type instances_list (line 16) | struct instances_list {
function add_new_instance (line 21) | static int add_new_instance(struct instances_list **list, char *name)
function add_instance_walk (line 41) | static int add_instance_walk(const char *name, void *data)
function clear_list (line 46) | static void clear_list(struct instances_list *list)
function clear_instance_trace (line 58) | static void clear_instance_trace(struct tracefs_instance *instance)
function clear_trace (line 73) | static void clear_trace(struct instances_list *instances)
function trace_clear (line 84) | void trace_clear(int argc, char **argv)
FILE: tracecmd/trace-cmd.c
function warning (line 24) | void warning(const char *fmt, ...)
function tracecmd_debug (line 74) | void tracecmd_debug(const char *fmt, ...)
type trace_log_severity (line 87) | struct trace_log_severity {
function trace_set_loglevel (line 100) | void trace_set_loglevel(int level)
function trace_set_verbose (line 107) | int trace_set_verbose(char *level)
type command (line 143) | struct command {
type command (line 152) | struct command
function main (line 186) | int main (int argc, char **argv)
FILE: tracecmd/trace-convert.c
function convert_file (line 15) | static void convert_file(const char *in, const char *out, int file_versi...
function trace_convert (line 37) | void trace_convert(int argc, char **argv)
FILE: tracecmd/trace-dump.c
type tep_handle (line 26) | struct tep_handle
type tracecmd_compression (line 31) | struct tracecmd_compression
type dump_items (line 35) | enum dump_items {
type file_section (line 54) | struct file_section {
type file_section (line 61) | struct file_section
type dump_items (line 63) | enum dump_items
function read_fd (line 73) | static int read_fd(int fd, char *dst, int len)
function read_compressed (line 92) | static int read_compressed(int fd, char *dst, int len)
function do_lseek (line 101) | static int do_lseek(int fd, int offset, int whence)
function read_file_string (line 109) | static int read_file_string(int fd, char *dst, int len)
function read_file_bytes (line 130) | static int read_file_bytes(int fd, char *dst, int len)
function read_dump_string (line 138) | static void read_dump_string(int fd, int size, enum dump_items id)
function read_file_number (line 155) | static int read_file_number(int fd, void *digit, int size)
function dump_initial_format (line 195) | static void dump_initial_format(int fd)
function dump_compress (line 245) | static void dump_compress(int fd)
function dump_header_page (line 270) | static void dump_header_page(int fd)
function dump_header_event (line 291) | static void dump_header_event(int fd)
function uncompress_reset (line 312) | static void uncompress_reset(void)
function uncompress_block (line 320) | static int uncompress_block(void)
function dump_ftrace_events_format (line 334) | static void dump_ftrace_events_format(int fd)
function dump_events_format (line 353) | static void dump_events_format(int fd)
function dump_kallsyms (line 386) | static void dump_kallsyms(int fd)
function dump_printk (line 400) | static void dump_printk(int fd)
function dump_cmdlines (line 414) | static void dump_cmdlines(int fd)
function dump_modules (line 428) | static void dump_modules(int fd)
function dump_cpus_count (line 444) | static void dump_cpus_count(int fd)
function dump_option_string (line 452) | static void dump_option_string(int fd, int size, char *desc)
function dump_section_header (line 459) | static void dump_section_header(int fd, enum dump_items v, unsigned shor...
function dump_option_buffer (line 491) | static void dump_option_buffer(int fd, unsigned short option, int size)
function dump_option_int (line 570) | static void dump_option_int(int fd, int size, char *desc)
function dump_option_xlong (line 579) | static void dump_option_xlong(int fd, int size, char *desc)
type time_shift_cpu (line 588) | struct time_shift_cpu {
function dump_option_timeshift (line 596) | static void dump_option_timeshift(int fd, int size)
function dump_option_guest (line 694) | void dump_option_guest(int fd, int size)
function dump_option_tsc2nsec (line 753) | void dump_option_tsc2nsec(int fd, int size)
function dump_option_section (line 769) | static void dump_option_section(int fd, unsigned int size,
function dump_sections (line 788) | static void dump_sections(int fd, int count)
function dump_option_done (line 834) | static int dump_option_done(int fd, int size)
function dump_options_read (line 858) | static int dump_options_read(int fd)
function dump_options (line 966) | static void dump_options(int fd)
function dump_latency (line 974) | static void dump_latency(int fd)
function dump_clock (line 979) | static void dump_clock(int fd)
function dump_flyrecord (line 1002) | static void dump_flyrecord(int fd)
function dump_therest (line 1021) | static void dump_therest(int fd)
function dump_v6_file (line 1042) | static void dump_v6_file(int fd)
function read_metadata_strings (line 1055) | static int read_metadata_strings(int fd, unsigned long long size)
function get_meta_strings (line 1083) | static void get_meta_strings(int fd)
function walk_v7_sections (line 1122) | static int walk_v7_sections(int fd)
function dump_v7_file (line 1189) | static void dump_v7_file(int fd)
function free_sections (line 1207) | static void free_sections(void)
function dump_file (line 1218) | static void dump_file(const char *file)
function trace_dump (line 1264) | void trace_dump(int argc, char **argv)
FILE: tracecmd/trace-hist.c
type tep_format_field (line 29) | struct tep_format_field
type tep_format_field (line 30) | struct tep_format_field
type tep_format_field (line 31) | struct tep_format_field
type tep_format_field (line 32) | struct tep_format_field
type tep_format_field (line 33) | struct tep_format_field
type tep_format_field (line 34) | struct tep_format_field
type tep_format_field (line 35) | struct tep_format_field
type tep_format_field (line 36) | struct tep_format_field
type tep_format_field (line 37) | struct tep_format_field
type tep_format_field (line 38) | struct tep_format_field
type tep_format_field (line 39) | struct tep_format_field
type tep_format_field (line 40) | struct tep_format_field
type tep_format_field (line 41) | struct tep_format_field
type tep_format_field (line 42) | struct tep_format_field
type tep_format_field (line 43) | struct tep_format_field
type tep_format_field (line 44) | struct tep_format_field
type tep_format_field (line 45) | struct tep_format_field
type tep_format_field (line 46) | struct tep_format_field
type tep_format_field (line 47) | struct tep_format_field
type tep_format_field (line 48) | struct tep_format_field
type stack_save (line 62) | struct stack_save {
type stack_save (line 70) | struct stack_save
function reset_stack (line 72) | static void reset_stack(void)
function save_stack (line 81) | static void save_stack(void)
function restore_stack (line 100) | static void restore_stack(int pid)
type pid_list (line 125) | struct pid_list
type chain (line 127) | struct chain {
type chain (line 138) | struct chain
type pid_list (line 142) | struct pid_list {
type pid_list (line 147) | struct pid_list
type pid_list (line 148) | struct pid_list
function add_chain (line 150) | static void add_chain(struct chain *chain)
function insert_chain (line 159) | static void
function save_call_chain (line 198) | static void save_call_chain(int pid, const char **chain, int size, int e...
function save_stored_stacks (line 222) | static void save_stored_stacks(void)
function flush_stack (line 230) | static void flush_stack(void)
function push_stack_func (line 240) | static void push_stack_func(const char *func)
function pop_stack_func (line 247) | static void pop_stack_func(void)
function process_function (line 253) | static void
function process_function_graph_entry (line 310) | static void
function process_function_graph_exit (line 356) | static void
function reset_pending_stack (line 395) | static void reset_pending_stack(void)
function copy_stack_to_pending (line 403) | static void copy_stack_to_pending(int pid)
function process_kernel_stack (line 411) | static void
function process_sched_wakeup (line 481) | static void
function process_sched_switch (line 506) | static void
function process_event (line 529) | static void
function process_record (line 564) | static void
type tep_event (line 594) | struct tep_event
type tep_handle (line 595) | struct tep_handle
type tep_event (line 598) | struct tep_event
function update_sched_wakeup (line 609) | static void update_sched_wakeup(struct tep_handle *pevent)
function update_sched_wakeup_new (line 621) | static void update_sched_wakeup_new(struct tep_handle *pevent)
function update_sched_switch (line 633) | static void update_sched_switch(struct tep_handle *pevent)
function update_function (line 647) | static void update_function(struct tep_handle *pevent)
function update_function_graph_entry (line 659) | static void update_function_graph_entry(struct tep_handle *pevent)
function update_function_graph_exit (line 671) | static void update_function_graph_exit(struct tep_handle *pevent)
function update_kernel_stack (line 686) | static void update_kernel_stack(struct tep_handle *pevent)
type field (line 697) | enum field { NEXT_PTR, SIB_PTR }
type chain (line 699) | struct chain
type chain (line 699) | struct chain
type field (line 699) | enum field
type chain (line 706) | struct chain
type chain (line 706) | struct chain
type field (line 706) | enum field
type chain (line 708) | struct chain
type chain (line 728) | struct chain
type chain (line 729) | struct chain
type chain (line 729) | struct chain
type field (line 729) | enum field
type chain (line 731) | struct chain
type chain (line 732) | struct chain
type chain (line 733) | struct chain
function sort_chain_parents (line 779) | static void sort_chain_parents(struct chain *chain)
function sort_chains (line 792) | static void sort_chains(void)
function get_percent (line 805) | static double get_percent(int total, int partial)
function single_chain (line 810) | static int single_chain(struct chain *chain)
function make_indent (line 828) | void make_indent(int indent)
function print_single_parent (line 840) | static void
function dump_chain (line 849) | static void
function print_parents (line 859) | static void print_parents(struct tep_handle *pevent, struct chain *chain...
function print_chains (line 903) | static void print_chains(struct tep_handle *pevent)
function do_trace_hist (line 933) | static void do_trace_hist(struct tracecmd_input *handle)
function trace_hist (line 1002) | void trace_hist(int argc, char **argv)
FILE: tracecmd/trace-list.c
function dump_file_content (line 16) | static void dump_file_content(const char *path)
function show_instance_file (line 36) | void show_instance_file(struct buffer_instance *instance, const char *name)
function show_file (line 53) | void show_file(const char *name)
function process_file_re (line 64) | static void process_file_re(process_file_func func,
function show_event (line 111) | static void show_event(process_file_func func, const char *system,
function show_system (line 124) | static void show_system(process_file_func func, const char *system, int ...
function show_event_systems (line 137) | static void show_event_systems(process_file_func func, char **systems, i...
function match_system_events (line 145) | static void match_system_events(process_file_func func, const char *system,
function process_events (line 161) | static void process_events(process_file_func func, const char *re, int f...
function event_filter_write (line 270) | static int event_filter_write(char *buf, int len, int flags)
function event_trigger_write (line 287) | static int event_trigger_write(char *buf, int len, int flags)
function event_format_write (line 304) | static int event_format_write(char *fbuf, int len, int flags)
function event_name (line 339) | static int event_name(char *buf, int len, int flags)
function show_event_filter_re (line 346) | static void show_event_filter_re(const char *re)
function show_event_trigger_re (line 352) | static void show_event_trigger_re(const char *re)
function show_event_format_re (line 358) | static void show_event_format_re(const char *re, int flags)
function show_event_names_re (line 363) | static void show_event_names_re(const char *re)
function show_events (line 368) | static void show_events(const char *eventre, int flags)
function show_tracers (line 389) | static void show_tracers(void)
function show_options (line 394) | void show_options(const char *prefix, struct buffer_instance *buffer, co...
function show_clocks (line 460) | static void show_clocks(void)
type tep_handle (line 479) | struct tep_handle
type tep_handle (line 481) | struct tep_handle
type stat (line 482) | struct stat
function show_functions (line 522) | static void show_functions(const char *funcre, int params)
function show_buffers (line 586) | static void show_buffers(void)
function show_systems (line 605) | static void show_systems(void)
function show_plugin_options (line 641) | static void show_plugin_options(void)
function trace_option (line 663) | void trace_option(int argc, char **argv)
function show_plugins (line 669) | static void show_plugins(void)
function show_compression (line 689) | static void show_compression(void)
function trace_list (line 707) | void trace_list(int argc, char **argv)
FILE: tracecmd/trace-listen.c
type tracecmd_msg_handle (line 51) | struct tracecmd_msg_handle
function put_temp_file (line 77) | static void put_temp_file(char *file)
function signal_setup (line 82) | static void signal_setup(int sig, sighandler_t handle)
function delete_temp_file (line 93) | static void delete_temp_file(const char *host, const char *port, int cpu)
function read_string (line 101) | static int read_string(int fd, char *buf, size_t size)
function process_option (line 115) | static int process_option(struct tracecmd_msg_handle *msg_handle, char *...
function finish (line 125) | static void finish(int sig)
function make_pid_name (line 132) | void make_pid_name(char *buf, const char *pidfile_basename)
function remove_pid_file (line 137) | void remove_pid_file(const char *pidfile_basename)
function process_child (line 145) | static int process_child(int sfd, const char *host, const char *port,
function setup_vsock_port (line 224) | static int setup_vsock_port(int start_port, int *sfd)
function trace_net_make (line 236) | int trace_net_make(int port, enum port_type type)
function trace_net_search (line 287) | int trace_net_search(int start_port, int *sfd, enum port_type type)
function fork_reader (line 304) | static void fork_reader(int sfd, const char *node, const char *port,
function open_port (line 323) | static int open_port(const char *node, const char *port, int *pid,
function communicate_with_client (line 342) | static int communicate_with_client(struct tracecmd_msg_handle *msg_handle)
function create_client_file (line 487) | static int create_client_file(const char *node, const char *port)
function destroy_all_readers (line 500) | static void destroy_all_readers(int cpus, int *pid_array, const char *node,
type tracecmd_msg_handle (line 518) | struct tracecmd_msg_handle
type port_type (line 520) | enum port_type
function collect_metadata_from_client (line 593) | static int
function stop_all_readers (line 629) | static void stop_all_readers(int cpus, int *pid_array)
function put_together_file (line 639) | static int put_together_file(int cpus, int ofd, const char *node,
function process_client (line 686) | static int process_client(struct tracecmd_msg_handle *msg_handle,
function do_fork (line 738) | static int do_fork(int cfd)
function trace_net_cmp_connection (line 762) | bool trace_net_cmp_connection(struct sockaddr_storage *addr, const char ...
function trace_net_cmp_connection_fd (line 806) | bool trace_net_cmp_connection_fd(int fd, const char *name)
function trace_net_print_connection (line 817) | int trace_net_print_connection(int fd)
function do_connection (line 839) | static int do_connection(int cfd, struct sockaddr *addr,
function add_process (line 888) | static void add_process(int pid)
function remove_process (line 914) | static void remove_process(int pid)
function kill_clients (line 930) | static void kill_clients(void)
function clean_up (line 947) | static void clean_up(void)
function do_accept_loop (line 960) | static void do_accept_loop(int sfd)
function make_pid_file (line 998) | void make_pid_file(const char *pidfile_basename)
function sigstub (line 1016) | static void sigstub(int sig)
function get_vsock (line 1020) | static int get_vsock(const char *port)
function get_network (line 1036) | static int get_network(char *port)
function do_listen (line 1072) | static void do_listen(char *port)
function start_daemon (line 1099) | static void start_daemon(void)
function trace_listen (line 1112) | void trace_listen(int argc, char **argv)
FILE: tracecmd/trace-mem.c
type tep_format_field (line 32) | struct tep_format_field
type tep_format_field (line 34) | struct tep_format_field
type tep_format_field (line 35) | struct tep_format_field
type tep_format_field (line 36) | struct tep_format_field
type tep_format_field (line 37) | struct tep_format_field
type tep_format_field (line 39) | struct tep_format_field
type tep_format_field (line 40) | struct tep_format_field
type tep_format_field (line 41) | struct tep_format_field
type tep_format_field (line 42) | struct tep_format_field
type tep_format_field (line 44) | struct tep_format_field
type tep_format_field (line 46) | struct tep_format_field
type tep_format_field (line 47) | struct tep_format_field
type tep_format_field (line 48) | struct tep_format_field
type tep_format_field (line 49) | struct tep_format_field
type tep_format_field (line 51) | struct tep_format_field
type tep_format_field (line 52) | struct tep_format_field
type tep_format_field (line 53) | struct tep_format_field
type tep_format_field (line 54) | struct tep_format_field
type tep_format_field (line 56) | struct tep_format_field
type tep_event (line 63) | struct tep_event
type tep_handle (line 64) | struct tep_handle
type tep_event (line 67) | struct tep_event
function update_kmalloc (line 78) | static void update_kmalloc(struct tep_handle *pevent)
function update_kmalloc_node (line 92) | static void update_kmalloc_node(struct tep_handle *pevent)
function update_kfree (line 106) | static void update_kfree(struct tep_handle *pevent)
function update_kmem_cache_alloc (line 117) | static void update_kmem_cache_alloc(struct tep_handle *pevent)
function update_kmem_cache_alloc_node (line 131) | static void update_kmem_cache_alloc_node(struct tep_handle *pevent)
function update_kmem_cache_free (line 146) | static void update_kmem_cache_free(struct tep_handle *pevent)
type func_descr (line 157) | struct func_descr {
type ptr_descr (line 170) | struct ptr_descr {
type func_descr (line 182) | struct func_descr
type ptr_descr (line 183) | struct ptr_descr
type func_descr (line 184) | struct func_descr
function make_key (line 188) | static int make_key(const void *ptr, int size)
type func_descr (line 201) | struct func_descr
type func_descr (line 203) | struct func_descr
type func_descr (line 218) | struct func_descr
type func_descr (line 220) | struct func_descr
type ptr_descr (line 236) | struct ptr_descr
type ptr_descr (line 238) | struct ptr_descr
type ptr_descr (line 249) | struct ptr_descr
type ptr_descr (line 251) | struct ptr_descr
function remove_ptr (line 265) | static void remove_ptr(unsigned long long ptr)
function add_kmalloc (line 284) | static void add_kmalloc(const char *func, unsigned long long ptr,
function remove_kmalloc (line 312) | static void remove_kmalloc(unsigned long long ptr)
function process_kmalloc (line 328) | static void
function process_kfree (line 354) | static void
function process_record (line 365) | static void
function func_cmp (line 405) | static int func_cmp(const void *a, const void *b)
function sort_list (line 417) | static void sort_list(void)
function print_list (line 438) | static void print_list(void)
function do_trace_mem (line 461) | static void do_trace_mem(struct tracecmd_input *handle)
function trace_mem (line 517) | void trace_mem(int argc, char **argv)
FILE: tracecmd/trace-profile.c
function nsecs_per_sec (line 36) | static unsigned long long nsecs_per_sec(unsigned long long ts)
function mod_to_usec (line 41) | static unsigned long long mod_to_usec(unsigned long long ts)
type handle_data (line 46) | struct handle_data
type event_hash (line 47) | struct event_hash
type event_data (line 48) | struct event_data
type trace_seq (line 50) | struct trace_seq
type event_hash (line 50) | struct event_hash
type handle_data (line 51) | struct handle_data
type event_data (line 52) | struct event_data
type tep_record (line 53) | struct tep_record
type event_data_type (line 55) | enum event_data_type {
type event_data (line 69) | struct event_data {
type stack_data (line 91) | struct stack_data {
type stack_holder (line 104) | struct stack_holder {
type start_data (line 110) | struct start_data {
type event_hash (line 123) | struct event_hash {
type group_data (line 141) | struct group_data {
type task_data (line 147) | struct task_data {
type cpu_info (line 165) | struct cpu_info {
type sched_switch_data (line 169) | struct sched_switch_data {
type handle_data (line 174) | struct handle_data {
type handle_data (line 202) | struct handle_data
type event_data (line 203) | struct event_data
function trace_profile_set_merge_like_comms (line 206) | void trace_profile_set_merge_like_comms(void)
type start_data (line 211) | struct start_data
type task_data (line 212) | struct task_data
type event_data (line 213) | struct event_data
type tep_record (line 213) | struct tep_record
type start_data (line 216) | struct start_data
type event_data_match (line 237) | struct event_data_match {
function match_start (line 243) | static int match_start(struct trace_hash_item *item, void *data)
function match_event (line 252) | static int match_event(struct trace_hash_item *item, void *data)
type event_hash (line 262) | struct event_hash
type task_data (line 263) | struct task_data
type event_data_match (line 263) | struct event_data_match
type event_hash (line 265) | struct event_hash
type trace_hash_item (line 266) | struct trace_hash_item
type event_hash (line 293) | struct event_hash
type task_data (line 294) | struct task_data
type event_data (line 294) | struct event_data
type start_data (line 295) | struct start_data
type event_data_match (line 297) | struct event_data_match
type start_data (line 306) | struct start_data
type task_data (line 307) | struct task_data
type event_data (line 307) | struct event_data
type event_data_match (line 311) | struct event_data_match
type trace_hash_item (line 313) | struct trace_hash_item
type start_data (line 314) | struct start_data
type stack_match (line 327) | struct stack_match {
function match_stack (line 332) | static int match_stack(struct trace_hash_item *item, void *data)
function add_event_stack (line 344) | static void add_event_stack(struct event_hash *event_hash,
function free_start (line 390) | static void free_start(struct start_data *start)
type event_hash (line 401) | struct event_hash
type task_data (line 402) | struct task_data
type start_data (line 402) | struct start_data
type event_data (line 403) | struct event_data
type event_hash (line 405) | struct event_hash
type event_hash (line 453) | struct event_hash
type task_data (line 454) | struct task_data
type event_data (line 454) | struct event_data
type start_data (line 457) | struct start_data
function match_task (line 465) | static int match_task(struct trace_hash_item *item, void *data)
function init_task (line 473) | static void init_task(struct handle_data *h, struct task_data *task)
type task_data (line 481) | struct task_data
type handle_data (line 482) | struct handle_data
type task_data (line 485) | struct task_data
type task_data (line 503) | struct task_data
type handle_data (line 504) | struct handle_data
type trace_hash_item (line 507) | struct trace_hash_item
type task_data (line 508) | struct task_data
function match_group (line 524) | static int match_group(struct trace_hash_item *item, void *data)
function add_task_comm (line 532) | static void
function account_task (line 549) | static void account_task(struct task_data *task, struct event_data *even...
type task_data (line 601) | struct task_data
type handle_data (line 602) | struct handle_data
type event_data (line 602) | struct event_data
type tep_record (line 603) | struct tep_record
type task_data (line 619) | struct task_data
type handle_data (line 620) | struct handle_data
type event_data (line 620) | struct event_data
type tep_record (line 621) | struct tep_record
type event_hash (line 623) | struct event_hash
type task_data (line 624) | struct task_data
type task_data (line 640) | struct task_data
type handle_data (line 641) | struct handle_data
type event_data (line 641) | struct event_data
type tep_record (line 642) | struct tep_record
type start_data (line 644) | struct start_data
type task_data (line 645) | struct task_data
function handle_event_data (line 666) | static int handle_event_data(struct handle_data *h,
function handle_missed_events (line 698) | static void handle_missed_events(struct handle_data *h, int cpu)
function match_event_data (line 714) | static int match_event_data(struct trace_hash_item *item, void *data)
type event_data (line 722) | struct event_data
type handle_data (line 723) | struct handle_data
type trace_hash_item (line 725) | struct trace_hash_item
function trace_profile_record (line 735) | static void trace_profile_record(struct tracecmd_input *handle,
type event_data (line 793) | struct event_data
type handle_data (line 794) | struct handle_data
type event_data_type (line 795) | enum event_data_type
type event_data (line 797) | struct event_data
type tep_event (line 798) | struct tep_event
function mate_events (line 826) | static void
function tracecmd_mate_events (line 871) | void tracecmd_mate_events(struct tracecmd_input *handle,
function func_print (line 902) | static void func_print(struct trace_seq *s, struct event_hash *event_hash)
function syscall_print (line 914) | static void syscall_print(struct trace_seq *s, struct event_hash *event_...
function softirq_print (line 958) | static void softirq_print(struct trace_seq *s, struct event_hash *event_...
function sched_switch_print (line 970) | static void sched_switch_print(struct trace_seq *s, struct event_hash *e...
function handle_sched_switch_event (line 988) | static int handle_sched_switch_event(struct handle_data *h,
function handle_stacktrace_event (line 1053) | static int handle_stacktrace_event(struct handle_data *h,
function handle_fgraph_entry_event (line 1123) | static int handle_fgraph_entry_event(struct handle_data *h,
function handle_fgraph_exit_event (line 1162) | static int handle_fgraph_exit_event(struct handle_data *h,
function handle_process_exec (line 1178) | static int handle_process_exec(struct handle_data *h,
function handle_sched_wakeup_event (line 1203) | static int handle_sched_wakeup_event(struct handle_data *h,
function trace_init_profile (line 1266) | void trace_init_profile(struct tracecmd_input *handle, struct hook_list ...
function output_event_stack (line 1520) | static void output_event_stack(struct tep_handle *pevent, struct stack_d...
type stack_chain (line 1565) | struct stack_chain {
function compare_chains (line 1579) | static int compare_chains(const void *a, const void *b)
function calc_percent (line 1596) | static int calc_percent(unsigned long long val, unsigned long long total)
function stack_overflows (line 1601) | static int stack_overflows(struct stack_data *stack, int longsize, int l...
function stack_value (line 1606) | static unsigned long long
type stack_chain (line 1615) | struct stack_chain
type stack_data (line 1616) | struct stack_data
type stack_chain (line 1619) | struct stack_chain
function free_chain (line 1745) | static void free_chain(struct stack_chain *chain, int nr_chains)
function print_indent (line 1760) | static void print_indent(int level, unsigned long long mask)
function print_chain_func (line 1774) | static void print_chain_func(struct tep_handle *pevent, struct stack_cha...
function output_chain (line 1786) | static void output_chain(struct tep_handle *pevent, struct stack_chain *...
function compare_stacks (line 1849) | static int compare_stacks(const void *a, const void *b)
function output_stacks (line 1880) | static void output_stacks(struct tep_handle *pevent, struct trace_hash *...
function output_event (line 1926) | static void output_event(struct event_hash *event_hash)
function compare_events (line 1965) | static int compare_events(const void *a, const void *b)
function output_task (line 2004) | static void output_task(struct handle_data *h, struct task_data *task)
function output_group (line 2053) | static void output_group(struct handle_data *h, struct group_data *group)
function compare_tasks (line 2090) | static int compare_tasks(const void *a, const void *b)
function compare_groups (line 2102) | static int compare_groups(const void *a, const void *b)
function free_event_hash (line 2110) | static void free_event_hash(struct event_hash *event_hash)
function __free_task (line 2127) | static void __free_task(struct task_data *task)
function free_task (line 2161) | static void free_task(struct task_data *task)
function free_group (line 2167) | static void free_group(struct group_data *group)
function show_global_task (line 2186) | static void show_global_task(struct handle_data *h,
function output_tasks (line 2195) | static void output_tasks(struct handle_data *h)
function output_groups (line 2234) | static void output_groups(struct handle_data *h)
function output_handle (line 2276) | static void output_handle(struct handle_data *h)
function merge_event_stack (line 2288) | static void merge_event_stack(struct event_hash *event,
function merge_stacks (line 2317) | static void merge_stacks(struct event_hash *exist, struct event_hash *ev...
function merge_event_into_group (line 2332) | static void merge_event_into_group(struct group_data *group,
function add_group (line 2383) | static void add_group(struct handle_data *h, struct task_data *task)
function merge_tasks (line 2427) | static void merge_tasks(struct handle_data *h)
function do_trace_profile (line 2441) | int do_trace_profile(void)
FILE: tracecmd/trace-read.c
type filter_str (line 36) | struct filter_str {
type filter_str (line 41) | struct filter_str
type event_str (line 43) | struct event_str {
type input_files (line 48) | struct input_files
type handle_list (line 50) | struct handle_list {
type list_head (line 57) | struct list_head
type input_files (line 59) | struct input_files {
type list_head (line 67) | struct list_head
type input_files (line 68) | struct input_files
type pid_list (line 70) | struct pid_list {
type pid_list (line 76) | struct pid_list
type tep_format_field (line 110) | struct tep_format_field
type tep_format_field (line 111) | struct tep_format_field
type tep_format_field (line 112) | struct tep_format_field
type tep_format_field (line 113) | struct tep_format_field
type tep_format_field (line 114) | struct tep_format_field
type tep_format_field (line 115) | struct tep_format_field
type wakeup_info (line 123) | struct wakeup_info {
type hook_list (line 129) | struct hook_list
type hook_list (line 130) | struct hook_list
type trace_hash (line 133) | struct trace_hash
function print_event_name (line 135) | static void print_event_name(struct trace_seq *s, struct tep_event *event)
type time_fmt (line 151) | enum time_fmt {
type tracecmd_input (line 157) | struct tracecmd_input
type time_fmt (line 157) | enum time_fmt
type tep_handle (line 159) | struct tep_handle
function print_event (line 177) | static void print_event(struct trace_seq *s, struct tracecmd_input *handle,
function show_test (line 200) | static void show_test(struct tracecmd_input *handle)
function test_save (line 221) | static void test_save(struct tep_record *record, int cpu)
function show_test (line 238) | static void show_test(struct tracecmd_input *handle)
function test_save (line 265) | static void test_save(struct tep_record *record, int cpu)
function show_test (line 280) | static void show_test(struct tracecmd_input *handle)
function test_save (line 318) | static void test_save(struct tep_record *record, int cpu)
function show_test (line 324) | static void show_test(struct tracecmd_input *handle)
function test_save (line 330) | static void test_save(struct tep_record *record, int cpu)
function free_filter_strings (line 335) | static void free_filter_strings(struct filter_str *filter_str)
type input_files (line 347) | struct input_files
type input_files (line 349) | struct input_files
function add_handle (line 361) | static void add_handle(struct tracecmd_input *handle, struct input_files...
function free_inputs (line 384) | static void free_inputs(void)
function free_handles (line 396) | static void free_handles(void)
function add_filter (line 407) | static void add_filter(struct input_files *input_file, const char *filte...
function __add_filter (line 430) | static void __add_filter(struct pid_list **head, const char *arg)
function add_comm_filter (line 456) | static void add_comm_filter(const char *arg)
function add_pid_filter (line 461) | static void add_pid_filter(const char *arg)
function convert_comm_filter (line 500) | static void convert_comm_filter(struct tracecmd_input *handle)
function make_pid_filter (line 537) | static void make_pid_filter(struct tracecmd_input *handle,
function __process_filters (line 565) | static int __process_filters(struct tracecmd_input *handle,
function process_filters (line 582) | static void process_filters(struct handle_list *handles)
function init_wakeup (line 602) | static void init_wakeup(struct tracecmd_input *handle)
function add_wakeup (line 654) | static void add_wakeup(unsigned int val, unsigned long long start)
function add_sched (line 686) | static void add_sched(unsigned int val, unsigned long long end, int rt)
function process_wakeup (line 735) | static void process_wakeup(struct tep_handle *pevent, struct tep_record ...
function show_wakeup_timings (line 772) | static void
function finish_wakeup (line 791) | static void finish_wakeup(void)
function trace_show_data (line 823) | void trace_show_data(struct tracecmd_input *handle, struct tep_record *r...
function read_latency (line 956) | static void read_latency(struct tracecmd_input *handle)
function test_filters (line 972) | static int
type stack_info_cpu (line 989) | struct stack_info_cpu {
type stack_info (line 994) | struct stack_info {
function print_handle_file (line 1001) | static void print_handle_file(struct handle_list *handles)
function skip_record (line 1012) | static bool skip_record(struct handle_list *handles, struct tep_record *...
type kvm_cpu_map (line 1052) | struct kvm_cpu_map {
type kvm_cpu_map (line 1058) | struct kvm_cpu_map
function cmp_map (line 1061) | static int cmp_map(const void *A, const void *B)
function map_vcpus (line 1071) | static void map_vcpus(struct tracecmd_input **handles, int nr_handles)
type tep_event (line 1109) | struct tep_event
type tep_record (line 1110) | struct tep_record
type tep_handle (line 1113) | struct tep_handle
type kvm_cpu_map (line 1114) | struct kvm_cpu_map
type kvm_cpu_map (line 1115) | struct kvm_cpu_map
function process_record (line 1144) | static int process_record(struct tracecmd_input *handle, struct tep_reco...
type output_type (line 1165) | enum output_type {
function read_data_info (line 1172) | static void read_data_info(struct list_head *handle_list, enum output_ty...
type tracecmd_input (line 1311) | struct tracecmd_input
function sig_end (line 1320) | static void sig_end(int sig)
function __add_cpu (line 1343) | static void __add_cpu(int cpu)
function parse_cpulist (line 1348) | static void parse_cpulist(const char *cpu_str)
function read_file_fd (line 1371) | static void read_file_fd(int fd, char *dst, int len)
function add_functions (line 1385) | static void add_functions(struct tep_handle *pevent, const char *file)
function process_plugin_option (line 1410) | static void process_plugin_option(char *option)
function set_event_flags (line 1423) | static void set_event_flags(struct tep_handle *pevent, struct event_str ...
function show_event_ts (line 1459) | static void show_event_ts(struct tracecmd_input *handle,
function add_hook (line 1472) | static void add_hook(const char *arg)
function add_first_input (line 1484) | static void add_first_input(const char *input_file, long long tsoffset)
function trace_report (line 1527) | void trace_report (int argc, char **argv)
FILE: tracecmd/trace-record.c
type trace_type (line 63) | enum trace_type {
type pid_record_data (line 81) | struct pid_record_data
type func_list (line 121) | struct func_list
type hook_list (line 127) | struct hook_list
type event_list (line 129) | struct event_list {
type tracecmd_event_list (line 141) | struct tracecmd_event_list
type events (line 143) | struct events {
type reset_file (line 151) | struct reset_file {
type reset_file (line 158) | struct reset_file
type reset_file (line 161) | struct reset_file
type buffer_instance (line 163) | struct buffer_instance
type buffer_instance (line 164) | struct buffer_instance
type buffer_instance (line 165) | struct buffer_instance
type tracecmd_recorder (line 167) | struct tracecmd_recorder
function is_top_instance (line 171) | static inline int is_top_instance(struct buffer_instance *instance)
function no_top_instance (line 176) | static inline int no_top_instance(void)
function init_instance (line 181) | static void init_instance(struct buffer_instance *instance)
type trace_cmd (line 191) | enum trace_cmd {
type common_record_context (line 201) | struct common_record_context {
function add_reset_file (line 228) | static void add_reset_file(const char *file, const char *val, int prio)
function add_reset_trigger (line 253) | static void add_reset_trigger(const char *file)
function reset_save_file (line 271) | static void reset_save_file(const char *file, int prio)
function reset_save_file_cond (line 287) | static void reset_save_file_cond(const char *file, int prio,
function add_instance (line 312) | void add_instance(struct buffer_instance *instance, int cpu_count)
function instance_reset_file_save (line 323) | static void instance_reset_file_save(struct buffer_instance *instance, c...
function test_set_event_pid (line 333) | static void test_set_event_pid(struct buffer_instance *instance)
type buffer_instance (line 374) | struct buffer_instance
type buffer_instance (line 376) | struct buffer_instance
function __add_all_instances (line 398) | static int __add_all_instances(const char *tracing_dir)
function add_all_instances (line 462) | void add_all_instances(void)
function tracecmd_stat_cpu_instance (line 477) | void tracecmd_stat_cpu_instance(struct buffer_instance *instance,
function tracecmd_stat_cpu (line 510) | void tracecmd_stat_cpu(struct trace_seq *s, int cpu)
function add_event (line 515) | static void add_event(struct buffer_instance *instance, struct event_lis...
function reset_event_list (line 522) | static void reset_event_list(struct buffer_instance *instance)
type buffer_instance (line 528) | struct buffer_instance
function put_temp_file (line 589) | static void put_temp_file(char *file)
function delete_temp_file (line 594) | static void delete_temp_file(struct buffer_instance *instance, int cpu)
function kill_thread_instance (line 613) | static int kill_thread_instance(int start, struct buffer_instance *insta...
function kill_threads (line 632) | static void kill_threads(void)
function die (line 644) | void die(const char *fmt, ...)
function delete_thread_instance (line 667) | static int delete_thread_instance(int start, struct buffer_instance *ins...
function delete_thread_data (line 687) | static void delete_thread_data(void)
function add_tsc2nsec (line 704) | static void
function guest_tsync_complete (line 720) | static void guest_tsync_complete(struct buffer_instance *instance)
function host_tsync_complete (line 726) | static void host_tsync_complete(struct common_record_context *ctx,
function tell_guests_to_stop (line 754) | static void tell_guests_to_stop(struct common_record_context *ctx)
function stop_threads (line 791) | static void stop_threads(enum trace_type type)
function wait_threads (line 814) | static void wait_threads()
type buffer_instance (line 826) | struct buffer_instance
type trace_type (line 827) | enum trace_type
function flush_threads (line 829) | static void flush_threads(void)
function set_ftrace_enable (line 845) | static int set_ftrace_enable(const char *path, int set)
function set_ftrace_proc (line 872) | static int set_ftrace_proc(int set)
function set_ftrace (line 883) | static int set_ftrace(struct buffer_instance *instance, int set, int use...
function write_file (line 901) | static int write_file(const char *file, const char *str)
function __clear_trace (line 914) | static void __clear_trace(struct buffer_instance *instance)
function clear_trace_instances (line 932) | static void clear_trace_instances(void)
function reset_max_latency (line 940) | static void reset_max_latency(struct buffer_instance *instance)
function add_filter_pid (line 946) | static int add_filter_pid(struct buffer_instance *instance, int pid, int...
function add_filter_pid_all (line 972) | static void add_filter_pid_all(int pid, int exclude)
function reset_save_ftrace_pid (line 980) | static void reset_save_ftrace_pid(struct buffer_instance *instance)
function update_ftrace_pid (line 996) | static void update_ftrace_pid(struct buffer_instance *instance,
function update_ftrace_pids (line 1030) | static void update_ftrace_pids(int reset)
type buffer_instance (line 1056) | struct buffer_instance
type buffer_instance (line 1057) | struct buffer_instance
function append_filter_pid_range (line 1059) | static void append_filter_pid_range(char **filter, int *curr_len,
type buffer_instance (line 1123) | struct buffer_instance
type filter_pids (line 1128) | struct filter_pids
function get_pid_addr_maps (line 1173) | static int get_pid_addr_maps(struct buffer_instance *instance, int pid)
function get_filter_pid_maps (line 1273) | static void get_filter_pid_maps(void)
function update_task_filter (line 1289) | static void update_task_filter(void)
function pid_t (line 1315) | static pid_t trace_waitpid(enum trace_type type, pid_t pid, int *status,...
function pidfd_open (line 1336) | static int pidfd_open(pid_t pid, unsigned int flags) {
function trace_waitpidfd (line 1340) | static int trace_waitpidfd(id_t pidfd) {
function trace_wait_for_processes (line 1360) | static int trace_wait_for_processes(struct buffer_instance *instance) {
function add_event_pid (line 1407) | static void add_event_pid(struct buffer_instance *instance, const char *...
function append_sched_event (line 1445) | static void append_sched_event(struct event_list *event, const char *fie...
function update_sched_events (line 1453) | static void update_sched_events(struct buffer_instance *instance, int pid)
type buffer_instance (line 1465) | struct buffer_instance
function add_new_filter_child_pid (line 1468) | static void add_new_filter_child_pid(int pid, int child)
function ptrace_attach (line 1500) | static void ptrace_attach(struct buffer_instance *instance, int pid)
function enable_ptrace (line 1516) | static void enable_ptrace(void)
type buffer_instance (line 1524) | struct buffer_instance
type buffer_instance (line 1526) | struct buffer_instance
type filter_pids (line 1527) | struct filter_pids
function for_all_instances (line 1529) | for_all_instances(instance) {
function ptrace_wait (line 1543) | static void ptrace_wait(enum trace_type type)
function ptrace_wait (line 1641) | static inline void ptrace_wait(enum trace_type type) { }
function enable_ptrace (line 1642) | static inline void enable_ptrace(void) { }
function ptrace_attach (line 1643) | static inline void ptrace_attach(struct buffer_instance *instance, int p...
function daemonize_set_child_detached (line 1649) | static void daemonize_set_child_detached(int s)
function daemonize_start (line 1654) | static void daemonize_start(void)
function daemonize_finish (line 1737) | static void daemonize_finish(void)
function trace_or_sleep (line 1753) | static void trace_or_sleep(enum trace_type type, bool pwait)
function change_user (line 1773) | static int change_user(const char *user)
function execute_program (line 1800) | static void execute_program(int argc, char **argv)
function run_cmd (line 1846) | static void run_cmd(enum trace_type type, const char *user, int argc, ch...
function set_plugin_instance (line 1887) | static void
function set_plugin (line 1946) | static void set_plugin(const char *name)
function save_option (line 1954) | static void save_option(struct buffer_instance *instance, const char *op...
function set_option (line 1966) | static int set_option(struct buffer_instance *instance, const char *option)
function disable_func_stack_trace_instance (line 1987) | static void disable_func_stack_trace_instance(struct buffer_instance *in...
function disable_func_stack_trace (line 2016) | static void disable_func_stack_trace(void)
function add_reset_options (line 2024) | static void add_reset_options(struct buffer_instance *instance)
function set_options (line 2103) | static void set_options(void)
function set_saved_cmdlines_size (line 2123) | static void set_saved_cmdlines_size(struct common_record_context *ctx)
function trace_check_file_exists (line 2156) | static int trace_check_file_exists(struct buffer_instance *instance, cha...
function use_old_event_method (line 2169) | static int use_old_event_method(void)
function old_update_events (line 2186) | static void old_update_events(const char *name, char update)
function reset_events_instance (line 2219) | static void
function reset_events (line 2268) | static void reset_events(void)
function read_error_log (line 2317) | static void read_error_log(const char *log)
function show_error (line 2342) | static void show_error(const char *file, const char *type)
function write_filter (line 2385) | static void write_filter(const char *file, const char *filter)
function clear_filter (line 2391) | static void clear_filter(const char *file)
function write_trigger (line 2396) | static void write_trigger(const char *file, const char *trigger)
function clear_trigger (line 2402) | static int clear_trigger(const char *file)
function clear_func_filter (line 2453) | static void clear_func_filter(const char *file)
function update_reset_triggers (line 2516) | static void update_reset_triggers(void)
function reset_buffer_files_instance (line 2530) | static void reset_buffer_files_instance(struct buffer_instance *instance)
function reset_buffer_files (line 2541) | static void reset_buffer_files(void)
function update_reset_files (line 2550) | static void update_reset_files(void)
function update_event (line 2568) | static void
function check_tracing_enabled (line 2620) | static void check_tracing_enabled(void)
function open_instance_fd (line 2636) | static int open_instance_fd(struct buffer_instance *instance,
function open_tracing_on (line 2654) | static int open_tracing_on(struct buffer_instance *instance)
function write_tracing_on (line 2671) | static void write_tracing_on(struct buffer_instance *instance, int on)
function read_tracing_on (line 2692) | static int read_tracing_on(struct buffer_instance *instance)
function reset_max_latency_instance (line 2714) | static void reset_max_latency_instance(void)
function tracecmd_enable_tracing (line 2722) | void tracecmd_enable_tracing(void)
function tracecmd_disable_tracing (line 2735) | void tracecmd_disable_tracing(void)
function tracecmd_disable_all_tracing (line 2743) | void tracecmd_disable_all_tracing(int disable_tracer)
function update_sched_event (line 2763) | static void
function update_event_filters (line 2773) | static void update_event_filters(struct buffer_instance *instance)
function update_pid_filters (line 2841) | static void update_pid_filters(struct buffer_instance *instance)
function update_pid_event_filters (line 2890) | static void update_pid_event_filters(struct buffer_instance *instance)
type buffer_instance (line 2908) | struct buffer_instance
function set_mask (line 2942) | static void set_mask(struct buffer_instance *instance)
function enable_events (line 2979) | static void enable_events(struct buffer_instance *instance)
function tracecmd_enable_events (line 2998) | void tracecmd_enable_events(void)
function set_clock (line 3003) | static void set_clock(struct common_record_context *ctx, struct buffer_i...
function set_max_graph_depth (line 3044) | static void set_max_graph_depth(struct buffer_instance *instance, char *...
function check_file_in_dir (line 3061) | static bool check_file_in_dir(char *dir, char *file)
type event_list (line 3088) | struct event_list
type buffer_instance (line 3089) | struct buffer_instance
type event_list (line 3089) | struct event_list
type event_list (line 3091) | struct event_list
type stat (line 3092) | struct stat
function make_sched_event (line 3139) | static void make_sched_event(struct buffer_instance *instance,
function test_event (line 3167) | static void test_event(struct event_list *event, const char *path,
function print_event (line 3178) | static void print_event(const char *fmt, ...)
function expand_event_files (line 3193) | static int expand_event_files(struct buffer_instance *instance,
function expand_events_all (line 3254) | static int expand_events_all(struct buffer_instance *instance,
function expand_event (line 3271) | static void expand_event(struct buffer_instance *instance, struct event_...
function expand_event_instance (line 3320) | static void expand_event_instance(struct buffer_instance *instance)
function expand_event_list (line 3339) | static void expand_event_list(void)
function finish (line 3350) | static void finish(void)
function flush (line 3370) | static void flush(void)
function do_sig (line 3376) | static void do_sig(int sig)
type addrinfo (line 3389) | struct addrinfo
type port_type (line 3390) | enum port_type
type addrinfo (line 3392) | struct addrinfo
type addrinfo (line 3393) | struct addrinfo
function connect_addr (line 3415) | static int connect_addr(struct addrinfo *results)
function connect_port (line 3440) | static int connect_port(const char *host, unsigned int port, enum port_t...
function do_accept (line 3465) | static int do_accept(int sd)
type addrinfo (line 3486) | struct addrinfo
type trace_guest (line 3488) | struct trace_guest
type addrinfo (line 3489) | struct addrinfo
function set_prio (line 3538) | static void set_prio(int prio)
type tracecmd_recorder (line 3548) | struct tracecmd_recorder
type buffer_instance (line 3549) | struct buffer_instance
type tracecmd_recorder (line 3552) | struct tracecmd_recorder
type tracecmd_recorder (line 3563) | struct tracecmd_recorder
type buffer_instance (line 3564) | struct buffer_instance
type tracecmd_recorder (line 3567) | struct tracecmd_recorder
type addrinfo (line 3568) | struct addrinfo
function create_recorder (line 3614) | static int create_recorder(struct buffer_instance *instance, int cpu,
function check_first_msg_from_server (line 3698) | static void check_first_msg_from_server(struct tracecmd_msg_handle *msg_...
function communicate_with_listener_v1 (line 3709) | static void communicate_with_listener_v1(struct tracecmd_msg_handle *msg...
function communicate_with_listener_v3 (line 3779) | static void communicate_with_listener_v3(struct tracecmd_msg_handle *msg...
function check_protocol_version (line 3786) | static void check_protocol_version(struct tracecmd_msg_handle *msg_handle)
function connect_vsock (line 3833) | static int connect_vsock(char *vhost)
function connect_ip (line 3855) | static int connect_ip(char *thost)
type tracecmd_msg_handle (line 3891) | struct tracecmd_msg_handle
type buffer_instance (line 3891) | struct buffer_instance
type tracecmd_msg_handle (line 3893) | struct tracecmd_msg_handle
type port_type (line 3894) | enum port_type
type tracecmd_output (line 3957) | struct tracecmd_output
type common_record_context (line 3957) | struct common_record_context
type tracecmd_output (line 3959) | struct tracecmd_output
type common_record_context (line 3959) | struct common_record_context
type tracecmd_msg_handle (line 3960) | struct tracecmd_msg_handle
type tracecmd_output (line 3962) | struct tracecmd_output
type tracecmd_msg_handle (line 3988) | struct tracecmd_msg_handle
type buffer_instance (line 3989) | struct buffer_instance
type common_record_context (line 3989) | struct common_record_context
type tracecmd_msg_handle (line 3991) | struct tracecmd_msg_handle
type tracecmd_output (line 3992) | struct tracecmd_output
function finish_network (line 4052) | static void finish_network(struct tracecmd_msg_handle *msg_handle)
function open_guest_fifos (line 4060) | static int open_guest_fifos(const char *guest, int **fds)
type tracefs_instance (line 4084) | struct tracefs_instance
function host_tsync (line 4086) | static int host_tsync(struct common_record_context *ctx,
function connect_to_agent (line 4127) | static void connect_to_agent(struct common_record_context *ctx,
function setup_guest (line 4233) | static void setup_guest(struct buffer_instance *instance)
function setup_agent (line 4266) | static void setup_agent(struct buffer_instance *instance,
function start_threads (line 4287) | static void start_threads(enum trace_type type, struct common_record_con...
function touch_file (line 4352) | static void touch_file(const char *file)
function append_buffer (line 4362) | static void append_buffer(struct tracecmd_output *handle,
function add_pid_maps (line 4400) | static void
function add_trace_id (line 4429) | static void
function add_buffer_stat (line 4436) | static void
function add_option_hooks (line 4455) | static void add_option_hooks(struct tracecmd_output *handle)
function add_uname (line 4467) | static void add_uname(struct tracecmd_output *handle)
function add_version (line 4489) | static void add_version(struct tracecmd_output *handle)
function print_stat (line 4502) | static void print_stat(struct buffer_instance *instance)
type buffer_instance (line 4519) | struct buffer_instance
function for_all_instances (line 4521) | for_all_instances(instance) {
function add_options (line 4542) | static void add_options(struct tracecmd_output *handle, struct common_re...
function write_guest_file (line 4568) | static void write_guest_file(struct buffer_instance *instance)
type tracecmd_output (line 4606) | struct tracecmd_output
type common_record_context (line 4606) | struct common_record_context
type tracecmd_output (line 4608) | struct tracecmd_output
function check_need_btf (line 4637) | static void check_need_btf(bool *need_btf, struct tracefs_instance *inst...
function record_data (line 4678) | static void record_data(struct common_record_context *ctx)
type filter_type (line 4849) | enum filter_type {
function filter_command (line 4854) | static int filter_command(struct tracefs_instance *instance, const char ...
function write_func_filter (line 4859) | static int write_func_filter(enum filter_type type, struct buffer_instan...
function write_func_file (line 4922) | static int write_func_file(struct buffer_instance *instance,
function functions_filtered (line 4972) | static int functions_filtered(struct buffer_instance *instance)
function set_funcs (line 5002) | static void set_funcs(struct buffer_instance *instance)
function add_func (line 5043) | static void add_func(struct func_list **list, const char *mod, const cha...
function find_ts (line 5056) | static int find_ts(struct tep_event *event, struct tep_record *record,
function find_time_stamp (line 5074) | static unsigned long long find_time_stamp(struct tep_handle *tep,
type tep_handle (line 5091) | struct tep_handle
type tep_handle (line 5094) | struct tep_handle
type tep_handle (line 5124) | struct tep_handle
type timespec (line 5131) | struct timespec
type timespec (line 5132) | struct timespec
function set_buffer_size_instance (line 5200) | static void set_buffer_size_instance(struct buffer_instance *instance)
function set_subbuf_size_instance (line 5220) | static void set_subbuf_size_instance(struct buffer_instance *instance)
function set_buffer_size (line 5240) | void set_buffer_size(void)
function process_event_trigger (line 5250) | static int
function clear_instance_triggers (line 5281) | static void clear_instance_triggers(struct buffer_instance *instance)
function process_event_filter (line 5340) | static void
function clear_instance_filters (line 5370) | static void clear_instance_filters(struct buffer_instance *instance)
function clear_filters (line 5401) | static void clear_filters(void)
function reset_clock (line 5409) | static void reset_clock(void)
function reset_cpu_mask (line 5418) | static void reset_cpu_mask(void)
function reset_event_pid (line 5438) | static void reset_event_pid(void)
function clear_triggers (line 5446) | static void clear_triggers(void)
function clear_instance_error_log (line 5454) | static void clear_instance_error_log(struct buffer_instance *instance)
function clear_error_log (line 5468) | static void clear_error_log(void)
function clear_all_dynamic_events (line 5476) | static void clear_all_dynamic_events(unsigned int excluded_types)
function clear_func_filters (line 5487) | static void clear_func_filters(void)
function make_instances (line 5507) | static void make_instances(void)
function tracecmd_remove_instances (line 5523) | void tracecmd_remove_instances(void)
function check_plugin (line 5539) | static void check_plugin(const char *plugin)
function check_function_plugin (line 5569) | static void check_function_plugin(void)
function __check_doing_something (line 5586) | static int __check_doing_something(struct buffer_instance *instance)
function check_doing_something (line 5592) | static void check_doing_something(void)
function update_plugin_instance (line 5604) | static void
function update_plugins (line 5645) | static void update_plugins(enum trace_type type)
function allocate_seq (line 5653) | static void allocate_seq(void)
function add_overrun (line 5666) | static void add_overrun(int cpu, struct trace_seq *src, struct trace_seq...
function record_stats (line 5704) | static void record_stats(void)
function print_stats (line 5727) | static void print_stats(void)
function destroy_stats (line 5735) | static void destroy_stats(void)
function list_event (line 5751) | static void list_event(const char *event)
function tracecmd_add_event (line 5878) | int tracecmd_add_event(const char *event_str, int stack)
function enable_profile (line 5883) | static void enable_profile(struct buffer_instance *instance)
type event_list (line 5931) | struct event_list
type buffer_instance (line 5932) | struct buffer_instance
type event_list (line 5935) | struct event_list
function add_hook (line 5962) | static void add_hook(struct buffer_instance *instance, const char *arg)
function update_first_instance (line 5985) | void update_first_instance(struct buffer_instance *instance, int topt)
function init_top_instance (line 5993) | void init_top_instance(void)
function trace_stop (line 6038) | void trace_stop(int argc, char **argv)
function trace_restart (line 6079) | void trace_restart(int argc, char **argv)
function find_dynevent_type (line 6128) | static unsigned int find_dynevent_type(const char *type)
function trace_reset (line 6159) | void trace_reset(int argc, char **argv)
function init_common_record_context (line 6253) | static void init_common_record_context(struct common_record_context *ctx,
function add_argv (line 6264) | static void add_argv(struct buffer_instance *instance, char *arg, bool p...
function add_arg (line 6280) | static void add_arg(struct buffer_instance *instance,
function cmd_check_die (line 6322) | static inline void cmd_check_die(struct common_record_context *ctx,
function remove_instances (line 6330) | static inline void remove_instances(struct buffer_instance *instances)
function check_instance_die (line 6345) | static inline void
function clock_is_supported (line 6353) | static bool clock_is_supported(struct tracefs_instance *instance, const ...
function get_tsc_nsec (line 6382) | static int get_tsc_nsec(int *shift, int *mult)
function get_tsc_nsec (line 6431) | static int get_tsc_nsec(int *shift, int *mult)
function trace_tsc2nsec_is_supported (line 6437) | bool trace_tsc2nsec_is_supported(void)
function parse_record_options (line 6442) | static void parse_record_options(int argc,
function get_trace_cmd_type (line 7081) | static enum trace_type get_trace_cmd_type(enum trace_cmd cmd)
function finalize_record_trace (line 7104) | static void finalize_record_trace(struct common_record_context *ctx)
function has_local_instances (line 7145) | static bool has_local_instances(void)
function set_tsync_params (line 7159) | static void set_tsync_params(struct common_record_context *ctx)
function record_trace (line 7222) | static void record_trace(int argc, char **argv,
function record_trace_command (line 7422) | static void record_trace_command(int argc, char **argv,
function trace_start (line 7429) | void trace_start(int argc, char **argv)
function trace_set (line 7438) | void trace_set(int argc, char **argv)
function read_last_boot_info (line 7450) | static void read_last_boot_info(void)
function trace_extract (line 7481) | void trace_extract(int argc, char **argv)
function trace_stream (line 7560) | void trace_stream(int argc, char **argv)
function trace_profile (line 7573) | void trace_profile(int argc, char **argv)
function trace_record (line 7593) | void trace_record(int argc, char **argv)
function trace_record_agent (line 7621) | int trace_record_agent(struct tracecmd_msg_handle *msg_handle,
FILE: tracecmd/trace-restore.c
type tracecmd_output (line 24) | struct tracecmd_output
type tracecmd_output (line 27) | struct tracecmd_output
function trace_restore (line 47) | void trace_restore (int argc, char **argv)
FILE: tracecmd/trace-setup-guest.c
function make_dir (line 20) | static int make_dir(const char *path, mode_t mode)
function make_fifo (line 40) | static int make_fifo(const char *path, mode_t mode)
function make_guest_dir (line 55) | static int make_guest_dir(const char *guest)
function make_guest_fifo (line 63) | static int make_guest_fifo(const char *guest, int cpu, mode_t mode)
function make_guest_fifos (line 80) | static int make_guest_fifos(const char *guest, int nr_cpus, mode_t mode)
function get_guest_cpu_count (line 96) | static int get_guest_cpu_count(const char *guest)
function attach_guest_fifos (line 114) | static int attach_guest_fifos(const char *guest, int nr_cpus)
function do_setup_guest (line 151) | static void do_setup_guest(const char *guest, int nr_cpus,
function trace_setup_guest (line 185) | void trace_setup_guest(int argc, char **argv)
FILE: tracecmd/trace-show.c
function trace_show (line 31) | void trace_show(int argc, char **argv)
FILE: tracecmd/trace-snapshot.c
function write_file (line 18) | static void write_file(const char *name, char *val)
function trace_snapshot (line 37) | void trace_snapshot (int argc, char **argv)
FILE: tracecmd/trace-split.c
type split_types (line 30) | enum split_types {
type cpu_data (line 41) | struct cpu_data {
type handle_list (line 54) | struct handle_list {
type list_head (line 64) | struct list_head
type tracecmd_input (line 69) | struct tracecmd_input
type handle_list (line 69) | struct handle_list
type tracecmd_input (line 71) | struct tracecmd_input
function add_handle (line 89) | static void add_handle(const char *name, int index, bool was_top_instance)
function free_handles (line 107) | static void free_handles(struct list_head *list)
type list_head (line 119) | struct list_head
type inst_list (line 121) | struct inst_list {
function free_inst (line 133) | static void free_inst(struct list_head *list)
type inst_list (line 144) | struct inst_list
type inst_list (line 147) | struct inst_list
function create_type_len (line 163) | static int create_type_len(struct tep_handle *pevent, int time, int len)
function write_record (line 186) | static int write_record(struct tracecmd_input *handle,
function write_page (line 256) | static void write_page(struct tep_handle *pevent,
type tep_record (line 285) | struct tep_record
type tracecmd_input (line 285) | struct tracecmd_input
function set_cpu_time (line 294) | static void set_cpu_time(struct tracecmd_input *handle,
function parse_cpu (line 307) | static int parse_cpu(struct tracecmd_input *handle,
function delete_temp_file (line 495) | static void delete_temp_file(const char *name)
function put_temp_file (line 500) | static void put_temp_file(char *file)
function touch_file (line 505) | static void touch_file(const char *file)
function parse_file (line 515) | static unsigned long long parse_file(struct tracecmd_input *handle,
function map_inst_handle (line 621) | static void map_inst_handle(void)
function is_top_instance_unique (line 655) | static bool is_top_instance_unique(void)
type prev_arg_type (line 680) | enum prev_arg_type {
function trace_split (line 686) | void trace_split (int argc, char **argv)
FILE: tracecmd/trace-sqlhist.c
type action (line 11) | enum action {
function do_sql (line 22) | static int do_sql(const char *instance_name,
function trace_sqlhist (line 129) | void trace_sqlhist (int argc, char **argv)
FILE: tracecmd/trace-stack.c
type stack_type (line 23) | enum stack_type {
function test_available (line 30) | static void test_available(void)
function change_stack_tracer_status (line 41) | static void change_stack_tracer_status(unsigned new_status)
function start_trace (line 73) | static void start_trace(void)
function stop_trace (line 78) | static void stop_trace(void)
function reset_trace (line 83) | static void reset_trace(void)
function read_trace (line 103) | static void read_trace(void)
function trace_stack (line 149) | void trace_stack (int argc, char **argv)
FILE: tracecmd/trace-stat.c
function is_top_instance (line 22) | static inline int is_top_instance(struct buffer_instance *instance)
function report_file (line 98) | static void report_file(struct buffer_instance *instance,
function report_instances (line 116) | static void report_instances(void)
type event_iter (line 135) | struct event_iter
type event_iter (line 137) | struct event_iter
function trace_event_iter_next (line 151) | enum event_iter_type
function trace_event_iter_free (line 205) | void trace_event_iter_free(struct event_iter *iter)
function reset_event_iter (line 217) | static void reset_event_iter(struct event_iter *iter)
function process_individual_events (line 227) | static int process_individual_events(const char *path, struct event_iter...
function process_event_enable (line 258) | static void
function report_events (line 309) | static void report_events(struct buffer_instance *instance)
function process_event_filter (line 380) | static void
function report_event_filters (line 422) | static void report_event_filters(struct buffer_instance *instance)
function process_event_trigger (line 453) | static void
function report_event_triggers (line 495) | static void report_event_triggers(struct buffer_instance *instance)
type func_states (line 526) | enum func_states {
function list_functions (line 532) | static void list_functions(const char *path, char *string)
function report_graph_funcs (line 588) | static void report_graph_funcs(struct buffer_instance *instance)
function report_ftrace_filters (line 609) | static void report_ftrace_filters(struct buffer_instance *instance)
function report_buffers (line 630) | static void report_buffers(struct buffer_instance *instance)
function report_clock (line 692) | static void report_clock(struct buffer_instance *instance)
function report_cpumask (line 706) | static void report_cpumask(struct buffer_instance *instance)
function report_probes (line 756) | static void report_probes(struct buffer_instance *instance,
function report_kprobes (line 789) | static void report_kprobes(struct buffer_instance *instance)
function report_uprobes (line 794) | static void report_uprobes(struct buffer_instance *instance)
function report_synthetic (line 799) | static void report_synthetic(struct buffer_instance *instance)
function report_traceon (line 804) | static void report_traceon(struct buffer_instance *instance)
function stat_instance (line 824) | static void stat_instance(struct buffer_instance *instance, bool opt)
function trace_stat (line 862) | void trace_stat (int argc, char **argv)
FILE: tracecmd/trace-stream.c
type tracecmd_input (line 23) | struct tracecmd_input
type buffer_instance (line 24) | struct buffer_instance
type hook_list (line 25) | struct hook_list
type tracecmd_output (line 28) | struct tracecmd_output
type tracecmd_input (line 29) | struct tracecmd_input
function trace_stream_read (line 87) | int trace_stream_read(struct pid_record_data *pids, int nr_pids, long sl...
FILE: tracecmd/trace-tsync.c
type trace_mapping (line 13) | struct trace_mapping {
function cmp_tmap_vcpu (line 23) | static int cmp_tmap_vcpu(const void *A, const void *B)
function map_kvm_vcpus (line 33) | static int map_kvm_vcpus(int guest_pid, struct trace_mapping *tmap)
function map_vcpus (line 112) | static int map_vcpus(struct tep_event *event, struct tep_record *record,
function start_mapping_vcpus (line 169) | static void start_mapping_vcpus(struct trace_guest *guest)
function stop_mapping_vcpus (line 203) | static void stop_mapping_vcpus(int cpu_count, struct trace_guest *guest)
type tracecmd_time_sync (line 283) | struct tracecmd_time_sync
type tracecmd_time_sync (line 289) | struct tracecmd_time_sync
type trace_guest (line 290) | struct trace_guest
type tracecmd_time_sync (line 326) | struct tracecmd_time_sync
type tracecmd_time_sync (line 330) | struct tracecmd_time_sync
FILE: tracecmd/trace-usage.c
type usage_help (line 10) | struct usage_help {
type usage_help (line 16) | struct usage_help
type usage_help (line 499) | struct usage_help
type usage_help (line 501) | struct usage_help
function usage (line 512) | void usage(char **argv)
function trace_usage (line 546) | void trace_usage(int argc, char **argv)
FILE: tracecmd/trace-vm.c
type trace_guest (line 18) | struct trace_guest
type trace_guest (line 21) | struct trace_guest
type trace_guest (line 34) | struct trace_guest
function trace_have_guests_pid (line 47) | bool trace_have_guests_pid(void)
function find_tasks (line 58) | static void find_tasks(struct trace_guest *guest)
type trace_guest (line 89) | struct trace_guest
type trace_guest (line 91) | struct trace_guest
type trace_guest (line 93) | struct trace_guest
type tracefs_instance (line 114) | struct tracefs_instance
type tracefs_instance (line 116) | struct tracefs_instance
type pids (line 128) | struct pids {
type trace_fields (line 133) | struct trace_fields {
function free_pids (line 142) | static void free_pids(struct pids *pids)
function add_pid (line 153) | static void add_pid(struct pids **pids, int pid)
function match_pid (line 166) | static bool match_pid(struct pids *pids, int pid)
function callback (line 176) | static int callback(struct tep_event *event, struct tep_record *record, ...
function find_tgid (line 228) | static int find_tgid(int pid)
function stop_trace_connect (line 267) | static int stop_trace_connect(struct tracefs_instance *open_instance)
function find_pid_by_cid (line 322) | static void find_pid_by_cid(struct trace_guest *guest)
type trace_guest (line 335) | struct trace_guest
type trace_guest (line 337) | struct trace_guest
function read_guest_cid (line 356) | static void read_guest_cid(char *name)
function read_qemu_guests (line 388) | void read_qemu_guests(void)
function get_guest_vcpu_pid (line 409) | int get_guest_vcpu_pid(unsigned int guest_cid, unsigned int guest_vcpu)
function trace_add_guest_info (line 434) | void
FILE: tracecmd/trace-vsock.c
function tcmd_vsock_open (line 9) | int __hidden tcmd_vsock_open(unsigned int cid, unsigned int port)
function tcmd_vsock_make (line 30) | int __hidden tcmd_vsock_make(unsigned int port)
function tcmd_vsock_make_any (line 58) | int __hidden tcmd_vsock_make_any(void)
function tcmd_vsock_get_port (line 63) | int __hidden tcmd_vsock_get_port(int sd, unsigned int *port)
function get_vsocket_params (line 80) | int get_vsocket_params(int fd, unsigned int *lcid, unsigned int *rcid)
function trace_vsock_print_connection (line 107) | int trace_vsock_print_connection(int fd)
function try_splice_read_vsock (line 127) | static int try_splice_read_vsock(void)
function tcmd_vsock_can_splice_read (line 158) | bool __hidden tcmd_vsock_can_splice_read(void)
function tcmd_vsock_local_cid (line 172) | int __hidden tcmd_vsock_local_cid(void)
FILE: utest/trace-utest.c
type unit_tests (line 20) | enum unit_tests {
function print_help (line 26) | static void print_help(char **argv)
function main (line 36) | int main(int argc, char **argv)
FILE: utest/tracecmd-utest.c
function silent_output (line 75) | static void silent_output(void)
function wait_for_exec (line 83) | static int wait_for_exec(int pid)
function run_trace (line 95) | static int run_trace(const char *cmd, ...)
function pipe_it (line 126) | static int pipe_it(int *ofd, int *efd, int (*func)(void *),
type do_grep (line 195) | struct do_grep {
function do_grep (line 200) | static int do_grep(void *data)
type do_grep_it (line 215) | struct do_grep_it {
function do_grep_it (line 221) | static int do_grep_it(void *data)
type do_grep_match (line 271) | struct do_grep_match {
function grep_match (line 277) | static int grep_match(const char *match, const char *cmd, ...)
function test_trace_record_report (line 330) | static void test_trace_record_report(void)
function test_trace_sqlhist_hist (line 340) | static void test_trace_sqlhist_hist(void)
function read_stats (line 364) | static int read_stats(const char *out, const char *match, const char *cm...
function test_trace_record_max (line 422) | static void test_trace_record_max(void)
function test_trace_convert6 (line 434) | static void test_trace_convert6(void)
type callback_data (line 448) | struct callback_data {
function read_events (line 453) | static int read_events(struct tracecmd_input *handle, struct tep_record ...
function read_events_10 (line 473) | static int read_events_10(struct tracecmd_input *handle, struct tep_reco...
function test_trace_library_read (line 482) | static void test_trace_library_read(void)
function test_trace_library_read_inc (line 509) | static void test_trace_library_read_inc(void)
function test_trace_library_read_back (line 555) | static void test_trace_library_read_back(void)
function test_trace_reset_kprobe (line 606) | static void test_trace_reset_kprobe(void)
function test_trace_reset_kretprobe (line 627) | static void test_trace_reset_kretprobe(void)
function test_trace_reset_uprobe (line 648) | static void test_trace_reset_uprobe(void)
function test_trace_reset_uretprobe (line 669) | static void test_trace_reset_uretprobe(void)
function test_trace_reset_eprobe (line 690) | static void test_trace_reset_eprobe(void)
function test_trace_reset (line 731) | static void test_trace_reset(void)
function test_suite_destroy (line 751) | static int test_suite_destroy(void)
function test_suite_init (line 758) | static int test_suite_init(void)
function test_tracecmd_lib (line 786) | void test_tracecmd_lib(void)
Condensed preview — 166 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,674K chars).
[
{
"path": ".gitattributes",
"chars": 54,
"preview": ".gitattributes export-ignore\n.gitignore export-ignore\n"
},
{
"path": ".gitignore",
"chars": 297,
"preview": "*.o\n*.so\n*.a\n*.dat\n*.data\n*.patch\n.*.d\n*.orig\n*.rej\n.pc\n*~\n*.pyc\n*.swp\n\\#*\\#\npatches/\ntc_version.h\nks_version.h\nctracecm"
},
{
"path": "CODING_STYLE",
"chars": 7200,
"preview": "\ntrace-cmd coding-style\n======================\n\nThe coding style of trace-cmd and the tracing libraries (libtracefs and\n"
},
{
"path": "CONTRIBUTE",
"chars": 4511,
"preview": "If you like to become part of the community and submit patches, here's how\nto do so for trace-cmd.\n\nIf you only want to "
},
{
"path": "COPYING",
"chars": 268,
"preview": "There are two main licenses that the tools in this directory are covered\nunder. For the applications themselves, they ar"
},
{
"path": "COPYING.LIB",
"chars": 26537,
"preview": "\n GNU LESSER GENERAL PUBLIC LICENSE\n Version 2.1, February 1999\n\n Copyright (C) 1"
},
{
"path": "DCO",
"chars": 2116,
"preview": "\n(Copied from the Linux Kernel's Documentation/process/submitting-patches.rst)\n\nSign your work - the Developer's Certifi"
},
{
"path": "Documentation/.gitignore",
"chars": 19,
"preview": "*.[1-9]\n*.m\n*.html\n"
},
{
"path": "Documentation/Makefile",
"chars": 2352,
"preview": "# SPDX-License-Identifier: GPL-2.0\n\ndoc_dir:=$(src)/Documentation\n\nexport doc_dir\n\nSUBDIR += trace-cmd\nSUBDIR += libtrac"
},
{
"path": "Documentation/README.PythonPlugin",
"chars": 3555,
"preview": " PYTHON PLUGIN DOCUMENTATION\n=============================\n\nWith the python plugin (make python-plugin) you can now\nwrit"
},
{
"path": "Documentation/asciidoc.conf",
"chars": 3196,
"preview": "## linktep: macro\n#\n# Usage: linktep:command[manpage-section]\n#\n# Note, {0} is the manpage section, while {target} is th"
},
{
"path": "Documentation/libtracecmd/Makefile",
"chars": 2816,
"preview": "# SPDX-License-Identifier: GPL-2.0\n\n# Include the utils\ninclude $(src)/scripts/utils.mk\n\n# This Makefile and manpage XSL"
},
{
"path": "Documentation/libtracecmd/install-docs.sh.in",
"chars": 744,
"preview": "#!/bin/bash\n# SPDX-License-Identifier: LGPL-2.1\n#\n# Copyright (c) 2023 Daniel Wagner, SUSE LLC\n\nfor section in 1 3 5; do"
},
{
"path": "Documentation/libtracecmd/libtracecmd-files.txt",
"chars": 6278,
"preview": "libtracecmd(3)\n=============\n\nNAME\n----\ntracecmd_open, tracecmd_open_fd, tracecmd_open_head, tracecmd_init_data,\ntracecm"
},
{
"path": "Documentation/libtracecmd/libtracecmd-instances.txt",
"chars": 3452,
"preview": "libtracecmd(3)\n=============\n\nNAME\n----\ntracecmd_buffer_instances, tracecmd_buffer_instance_name, tracecmd_buffer_instan"
},
{
"path": "Documentation/libtracecmd/libtracecmd-iterate.txt",
"chars": 13496,
"preview": "libtracecmd(3)\n=============\n\nNAME\n----\ntracecmd_iterate_events, tracecmd_iterate_events_multi, tracecmd_follow_event,\nt"
},
{
"path": "Documentation/libtracecmd/libtracecmd-log.txt",
"chars": 1778,
"preview": "libtracecmd(3)\n=============\n\nNAME\n----\ntracecmd_set_loglevel - Set log level of the library\n\nSYNOPSIS\n--------\n[verse]\n"
},
{
"path": "Documentation/libtracecmd/libtracecmd-maps.txt",
"chars": 5863,
"preview": "libtracecmd(3)\n=============\n\nNAME\n----\ntracecmd_map_vcpus, tracecmd_get_cpu_map, tracecmd_map_find_by_host_pid, tracecm"
},
{
"path": "Documentation/libtracecmd/libtracecmd-peer.txt",
"chars": 4413,
"preview": "libtracecmd(3)\n=============\n\nNAME\n----\ntracecmd_get_traceid, tracecmd_get_guest_cpumap - Manage trace session with mult"
},
{
"path": "Documentation/libtracecmd/libtracecmd-record.txt",
"chars": 3841,
"preview": "libtracecmd(3)\n=============\n\nNAME\n----\ntracecmd_read_cpu_first, tracecmd_read_data, tracecmd_read_at,\ntracecmd_free_rec"
},
{
"path": "Documentation/libtracecmd/libtracecmd-timestamp.txt",
"chars": 4625,
"preview": "libtracecmd(3)\n=============\n\nNAME\n----\ntracecmd_get_first_ts, tracecmd_add_ts_offset, tracecmd_get_tsc2nsec - Handle ti"
},
{
"path": "Documentation/libtracecmd/libtracecmd.txt",
"chars": 5835,
"preview": "libtracecmd(3)\n=============\n\nNAME\n----\nlibtracecmd - trace-cmd library APIs\n\nSYNOPSIS\n--------\n[verse]\n--\n*#include <tr"
},
{
"path": "Documentation/libtracecmd/meson.build",
"chars": 5013,
"preview": "# SPDX-License-Identifier: LGPL-2.1\n#\n# Copyright (c) 2023 Daniel Wagner, SUSE LLC\n\n# input text file: man page section\n"
},
{
"path": "Documentation/manpage-1.72.xsl",
"chars": 510,
"preview": "<!-- manpage-1.72.xsl:\n special settings for manpages rendered from asciidoc+docbook\n handles peculiarities in d"
},
{
"path": "Documentation/manpage-base.xsl",
"chars": 1192,
"preview": "<!-- manpage-base.xsl:\n special formatting for manpages rendered from asciidoc+docbook -->\n<xsl:stylesheet xmlns:xsl"
},
{
"path": "Documentation/manpage-bold-literal.xsl",
"chars": 578,
"preview": "<!-- manpage-bold-literal.xsl:\n special formatting for manpages rendered from asciidoc+docbook -->\n<xsl:stylesheet x"
},
{
"path": "Documentation/manpage-normal.xsl",
"chars": 475,
"preview": "<!-- manpage-normal.xsl:\n special settings for manpages rendered from asciidoc+docbook\n handles anything we want"
},
{
"path": "Documentation/manpage-suppress-sp.xsl",
"chars": 737,
"preview": "<!-- manpage-suppress-sp.xsl:\n special settings for manpages rendered from asciidoc+docbook\n handles erroneous, "
},
{
"path": "Documentation/trace-cmd/Makefile",
"chars": 3481,
"preview": "# SPDX-License-Identifier: GPL-2.0\n\n# Include the utils\ninclude $(src)/scripts/utils.mk\n\n# This Makefile and manpage XSL"
},
{
"path": "Documentation/trace-cmd/install-docs.sh.in",
"chars": 744,
"preview": "#!/bin/bash\n# SPDX-License-Identifier: LGPL-2.1\n#\n# Copyright (c) 2023 Daniel Wagner, SUSE LLC\n\nfor section in 1 3 5; do"
},
{
"path": "Documentation/trace-cmd/meson.build",
"chars": 5447,
"preview": "# SPDX-License-Identifier: LGPL-2.1\n#\n# Copyright (c) 2023 Daniel Wagner, SUSE LLC\n\n# input text file: man page section\n"
},
{
"path": "Documentation/trace-cmd/trace-cmd-agent.1.txt",
"chars": 2165,
"preview": "TRACE-CMD-AGENT(1)\n==================\n\nNAME\n----\ntrace-cmd-agent - Run as an agent on a machine (to be controlled by ano"
},
{
"path": "Documentation/trace-cmd/trace-cmd-attach.1.txt",
"chars": 4330,
"preview": "TRACE-CMD-ATTACH(1)\n===================\n\nNAME\n----\ntrace-cmd-attach - attach a guest trace.dat file to a host trace.dat "
},
{
"path": "Documentation/trace-cmd/trace-cmd-check-events.1.txt",
"chars": 1740,
"preview": "TRACE-CMD-CHECK_EVENTS(1)\n=========================\n\nNAME\n----\ntrace-cmd-check-events - parse the event formats on local"
},
{
"path": "Documentation/trace-cmd/trace-cmd-clear.1.txt",
"chars": 1231,
"preview": "TRACE-CMD-CLEAR(1)\n=================\n\nNAME\n----\ntrace-cmd-clear - clear the Ftrace buffer.\n\nSYNOPSIS\n--------\n*trace-cmd"
},
{
"path": "Documentation/trace-cmd/trace-cmd-convert.1.txt",
"chars": 1767,
"preview": "TRACE-CMD-CONVERT(1)\n===================\n\nNAME\n----\ntrace-cmd-convert - convert trace files\n\nSYNOPSIS\n--------\n*trace-cm"
},
{
"path": "Documentation/trace-cmd/trace-cmd-dump.1.txt",
"chars": 4237,
"preview": "TRACE-CMD-DUMP(1)\n===================\n\nNAME\n----\ntrace-cmd-dump - show a meta data from a trace file, created by trace-c"
},
{
"path": "Documentation/trace-cmd/trace-cmd-extract.1.txt",
"chars": 3653,
"preview": "TRACE-CMD-EXTRACT(1)\n====================\n\nNAME\n----\ntrace-cmd-extract - extract out the data from the Ftrace Linux trac"
},
{
"path": "Documentation/trace-cmd/trace-cmd-hist.1.txt",
"chars": 1491,
"preview": "TRACE-CMD-HIST(1)\n=================\n\nNAME\n----\ntrace-cmd-hist - show histogram of events in trace.dat file\n\nSYNOPSIS\n---"
},
{
"path": "Documentation/trace-cmd/trace-cmd-list.1.txt",
"chars": 2684,
"preview": "TRACE-CMD-LIST(1)\n=================\n\nNAME\n----\ntrace-cmd-list - list available plugins, events or options for Ftrace.\n\nS"
},
{
"path": "Documentation/trace-cmd/trace-cmd-listen.1.txt",
"chars": 2124,
"preview": "TRACE-CMD-LISTEN(1)\n===================\n\nNAME\n----\ntrace-cmd-listen - listen for incoming connection to record tracing.\n"
},
{
"path": "Documentation/trace-cmd/trace-cmd-mem.1.txt",
"chars": 3663,
"preview": "TRACE-CMD-MEM(1)\n================\n\nNAME\n----\ntrace-cmd-mem - show memory usage of certain kmem events\n\nSYNOPSIS\n--------"
},
{
"path": "Documentation/trace-cmd/trace-cmd-options.1.txt",
"chars": 788,
"preview": "TRACE-CMD-OPTIONS(1)\n====================\n\nNAME\n----\ntrace-cmd-options - list available options from trace-cmd plugins\n\n"
},
{
"path": "Documentation/trace-cmd/trace-cmd-profile.1.txt",
"chars": 32312,
"preview": "TRACE-CMD-PROFILE(1)\n====================\n\nNAME\n----\ntrace-cmd-profile - profile tasks running live\n\nSYNOPSIS\n--------\n*"
},
{
"path": "Documentation/trace-cmd/trace-cmd-record.1.txt",
"chars": 27976,
"preview": "TRACE-CMD-RECORD(1)\n===================\n\nNAME\n----\ntrace-cmd-record - record a trace from the Ftrace Linux internal trac"
},
{
"path": "Documentation/trace-cmd/trace-cmd-report.1.txt",
"chars": 31979,
"preview": "TRACE-CMD-REPORT(1)\n===================\n\nNAME\n----\ntrace-cmd-report - show in ASCII a trace created by trace-cmd record\n"
},
{
"path": "Documentation/trace-cmd/trace-cmd-reset.1.txt",
"chars": 4299,
"preview": "TRACE-CMD-RESET(1)\n==================\n\nNAME\n----\ntrace-cmd-reset - turn off all Ftrace tracing to bring back full perfor"
},
{
"path": "Documentation/trace-cmd/trace-cmd-restore.1.txt",
"chars": 4065,
"preview": "TRACE-CMD-RESTORE(1)\n====================\n\nNAME\n----\ntrace-cmd-restore - restore a failed trace record\n\nSYNOPSIS\n-------"
},
{
"path": "Documentation/trace-cmd/trace-cmd-set.1.txt",
"chars": 10961,
"preview": "TRACE-CMD-SET(1)\n================\n\nNAME\n----\ntrace-cmd-set - set a configuration parameter of the Ftrace Linux internal "
},
{
"path": "Documentation/trace-cmd/trace-cmd-show.1.txt",
"chars": 3571,
"preview": "TRACE-CMD-SHOW(1)\n=================\n\nNAME\n----\ntrace-cmd-show - show the contents of the Ftrace Linux kernel tracing buf"
},
{
"path": "Documentation/trace-cmd/trace-cmd-snapshot.1.txt",
"chars": 1673,
"preview": "TRACE-CMD-SNAPSHOT(1)\n=====================\n\nNAME\n----\ntrace-cmd-snapshot - take, reset, free, or show a Ftrace kernel s"
},
{
"path": "Documentation/trace-cmd/trace-cmd-split.1.txt",
"chars": 3912,
"preview": "TRACE-CMD-SPLIT(1)\n==================\n\nNAME\n----\ntrace-cmd-split - split a trace.dat file into smaller files\n\nSYNOPSIS\n-"
},
{
"path": "Documentation/trace-cmd/trace-cmd-sqlhist.1.txt",
"chars": 18072,
"preview": "TRACE-CMD-SQLHIST(1)\n====================\n\nNAME\n----\ntrace-cmd-sqlhist - Use SQL language to create / show creation of t"
},
{
"path": "Documentation/trace-cmd/trace-cmd-stack.1.txt",
"chars": 1554,
"preview": "TRACE-CMD-STACK(1)\n==================\n\nNAME\n----\ntrace-cmd-stack - read, enable or disable Ftrace Linux kernel stack tra"
},
{
"path": "Documentation/trace-cmd/trace-cmd-start.1.txt",
"chars": 1582,
"preview": "TRACE-CMD-START(1)\n==================\n\nNAME\n----\ntrace-cmd-start - start the Ftrace Linux kernel tracer without recordin"
},
{
"path": "Documentation/trace-cmd/trace-cmd-stat.1.txt",
"chars": 2305,
"preview": "TRACE-CMD-STAT(1)\n=================\n\nNAME\n----\ntrace-cmd-stat - show the status of the tracing (ftrace) system\n\nSYNOPSIS"
},
{
"path": "Documentation/trace-cmd/trace-cmd-stop.1.txt",
"chars": 2035,
"preview": "TRACE-CMD-STOP(1)\n=================\n\nNAME\n----\ntrace-cmd-stop - stop the Ftrace Linux kernel tracer from writing to the "
},
{
"path": "Documentation/trace-cmd/trace-cmd-stream.1.txt",
"chars": 1469,
"preview": "TRACE-CMD-STREAM(1)\n===================\n\nNAME\n----\ntrace-cmd-stream - stream a trace to stdout as it is happening\n\nSYNOP"
},
{
"path": "Documentation/trace-cmd/trace-cmd.1.txt",
"chars": 3155,
"preview": "TRACE-CMD(1)\n============\n\nNAME\n----\ntrace-cmd - interacts with Ftrace Linux kernel internal tracer\n\nSYNOPSIS\n--------\n*"
},
{
"path": "Documentation/trace-cmd/trace-cmd.dat.v6.5.txt",
"chars": 7677,
"preview": "TRACE-CMD.DAT.v6(5)\n===================\n\nNAME\n----\ntrace-cmd.dat.v6 - trace-cmd version 6 file format\n\nSYNOPSIS\n--------"
},
{
"path": "Documentation/trace-cmd/trace-cmd.dat.v7.5.txt",
"chars": 19152,
"preview": "TRACE-CMD.DAT.v7(5)\n===================\n\nNAME\n----\ntrace-cmd.dat.v7 - trace-cmd version 7 file format\n\nSYNOPSIS\n--------"
},
{
"path": "LICENSES/GPL-2.0",
"chars": 18729,
"preview": "Valid-License-Identifier: GPL-2.0\nValid-License-Identifier: GPL-2.0-only\nValid-License-Identifier: GPL-2.0+\nValid-Licens"
},
{
"path": "LICENSES/LGPL-2.1",
"chars": 27413,
"preview": "Valid-License-Identifier: LGPL-2.1\nValid-License-Identifier: LGPL-2.1+\nSPDX-URL: https://spdx.org/licenses/LGPL-2.1.html"
},
{
"path": "Makefile",
"chars": 17915,
"preview": "# SPDX-License-Identifier: GPL-2.0\n# trace-cmd version\nTC_VERSION = 3\nTC_PATCHLEVEL = 4\nTC_EXTRAVERSION = 0\nTRACECMD_VER"
},
{
"path": "Makefile.meson",
"chars": 970,
"preview": "# SPDX-License-Identifier: GPL-2.0\n\nundefine CFLAGS\n\n# Makefiles suck: This macro sets a default value of $(2) for the\n#"
},
{
"path": "PACKAGING",
"chars": 1074,
"preview": "The libtracefs and libtraceevent packages are required for trace-cmd\nand libtracecmd.so\n\nIn order to create a package di"
},
{
"path": "README",
"chars": 2065,
"preview": "\n\n For more information on contributing please see: https://www.trace-cmd.org\n\nNote: The official repositiory for trace"
},
{
"path": "check-manpages.sh",
"chars": 1460,
"preview": "#!/bin/bash\n# SPDX-License-Identifier: LGPL-2.1\n# Copyright (C) 2022, Google Inc, Steven Rostedt <rostedt@goodmis.org>\n#"
},
{
"path": "features.mk",
"chars": 1254,
"preview": "# SPDX-License-Identifier: GPL-2.0\n\n# taken from perf which was based on Linux Kbuild\n# try-cc\n# Usage: option = $(call "
},
{
"path": "include/linux/time64.h",
"chars": 348,
"preview": "/* SPDX-License-Identifier: GPL-2.0 */\n\n#ifndef _TOOLS_LINUX_TIME64_H\n#define _TOOLS_LINUX_TIME64_H\n\n#define MSEC_PER_SE"
},
{
"path": "include/trace-cmd/trace-cmd.h",
"chars": 4475,
"preview": "/* SPDX-License-Identifier: LGPL-2.1 */\n/*\n * Copyright (C) 2008, 2009, 2010 Red Hat Inc, Steven Rostedt <srostedt@redha"
},
{
"path": "include/version.h",
"chars": 183,
"preview": "#ifndef _VERSION_H\n#define _VERSION_H\n\n#define VERSION(a, b) (((a) << 8) + (b))\n\n#ifdef BUILDGUI\n#include \"ks_version.h\""
},
{
"path": "lib/meson.build",
"chars": 3530,
"preview": "# SPDX-License-Identifier: LGPL-2.1\n#\n# Copyright (c) 2023 Daniel Wagner, SUSE LLC\n\nproject(\n 'libtracecmd', ['c'],\n "
},
{
"path": "lib/meson_options.txt",
"chars": 937,
"preview": "# -*- mode: meson -*-\n# SPDX-License-Identifier: LGPL-2.1\n\noption('vsock', type : 'boolean', value : true,\n descri"
},
{
"path": "lib/trace-cmd/Makefile",
"chars": 3324,
"preview": "# SPDX-License-Identifier: GPL-2.0\n\ninclude $(src)/scripts/utils.mk\n\nbdir:=$(obj)/lib/trace-cmd\nldir:=$(src)/lib/trace-c"
},
{
"path": "lib/trace-cmd/include/meson.build",
"chars": 132,
"preview": "# SPDX-License-Identifier: LGPL-2.1\n#\n# Copyright (c) 2023 Daniel Wagner, SUSE LLC\n\nlibtracecmd_incdir = include_directo"
},
{
"path": "lib/trace-cmd/include/private/meson.build",
"chars": 329,
"preview": "# SPDX-License-Identifier: LGPL-2.1\n#\n# Copyright (c) 2023 Daniel Wagner, SUSE LLC\n\nconfig_h = configure_file(\n outpu"
},
{
"path": "lib/trace-cmd/include/private/trace-cmd-private-python.h",
"chars": 744,
"preview": "/* SPDX-License-Identifier: LGPL-2.1 */\n/*\n * Private interface exposed to the python module. See python/ctracecmd.i and"
},
{
"path": "lib/trace-cmd/include/private/trace-cmd-private.h",
"chars": 24697,
"preview": "/* SPDX-License-Identifier: LGPL-2.1 */\n/*\n * Copyright (C) 2008, 2009, 2010 Red Hat Inc, Steven Rostedt <srostedt@redha"
},
{
"path": "lib/trace-cmd/include/private/trace-filter-hash.h",
"chars": 2076,
"preview": "/* SPDX-License-Identifier: LGPL-2.1 */\n/*\n * Copyright (C) 2009, 2010 Red Hat Inc, Steven Rostedt <srostedt@redhat.com>"
},
{
"path": "lib/trace-cmd/include/private/trace-hash.h",
"chars": 1524,
"preview": "/* SPDX-License-Identifier: GPL-2.0 */\n/*\n * Copyright (C) 2014 Red Hat Inc, Steven Rostedt <srostedt@redhat.com>\n *\n */"
},
{
"path": "lib/trace-cmd/include/private/trace-msg.h",
"chars": 299,
"preview": "/* SPDX-License-Identifier: LGPL-2.1 */\n#ifndef _TRACE_MSG_H_\n#define _TRACE_MSG_H_\n\n#include <stdbool.h>\n\n#define UDP_M"
},
{
"path": "lib/trace-cmd/include/private/trace-rbtree.h",
"chars": 1143,
"preview": "/* SPDX-License-Identifier: LGPL-2.1 */\n/*\n * Copyright (C) 2023 Google, Steven Rostedt <rostedt@goodmis.org>\n *\n */\n#if"
},
{
"path": "lib/trace-cmd/include/trace-cmd-local.h",
"chars": 4017,
"preview": "/* SPDX-License-Identifier: LGPL-2.1 */\n/*\n * Copyright (C) 2010 Red Hat Inc, Steven Rostedt <srostedt@redhat.com>\n *\n *"
},
{
"path": "lib/trace-cmd/include/trace-hash-local.h",
"chars": 991,
"preview": "/* SPDX-License-Identifier: GPL-2.0 */\n/*\n * Copyright (C) 2009, Steven Rostedt <srostedt@redhat.com>\n *\n */\n#ifndef _TR"
},
{
"path": "lib/trace-cmd/include/trace-tsync-local.h",
"chars": 2208,
"preview": "/* SPDX-License-Identifier: LGPL-2.1 */\n/*\n * Copyright (C) 2019, VMware, Tzvetomir Stoyanov <tz.stoyanov@gmail.com>\n *\n"
},
{
"path": "lib/trace-cmd/include/trace-write-local.h",
"chars": 734,
"preview": "/* SPDX-License-Identifier: LGPL-2.1 */\n/*\n * Copyright (C) 2010 Red Hat Inc, Steven Rostedt <srostedt@redhat.com>\n *\n *"
},
{
"path": "lib/trace-cmd/meson.build",
"chars": 2239,
"preview": "# SPDX-License-Identifier: LGPL-2.1\n#\n# Copyright (c) 2023 Daniel Wagner, SUSE LLC\n\nsources = [\n 'trace-hash.c',\n "
},
{
"path": "lib/trace-cmd/plugins/Makefile",
"chars": 1355,
"preview": "include $(src)/scripts/utils.mk\n\nbdir:=$(obj)/lib/trace-cmd/plugins\n\nPLUGIN_OBJS =\n\nPLUGIN_OBJS := $(PLUGIN_OBJS:%.o=$(b"
},
{
"path": "lib/trace-cmd/test.c",
"chars": 97,
"preview": "#include <trace-cmd/trace-cmd.h>\n\nint main()\n{\n\ttracecmd_open_head(\"trace.dat\", 0);\n\treturn 0;\n}\n"
},
{
"path": "lib/trace-cmd/trace-blk-hack.c",
"chars": 4079,
"preview": "// SPDX-License-Identifier: LGPL-2.1\n/*\n * Copyright (C) 2009 Red Hat Inc, Steven Rostedt <srostedt@redhat.com>\n *\n */\n#"
},
{
"path": "lib/trace-cmd/trace-compress-zlib.c",
"chars": 2241,
"preview": "// SPDX-License-Identifier: LGPL-2.1\n/*\n * Copyright (C) 2021, VMware, Tzvetomir Stoyanov tz.stoyanov@gmail.com>\n *\n */\n"
},
{
"path": "lib/trace-cmd/trace-compress-zstd.c",
"chars": 2414,
"preview": "// SPDX-License-Identifier: LGPL-2.1\n/*\n * Copyright (C) 2022, Sebastian Andrzej Siewior <sebastian@breakpoint.cc>\n *\n *"
},
{
"path": "lib/trace-cmd/trace-compress.c",
"chars": 25489,
"preview": "// SPDX-License-Identifier: LGPL-2.1\n/*\n * Copyright (C) 2021, VMware, Tzvetomir Stoyanov tz.stoyanov@gmail.com>\n *\n */\n"
},
{
"path": "lib/trace-cmd/trace-filter-hash.c",
"chars": 4013,
"preview": "// SPDX-License-Identifier: LGPL-2.1\n/*\n * Copyright (C) 2009, Steven Rostedt <srostedt@redhat.com>\n * Copyright (C) 201"
},
{
"path": "lib/trace-cmd/trace-filter.c",
"chars": 4671,
"preview": "// SPDX-License-Identifier: LGPL-2.1\n/*\n * Copyright (C) 2022, Google Inc, Steven Rostedt <rostedt@goodmis.org>\n*/\n#incl"
},
{
"path": "lib/trace-cmd/trace-ftrace.c",
"chars": 13708,
"preview": "// SPDX-License-Identifier: LGPL-2.1\n/*\n * Copyright (C) 2009, 2010 Red Hat Inc, Steven Rostedt <srostedt@redhat.com>\n *"
},
{
"path": "lib/trace-cmd/trace-hash.c",
"chars": 1747,
"preview": "// SPDX-License-Identifier: GPL-2.0\n/*\n * Copyright (C) 2014, Steven Rostedt <srostedt@redhat.com>\n *\n */\n#include <stdi"
},
{
"path": "lib/trace-cmd/trace-hooks.c",
"chars": 3249,
"preview": "// SPDX-License-Identifier: LGPL-2.1\n/*\n * Copyright (C) 2015 Red Hat Inc, Steven Rostedt <srostedt@redhat.com>\n *\n */\n\n"
},
{
"path": "lib/trace-cmd/trace-input.c",
"chars": 162540,
"preview": "// SPDX-License-Identifier: LGPL-2.1\n/*\n * Copyright (C) 2009, 2010 Red Hat Inc, Steven Rostedt <srostedt@redhat.com>\n *"
},
{
"path": "lib/trace-cmd/trace-maps.c",
"chars": 4396,
"preview": "#include <stdlib.h>\n\n#include \"trace-cmd-local.h\"\n#include \"trace-local.h\"\n\n/*\n * Structure to hold the mapping between "
},
{
"path": "lib/trace-cmd/trace-msg.c",
"chars": 35487,
"preview": "// SPDX-License-Identifier: LGPL-2.1\n/*\n * trace-msg.c : define message protocol for communication between clients and\n "
},
{
"path": "lib/trace-cmd/trace-output.c",
"chars": 75799,
"preview": "// SPDX-License-Identifier: LGPL-2.1\n/*\n * Copyright (C) 2009, 2010 Red Hat Inc, Steven Rostedt <srostedt@redhat.com>\n *"
},
{
"path": "lib/trace-cmd/trace-perf.c",
"chars": 2627,
"preview": "// SPDX-License-Identifier: LGPL-2.1\n/*\n * Copyright (C) 2021, VMware, Tzvetomir Stoyanov <tz.stoyanov@gmail.com>\n *\n */"
},
{
"path": "lib/trace-cmd/trace-plugin.c",
"chars": 7293,
"preview": "// SPDX-License-Identifier: LGPL-2.1\n/*\n * Copyright (C) 2009, 2010 Red Hat Inc, Steven Rostedt <srostedt@redhat.com>\n *"
},
{
"path": "lib/trace-cmd/trace-rbtree.c",
"chars": 9629,
"preview": "// SPDX-License-Identifier: LGPL-2.1\n/*\n * Copyright (C) 2023 Google, Steven Rostedt <rostedt@goodmis.org>\n *\n */\n#inclu"
},
{
"path": "lib/trace-cmd/trace-recorder.c",
"chars": 10365,
"preview": "// SPDX-License-Identifier: LGPL-2.1\n/*\n * Copyright (C) 2009, 2010 Red Hat Inc, Steven Rostedt <srostedt@redhat.com>\n *"
},
{
"path": "lib/trace-cmd/trace-timesync-kvm.c",
"chars": 14590,
"preview": "// SPDX-License-Identifier: LGPL-2.1\n/*\n * Copyright (C) 2020, VMware, Tzvetomir Stoyanov tz.stoyanov@gmail.com>\n *\n */\n"
},
{
"path": "lib/trace-cmd/trace-timesync-ptp.c",
"chars": 19004,
"preview": "// SPDX-License-Identifier: LGPL-2.1\n/*\n * Copyright (C) 2019, VMware, Tzvetomir Stoyanov tz.stoyanov@gmail.com>\n *\n */\n"
},
{
"path": "lib/trace-cmd/trace-timesync.c",
"chars": 26490,
"preview": "// SPDX-License-Identifier: LGPL-2.1\n/*\n * Copyright (C) 2019, VMware, Tzvetomir Stoyanov <tz.stoyanov@gmail.com>\n *\n */"
},
{
"path": "lib/trace-cmd/trace-util.c",
"chars": 14430,
"preview": "// SPDX-License-Identifier: LGPL-2.1\n/*\n * Copyright (C) 2009, 2010 Red Hat Inc, Steven Rostedt <srostedt@redhat.com>\n *"
},
{
"path": "libtracecmd.pc.template",
"chars": 333,
"preview": "prefix=INSTALL_PREFIX\nlibdir=LIB_DIR\nincludedir=HEADER_DIR\n\nName: libtracecmd\nURL: https://git.kernel.org/pub/scm/utils/"
},
{
"path": "make-trace-cmd.sh",
"chars": 1209,
"preview": "#!/bin/bash\n\nif [ -z \"$INSTALL_PATH\" ]; then\n\techo\n\techo 'Error: No $INSTALL_PATH defined'\n\techo\n\techo \" usage: [PREFI"
},
{
"path": "meson-vcs-tag.sh",
"chars": 613,
"preview": "#!/usr/bin/env bash\n# SPDX-License-Identifier: LGPL-2.1-or-later\n\nset -eu\nset -o pipefail\n\ndir=\"${1:?}\"\nfallback=\"${2:?}"
},
{
"path": "meson.build",
"chars": 4731,
"preview": "# SPDX-License-Identifier: GPL-2.0\n#\n# Copyright (c) 2023 Daniel Wagner, SUSE LLC\n\nproject(\n 'trace-cmd', ['c'],\n "
},
{
"path": "meson_options.txt",
"chars": 1331,
"preview": "# -*- mode: meson -*-\n# SPDX-License-Identifier: GPL-2.0\n\noption('version-tag', type : 'string',\n description : 'o"
},
{
"path": "python/Makefile",
"chars": 1039,
"preview": "# SPDX-License-Identifier: GPL-2.0\n\ninclude $(src)/scripts/utils.mk\n\nifdef BUILD_PYTHON_WORKS\nPYTHON_SO_INSTALL := ctrac"
},
{
"path": "python/ctracecmd.i",
"chars": 5609,
"preview": "// tracecmd.i\n%module ctracecmd\n%include \"typemaps.i\"\n%include \"constraints.i\"\n\n%nodefaultctor record;\n%nodefaultdtor re"
},
{
"path": "python/event-viewer.py",
"chars": 7916,
"preview": "#!/usr/bin/env python2\n\nimport getopt\nfrom gobject import *\nimport gtk\nfrom tracecmd import *\nimport time\n\napp = None\nda"
},
{
"path": "python/meson.build",
"chars": 1549,
"preview": "# SPDX-License-Identifier: GPL-2.0\n#\n# Copyright (c) 2023 Daniel Wagner, SUSE LLC\n\nwant_python = get_option('python')\nif"
},
{
"path": "python/tracecmd.py",
"chars": 7812,
"preview": "#\n# Copyright (C) International Business Machines Corp., 2009\n#\n# This program is free software; you can redistribute i"
},
{
"path": "python/tracecmdgui.py",
"chars": 7892,
"preview": "#\n# Copyright (C) International Business Machines Corp., 2009\n#\n# This program is free software; you can redistribute i"
},
{
"path": "scripts/debug/tsync_hist.py",
"chars": 1374,
"preview": "# SPDX-License-Identifier: GPL-2.0\n#\n# Copyright (C) 2019, VMware Inc, Tzvetomir Stoyanov <tz.stoyanov@gmail.com>\n# Copy"
},
{
"path": "scripts/debug/tsync_readme",
"chars": 596,
"preview": "PTP-like algorithm debug\n========================\n\ntsync_*.py scripts can be used to visualise debug files, written when"
},
{
"path": "scripts/debug/tsync_res.py",
"chars": 1100,
"preview": "# SPDX-License-Identifier: GPL-2.0\n#\n# Copyright (C) 2019, VMware Inc, Tzvetomir Stoyanov <tz.stoyanov@gmail.com>\n# Copy"
},
{
"path": "scripts/utils.mk",
"chars": 5967,
"preview": "# SPDX-License-Identifier: GPL-2.0\n\n# Utils\n\nifeq ($(BUILDGUI), 1)\n GUI\t\t= 'GUI '\n GSPACE\t=\nelse\n GUI\t\t=\n GSPACE\t= \""
},
{
"path": "tracecmd/.gitignore",
"chars": 10,
"preview": "trace-cmd\n"
},
{
"path": "tracecmd/Makefile",
"chars": 2263,
"preview": "# SPDX-License-Identifier: GPL-2.0\n\nVERSION := $(TC_VERSION)\nPATCHLEVEL := $(TC_PATCHLEVEL)\nEXTRAVERSION := $(TC_EXTRAVE"
},
{
"path": "tracecmd/include/bug.h",
"chars": 337,
"preview": "/* SPDX-License-Identifier: LGPL-2.1 */\n#ifndef __TRACE_CMD_BUG\n#define __TRACE_CMD_BUG\n\n#define unlikely(cond)\t__builti"
},
{
"path": "tracecmd/include/list.h",
"chars": 1605,
"preview": "/* SPDX-License-Identifier: LGPL-2.1 */\n/*\n * Copyright (C) 2009 Red Hat Inc, Steven Rostedt <srostedt@redhat.com>\n *\n *"
},
{
"path": "tracecmd/include/trace-local.h",
"chars": 12029,
"preview": "/* SPDX-License-Identifier: GPL-2.0 */\n/*\n * Copyright (C) 2009, 2010 Red Hat Inc, Steven Rostedt <srostedt@redhat.com>\n"
},
{
"path": "tracecmd/meson.build",
"chars": 1287,
"preview": "# SPDX-License-Identifier: GPL-2.0\n#\n# Copyright (c) 2023 Daniel Wagner, SUSE LLC\n\nsources = [\n 'trace-agent.c',\n "
},
{
"path": "tracecmd/trace-agent.c",
"chars": 9857,
"preview": "// SPDX-License-Identifier: GPL-2.0\n/*\n * Copyright (C) 2018 VMware Inc, Slavomir Kaslev <kaslevs@vmware.com>\n *\n * base"
},
{
"path": "tracecmd/trace-attach.c",
"chars": 10941,
"preview": "// SPDX-License-Identifier: GPL-2.0\n/*\n * Copyright (C) 2023 Google Inc, Steven Rostedt <rostedt@goodmis.org>\n *\n */\n#in"
},
{
"path": "tracecmd/trace-check-events.c",
"chars": 1522,
"preview": "// SPDX-License-Identifier: GPL-2.0\n/*\n * Copyright (C) 2009, 2010 Red Hat Inc, Steven Rostedt <srostedt@redhat.com>\n *\n"
},
{
"path": "tracecmd/trace-clear.c",
"chars": 2471,
"preview": "// SPDX-License-Identifier: LGPL-2.1\n/*\n * Copyright (C) 2008, 2009, 2010 Red Hat Inc, Steven Rostedt <srostedt@redhat.c"
},
{
"path": "tracecmd/trace-cmd.bash",
"chars": 14082,
"preview": "make_small() {\n local w=$1\n\n echo $w | tr A-Z a-z\n}\n\nshow_instances()\n{\n local cur=\"$1\"\n local bufs=$(trace-cm"
},
{
"path": "tracecmd/trace-cmd.c",
"chars": 3750,
"preview": "// SPDX-License-Identifier: GPL-2.0\n/*\n * Copyright (C) 2008, 2009, 2010 Red Hat Inc, Steven Rostedt <srostedt@redhat.co"
},
{
"path": "tracecmd/trace-convert.c",
"chars": 2680,
"preview": "// SPDX-License-Identifier: GPL-2.0\n/*\n * Copyright (C) 2021, VMware, Tzvetomir Stoyanov <tz.stoyanov@gmail.com>\n */\n#in"
},
{
"path": "tracecmd/trace-dump.c",
"chars": 33415,
"preview": "// SPDX-License-Identifier: GPL-2.0\n/*\n * Copyright (C) 2009, 2010 Red Hat Inc, Steven Rostedt <srostedt@redhat.com>\n *\n"
},
{
"path": "tracecmd/trace-hist.c",
"chars": 24101,
"preview": "// SPDX-License-Identifier: GPL-2.0\n/*\n * Copyright (C) 2013 Red Hat Inc, Steven Rostedt <srostedt@redhat.com>\n *\n * Sev"
},
{
"path": "tracecmd/trace-list.c",
"chars": 15780,
"preview": "// SPDX-License-Identifier: GPL-2.0\n/*\n * Copyright (C) 2009, 2010 Red Hat Inc, Steven Rostedt <srostedt@redhat.com>\n *\n"
},
{
"path": "tracecmd/trace-listen.c",
"chars": 23472,
"preview": "// SPDX-License-Identifier: GPL-2.0\n/*\n * Copyright (C) 2009, 2010 Red Hat Inc, Steven Rostedt <srostedt@redhat.com>\n *\n"
},
{
"path": "tracecmd/trace-mem.c",
"chars": 13707,
"preview": "// SPDX-License-Identifier: GPL-2.0\n/*\n * Copyright (C) 2013 Red Hat Inc, Steven Rostedt <srostedt@redhat.com>\n *\n *\n * "
},
{
"path": "tracecmd/trace-profile.c",
"chars": 59377,
"preview": "// SPDX-License-Identifier: GPL-2.0\n/*\n * Copyright (C) 2014 Red Hat Inc, Steven Rostedt <srostedt@redhat.com>\n *\n */\n\n/"
},
{
"path": "tracecmd/trace-read.c",
"chars": 45289,
"preview": "// SPDX-License-Identifier: GPL-2.0\n/*\n * Copyright (C) 2009, 2010 Red Hat Inc, Steven Rostedt <srostedt@redhat.com>\n *\n"
},
{
"path": "tracecmd/trace-record.c",
"chars": 177462,
"preview": "// SPDX-License-Identifier: GPL-2.0\n/*\n * Copyright (C) 2008, 2009, 2010 Red Hat Inc, Steven Rostedt <srostedt@redhat.co"
},
{
"path": "tracecmd/trace-restore.c",
"chars": 3594,
"preview": "// SPDX-License-Identifier: GPL-2.0\n/*\n * Copyright (C) 2009, 2010 Red Hat Inc, Steven Rostedt <srostedt@redhat.com>\n *\n"
},
{
"path": "tracecmd/trace-setup-guest.c",
"chars": 4688,
"preview": "// SPDX-License-Identifier: GPL-2.0\n/*\n * Copyright (C) 2019 VMware Inc, Slavomir Kaslev <kaslevs@vmware.com>\n *\n */\n\n#i"
},
{
"path": "tracecmd/trace-show.c",
"chars": 5571,
"preview": "// SPDX-License-Identifier: GPL-2.0\n/*\n * Copyright (C) 2009, 2010 Red Hat Inc, Steven Rostedt <srostedt@redhat.com>\n *\n"
},
{
"path": "tracecmd/trace-snapshot.c",
"chars": 2117,
"preview": "// SPDX-License-Identifier: GPL-2.0\n/*\n * Copyright (C) 2013 Red Hat Inc, Steven Rostedt <srostedt@redhat.com>\n *\n */\n#i"
},
{
"path": "tracecmd/trace-split.c",
"chars": 20317,
"preview": "// SPDX-License-Identifier: GPL-2.0\n/*\n * Copyright (C) 2010 Red Hat Inc, Steven Rostedt <srostedt@redhat.com>\n *\n */\n#i"
},
{
"path": "tracecmd/trace-sqlhist.c",
"chars": 5232,
"preview": "#include <stdio.h>\n#include <stdlib.h>\n#include <stdarg.h>\n#include <string.h>\n#include <errno.h>\n#include <unistd.h>\n#i"
},
{
"path": "tracecmd/trace-stack.c",
"chars": 3830,
"preview": "// SPDX-License-Identifier: GPL-2.0\n/*\n * Copyright (C) 2009, 2010 Red Hat Inc, Steven Rostedt <srostedt@redhat.com>\n *\n"
},
{
"path": "tracecmd/trace-stat.c",
"chars": 17635,
"preview": "// SPDX-License-Identifier: GPL-2.0\n/*\n * Copyright (C) 2014 Red Hat Inc, Steven Rostedt <srostedt@redhat.com>\n *\n */\n#i"
},
{
"path": "tracecmd/trace-stream.c",
"chars": 3060,
"preview": "// SPDX-License-Identifier: GPL-2.0\n/*\n * Copyright (C) 2014 Red Hat Inc, Steven Rostedt <srostedt@redhat.com>\n *\n */\n#i"
},
{
"path": "tracecmd/trace-tsync.c",
"chars": 7742,
"preview": "// SPDX-License-Identifier: GPL-2.0\n/*\n * Copyright (C) 2021 Google Inc, Steven Rostedt <rostedt@goodmis.org>\n * Copyrig"
},
{
"path": "tracecmd/trace-usage.c",
"chars": 25226,
"preview": "// SPDX-License-Identifier: GPL-2.0\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <libgen.h>\n\n#inc"
},
{
"path": "tracecmd/trace-vm.c",
"chars": 10677,
"preview": "// SPDX-License-Identifier: GPL-2.0\n/*\n * Copyright (C) 2008, 2009, 2010 Red Hat Inc, Steven Rostedt <srostedt@redhat.co"
},
{
"path": "tracecmd/trace-vsock.c",
"chars": 3443,
"preview": "#include <unistd.h>\n#include <errno.h>\n#include <arpa/inet.h>\n#include <sys/ioctl.h>\n#include <linux/vm_sockets.h>\n\n#inc"
},
{
"path": "utest/Makefile",
"chars": 1268,
"preview": "# SPDX-License-Identifier: GPL-2.0\n\ninclude $(src)/scripts/utils.mk\n\nbdir:=$(obj)/utest\n\nTARGETS = $(bdir)/trace-utest\n\n"
},
{
"path": "utest/README",
"chars": 373,
"preview": "\nUnit tests for trace-cmd libraries. The tests use CUnit framework:\n http://cunit.sourceforge.net/\nwhich must be pre ins"
},
{
"path": "utest/meson.build",
"chars": 508,
"preview": "# SPDX-License-Identifier: GPL-2.0\n#\n# Copyright (c) 2023 Daniel Wagner, SUSE LLC\n\nsources = [\n 'tracecmd-utest.c',\n "
},
{
"path": "utest/trace-utest.c",
"chars": 1832,
"preview": "// SPDX-License-Identifier: LGPL-2.1\n/*\n * Copyright (C) 2020, VMware, Tzvetomir Stoyanov <tz.stoyanov@gmail.com>\n *\n */"
},
{
"path": "utest/trace-utest.h",
"chars": 307,
"preview": "/* SPDX-License-Identifier: LGPL-2.1 */\n/*\n * Copyright (C) 2020, VMware, Tzvetomir Stoyanov <tz.stoyanov@gmail.com>\n *\n"
},
{
"path": "utest/tracecmd-utest.c",
"chars": 17895,
"preview": "// SPDX-License-Identifier: LGPL-2.1\n/*\n * Copyright (C) 2020, VMware, Tzvetomir Stoyanov <tz.stoyanov@gmail.com>\n *\n */"
}
]
About this extraction
This page contains the full source code of the rostedt/trace-cmd GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 166 files (1.5 MB), approximately 433.9k tokens, and a symbol index with 2441 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.