| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
| |
Adde strim() to remove leading and trailing whitespace from the event
and system names being passed into the filter.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
| |
The comma deliminating event names was not being processed correctly.
The index pointer was stuck at the comma instead of the next event name
and this caused the filtering to fail.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use the regex to find events and systems. Since we are now using regular
expresions to add events to filters, we can no longer use the '.' to
separate the system name from the event name. That is:
trace-cmd report -F 'sched.sched_switch'
will no longer work. It needs to be:
trace-cmd report -F 'sched/sched_switch'
Which is a better naming since that is how the files are distinguished
anyhow.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
| |
Need to call pevent_filter_free() when finished with reporting.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
If no name is given to the filter, then use the system name as the
name and make the system name NULL.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
Let the filter string contain just events. This will make all
records that have this event match.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
| |
The header files tc_version.h and ks_version.h are created by the build
process. Add a comment warning that changes to these files will not
be sustained.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add the ability to filter on event fields. This patch implements
the filter on trace-cmd report.
Using the following:
trace-cmd report -F 'sched.sched_switch:next_prio < 100 ||
(prev_comm != "swapper" && next_comm != "swapper")'
Will return a report where prios are under 100 (Real-time)
and does not include any context switch with the swapper task.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
| |
The !! string needs to be returned as two different tokens.
Break out of the token parser when one is encountered.
Also break out on '==' and '!=',
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All the files that are used to create the libraries:
libparsevent and libtracecmd are converted to the LGPL
as well as the files to create the plugins.
All files now have a boilerplate header that states which
license that the file is under. A README file is created as
well as the COPYING.LIB which contains the text of the
LGPL.
All authors of the code that created these files have given
their Acks.
Acked-by: Darren Hart <dvhltc@us.ibm.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Acked-by: Josh Triplett <josh@joshtriplett.org>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace the event list in the pevent structure with a sorted array
of event_format pointers. Now the search for an event can be done
with a binary search. With the size of events growing, this makes
a big difference.
Running trace-cmd report on a 300,000 event data file and outputing
into /dev/null, went from:
real 0m5.639s
user 0m5.464s
sys 0m0.174s
to
real 0m1.810s
user 0m1.672s
sys 0m0.138s
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
| |
The order of freeing the old plot info and initializing the new plot
info was backwards, and caused loading a new graph to output tons of
errors about gc being NULL.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Make the input buffer that the parse events reads into a const char *.
This will be needed by later patches to make sure the input buffer
does not get modified.
In doing this change, the work around by Johannes Berg needed to
be rewritten, since the push_str modified the input buffer.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
There is no reason that the record that is passed to show_data should be
freed by show_data. Free it from the location that allocated it.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
| |
Move the function like macros __print_symbolic() and friends into
their own routine. This will allow adding parsing to other types
of functions easier.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Because we now have reference counting of records, we do not
need to jump through the hoops of allocating previous records'
data to use it after reading new records.
Remove the hacks from the function graph plugin that does
all this.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Add a "locked" attribute to the record structure. This will be
set when a peek is returned and cleared on read. This will help
debug cases that incorrectly free a record returned by peek.
The internal helper function free_next() is added to do the freeing
of the next record used by peek.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
A previous change broke the cpu filtering and had the trace-read
return a peek and not a read. This would later be freed incorrectly.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
Add the helper routine tracecmd_get_cursor() that returns the offset
of the next tracecmd_read_data() or tracecmd_peek_data().
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
The record allocating in the displaying of task info must
always be freed.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
Have kernelshark call the graph info destructor.
Have the graph info destructor free the lists.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
The task plot display did not always initialize the time
that was displayed.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
| |
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
The plots are quite far apart for no apparent reason. Bring them
30 pixels closer.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
| |
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
Add a check box, that when set, the graph will follow the cursor
of the list. This makes moving the graph with searches nicer.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
Since a time slot can hold thousands or just 1 event, search backwards
in the task plot and limit it by 20 events not time by pixels.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
| |
When zooming in on a task plot and the events show up in the graph,
instead of showing the CPU type data, show information useful for the task.
This includes what CPU it is on, and for sched_switch, if a wakeup
was detected, it shows the latency from the wakeup.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
|
| |
The task plot was search every CPU for a matching event. If a CPU did
not have any events for a given plot, it would search all the way back to the
start! This caused a huge delay in processing and would hang trace-graph
for seconds while it would search the cpu data backwards.
Limit the distance to only 5 pixels in its search.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
| |
The set_cpus_to_time() can be expensive, and find_record() calls
it directly. No need to double the time to find the next record for
a task plot.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
| |
Add the ability for a plot to draw a empty box.
Then with this ability, change the task plots to show a hollow red
box from the time the task was woken, till the time it was scheduled.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
| |
Move the code from initializing the start cursor locations of the
CPUs.
Also control when a record is passed to the plot based on its
timestamp.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
Add the helper routine tracecmd_set_all_cpus_to_timestamp() to be
used to initialize all CPUs to a given time.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
When adding a new plot, a resize is required since the size of the
graph has changed. Not just redrawing the graph.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
When selecting to plot a task, insert the plot beneath the plot that it
was selected on.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
| |
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
| |
The graph height was only calculated when the graph was loaded. Now that you
can add new plots, we need to recalculate the height anytime a plot is
added or removed.
Reported-by: Darren Hart <dvhltc@us.ibm.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
A previous fix to fix sched_switch events broke printing non sched switch
events.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
| |
Change the code to iterate once down all records to create all plots.
Use the cpu_hash, task_hash and all_recs to find what plot cares about what
data.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
Need to destroy the the plots with the full destructor when removing
them before loading a new trace.dat file.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
Add an intermediate list item for hashs to let a plot be assigned
to more that one hash.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
| |
Add a hash in the graph info to quickly look up to see if plots
have been registered to a pid or cpus. This is currently not used
but will be in the following patches.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
| |
Added a destructor routine to the plot callbacks to be called before
the plot is destroyed. This allows the plot to clean up any resources
that it allocated before it is freed.
Also did some other minor clean ups and freeing.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
| |
Use the plot itself to pass to routines instead of the index
into the ginfo->plot_array of the plot. This requires that the
plot keeps track of its own position in that array, and the
trace-plot.c code must update that position when plots are added
or removed from the middle of the array.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
| |
Remove the list structure for plots. The plots are stored
on an array anyway, and the managing them on a list just
adds overhead and maintenance without any added benefit.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a way to remove a plot.
Todo:
Add warning to remove plot
Add ways to get back CPU plots
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a pop up window that lets you trace a given task.
TODO:
Prevent duplicate plots
Add way to remove plots
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
Create the code to plot a task. Currently nothing calls it. But that
will change in later patches when we collect all task pids.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
Add the tracecmd_read_prev(handle, record) that returns the record
before the given record.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
| |
Use calc_page_offset() to performe the:
offset & (handle->page_size - 1)
to prevent any typos and bugs.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|