aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
* kernelshark: Make the programs depend on the tracecmd librarySteven Rostedt2010-01-04
| | | | | | | | | | | | If we do a make clean, still allow the dependencies of the programs to create the library. That is: $ make clean $ make trace-view Needs to build the libtracecmd.a file. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-view: Include sched switch in task filteringSteven Rostedt2010-01-04
| | | | | | | Include when a task is scheduled in as an event in the filtered list. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-view: Fix trace_view_store_get_timestamp_visible_row()Steven Rostedt2010-01-04
| | | | | | | | | | | The search used the size of the actual_rows array, and not the size of what was visible. The visible_rows use the array, but anything outside the visible rows are just left overs. Using the bsearch on the entire array causes errors in the search. It should only use the subset that is visible. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-view: Fix searching by timestamp for filtered listsSteven Rostedt2010-01-04
| | | | | | | | | | | | | When a list is filtered, the search_for_record_by_timestamp() was returning incorrect values because the rows_ts_cmp() was using the pointer the array was pointing to go to the next record. But if that record was not visible or the next record should have been on another CPU, it would break the bsearch. The correct approach is to look at the next record in the array, not the per cpu list. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-view: Do not call helper function to select row in trace_view_select()Steven Rostedt2010-01-04
| | | | | | | The helper function to select a row just adds overhead for trace_view_select(). Just call the selection directly. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-view: Return only visible recordsSteven Rostedt2010-01-04
| | | | | | | | The trace_view_store_get_timestamp_visible_row() did not return only visible rows, but also invisible ones. This patch fixes the code to only return the visible rows. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* kernel-shark: Enabled filtering of tasks for list and graphSteven Rostedt2010-01-04
| | | | | | The list and graph can now filter tasks. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* Merge branch 'trace-cmd' into trace-viewSteven Rostedt2010-01-04
|\
| * trace-cmd: Have tracecmd_read_cpu_first() return the first recordSteven Rostedt2010-01-04
| | | | | | | | | | | | | | | | | | | | | | There was a bug with tracecmd_read_cpu_first() where it may not return the first record for a CPU. If another record was read on the first page the get_page() function would return without reseting the index. The tracecmd_read_cpu_first() needs to always reset the index before returning tracecmd_read_data(). 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>
* | Merge branch 'trace-cmd' into trace-viewSteven Rostedt2009-12-31
|\| | | | | | | | | | | | | Conflicts: Makefile Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
| * trace-cmd: Add plugin_kmem for showing function names of call sitesSteven Rostedt2009-12-31
| | | | | | | | | | | | | | | | | | | | | | The kmem events only show a useless hex symbol for the call site name. This adds a plugin to do a lookup of the function name and still print the rest of the event format. Also adds pevent_find_function_address() to let the plugin show the offset into the function as well. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
| * trace-cmd: Allow plugin handlers to let the default print to also happenSteven Rostedt2009-12-31
| | | | | | | | | | | | | | | | | | | | A plugin may only need to translate part of the field, or if it fails to translate, it may want the default to print. Now if a plugin handler returns something other than 0, the default print handler will take place. 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>
* | trace-graph: Replace hash looping with a faster hashSteven Rostedt2009-12-31
| | | | | | | | | | | | | | | | | | Did a little more research and found a nice hash that is quick and pretty powerful. Based off of Paul Hsieh's super fast hash: http://www.azillionmonkeys.com/qed/hash.html Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | trace-graph: Add a little better pid hash functionSteven Rostedt2009-12-31
| | | | | | | | | | | | | | | | This adds a little better pid hash function that will give a better difference in colors for tasks than the previous hash algorithm. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | trace-graph: Fix color of task starting windowSteven Rostedt2009-12-31
| | | | | | | | | | | | | | | | | | The color was not being set up for the box if a task other than idle was the first event on a CPU. The gc variable used to draw the task box was not initialized and the color of the task was random at the start. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | Merge branch 'trace-cmd' into trace-viewSteven Rostedt2009-12-31
|\|
| * trace-cmd: Always initialize cpu_data listSteven Rostedt2009-12-31
| | | | | | | | | | | | | | | | Always intialize the cpu_data list event if the cpu data is empty. The list may still be referenced, and it will segfault if the list is not initialized. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | trace-view: Handle case that cell has no textSteven Rostedt2009-12-31
| | | | | | | | | | | | | | If for some reason a cell in a column contains no text, then exit the data_func, otherwise we may segfault. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | trace-view: Add compat functions for older GTKSteven Rostedt2009-12-30
| | | | | | | | | | | | | | | | | | Some of the functions that were used to make the fixed width columns are not available for older GTK. This patch adds compat functions that implement code that lets this compile with older versions of GTK. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | Merge branch 'for-rostedt/trace-view' of ↵Steven Rostedt2009-12-30
|\ \ | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/dvhart/trace-cmd into trace-view
| * | trace-view: Self-adjusting fixed width trace-viewDarren Hart2009-12-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By using fixed width columns and fixed height rows, the view can now render over 400k events without any noticable lag. This makes it so large traces can now be viewed in one "page" of the trace-view-model. The new trace-view-data-func() is called when the view wants to render cell (which it only has to do when it's visible now that we use fixed sizings). Here we check the string width in pixels and resize the column if necessary. By tracking the max character width of each column, we can avoid doing the expensive Pango pixel width test as often. By adding a little extra padding, we anticipate one more character, further reducing the overhead. The first full scroll down and up shows no noticable lag due to these calculations once the optimizations were implemented. V2: fix an unused var warning and use a long when casting to a pointer. Signed-off-by: Darren Hart <dvhltc@us.ibm.com>
* | | trace-graph: Work on fixing the zooming and horizontal scrollingSteven Rostedt2009-12-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | For some reason zooming in too much will cause the horizontal scrolling to get out of sync. This is probably a rounding error or some other strange bug. This patch cleans some of the code up and fixes parts of it. But there's still a bug to swat. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | | Merge branch 'trace-cmd' into trace-viewSteven Rostedt2009-12-30
|\ \ \ | | |/ | |/|
| * | trace-cmd: Invalidate peek cached record if timestamp does not matchSteven Rostedt2009-12-30
| | | | | | | | | | | | | | | | | | | | | | | | If the recorded timestamp of the cpu cached record does not match the timestamp stored in the cpu_data, that means the record is no longer valid. Free it and read a new record. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | | trace-graph: Convert the printfs to dprintf for debuggingSteven Rostedt2009-12-30
| | | | | | | | | | | | | | | | | | | | | Too much output is being displayed in the graph output. Convert the printf to dprintf macro that can control the amount of output. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | | trace-view: Move cpu mask functions into cpu.hSteven Rostedt2009-12-30
| | | | | | | | | | | | | | | | | | Move the cpu mask alorithms out into cpu.h for other files to use them. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | | Merge branch 'trace-cmd' into trace-viewSteven Rostedt2009-12-30
|\| | | |/ |/|
| * trace-cmd: Python EventStore and record memory managementDarren Hart2009-12-30
| | | | | | | | | | | | | | | | | | | | | | | | Add a python EventStore instead of a generic gtk.ListStore. Load time is reduced 50% although still 15x slower than the C version. Add the proper freeing of the record to the Event destructor rather than setting ownership of the pointer to Python. The latter causes swig to call free() on the record rather than free_record() which does some intelligent things regarding the mmap. Signed-off-by: Darren Hart <dvhltc@us.ibm.com>
| * trace-cmd: Use fixed sized rows and columns in event-viewer.pyDarren Hart2009-12-30
| | | | | | | | Signed-off-by: Darren Hart <dvhltc@us.ibm.com>
| * trace-cmd: Add Python GTK Event Viewer exampleDarren Hart2009-12-30
| | | | | | | | Signed-off-by: Darren Hart <dvhltc@us.ibm.com>
| * trace-cmd: Add python wrapper for tracecmd_read_atDarren Hart2009-12-30
| | | | | | | | Signed-off-by: Darren Hart <dvhltc@us.ibm.com>
| * trace-cmd: Update tracecmd.py for tracecmd_open API changeDarren Hart2009-12-30
| | | | | | | | Signed-off-by: Darren Hart <dvhltc@us.ibm.com>
| * trace-cmd: Remove unecessary dependencies for the python targetDarren Hart2009-12-30
| | | | | | | | Signed-off-by: Darren Hart <dvhltc@us.ibm.com>
* | trace-view: Make CPU filter modify all cpus with other togglesSteven Rostedt2009-12-29
| | | | | | | | | | | | | | | | | | | | When clicking the All CPUs toggle, it will now select all the individual CPU toggle buttons. When disabling an individual CPU toggle, it will also disable the All CPUs toggle. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | trace-graph: Add separate drawing area to hold CPU labelsSteven Rostedt2009-12-29
| | | | | | | | | | | | This adds a separate drawing area to hald the CPU labels. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | trace-graph: Return generic widget for graphSteven Rostedt2009-12-29
| | | | | | | | | | | | | | | | | | | | | | In order to add another column to store the information of a bar (like CPU, or TASK) we need to have more than one widget and control the scrollwindow. This patch places the scrollwindow inside the management of the graph code, and returns a hbox to the caller. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | trace-graph: Fix the graph to be a bit more eye pleasingSteven Rostedt2009-12-29
| | | | | | | | | | | | | | | | | | Removed the "boxing" of tasks, and made them a solid bar. Moved the CPU line to the bottom as well. Moved the CPU labels below the bar. Reported-by: Darren Hart <dvhltc@us.ibm.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | Merge branch 'trace-cmd' into trace-viewSteven Rostedt2009-12-29
|\|
| * trace-cmd: Make print op NULL on error of processing argSteven Rostedt2009-12-29
| | | | | | | | | | | | | | | | | | | | If the processing of an arg fails, it frees the given token. But in this case, the token happens to also be assigned to an op. If the parsing fails, then the op may be freed twice causing glibc to abort. Reported-by: John Kacur <jkacur@redhat.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | Merge branch 'trace-cmd' into trace-viewSteven Rostedt2009-12-29
|\|
| * trace-cmd: Do not close dir if it was not openedSteven Rostedt2009-12-29
| | | | | | | | | | | | | | The fix for a memory leak with closedir incorrectly added the close in the fail path. There is no failure condition after the opendir. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | trace-view: Add getopt support to gui tools for input fileDarren Hart2009-12-29
| | | | | | | | | | | | Signed-off-by: Darren Hart <dvhltc@us.ibm.com> LKML-Reference: <4B3A5AD1.8020001@us.ibm.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | Merge branch 'trace-cmd' into trace-viewSteven Rostedt2009-12-29
|\|
| * trace-cmd: Add python specific files to .gitignoreSteven Rostedt2009-12-29
| | | | | | | | | | | | | | Add some generated files from python to the ignore list. Reported-by: Darren Hart <dvhltc@us.ibm.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>