| Commit message (Collapse) | Author | Age |
... | |
|
|
|
|
|
|
|
| |
When doing a list search, it may take a while if there are a lot of
events to search through. Freeze the window and change the cursor
to the wait cursor while processing the search.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
| |
There may be cases that we need to freeze the main window in order
to provide updates to other widgets or the cursor while working
to update something.
Add trace_freeze_all() and trace_unfreeze_all()
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
Add trace_set_cursor() and trace_put_cursor() to set and unset
the cursor of the parent window.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
| |
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
| |
The trace-compat.c comment header was copied from parse-events.c and included
the comment about Frederic Weisbecker writing the code for the function
graph tracer output. This has nothing to do with the trace-compat.c file.
Remove it.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
When a search is not found, use a pop up to show that answer
instead of a printf.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
| |
Currently there's only handlers to get visible rows from the tree.
It may be needed to look at other rows from other pages (like
in the search function).
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
Some places in the code does not have access to a window. Default
to the parent window if the parent is not supplied.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Currently the search function only works on the first page of the list.
The list is broken up into pages of 1,000,000 items. But if you are
on the second or later page (>1,000,000 item) the search will
not work.
This patch fixes the search feature to work on other pages.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
| |
If for some reason a trace.dat file is missing the function list
(sometimes happens when creating a trace.dat from restore), add
away to allow trace-cmd report to pull in a kallsyms file to
use instead.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
| |
The long opt for the filter test "--filter-test" was not setting
the filter-test variable. It was not even tested and would cause
the help message to appear.
Also add comments around the long op case statements.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
| |
Now that record -F -c will follow the children, this patch implements
the filters to be updated to include the children in the event
filters.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since there's no good way to know when a child forks, and we
want to update the filters when it does. We must resort to ptrace.
Yes it sucks, but it works.
When performing a trace-cmd record -F -c program
The "-c" switch will cause trace-cmd to ptrace the program. If
the program forks, trace-cmd will update the filters to follow
the children of the program.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
| |
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
| |
When trace_printk or trace_marker is used, it may end with a '\n'.
Do not print out a double '\n'. If the user wants two '\n' then the
trace_printk or trace_marker should specify two.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
| |
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
In case the user wants to use a different manpage/docbook.xsl,
let them override the MANPAGE_DOCBOOK_XSL environment variable.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
Remove space from the do_install script that was making the
install of kernelshark html documents fail.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
| |
Fail if the docbook.xsl is not found. Currently it fails if
the file does not exist, but passing in a blank string does not
produce an error.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The sched_switch and sched_wakeup filters are special for tracing
pids. If we are tracing a pid, we want sched_switch and sched_wakeup
to be traced if it is waking up or switching to the given pid.
Since events are now expanded into a list holding the filter
files to be updated. Either reuse or create if necessary the
sched_* events to add the extra filters.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
| |
Use glob to expand the events given on the command line into
separate entities on the event_selection list. This will allow
easier settings of the filters during execution time.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
After reading the filter, make sure to zero out the end of
the filter string.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Using the "len" variable in print_str_arg() to test if the
value is an array when the arg field size is zero is incorrect.
When the arg field size is zero, the data is an dynamic value
regardless if FIELD_IS_ARRAY is set or not. It may not be set
for strings at the end of the record.
Only assume the data is a pointer if the arg->field.field->size
is sizeof long.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
Change the way update_ftrace_pid() to allow multiple calls
to add more than one pid.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
| |
The value converted by the filters in comparisons uses strtoll()
which returns an invalid number when we are dealing with 64bit IP
addresses.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add to trace-cmd restore:
-t dir: where dir is the directory to search instead of looking at
debugfs/tracing
-k file: where to read kallsyms from, instead of reading
/proc/kallsyms
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
Add the -T option to print the filter strings created by -F
and exit.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
If pevent->test_filters is set when a filter string is added,
then it will print the filters strings that were created and exit.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
New rewrite of the parse event filter to greatly simplify
the logic. Should be much easier to modify it now.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Show a nice pointer where an error occurred in filtering:
# trace-cmd report -F 'sched_switch:(next_pid==x)||)prev_pid == 1'
version = 6
cpus=4
trace-cmd: No such file or directory
Error filtering: sched_switch:(next_pid==x)||)prev_pid == 1
(next_pid==x)||)prev_pid == 1
^
Expected end where ) was found
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current format for sched_switch and sched_wakeup events is:
trace-cmd-2271 [003] 6201.438152: sched_switch: 2271:120:S ==> 0:120: kworker/0:1
<idle>-0 [002] 6201.438301: sched_wakeup: 0:?:? + 2270:120:? trace-cmd [002] Success
<idle>-0 [002] 6201.438311: sched_switch: 0:120:R ==> 2270:120: trace-cmd
trace-cmd-2270 [002] 6201.438393: sched_switch: 2270:120:S ==> 0:120: kworker/0:1
<idle>-0 [000] 6201.438799: sched_wakeup: 0:?:? + 10:120:? kworker/0:1 [000] Success
<idle>-0 [000] 6201.438839: sched_switch: 0:120:R ==> 10:120: kworker/0:1
Which kinda sucks. Rewrite it to look like.
trace-cmd-2271 [003] 6201.438152: sched_switch: trace-cmd:2271 [120] S ==> kworker/0:1:0 [120]
<idle>-0 [002] 6201.438301: sched_wakeup: trace-cmd:2270 [120] success=1 CPU:002
<idle>-0 [002] 6201.438311: sched_switch: kworker/0:1:0 [120] R ==> trace-cmd:2270 [120]
trace-cmd-2270 [002] 6201.438393: sched_switch: trace-cmd:2270 [120] S ==> kworker/0:1:0 [120]
<idle>-0 [000] 6201.438799: sched_wakeup: kworker/0:1:10 [120] success=1 CPU:000
<idle>-0 [000] 6201.438839: sched_switch: swapper:0 [120] R ==> kworker/0:1:10 [120]
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
|
| |
The function pevent_register_comm() will allocate its own comm
depending on when you execute it. This is stupid and likely to
cause bugs.
Make it always allocate its own comm and also change the parameter
name to accept const char *.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use "struct filter_arg_exp" instead of "struct filter_arg_op"
for FILTER_ARG_EXP and eliminate the warnings:
/home/laijs/work/trace-cmd/parse-filter.c: In function ‘get_exp_value’:
/home/laijs/work/trace-cmd/parse-filter.c:1461:2: warning: case value ‘4’ not in enumerated type ‘enum filter_op_type’
/home/laijs/work/trace-cmd/parse-filter.c:1464:2: warning: case value ‘5’ not in enumerated type ‘enum filter_op_type’
/home/laijs/work/trace-cmd/parse-filter.c:1467:2: warning: case value ‘6’ not in enumerated type ‘enum filter_op_type’
/home/laijs/work/trace-cmd/parse-filter.c:1470:2: warning: case value ‘7’ not in enumerated type ‘enum filter_op_type’
/home/laijs/work/trace-cmd/parse-filter.c:1473:2: warning: case value ‘8’ not in enumerated type ‘enum filter_op_type’
/home/laijs/work/trace-cmd/parse-filter.c:1476:2: warning: case value ‘9’ not in enumerated type ‘enum filter_op_type’
/home/laijs/work/trace-cmd/parse-filter.c:1479:2: warning: case value ‘10’ not in enumerated type ‘enum filter_op_type’
/home/laijs/work/trace-cmd/parse-filter.c:1482:2: warning: case value ‘11’ not in enumerated type ‘enum filter_op_type’
/home/laijs/work/trace-cmd/parse-filter.c: In function ‘exp_to_str’:
/home/laijs/work/trace-cmd/parse-filter.c:1844:2: warning: case value ‘4’ not in enumerated type ‘enum filter_op_type’
/home/laijs/work/trace-cmd/parse-filter.c:1847:2: warning: case value ‘5’ not in enumerated type ‘enum filter_op_type’
/home/laijs/work/trace-cmd/parse-filter.c:1850:2: warning: case value ‘6’ not in enumerated type ‘enum filter_op_type’
/home/laijs/work/trace-cmd/parse-filter.c:1853:2: warning: case value ‘7’ not in enumerated type ‘enum filter_op_type’
/home/laijs/work/trace-cmd/parse-filter.c:1856:2: warning: case value ‘8’ not in enumerated type ‘enum filter_op_type’
/home/laijs/work/trace-cmd/parse-filter.c:1859:2: warning: case value ‘9’ not in enumerated type ‘enum filter_op_type’
/home/laijs/work/trace-cmd/parse-filter.c:1862:2: warning: case value ‘10’ not in enumerated type ‘enum filter_op_type’
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a 'COMM' special field to allow the filter in trace-cmd report
to filter on the task's comm.
Most records do not have data about what the comm is of the
task that recorded the record. But comms are stored in various
ways that parse-events can handle.
By adding a special field 'COMM' (all caps) the user can now
filter out tasks based on their name. This is useful when filtering
out (or in) a bunch of threads.
-F 'COMM != "trace-cmd"'
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Allow the user to specify CC and AR via the environment by only
setting them in the Makefile if they don't already exist. This is
useful for external build systems for example.
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
LKML-Reference: <1294333733-7746-1-git-send-email-darren@dvhart.com>
CC: Tim Bird <tim.bird@am.sony.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
| |
The handle member object was changed to _handle, correct the usage
in event-viewer.py.
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
LKML-Reference: <1294173820-7043-4-git-send-email-dvhart@linux.intel.com>
CC: Tom Zanussi <tom.zanussi@intel.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
| |
Make the usage function available to shared objects, such as the python
ctracecmd.so module built by the SWIG mechanism.
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
LKML-Reference: <1294173820-7043-3-git-send-email-dvhart@linux.intel.com>
CC: Tom Zanussi <tom.zanussi@intel.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
| |
Make tracecmd_(get|put)_tracing_file available to shared objects, such
the python ctracecmd.so module generated by the SWIG mechanism.
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
LKML-Reference: <1294173820-7043-2-git-send-email-dvhart@linux.intel.com>
CC: Tom Zanussi <tom.zanussi@intel.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
Add the -a option to trace-cmd record that will bring back the old
behavior of recording the format of all events.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
| |
No need to record all event formats when only a few are being recorded.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
| |
Fix this warning:
trace-output.c:832: warning: format '%llx' expects type 'long long unsigned int', but argument 3 has type 'off64_t'
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
| |
Instead of just showing the average wakeup latency in the -w report,
also show the max and min latencies as well as the time stamp that
they occurred.
Requested-by: Shawn Bohrer <sbohrer@rgmadvisors.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
| |
The wakeup event "success" field is going away. Do not depend on it.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
| |
The "success" field of the wakeup events is going away,
don't depend on them there. If they don't exist, then the
wakeup was successful, so treat it as such.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
Let pevent_read_number_field() have a NULL field. Just return -1
if one does not exist.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Kernel 2.6.35.7 generates invalid trace files due to
/sys/kernel/debug/tracing/events/scsi/scsi_dispatch_cmd_timeout/format
returning "FORMAT TOO BIG" (seems to be fixed in 2.6.36). This makes
pevent_data_event_from_type return NULL, and dereferencing of event
crashes the viewer.
Catch and report the error properly.
Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
LKML-Reference: <4CB758C1.8090906@web.de>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
| |
The kvm plugin understands a few new fields; don't warn if they are missing,
as expected on older kernels.
Signed-off-by: Avi Kivity <avi@redhat.com>
LKML-Reference: <1291051539-16791-1-git-send-email-avi@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
| |
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
| |
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
| |
svm exit reasons use different code than vmx; use the new "isa" trace field
to select the instruction set and display the strings accordingly.
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|