| Commit message (Collapse) | Author | Age |
|
|
|
|
|
| |
Need to return the variable that "ret" is set as, not always 0.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
| |
If a user types "kernelshark mytrace.dat" without using te -i option,
still use the mytrace.dat as the input file for the trace, instead
of the default trace.dat.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
| |
The search for a pid in the hash did would get into an infinite
loop if that hash bucket contained more than one pid.
Reported-by: Chris Mason <chris.mason@oracle.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
| |
The check for if an event has trivial filter is not enough to
test if the event should be shaded or not. A check of if the
event has any filter is still needed.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
Add a combo box of events and a combo box of fields that are
available for the advanced filter.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
| |
Add the functions pevent_event_common_fields() and pevent_event_fields()
that return an allocated array of the events common or event specific
fields.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
| |
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
| |
When adding plots with the plot menu, the scroll bar did not
expand to let the new plots into the visible area.
Need to recalculate the height after a plot is added or removed.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
Add the CPU and task plotting menu that was implemented for trace-graph
to kernelshark.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
The task plot menu that was added with the CPU plot menu is now
functional. You can add and remove task plots with using the menu.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
Add trace_graph_task_list() to return a list of tasks that are
found in the graph.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Code commonly passes around the event id and uses that to find the
event. Even if the event was already found, it uses the id to find
it later.
By caching the last event found by the name or id, and checking that
on the next query before searching, saves some time.
Running trace-cmd report on 6,000,000 events went from:
real 0m41.805s
user 0m39.483s
sys 0m2.311s
to:
real 0m39.769s
user 0m37.401s
sys 0m2.356s
About a 4% speed-up.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
| |
Add the -P option to trace-cmd record (and start) to only trace
a given pid. This is just like -F command where the pid given to
-P would be the pid of the command.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
| |
Move the reading of missed comms from sched_switch events from
trace-plot-cpu.c into trace-graph.c into the sched_switch check
itself.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
| |
Added menu for adding and removing CPU plots and Tasks.
Only CPU updates have been implemented in this change set.
Task updates will follow.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now with "trace-cmd record -l func -g func -n func" you can add function
filtering to the trace.
Since -F and -f are taken, -l is used as "limit functions".
-l func ; writes func into set_ftrace_filter
-n func ; writes func into set_ftrace_notrace
-g func ; writes func into set_graph_function
You can specify more than one function on the command line.
trace-cmd record -p function -l sys_write -l sys_read
The above will set set_ftrace_filter to both sys_write and sys_read.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
Make sure the advanced filters get copied too when syncing between
the graph and list filters.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
| |
Add the advanced filter menu for list and graph.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
Add the menu and implementation to perform advance event filtering
on the trace-graph.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
| |
Use the event_filter dialog instead of the system and event names.
trace-view already does this, this patch converts kernelshark and
trace-graph.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
| |
The menu "sync graph events to list" and "sync list events to graph"
is confusing because the word "to" usually means to destination.
But in this case, the "to" points to the source.
Replacing "sync graph events with list" makes this less confusing.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
| |
Have the events with event filters show up greyed out in the event
filter dialog. If the user keeps them active, the filter stays active.
But if the user disables the filter, then it will go away.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
Add pevent_update_trivial() to use one filter to update the
another filter.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
| |
Add pevent_filter_copy() to be able to copy one filter onto another.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
Add the -w option to trace-cmd read to record and display
wakeup latencies.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
Add pevent_filter_event_has_trivial() to test if an event has
a trivial TRUE, FALSE, or either filter.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
| |
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
Add the function pevent_filter_clear_trivial() to be able to remove
just those filters that are TRUE or FALSE (or both).
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
Add to the filter dialog the list of filters defined and a way
to delete those filters.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
| |
Forgot to add parse_filter_remove_event() to parse_events.h
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
Add a util.h file to hold small functions that may be useful
for other files.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
| |
Add the function pevent_filter_make_string() that will return an
allocated string that translates a filter of an event. This can
be used to display the defined filters back to the user.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
| |
Print reason filter fails.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
| |
Add =~ and !~ for filtering string matches.
Also fixed the == and != string matching since it was using
strncmp() due to values may not being NULL terminated. Copies
the data instead and compares the copy.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
| |
Change pevent_find_field() to pevent_find_any_field() because
the former does not check common fields where the later checks
both.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
| |
Add a "Advanced event filter" option that opens a text dialog
that lets you write an advanced filter.
This is still very primitive and needs to be cleaned up.
Not only that, it needs to show previous filters.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
| |
Use the new pevent event_filter infrastructure to filter events.
It removes a lot of specific graph and list code and is also
faster.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
Add function pevent_filter_reset() to reset and clear all
filters in an event_filter structure.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
| |
In trace-view-main, the info passed to the callbacks is now
a tree info and not the tree. The CPU and events clicked callbacks
did not get updated to this change.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
The initialization of the event list zero'd the first event item
instead of the last.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
Add filter function pevent_event_filtered() to return true
if the event has a filter against it, and false otherwise.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
| |
Create the function pevent_filter_remove_event() that takes an
filter and an event id as its parameters and removes the event
from the given filter.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a -v option to trace-cmd report to negate all filters specified
after it. That is, records that match those filters will not be
displayed.
./trace-cmd report -F sched -v -F 'sched_switch: next_prio > 100'
This will display all sched events except sched_switch events where
the next_prio is greater than 100.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
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>
|