aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
* kernelshark: Start of making kernelshark utilitySteven Rostedt2009-12-22
| | | | | | | 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>
* trace-graph: Move windowing into trace-graph-main.cSteven Rostedt2009-12-22
| | | | | | | 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>
* trace-view: Move windowing of trace-view into trace-view-main.cSteven Rostedt2009-12-22
| | | | | | | | 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>
* trace-view: Fix some GTK warningsSteven Rostedt2009-12-21
| | | | | | | 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-view: Separate out view from trace-cmdSteven Rostedt2009-12-21
| | | | | | | 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>
* trace-graph: Add CPU label to CPU linesSteven Rostedt2009-12-21
| | | | | | | The CPU lines did not show what CPUs they represent. This enables them. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* Merge branch 'trace-cmd' into trace-viewSteven Rostedt2009-12-21
|\
| * trace-cmd: Zero out item_arg in process_paranSteven Rostedt2009-12-21
| | | | | | | | | | | | | | | | 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>
* | trace-graph: Add back setting of draw area width and heightSteven Rostedt2009-12-18
| | | | | | | | | | | | | | 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>
* | Merge branch 'trace-cmd' into trace-viewSteven Rostedt2009-12-18
|\| | | | | | | | | | | | | Fixed up the trace-graph and trace-cmd view to handle the new API Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
| * trace-cmd: Have function graph keep record aroundSteven Rostedt2009-12-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * trace-cmd: Fixed tracecmd_refresh_record()Steven Rostedt2009-12-18
| | | | | | | | | | | | | | | | 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>
| * trace-cmd/pevent: Remove passing of cpu to pevent prasing functionsSteven Rostedt2009-12-18
| | | | | | | | | | | | | | 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>
| * trace-cmd: Add tracecmd_refresh_record()Steven Rostedt2009-12-18
| | | | | | | | | | | | | | | | | | 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>
| * trace-cmd/pevent: Add cpu to struct recordSteven Rostedt2009-12-18
| | | | | | | | | | | | | | | | | | | | 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>
| * trace-cmd: Pass in record to pevent functionsSteven Rostedt2009-12-18
| | | | | | | | | | | | | | | | | | | | 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>
| * trace-cmd: Add trace-cmd extractSteven Rostedt2009-12-18
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | trace-graph: Handle function-graph hackSteven Rostedt2009-12-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | trace-graph: Keep the flyover event window inside viewableSteven Rostedt2009-12-17
| | | | | | | | | | | | | | | | 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>
* | trace-gui: Remove dependency from view_dependsSteven Rostedt2009-12-17
| | | | | | | | | | | | | | | | 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>
* | trace-gui: Remove gnome referencesSteven Rostedt2009-12-17
| | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'trace-cmd' into trace-viewSteven Rostedt2009-12-17
|\| | | | | | | | | | | | | 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>
| * trace-cmd: Rename struct event to struct event_formatSteven Rostedt2009-12-17
| | | | | | | | | | | | | | | | 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>
| * trace-cmd: Add initial python tracecmd APIDarren Hart2009-12-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | trace-graph: Added some fixes for the trace labelsSteven Rostedt2009-12-17
| | | | | | | | | | | | | | 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>
* | trace-graph: Add new cmdlines via sched_switchSteven Rostedt2009-12-17
| | | | | | | | | | | | | | | | 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>
* | trace-graph: Add labels when enough room permitsSteven Rostedt2009-12-17
| | | | | | | | | | | | Add labels to the graph if there's enough room to show them. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | trace-graph: Fix missing lines at start and end of graphSteven Rostedt2009-12-17
| | | | | | | | | | | | | | 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>
* | trace-graph: Allow to zoom farther than X resourses allowSteven Rostedt2009-12-17
| | | | | | | | | | | | | | | | | | | | 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>
* | trace-view/graph: Update for change in pevent_data_*() APISteven Rostedt2009-12-17
| | | | | | | | | | | | | | The pevent_data_*() functions now take the record as the parameter and not the raw data. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | trace-graph: Fix zoom outSteven Rostedt2009-12-17
| | | | | | | | | | | | | | | | 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>
* | trace-graph: Add trace-compat to deal with old GTK versionsSteven Rostedt2009-12-17
| | | | | | | | | | | | | | | | | | 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>
* | trace-graph: Add zoom in and zoom out abilitySteven Rostedt2009-12-17
| | | | | | | | | | | | | | 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>
* | trace-graph: Add space to hold all CPUSSteven Rostedt2009-12-17
| | | | | | | | | | | | | | | | 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 check_sched_switch()Steven Rostedt2009-12-17
| | | | | | | | | | | | | | 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>
* | Add trace graph to graph CPU tracesSteven Rostedt2009-12-17
| | | | | | | | Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | Change default visible rows from 10000 to 1000Steven Rostedt2009-12-17
| | | | | | | | | | | | | | 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>
* | Add fixed font for latency and info columnsSteven Rostedt2009-12-17
| | | | | | | | | | | | | | | | 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>
* | Fix latency format dataSteven Rostedt2009-12-17
| | | | | | | | | | | | | | 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>
* | Add paging of large data filesSteven Rostedt2009-12-17
| | | | | | | | | | | | | | | | | | 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>
* | Add filtering of CPUsSteven Rostedt2009-12-17
| | | | | | | | | | | | | | 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>
* | Add dialog for event filteringSteven Rostedt2009-12-17
| | | | | | | | | | | | | | Created a dialog that shows all events. Still need to implement the event filtering. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | Set default width to 800x600Steven Rostedt2009-12-17
| | | | | | | | | | | | | | | | | | 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>
* | Remove old loading of trace dataSteven Rostedt2009-12-17
| | | | | | | | | | | | | | 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 column finding without all columns visibleSteven Rostedt2009-12-17
| | | | | | | | | | | | | | | | | | 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>
* | Connect the trace_view_store to the trace view treeSteven Rostedt2009-12-17
| | | | | | | | | | | | | | 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>
* | Add new trace view store model to improve performanceSteven Rostedt2009-12-17
| | | | | | | | | | | | | | 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>
* | Add GTK viewer for reading trace dataSteven Rostedt2009-12-17
|/ | | | | | This is the start of adding a GTK front end to read the trace data. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-cmd: Add ability to add new comms after first useSteven Rostedt2009-12-17
| | | | | | | | | | | | | 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>
* trace-cmd: Add pevent_pid_is_registered()Steven Rostedt2009-12-17
| | | | | | | 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>