| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
| |
Add a utility that makes both trace-graph and trace-view interact.
It may also in the future do recording as well.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
In order to be able to use the trace-graph in other applications
we separate out the creation of the graph from the windowing.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
| |
In order to make the trace-view list be used in other applications
separate out the main window into trace-view-main.c and make an
API that another application can use a trace view with.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
There were a few GTK warnings spitting out with the trace-view code.
This patch cleans up that code.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
trace-cmd is going to be a command line only tool. The viewer
is going to go into a separate utility. This patch separates it out.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
The CPU lines did not show what CPUs they represent. This enables
them.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
The print arg gets its fields processed the first time they are used.
If the field is not initialized to zero, this will cause it to
use an uninitialized field and crash.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
| |
| |
| |
| |
| |
| |
| | |
The draw area did request the space for the CPUs when they go out
of view. So we never got the scroll bar for them.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|\|
| |
| |
| |
| |
| |
| | |
Fixed up the trace-graph and trace-cmd view to handle the new
API
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The function graph tracer looks forward in the trace to determine
if a function is a leaf or not. In doing so, it causes the mapping
of records to change. This produces a nasty side effect where the
caller can have the record stored, and it will suddenly invalidate
the record's mapping.
This refreshes the record passed in and does a trick by calling
the tracecmd_peek_data function that will cache the location
after the leaf function's return entry.
This unfortunately causes a side effect too where if the last
entry in the trace is a leaf function, we can't hide the exit entry
and it will print regardless. But this side effect wont crash the
application, but the previous side effect will.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Fixed tracecmd_refresh_record to update the CPU iterator properly.
Also added the refresh to the tracecmd_peek_data() if it was going
to return the cached record.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
| |
| |
| |
| |
| |
| |
| | |
Now that the struct record holds the cpu information, there's no need
to pass the cpu number to the pevent parsing routines.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The data field in a struct record is a pointer to an mmap
section of memory. If other records are read, this mmap section
can be unmapped. The tracecmd_refresh_record() allows users to remap
that mmapped section for the record.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Most routines that use a record also require a CPU number.
It just makes sense to move the CPU to the record.
This patch also renames some ambiguous "data" to "record"
variables.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Instead of passing in the data, size and timestamp to the
pevent parsing routines, pass in the record itself. This allows
the pevent parsing routines to have a bit more control and facilitates
the need of future work where we need to know more about the record
in the parser.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This adds a way to extract a current trace into the data file.
That is, you can run a ftrace outside of trace-cmd, or use
trace-cmd start and trace-cmd stop
to get a trace. Then to pull it into a file, use
trace-cmd extract
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In order for the function graph tracer to know if the current
entry is a nested function or a leaf function, it must read ahead
to examine the next entry. But if the next entry happens to be on
another page, doing this will unmap the current record's data.
We have debug printing to the screen as we mouse over the events.
The debug prints out the record's info, and this can call the
function graph tracer's routine that will move the record.
But then we reference the record a second time to display the same
info in the drawing. This second one is using a unmapped page.
For now, we hack a work around by freeing the record and rereading
it after we display the debug info.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
| |
| |
| |
| |
| |
| |
| |
| | |
The flyover event information window currently only stays inside
the drawing area. But if the drawing area is not fully exposed,
the flyover window may be hidden outside the visible section.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
| |
| |
| |
| |
| |
| |
| |
| | |
The trace-view.o and trace-graph.o were always compiled
due to the .PHONY gtk_depends. Not sure why this was done,
but I'm removing it until I figure it out.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The original idea was to use a gnome canvas, but it became
more apparent to directly draw into a drawable area.
This patch removes all references to gnome, since we do not
want to limit this utility to gnome only.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|\|
| |
| |
| |
| |
| |
| | |
Fixed trace-cmd view and trace-graph to handle rename of
struct event to struct event_format.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Calling the event format parser "struct event" may lead
to confusion about if the struct actually represents an instance
of an event instead of what it really is: a format descriptor.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add an object oriented python API in a new tracecmd.py module. This
module contains a self test that duplicates the behavior of the
tracecmd-test.py, so it has been removed.
This API is far from complete and only implements enough functionality
to list the events on each CPU.
SWIG doesn't handle long longs so we have to add a wrapper, a
typemapper, and a marshaller to get a 64bit integer out of the record
data. This is a first take, comments welcome. We'll need to do something
similar with the timestamp values.
Signed-off-by: Darren Hart <dvhltc@us.ibm.com>
LKML-Reference: <4B2AC3E1.1010301@us.ibm.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
| |
| |
| |
| |
| |
| |
| | |
The trace labels had some minor bugs, and one major one (would crash
if we zoomed in so far that a CPU line had no events).
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
| |
| |
| |
| |
| |
| |
| |
| | |
The cmdline cache used by ftrace only saves 100 cmdlines. But if
there's more tasks than cmdlines, then we will end up with a lot with
<...>. This looks at sched_switch and will add comms if they are found.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
| |
| |
| |
| |
| |
| | |
Add labels to the graph if there's enough room to show them.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
| |
| |
| |
| |
| |
| |
| | |
The start and end of the graph did not add task lines if the running task
was not idle at either the start or end of the trace.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We can't zoom in so much that the drawing area is greater than
what X resources use. So when we zoom in deeply, we make the
viewable area (full scroll bar) a subset of the full image.
This allows us to zoom in as deep as we like.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
| |
| |
| |
| |
| |
| |
| | |
The pevent_data_*() functions now take the record as the parameter
and not the raw data.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
| |
| |
| |
| |
| |
| |
| |
| | |
The zoom out should convert the selected width down to one pixel.
This means we divide the selected width from the current width.
We don't take a proportion of the view width as we did for zoom in.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Testing this code on different boxes, I've found that some older
gtk versions don't have all the functions that are needed. This
adds those functions in a hack (for older versions anyway) to
try to cope with this.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
| |
| |
| |
| |
| |
| |
| | |
To zoom in, just press the left mouse button and slide right, and release.
To zoom out, press the left mouse button and slide left and release.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
| |
| |
| |
| |
| |
| |
| |
| | |
In case we have a lot of CPUS, make sure the drawing area
has enough room to display them. The scroll window will take
care of the viewable area.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
| |
| |
| |
| |
| |
| |
| | |
Add code to look for sched_switch events to be able to box in
the events based on the tasks running.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
| |
| |
| |
| | |
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
| |
| |
| |
| |
| |
| |
| | |
Even having 10000 row limit takes a bit of time to show the rows.
Making it only 1000 rows per page seems to speed it up a bit.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
| |
| |
| |
| |
| |
| |
| |
| | |
The latency field looks best when all the rows match in width.
There also exists traces that look best when the info printed is
the same width.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
| |
| |
| |
| |
| |
| |
| | |
The data descriptor and not the data record was being passed into
the latency format parser. This was obvously giving corrupted data.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Loading a large (100,000+ entry) data file can take a very long
time, and is quite annoying to wait for. This patch breaks the
data up into pages (10,000 rows per page). Then it lets the user
move about the pages with a scroll button.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
| |
| |
| |
| |
| |
| |
| | |
Added cpu dialog to filter on CPUs. Still need to add the
event filtering, even though the event filter dialog is active.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
| |
| |
| |
| |
| |
| |
| | |
Created a dialog that shows all events. Still need to implement the
event filtering.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The window would always show up as an annoyingly small box.
At least set the default dimensions to something sane.
TODO: Let the user define these attributes.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
| |
| |
| |
| |
| |
| |
| | |
The trace view store now takes care of loading the trace data.
We can remove the old code that did it for the list store.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixed a bug where the column returned when all columns were not
visible would be less than 1.
Consolidated the calculating of the column index into a single function.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
| |
| |
| |
| |
| |
| |
| | |
This patch replaces the list store used for the main trace tree with
the trace_view_store.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
| |
| |
| |
| |
| |
| |
| | |
With the amount of data needed for loading a trace file, we must
implement our own tree view model.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|/
|
|
|
|
| |
This is the start of adding a GTK front end to read the trace data.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To speed up the reading of cmdlines to pid mappings, an unsorted list
is used first to register comms (cmdlines). Once the list is
used to seach, the list is converted to a sorted array to allow
for fast binary searches. But once this was done, there was no way
to add more cmdlines mappings.
This now adds a slower version to add new cmdlines after the list
has been made, but still makes it possible.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
|
|
|
|
|
| |
Add the function pevent_pid_is_registered() that returns 1 if the
given pid has a cmdline mapped to it, and 0 otherwise.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|