aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
...
* parse-events: Let function handlers be overriddenSteven Rostedt2010-03-23
| | | | | | | | | Now that plugins are in both system and user directories, the user directory is processed after the system directory. This makes it highly likely that a function handler may be added again. Instead of warning about it and failing let the new function handler override the previous one. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* build/trace-cmd: Add way to install system default pluginsSteven Rostedt2010-03-23
| | | | | | | | | | If the prefix in the make build is not $(HOME) then a system wide plugin directory is used (in $(prefix)/share/trace-cmd/plugins). This is then compiled into the tracecmd library so that it knows to look for the plugins there. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* parse-events: Handle operations within a conditionSteven Rostedt2010-03-23
| | | | | | | | The conditon ? : does not handle other operations within it (like << which the ext4 tracepoints added). This patch makes the conditions handle operations within them. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-cmd: Add options to trace.dat fileSteven Rostedt2010-03-23
| | | | | | | | Add the start of option to the trace.dat file. This will allow later versions of the file to add data without breaking older versions of trace-cmd. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-cmd: Added jbd2 pluginSteven Rostedt2010-03-23
| | | | | | | Added the jbd2 plugin that adds the helper functions to handle jbd2_dev_to_name() and jiffies_to_msecs(). Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* parse-events: Add hook for plugins to register function handlingSteven Rostedt2010-03-23
| | | | | | | | | | | Sometimes an event may use a helper function inside the print format. Unfortunately, parse-events does not know how to handle these. This patch adds a registration function pevent_register_print_function() That a plugin can use to register how to handle helper functions in the event's print format. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* parse-events: Handle failure of process opSteven Rostedt2010-03-23
| | | | | | | | | | If the process_op fails in event_read_print_args the failure will go unnoticed. Also do zero out the right arg on failed condition, since it may point back to the original arg and cause a double free. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* parse-events: Fix freeing of failed condition (part 2)Steven Rostedt2010-03-22
| | | | | | | The *tok is already set to NULL, the token variable is allocated. We need to free that instead of *tok. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* parse-events: Fix freeing of failed conditionSteven Rostedt2010-03-22
| | | | | | | | If the condition processing fails, we free right and left args but they are already assigned to the main arg so that it would be freed again when the main arg is freed. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-cmd: Move the printing of the mac address into its own functionSteven Rostedt2010-03-19
| | | | Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* parse-event: Test for field type in print format "%pM"Steven Rostedt2010-03-19
| | | | | | | | | | The processing of the "%pM" just assumes that the print_arg is of field type. This may not be the case and if it is not, then it will have unpredictable results. Test to make sure the field type is what is expected. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-cmd: Only show plugins that are loaded when -V is usedSteven Rostedt2010-03-19
| | | | | | | The output of the plugins being loaded, while useful, are quite annoying. Make it default off and add an option to display them. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-cmd: Add -h to to show help without a commandSteven Rostedt2010-03-19
| | | | | | | | | | trace-cmd -h or trace-cmd help both show an error with the arguments. This patch fixes this to just display the help message. Report-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-cmd: Documentation - various spelling fixes.John Kacur2010-03-19
| | | | | Signed-off-by: John Kacur <jkacur@redhat.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-cmd: add TAGS and tags to .gitignore.John Kacur2010-03-19
| | | | | Signed-off-by: John Kacur <jkacur@redhat.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* build: Makefile, add ctags for (g)vimJohn Kacur2010-03-19
| | | | | | | | | Add the ability to make tags for (g)vim. Also, add a section in clean that removes TAGS and tags Signed-off-by: John Kacur <jkacur@redhat.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* build: Add support for building out of tree with O=/object/output/dirSteven Rostedt2010-03-19
| | | | | | | | | | | | Some people prefer to have the build output be done out of tree. This follows the Linux method of building the objects in another path. make O=~/mypath Will build the objects and the executables into the ~/mypath directory. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* build: Add install for executablesSteven Rostedt2010-03-10
| | | | Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-cmd: Register plugins before reading eventsSteven Rostedt2010-03-10
| | | | | | | | Register plugins before events are read. This will remove warnings about events that can not be parsed event though a plugin will read that event anyway. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-cmd: Change printf to pr_stat() in registering pluginsSteven Rostedt2010-03-10
| | | | Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* parse-events: Let plugins be registered before reading eventsSteven Rostedt2010-03-10
| | | | | | | | Allow a plugin to be registered before reading events. This will enable plugins to be registered, and then not warn about events that do not parse, if a plugin is registered for that event. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-cmd: Have -q also remove printing overrinding event outputsSteven Rostedt2010-03-10
| | | | | | | Make the -q option of trace-cmd report silence the outputs of overriding event callbacks. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* parse-event: Add pr_stat()Steven Rostedt2010-03-09
| | | | | | | Added a pr_stat() function to print out status that can also be used by applications to override it. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-cmd: Add '-q' to trace-cmd report to silence warningsSteven Rostedt2010-03-09
| | | | | | | Added a -q option to trace-cmd report that will not print out warnings about parsing errors. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-cmd: Add Makefile to build man pagesSteven Rostedt2010-03-08
| | | | | | | | | | | Add a Makefile that has logic to build a man page. It is still very primitive and uses ascriidoc and xsltproc to do the formating. But instead of build my own xsl file or putting together one from others, I decided to use xsl files that already exist by doing a locate on manpages/docbook.xsl, and using what is found. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-cmd: Add documentation that will become manpages for trace-cmdSteven Rostedt2010-03-05
| | | | | | Added a Documentation directory that will become the trace-cmd manpages. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-view: Keep selected row after CPU filtersSteven Rostedt2010-03-04
| | | | | | | | | | | After a CPU filtering event happened, the selected row was lost and the first row is selected. This gets annoying when you have a row selected and want to filter out the other CPUs. You would lose the row and then have to search for it again. This patch reselects the selected row after a CPU filter change. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-cmd: Don't crash on printk format errorsSteven Rostedt2010-03-03
| | | | | | | | For some reason the trace-cmd split caused the printk format to have lonely ":" on the line which caused the parsing to break. Just warn instead of crashing. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-record: Fix bug with using wrong file descriptorJiri Olsa2010-02-25
| | | | | | | | | tracecmd_create_recorder opens with fd, but then incorrectly checks recorder->fd. Signed-off-by: Jiri Olsa <jolsa@redhat.com> LKML-Reference: <1267119647-16775-1-git-send-email-jolsa@redhat.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-cmd: Add -b option to change ring buffer sizeSteven Rostedt2010-02-25
| | | | | | | Add the -b option to record and reset to allow the user to modify the ftrace ring buffer size in kilobytes per CPU. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-cmd: Add -t to force use of TCP for live connectionSteven Rostedt2010-02-24
| | | | | | | | | Add the option -t for use with -N on record, to force the use of TCP instead of UDP in recording the trace output. This makes the connection more reliable at the cost of performance and noise in the trace. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-cmd: Do not bail on failing mmap on second CPU if first had no sizeSteven Rostedt2010-02-24
| | | | | | | | | | | | If the first CPU had no size, and the second CPU failed to mmap, do not fail the entire trace-cmd report. The mmap check is not done on CPUs with no size. If the mmap fails, then check the previous CPUs to see if any of them had size, and if so then bail. But if none did, then continue. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-cmd: Fix accept in listen for tcp client readSteven Rostedt2010-02-24
| | | | | | | | | | | The peer_addr_len was not being initialized for use with accept in the TCP version of the client read. This caused the accept to fail. Also added error checks and printing of the fact that the client requested using TCP. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-cmd: Use TCP if page size is too big for UDPSteven Rostedt2010-02-24
| | | | | | | | | If the kernel page size is too big (as it can be with PPC and other archs), we switch to using TCP for the live reads. This may impact performance, but still lets the code work. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* parse-events: Fix endian bug in get_str()Steven Rostedt2010-02-24
| | | | | | | | The get_str() code was missing an endian conversion. Also the macros for data2hast needed parenthesis. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-cmd: Stop recording if the recorder failsSteven Rostedt2010-02-24
| | | | | | | Add a check to the recorder to see if it failed. If it did, stop processing. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-cmd: Remove some dead code from trace-listen.cSteven Rostedt2010-02-24
| | | | Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-cmd: Add new trace-cmd listen, and record -NSteven Rostedt2010-02-24
| | | | | | | | | | | | | | | | | | | | | | Add a way to record the trace remotely. On a remote box, one can start trace-cmd like: trace-cmd listen -p 1234 Then the local box that wants to trace can run: trace-cmd record -e all -N otherhost:1234 command Instead of writing to trace.dat, the record will send the data over the network using TCP and UDP and the trace.dat file will be created on the remote host. The remote host will save the file as trace.host:port.dat TCP is used to send the recording box information, and UDP is used to send the live data from the trace. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-cmd: Add tracecmd_attach_cpu_data()Steven Rostedt2010-02-24
| | | | | | | | | Added the functions tracecmd_attach_cpu_data() and tracecmd_attach_cpu_data_fd() to allow a already created output file, that does not have its CPU data attached, to attached the cpu data to it. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-cmd: Add fd versions of some trace.dat writersSteven Rostedt2010-02-23
| | | | | | | Add some verisons of tracecmd_output that allows to pass in an already opened file descriptor. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-filter: Added op commbo box to show available opsSteven Rostedt2010-02-22
| | | | | | | Added a ops combo box that lets the user know what ops are allowed in the advanced filter. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* parse-events: Restructure advanced filter to handle arithmeticSteven Rostedt2010-02-22
| | | | | | | | | | | | | | | Have fields be compared to each other and have mathmatic algorithms applied. Now we can do: funcgraph_exit : rettime - calltime > 1000000 Or sched_wakeup : pid == common_pid Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-graph: Set marker A with just clicking mouseSteven Rostedt2010-02-22
| | | | | | | Make the click without moving the mouse set Marker A. The click with shift sets Marker B. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-graph: Have marker labels have the color of their linesSteven Rostedt2010-02-20
| | | | | | | Change the "A:" and "B:" to have the same background colors of the lines that represent them. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-graph: Have status marker times with white backgroundSteven Rostedt2010-02-19
| | | | | | | | It's hard to see the times in the status bar if everything has a grey background. Make the times have a white background, it makes it easier to see. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-graph: Add status bar and marker line infoSteven Rostedt2010-02-19
| | | | | | | | | | Using shift and drag, a marker is made, where Marker A is green and Marker B is red. The time stamps of the markers as well as the delta between them is shown in a new status bar above the graph. Requested-by: Darren Hart <dvhltc@us.ibm.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-graph: Change drag from zoom to time differenceSteven Rostedt2010-02-19
| | | | | | | Make the drag show the time difference between two points and change zoom to be shift+drag. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-graph: Show running sched out latenciesSteven Rostedt2010-02-19
| | | | | | | Add a empty red box when scheduled out, and make wakeup latencies green. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-graph: Fix return of trace_graph_check_sched_switch()Steven Rostedt2010-02-19
| | | | | | Need to return the variable that "ret" is set as, not always 0. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* kernelshark/trace-cmd: Use command line as input_file if -i is left outSteven Rostedt2010-02-19
| | | | | | | | If a user types "kernelshark mytrace.dat" without using te -i option, still use the mytrace.dat as the input file for the trace, instead of the default trace.dat. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>