aboutsummaryrefslogtreecommitdiffstats
path: root/trace-graph.c
Commit message (Collapse)AuthorAge
* trace-cmd: Relicense the library files under LGPLSteven Rostedt2010-02-15
| | | | | | | | | | | | | | | | | | | | 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>
* trace-graph: Free old plot info before initializing new plot infoSteven Rostedt2010-02-12
| | | | | | | | 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>
* kernelshark/trace-graph: Free up graph infoSteven Rostedt2010-02-11
| | | | | | | Have kernelshark call the graph info destructor. Have the graph info destructor free the lists. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-graph: Make the plots closerSteven Rostedt2010-02-11
| | | | | | | The plots are quite far apart for no apparent reason. Bring them 30 pixels closer. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-graph: Show wake latency in task plotsSteven Rostedt2010-02-10
| | | | | | | | | 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>
* trace-graph: Have the graph control the start stop recordsSteven Rostedt2010-02-10
| | | | | | | | | | 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>
* trace-graph: Resize instead of redraw when adding plotsSteven Rostedt2010-02-10
| | | | | | | 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>
* trace-graph: Insert new task plots below the plot that they were selected onSteven Rostedt2010-02-10
| | | | | | | 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>
* trace-graph: Resize graph height when plot is added or removedSteven Rostedt2010-02-10
| | | | | | | | | 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>
* trace-graph: Iterate over all records for all plotsSteven Rostedt2010-02-10
| | | | | | | | 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>
* trace-graph: Add hash to lookup pids and cpusSteven Rostedt2010-02-10
| | | | | | | | 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>
* trace-graph: Pass plot around instead of indexSteven Rostedt2010-02-10
| | | | | | | | | | 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>
* trace-graph: Add popup menu to remove plotSteven Rostedt2010-02-10
| | | | | | | | | | | | 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>
* trace-graph: Add way to add task plotsSteven Rostedt2010-02-10
| | | | | | | | | | | | 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>
* trace-graph: Rename cpu references to plot referencesSteven Rostedt2010-02-10
| | | | | | | Theres still variables that reference "cpu" when now they are referencing plot interfaces. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-graph: Move display event info into plot structuresSteven Rostedt2010-02-10
| | | | | | | Move the code to show what to display into the plot sturctures. Have the plot structure determine what to show. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-graph: Add find_record to plots for popup windowsSteven Rostedt2010-02-10
| | | | | | | | The popup needs a record to use to determin if a task should be added to the filter or not. Add the method find_record to the plot callback structure. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-graph: Fix printing of event labelsSteven Rostedt2010-02-10
| | | | | | | | | Make the printing of event labels a bit more sophisicated. That is to print the event label when there is enough room before and after the event. If one label is small, let another larger label use up that space. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-graph: Move what to plot into cpu specific fileSteven Rostedt2010-02-08
| | | | | | | | | | Move the decisions to what to plot into the cpu specific file. Now the trace-graph.c can just manange the drawing. The code to show the fly-over windows still needs to be made generic. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-graph: Move adjusting of graph to plot codeSteven Rostedt2010-02-08
| | | | | | | | | Make the adjustment of the graph into a plot callback. That is, start from the first plot and work down to see if the plot has an exact match and should be displayed in the graph viewable area (adjust scrollbar). Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-graph: Start of graph_plot structureSteven Rostedt2010-02-08
| | | | | | | | | | | This is a start of moving from plotting just the CPUs, but to move the code to a plot interface. This will eventually allow a line to just plot a task (on all CPUs). This first patch just sets up some of the infratructure, but still is tied to the CPU plots. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-graph: Make helper functions to convert time and xSteven Rostedt2010-02-05
| | | | | | | Add convert_x_to_time() and convert_time_to_x() instead of hard coding it and having it error prone. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-graph: Fix compile warning on stupid guint64 and printf formatsSteven Rostedt2010-02-03
| | | | | | | | | | | | For some stupid reason glib defines guint64 inconsistantly on different platforms. Probably because the developers don't even test on more than one box. This patch adds u64 as unsigned long long and uses this to typecast the output for printf. Reported-by: Darren Hart <dvhltc@us.ibm.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-graph: Check for no record in drawing CPU infoSteven Rostedt2010-01-15
| | | | | | | If a CPU is empty, the record returned from tracecmd_read_cpu_last() may be NULL. Account for it. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-graph: Move vadj to view selected CPUSteven Rostedt2010-01-13
| | | | | | | If an event is selected on a CPU that is not visible in the graph, the vadj needs to move to make that CPU viewable. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-graph: Move pevent saved data to graph info structureSteven Rostedt2010-01-13
| | | | | | | | | With the ability to load and unload files from the graph, the pevent data structures may be freed. We need to move the cached pointers of the data fields to the ginfo structure so that we can initialize them again when we load a new file. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* Merge branch 'trace-cmd' into trace-viewSteven Rostedt2010-01-11
| | | | | | | | | | | | | | Updated to handle the API change to tracecmd_open(). modified: kernel-shark.c modified: trace-cmd.h modified: trace-graph-main.c modified: trace-graph.c modified: trace-input.c modified: trace-read.c modified: trace-view-main.c Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-graph: Added loading of filesSteven Rostedt2010-01-11
| | | | | | | | | Modified trace-graph to open withoun any files loaded. Added an "Load File" menu option to open a file dialog to load a new file. Also allow to load new files. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-graph: Remove left over debug printSteven Rostedt2010-01-08
| | | | Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-graph: Remove 'hello' printSteven Rostedt2010-01-08
| | | | | | | | | The graph had a little 'hello' test to prove that the proper pointer was being sent to the destroy function. Remove it. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* kernel-shark: Remove a bunch of debug printingSteven Rostedt2010-01-08
| | | | | | Remove the debug printing, or at least hide it. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-graph: Fix the displaying of eventsSteven Rostedt2010-01-08
| | | | | | | | | | | When an event is by itself, information is displayed about it. But it was displaying the wrong information. This patch adds a separate variable to keep track of what should be displayed and removes the confusion with trying to use other variables. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-graph: Fix start and end event info boxSteven Rostedt2010-01-08
| | | | | | | The event info box was showing the wrong task if the pointer was before the first record or after the last. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-graph: Fix fly over window to show actual tasksSteven Rostedt2010-01-08
| | | | | | | The event info box was getting confused by sched_switches, and showing the wrong task at the given time line. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-graph: Show actual task color at start of graphSteven Rostedt2010-01-08
| | | | | | | If the first event in the graph is a sched_switch, then the color for the block was showing the new task. Not the previous task. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-graph: Allow selection before graph for zoomingSteven Rostedt2010-01-08
| | | | | | | | | | It is difficult to zoom in from the beginning of the graph, because you must move the pointer right to zoom. To ease zooming in at the start of the graph, this patch now allows the user to select on the CPU drawing, and move the pointer over the graph to make the selection. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-graph: Clear out event info window when leaving drawingSteven Rostedt2010-01-08
| | | | | | | | When the pointer leaves the drawing area, sometimes the event info box would stay hanging around. This looks messy, so remove it when the pointer leaves the drawing area. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-graph: Keep event info in viewSteven Rostedt2010-01-08
| | | | | | | | | | | | | | | | | | If the scrolled window is vertically adjusted so that the top CPU bar is close to the top of the viewable area, the event info box can be hidden. Change the location of the event info box to go beneath the pointer when near the top. The location of the box is also changed to be to the left of the pointer instead of the right. This is because when we make the flip the box may be hidden by the cursor itself. Although this does not protect against that happening when the pointer is near the top left corner, since the box will be to the right of the cursor then anyway. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-graph: Rename vadj to hadj since it is the horizontal adjustmentSteven Rostedt2010-01-08
| | | | | | | For some reason we called the horizontal adjustment of the graph vadj. Call it hadj. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-graph: Have graph show task filter wake upsSteven Rostedt2010-01-07
| | | | | | | | | | When a task is filtered, have the wake up of the filtered task also displayed. This patch also modifies the event info box to show the task being woken up instead of the waker. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* kerenl-shark: Use callbacks for updating the filter between graph and listSteven Rostedt2010-01-07
| | | | | | Have the graph send callbacks to update the lists filters. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-graph: Add hiding of tasksSteven Rostedt2010-01-07
| | | | | | | | Add option to hide tasks. This acts as the opposite of filtering. If a task is added to the hidden list, then it will not show up. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-graph: Implement event filtering for the graphSteven Rostedt2010-01-07
| | | | | | | Move some of the trace-view event filtering to be generic enough and have the trace-graph use it. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-graph: Show filtered tasks scheduling outSteven Rostedt2010-01-05
| | | | | | | The trace graph shows filtered tasks scheduling in, but it filters out that task from scheduling out. This fixes that bug. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-graph: Move task filter code to trace-hash.[ch]Steven Rostedt2010-01-04
| | | | | | | | | In order to make the trace tree of kernelshark work better with the trace-graph, move the filtering code of tasks out of trace-graph.c into trace-hash.c. This will allow the trace-tree to be more flexible in its filtering too. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-graph: Disable filter when last task is removedSteven Rostedt2010-01-04
| | | | | | When the last task is removed from the filter, disable the filter. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* kernel-shark: Allow filtering of graph from tree viewSteven Rostedt2010-01-04
| | | | | | | | Let the tree view pop up menu filter the graph as well. This makes finding tasks to filter on easier, as it is easier to search for a task from the tree view than with the graph. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-graph: Add filtering of tasksSteven Rostedt2009-12-31
| | | | | | | This enables the popup filter menus to actual filter the tasks in the graph. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-graph: Remove hack to redraw graphSteven Rostedt2009-12-31
| | | | | | | | An old hack was still in place to redraw the graph after zooming in and out. Replace it with the redraw function and the update_with_backend(). Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-graph: Add task filtering popup menusSteven Rostedt2009-12-31
| | | | | | | | | Add popup menus to graph that allows the use to add or remove tasks from the filter, as well as to enable or disable the filter. This only adds the popup menus, the filtering is not actually done yet. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>