| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
| |
This fixes an error in the mac80211 plugin
when it parses flags, seems we never noticed
because I ordered the flags properly.
Also add the new QOS flag.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
| |
The parent arg in process_value() may not be changed on error.
If we pass in an argument, then it needs to be initialized to NULL
if we plan on freeing it on failure.
Reported-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
| |
The process_not() filter parsing did not assign an arg to the parent arg,
and the entire expression was ignored.
Reported-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Seeing in the Buffer statistics:
entries: 0
Makes it look like nothing was recorded when the opposite is true.
Add a note that explains what this value means.
Reported-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The parenthesis filter parsing was a bit broken and needed a rewrite.
This redesigns the filter parsing to be a bit more sane when it comes
to parenthesis. It lets the parenthesis be treated as what they resolve
to be.
Funny, the example used by kernelshark failed because of this bug:
"next_prio < 100 && (prev_prio > 100 && prev_pid != 0)"
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
|
| |
If the ring buffer in the kernel sends information via the commit
field of the sub buffer header. Than this patch will display
where events were lost.
If the sub buffer has space and can store the count of dropped events,
this patch will show the count as well.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The while loop that copies pages from one dat file ot the next
breaks after it copies the last page that it is expected to.
But after the while loop (for other split types) there is also a checkt
if a page is not finished and should be copied. But this always copies
the page again with the page count option, and causes a duplict page
at the end of the trace.
The fix is simply to break out of the loop before copying the data
when the page count is hit. Then the copy after the while loop will
copy the last page needed.
Reported-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is a common mistake to do:
trace-cmd split my-trace.dat
Expecting to be splitting the file my-trace.dat. But this is taken
as the starting value and the user will not know that the command
ran the split against trace.dat (if it exists).
This patch checks to make sure that the start and end values passed
in are indeed floating point (or integer) values.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
| |
If a output file is specified, always append a '.1' to it.
This removes the confusion of where the output file is written to
and it could cause data to be overwritten that was not expected.
Reported-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
| |
If a directory is specified in the output file for trace-cmd split,
then it would fault because of the adding of the prefix ".tmp"
to the output name. This patch fixes the issues by parsing out the
directory name and basename from the output path.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
The loop after getaddrinfo() needs to test connect() against -1, not 1.
Reported-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
|
| |
When killing the trace-cmd listen, it will kill all the listeners
and leave the temporary per CPU data files around.
This patch adds handlers (also replacing signal() with sigaction())
to allow a Ctrl^C or kill pid, to shutdown the recording nicely
and create the final file before exiting.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
| |
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
Add a way to pipe log info to another file, especially useful in
daemon mode.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
| |
Clean up the children that are created by a client with signals instead
of leaving them around as zombies until another connection is made.
This is a much cleaner solution.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
The daemon was not implement on trace-cmd listen. This implements it
by simply calling daemon().
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
Add the option --debug to keep trace-cmd from forking children on
connections.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
| |
Fork off children when a process is connected, and run continuously.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
| |
If -d is specified on the command line for 'trace-cmd listen' then
change to that directory to write the data files to.
Reported-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
| |
Added a documentation man page on the format of the trace.dat file.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
To make way for creating other numbered man pages, modify the make documentation
build to be number specific. This required adding the numbers to the text files.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
| |
Added 'make install_doc'
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
| |
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
| |
Using dependencies to trigger the manpage.xsl waring was causing all man pages
to be built every time, event when no files were changed.
By converting it to a funciton and calling it first, it will allow the man pages
to only be rebuilt if their source files were changed.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
| |
Use the "KBUILD" method to build documentation.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
| |
Update the Documentation Makefile to handle building outside the source tree.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
| |
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
| |
When raw fields are printing, check if the field is of type long.
Since longs usually store pointers, it makes more sense to print out a hex
number for a field declared as long than decimal.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
Add '-r' option that prints the events by their field content and ignores
the print format of the event.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add print_raw field to pevent that will cause the pretty_print function to output
the entries by their raw data in the fields, and will ignore the print formats.
When set, each field will show its data.
So instead of this:
sched_switch: task swapper:0 [140] (R) ==> trace-cmd:31807 [140]
We have:
sched_switch: prev_comm=swapper prev_pid=0 prev_prio=140 prev_state=0 next_comm=trace-cmd next_pid=31807 next_prio=140
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
Add the option -L to disable system plugins and only load local ones.
Add the option -N to disable all plugins.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
The help for record has one backslash with the options going to the next line,
but it does not have another one for the second line the options run off to.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The usage just printed all commands and their full descriptions. This is too much
for all the commands that trace-cmd does.
This patch moves the usage out of trace-cmd.c and into a new file called trace-usage.c.
It then makes a structure that holds the name of the command, a short description
and the full usage (from the original usage).
If no command, or the command passed to trace-cmd is not found, then the list
of commands and their short usages are shown.
If a command is passed in, only the usage for that command is shown.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
|
| |
If an event fails to parse the print string, then it is better to show the
contents as raw elements than just to print "FAILED TO PARSE" and drop the
event.
At least now the events show a bit more information, even if the print string
did not parse correctly.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The field_is_string() function always returns true because it checks for
!strstr(...), which returns 0 if it does not match. Thus the
!strstr("char") || !strstr("u8") || !strstr("s8")
One would fail and the entire code would end up being true.
Also move the field_is_dynamic out of the field_is_string() condition because a
field may be dynamic without being a string.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
| |
The dynamic flag was not being set because the compare in the field type was
looking for an exact match of "__data_loc", when in reality, the field type
also contained the array type as well (ie. "__data_loc int").
Just check the first 10 characters of the type.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change the output of installing from:
install -d -m 755 '/usr/local/share/trace-cmd/plugins'
install plugin_hrtimer.so plugin_kmem.so plugin_sched_switch.so plugin_mac80211.so plugin_jbd2.so '/usr/local/share/trace-cmd/plugins'
install -d -m 755 '/usr/local/bin'
install trace-cmd '/usr/local/bin'
gui build complete
install -d -m 755 '/usr/local/bin'
install trace-view '/usr/local/bin'
install trace-graph '/usr/local/bin'
install kernelshark '/usr/local/bin'
to:
INSTALL plugin_hrtimer.so to /usr/local/share/trace-cmd/plugins
INSTALL plugin_kmem.so to /usr/local/share/trace-cmd/plugins
INSTALL plugin_sched_switch.so to /usr/local/share/trace-cmd/plugins
INSTALL plugin_mac80211.so to /usr/local/share/trace-cmd/plugins
INSTALL plugin_jbd2.so to /usr/local/share/trace-cmd/plugins
INSTALL trace-cmd to /usr/local/bin
INSTALL trace-view to /usr/local/bin
INSTALL trace-graph to /usr/local/bin
INSTALL kernelshark to /usr/local/bin
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
On error to connecting to a machine, the port is printed with a %d. But the variable
is of type char * and a %s should be used.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
- Add BUILDING and INSTALL instructions to the README
- Change Makefile so that messages don't appear like errors.
Signed-off-by: John Kacur <jkacur@redhat.com>
|
|
|
|
|
|
| |
If you a user does "make install", also install plugins.
Signed-off-by: John Kacur <jkacur@redhat.com>
|
|
|
|
|
|
|
|
| |
Make the default value of prefix /usr/local which makes sense for most end-users
Developers who wish to use $HOME can set this on the command line.
(use ?= which only sets the default if prefix doesn't already have a value)
Signed-off-by: John Kacur <jkacur@redhat.com>
|
|
|
|
|
|
|
| |
DESTDIR_SQ must have been incompletely copied from another project's makefile.
It isn't serving a purpose here, so remove it.
Signed-off-by: John Kacur <jkacur@redhat.com>
|
|
|
|
|
|
| |
File trace_plugin_dir is generated during make. Add it to the .gitignore file.
Signed-off-by: John Kacur <jkacur@redhat.com>
|
|
|
|
|
|
|
|
| |
This was a silly bug that the function to add to events from plugins never
was stored in the temp structure.
Reported-by: "Luis Claudio R. Goncalves" <lclaudio@uudg.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
| |
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
| |
Now that plugins are in both system and user directories, the user directory
is processed after the system directory. This makes it highly likely that
a function handler may be added again. Instead of warning about it and failing
let the new function handler override the previous one.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
| |
If the prefix in the make build is not $(HOME) then a system wide
plugin directory is used (in $(prefix)/share/trace-cmd/plugins).
This is then compiled into the tracecmd library so that it knows to look
for the plugins there.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
| |
The conditon ? : does not handle other operations within it (like << which
the ext4 tracepoints added). This patch makes the conditions handle operations
within them.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
| |
Add the start of option to the trace.dat file. This will allow
later versions of the file to add data without breaking older
versions of trace-cmd.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
Added the jbd2 plugin that adds the helper functions to handle
jbd2_dev_to_name() and jiffies_to_msecs().
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|