aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
...
| * trace-view: Add save and load of task filtersSteven Rostedt2010-04-09
| | | | | | | | | | | | | | Include saving of the task filters to the filter file as well as the ability to load them. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
| * trace-view: Add pop-up task menu for filtering tasksSteven Rostedt2010-04-09
| | | | | | | | | | | | | | Add pop-up menu over the rows that will allow to filter on tasks in trace-view. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
| * trace-view: Add loading of saved event filtersSteven Rostedt2010-04-09
| | | | | | | | | | | | | | Add "Load filters" to trace-view that loads the event filters saved with a "Save filters". Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
| * trace-view: Added saving of filtersSteven Rostedt2010-04-09
| | | | | | | | | | | | | | Add "Save filters" to "File" menu, where it will allow the user to save the filters to a file in XML format. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
| * kernelshark: Created trace_get_file_dialog() to ask for filenameSteven Rostedt2010-04-09
| | | | | | | | | | | | | | Added shortcut trace_get_file_dialog() to simplify the asking for a file name. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
| * kernelshark: Add "Help" menu optionsSteven Rostedt2010-04-09
| | | | | | | | | | | | | | Add help content and about to menu options. Still need to write the help content, right now it just points to google. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
| * kernelshark: Add dialog helperSteven Rostedt2010-04-09
| | | | | | | | | | | | | | Add trace-dialog.c to include a trace_show_help() and trace_dialog() helpers. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | build: Add DESTDIR to makeSteven Rostedt2010-06-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the variable DESTDIR that allows a user to install into a directory that will later be moved to another host. This facilitates the creation of distribution packages. make DESTDIR=/tmp/build prefix=/usr install Will install the program files into /tmp/build/usr/.. but the program will expect to find itself in the /usr/.. directories. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | trace-cmd: Version 1.1.0-rc1Steven Rostedt2010-06-09
| | | | | | | | | | | | | | Separate out the difference between the stable releases and the developmental ones. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | build/doc: Use a substitution reference in man pages installJohn Kacur2010-06-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | subst will substitution every occurence of a string with another. What we want here is just to substitute the last occurence. That is we want to transform files that end with .1 into .1.install We do not want to transform every ".1" in a path name into .1.install. Without this fix you can get errors of this nature. make prefix=/home/jkacur/rpmbuild/BUILDROOT/trace-cmd-1.0.1-4.fc12.x86_64/usr install_doc make -C /home/jkacur/rpmbuild/BUILD/trace-cmd-1.0.1/Documentation install make[1]: *** No rule to make target `/home/jkacur/rpmbuild/BUILD/trace-cmd-1.0.1.install/Documentation/trace-cmd.1', needed by `/home/jkacur/rpmbuild/BUILD/trace-cmd-1.0.1.install/Documentation/trace-cmd.1.install'. Stop. make: *** [install_doc] Error 2 Signed-off-by: John Kacur <jkacur@redhat.com> LKML-Reference: <1276099288-3029-3-git-send-email-jkacur@redhat.com> Use a "substitution reference" instead of a substitution. A "subst" will change every occurence of a string Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | build: EXTRAVERSION should be set without a leading periodJohn Kacur2010-06-09
| | | | | | | | | | | | | | | | | | EXTRAVERSION should be set without a leading period, and then add the period where necessary in the Makefile Signed-off-by: John Kacur <jkacur@redhat.com> LKML-Reference: <1276099288-3029-2-git-send-email-jkacur@redhat.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | trace-graph: Use ref_count instead of comparisonsSteven Rostedt2010-06-09
| | | | | | | | | | | | | | | | | | | | In find_previous_record in the trace-plot, instead of checking if the last_record is equal to the start_record, simply up the ref count. Then the free will not free the start_record. This makes the code a bit cleaner. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | trace-cmd: Remove free_record from tracecmd_read_prevSteven Rostedt2010-06-09
| | | | | | | | | | | | Missed a free_record in the revert of the need to free peek data. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | trace-graph: Removed free_record() on peek dataSteven Rostedt2010-06-09
| | | | | | | | | | | | No need to free peek_data() in trace plots. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | trace-cmd: Remove left over debuggingSteven Rostedt2010-06-09
| | | | | | | | Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | trace-cmd: Revert need to free peek eventSteven Rostedt2010-06-08
| | | | | | | | | | | | | | | | Freeing records that were returned via "peek event" made things a bit more complex. Since the original code was written to determine that peek events should not be freed. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | trace-cmd: Add back locked recordSteven Rostedt2010-06-08
| | | | | | | | | | | | | | | | To debug when a record is being freed and still referenced internally, the "locked" field is added. This will flag when a record has been freed when it should not have been. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | build: Fix typo of PYTHON_PLUGINsSteven Rostedt2010-06-07
| | | | | | | | Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | build: Don't remove trace_plugin_dir twiceSteven Rostedt2010-06-07
| | | | | | | | | | | | | | | | | | The 'make clean' removes trace_plugin_dir twice. This is because CMD_TARGETS includes it, and it is also included directly with the clean Makefile target. Reported-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | trace-cmd: Have git ignore trace_python_dirSteven Rostedt2010-06-07
| | | | | | | | | | Reported-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | build: Use file names in BUILD_PYTHON macroSteven Rostedt2010-06-07
| | | | | | | | | | | | | | | | | | The BUILD_PYTHON macro is added to the CMD_TARGETS which is used also by 'make clean'. This requires that BUILD_PYTHON have the actual files that are built instead of the target names. Reported-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | trace-cmd: quote path definitionsJohannes Berg2010-06-07
| | | | | | | | | | | | | | | | | | Rather than using MAKE_STR(), quote path definitions on the command line so that the preprocessor sees a string already. This avoids problems with path names that aren't valid expressions. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | python plugin: modify sys.path only onceJohannes Berg2010-06-07
| | | | | | | | | | | | | | | | Rather than appending to sys.path for every loaded plugin, do it only once when initializing. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | trace-cmd: Add signal handler for SIGINT in trace-cmd readSteven Rostedt2010-06-07
| | | | | | | | | | | | | | | | When python plugins are loaded, they override SIGINT, and it becomes quite annoying that you can't stop a print with Ctrl-C. By adding a signal handler for SIGINT, we can stop the output with Ctrl-C. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | trace-cmd: Add PLYTHON_DIR to search path for the python pluginsSteven Rostedt2010-06-07
| | | | | | | | | | | | | | Automate the loading of the PYTHON_DIR to tell the plugins where to load the trace-cmd specific modules. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | build: Install python modules into the trace-cmd python directorySteven Rostedt2010-06-07
| | | | | | | | | | | | Install ctracecmd.so and python helpers into the python directory. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | build: Make a python directory to install toSteven Rostedt2010-06-07
| | | | | | | | | | | | | | Add a python directory under the share/trace-cmd/ directory that can store the libraries needed for PYTHONDIR. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | build: Install plugin_python.so if availableSteven Rostedt2010-06-04
| | | | | | | | | | | | If the plugin_python.so is built, then install it too. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | build: Add test to see if we can build pythonSteven Rostedt2010-06-04
| | | | | | | | | | | | | | Check if python-config works, and if it does, try to build the python code. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | parse-events: Do not fail on "FORMAT TOO BIG" event errorsSteven Rostedt2010-06-03
| | | | | | | | | | | | | | | | The new SCSI event formats are larger than a page, causing the kernel to print out "FORMAT TOO BIG" instead of the format. Just skip these events instead of dieing. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | trace-cmd: unify plugin loadingJohannes Berg2010-06-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a new externally visible function trace_util_load_plugins that takes a callback to load a given plugin, and use it in both the core to load .so plugins, and the python plugin to load .py plugins. Note that this changes the location from which python plugins are loaded. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> [ cleaned up whitespace damage ] Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | trace-cmd: Only C plugins that end with .soSteven Rostedt2010-06-01
| | | | | | | | | | | | | | | | | | In order to put python plugins in the plugin directory, we must keep the dlopen from opening them. Use the extensions to denote the type of plugin they are. The compiled C plugins should end with .so. The python plugins will end with .py. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | tracecmd.py: Complete Event dict abstractionJohannes Berg2010-05-27
| | | | | | | | | | | | | | | | | | Apart from being immutable, Event instances should behave like a dict. Use the DictMixin to make them support the remaining features. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | Merge branch 'python2' of http://git.sipsolutions.net/trace-cmd into trace-cmdSteven Rostedt2010-05-25
|\ \
| * | python pluginJohannes Berg2010-05-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a python plugin that can in turn load plugins written in python. To make it work, trace-cmd needs to load plugin modules with RTLD_GLOBAL so that the python interpreter's symbols will be available to python C extension modules. Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
| * | python: improve string handlingJohannes Berg2010-05-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds ev.str_field('foo') as a non-raising version of str(ev['foo']) that this patch also enables. A new C function is necessary because str(ev['foo'].data) may contain the NUL bytes that should have terminated the C strings. Suggested-by: Pierre Tardy <tardyp@gmail.com> Acked-by: Darren Hart <dvhltc@us.ibm.com> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
| * | python: cache propertiesJohannes Berg2010-05-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | Address one TODO item and cache all properties (since currently all of them are immutable). Acked-by: Darren Hart <dvhltc@us.ibm.com> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
| * | python: provide more classesJohannes Berg2010-05-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds more classes that can be used from python. Also, change the Event class a bit so that we pass in the format to be able to instantiate it from C later. Acked-by: Darren Hart <dvhltc@us.ibm.com> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
| * | python: provide more C methodsJohannes Berg2010-05-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | This provides the C methods for wrapping callbacks and the upcoming Event/Field classes. Acked-by: Darren Hart <dvhltc@us.ibm.com> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
| * | trace-cmd: make records refcountedJohannes Berg2010-05-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a callback wants to hold on to a record, it can then increase the refcount and keep it. This is most likely to happen with the upcoming python plugin. Since the underlying data pages are already refcounted, we can just add a refcount to struct record (rather than having the error checking with the 'locked' member). Acked-by: Darren Hart <dvhltc@us.ibm.com> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
| * | python: no default constructors/destructors for recordsJohannes Berg2010-05-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since there is no way we can generate valid records from python, there's no point in allowing swig to generate a constructor and destructor. This should probably be done to more of the structs too. Acked-by: Darren Hart <dvhltc@us.ibm.com> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
| * | python: avoid crashes with fieldsJohannes Berg2010-05-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When accessing a field that doesn't exist, we may get None, and then pass that NULL pointer to C -- catch that and make the num_field() method return None then. Acked-by: Darren Hart <dvhltc@us.ibm.com> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
| * | swig: properly wrap output parametersJohannes Berg2010-05-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | By using %apply rather than overriding, we can make the swig code smaller, generate less code and fewer warnings. Acked-by: Darren Hart <dvhltc@us.ibm.com> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
| * | python: use pseudo-private fieldsJohannes Berg2010-05-25
| | | | | | | | | | | | | | | | | | | | | | | | This is more idiomatic python since most other code shouldn't access these fields. Acked-by: Darren Hart <dvhltc@us.ibm.com> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
| * | python wrapper: do not pass Trace but peventJohannes Berg2010-05-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When it will be used for the python plugin, an Event will not have a Trace pointer in python directly available as that would not make a lot of sense since it is used for reading a trace file. But the event also doesn't need a Trace pointer, it just needs the pevent. Acked-by: Darren Hart <dvhltc@us.ibm.com> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
| * | tracecmd.py: use alloc, not openJohannes Berg2010-05-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | tracecmd_open will already read the header etc., whereas tracecmd_alloc doesn't and that is what is required here. Acked-by: Darren Hart <dvhltc@us.ibm.com> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
| * | swig: make python module depend on swig fileJohannes Berg2010-05-25
| | | | | | | | | | | | | | | | | | | | | | | | Just so it's easier to modify the swig file, make it depend on it. Acked-by: Darren Hart <dvhltc@us.ibm.com> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
* | | parse-events: Let dynamic arrays have element size 1 for stringsSteven Rostedt2010-05-25
| | | | | | | | | | | | | | | | | | | | | If a dynamic array is a string set its element size to 1. We can later handle shorts and ints. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | | parse-events: Fix segfault of print array processingSteven Rostedt2010-05-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | The reading of an element in an array assumed the arg was a field type event though the arg could have been of a dynamic array type. This caused a Seg fault when processing dynamic arrays. Reported-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* | | parse-events: Fix unaligned accesses while fetching trace valuesFrederic Weisbecker2010-05-24
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Accessing trace values of an 8 size may end up in a segfault on archs that can't deal with misaligned access, which is the case for sparc 64. This is because PERF_SAMPLE_RAW are aligned to 4 and not to 8. Fix this on the macros that get the values of 8 size. This fixes segfaults on perf tools in sparc 64. [ Got permission from Frederic to include this for LGPL trace-cmd ] Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <1274348659-15417-4-git-send-regression-fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Tom Zanussi <tzanussi@gmail.com> Cc: Masami Hiramatsu <mhiramat@redhat.com> Cc: David Miller <davem@davemloft.net> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>