aboutsummaryrefslogtreecommitdiffstats
path: root/parse-events.c
Commit message (Collapse)AuthorAge
* Fix print outputSteven Rostedt2009-11-23
| | | | | | | | The standard print statement would use a zero size field for the string data. This was not handled well, and the print statement never printed any data. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* Add comment for '#' workaroundSteven Rostedt2009-11-23
| | | | | | | The '#' is just a work around and needs to be correct. Add a comment to remind us to fix this later. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* "handle" alternate printf formatJohannes Berg2009-11-23
| | | | | | | | | The '#' can be ignored most of the time, right now we always print %x as 0x... for instance, so the # adds nothing. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* Handle old formatSteven Rostedt2009-11-20
| | | | | | | | | Update to read the old file format for 2.6.30. It is very limited, but can process a little. Unfortunately, the printk_formats file is broken for 2.6.30. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* Do not die on bad op in process_opSteven Rostedt2009-11-20
| | | | | | | Instead of killing the program, simply warn and continue when we encounter a bad op. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* Fix up function graph time spacingSteven Rostedt2009-11-20
| | | | | | | The conversion of the parse-events.c to use trace-seq, broke the spacing of the function graph tracer timings. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* Convert parse-envents.c to use trace_seq for outputSteven Rostedt2009-11-16
| | | | | | | To allow other users to take adavantage of the parse-events code, convert it to trace_seq. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* add -std=gnu99 to compilingSteven Rostedt2009-10-14
| | | | | | | | | Perf uses -std=gnu99 which causes some strange side effects. To keep parse-events.c close to what is in perf, we use the same option. Namely, it makes us typecast the options for "%a" in the sscanf to float. Signed-off-by: Steven Rostedt <srostedt@redhat.com>
* add '+' to parsing in print formatSteven Rostedt2009-10-14
| | | | Signed-off-by: Steven Rostedt <srostedt@redhat.com>
* remove all char * typecasts and use const in prototypeSteven Rostedt2009-10-14
| | | | | | | | The (char *) for all the static strings was a fix for the symptom and not the disease. The real issue was that the function prototypes needed to be declared "const char *". Signed-off-by: Steven Rostedt <srostedt@redhat.com>
* make the code closer to what is in perfSteven Rostedt2009-10-14
| | | | Signed-off-by: Steven Rostedt <srostedt@redhat.com>
* handle '-' op in print formatSteven Rostedt2009-10-14
| | | | | | To be done, we need to also handle '+', '--', and '++' Signed-off-by: Steven Rostedt <srostedt@redhat.com>
* port over changes from perfFrederic Weisbecker2009-10-14
| | | | | | | Frederic Weisbecker added a bunch of changes to the perf code. This is a port of his work to trace-cmd. Signed-off-by: Steven Rostedt <srostedt@redhat.com>
* add #define _GNU_SOURCE for sscanf to work with %asSteven Rostedt2009-10-14
| | | | Signed-off-by: Steven Rostedt <srostedt@redhat.com>
* handle new "signed" field in format layoutSteven Rostedt2009-10-13
| | | | Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* clean up the latency format code to include more infoSteven Rostedt2009-10-13
| | | | Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* add space after latency formatSteven Rostedt2009-10-13
| | | | | | The event output and the latency info are together with no spaces. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* add latency format option to all outputSteven Rostedt2009-10-13
| | | | | | | All traces have info about interrupts disabled, preempt count and needing rescheduling. Add an option to expose these. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* fix bprintk printingSteven Rostedt2009-10-13
| | | | | | | The handling of bprintk was broken in more ways than one. This fixes those issues. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* Handle print formats with tabs and newlinesSteven Rostedt2009-10-13
| | | | | | The \n and \t were not converted. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* handle the printing of the '['Steven Rostedt2009-10-13
| | | | | | | | The bracket could be parsed, but it was not read. Handle array for types of long. This only works with arrays of long. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* handle new ftrace formatSteven Rostedt2009-10-13
| | | | | | | Ftrace items now have arguments. But use the fact that they may or may not exist to determine which version of the kernel is there. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* fix handling of '['Steven Rostedt2009-10-13
| | | | | | The left op of the '[' was not initialized to the original top arg. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* handle new lines between argsSteven Rostedt2009-10-13
| | | | | | | If a new line was between args, it could fail the parsing. Be more flexible with newlines. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* add '>' and '<' to valid opsSteven Rostedt2009-10-13
| | | | | | | The greater than and less then were implemented, but were not listed as valid ops. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* do not exit when parser fails on an eventSteven Rostedt2009-10-13
| | | | | | If an event fails to parse, just warn about it, and continue. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* handle '*' in typecastSteven Rostedt2009-10-12
| | | | | | This patch handles '*' being used in the typecast. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* handle array in print fieldSteven Rostedt2009-10-12
| | | | | | | This may only handle the array parsing. It does not do anything with the output (yet). Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* handle '\' in print format.Steven Rostedt2009-10-12
| | | | | | The '\' code to handle '\"' was incorrect. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* handle print concatinationsSteven Rostedt2009-10-12
| | | | | | | | kmem_alloc ftrace event format had a string that was broken up by two tokens. "string 1" "string 2". This patch lets the parser be able to handle the concatination. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* Fix bug that made %pf not work at the end of a fmt (and %pF not work at all)Josh Triplett2009-08-05
| | | | | | | | | | | When parsing %pf or %pF, pretty_print checked if the next character matched 'f' or 'F', and if so, set show_func to the character *after* that. If not at the end of the string, this would still have the effect of 'f', since pretty_print only checked for non-zero show_func; however, 'F' would not work. If at the end of the string, show_func would get the '\0', which disabled function printing entirely. Signed-off-by: Josh Triplett <josh@joshtriplett.org>
* print_str_arg: handle PRINT_ATOMJosh Triplett2009-08-05
| | | | | | | Normal string literals end up as PRINT_ATOM; handle that in print_str_arg. Signed-off-by: Josh Triplett <josh@joshtriplett.org>
* Handle == and !=Josh Triplett2009-08-05
| | | | | | | Make process_op handle == and !=, and make eval_arg_num handle != (it already handled ==). Signed-off-by: Josh Triplett <josh@joshtriplett.org>
* Tokenize == as a single token.Josh Triplett2009-08-05
| | | | Signed-off-by: Josh Triplett <josh@joshtriplett.org>
* Stop tokenizing !! as a single token.Josh Triplett2009-08-05
| | | | Signed-off-by: Josh Triplett <josh@joshtriplett.org>
* Fix typo: s/peak/peek/Josh Triplett2009-08-05
| | | | Signed-off-by: Josh Triplett <josh@joshtriplett.org>
* Add values of enum hrtimer_restart to known flags.Josh Triplett2009-08-05
| | | | Signed-off-by: Josh Triplett <josh@joshtriplett.org>
* Turn the list of known flags into a data structure.Josh Triplett2009-08-05
| | | | Signed-off-by: Josh Triplett <josh@joshtriplett.org>
* only print function name on "%pf" and not address offsetSteven Rostedt2009-07-21
| | | | Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* initialize left and right for equal opSteven Rostedt2009-07-21
| | | | | | | The equal '=' op did not have the left and right arguments initialized in the switch statement. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* handle bprint eventsSteven Rostedt2009-07-21
| | | | | | | | The ftrace bprint uses a special binary format to record trace_print events. This patch changes trace-cmd to handle the format. Part of that is to read (and record) the printk_formats file in the trace.dat. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* handle type []item formatSteven Rostedt2009-07-21
| | | | | | | Sometimes an array format may be shown as "type []item" instead of "type item[]". This patch makes the tool handle both formats. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* parse header_page from tracing/events directorySteven Rostedt2009-07-17
| | | | | | | | | Parse out the header_page from the tracing/events directory to get the page header offsets and sizes. We can also use the "commit" field to get the long size of the kernel, incase the kernel and the userspace have different word sizes. Signed-off-by: Steven Rostedt <srostedt@redhat.com>
* fix reading data from diffenent endian typesSteven Rostedt2009-07-17
| | | | | | | | | When testing a data file created on x86 on a PPC box, I found that there was a missing conversion of reading the values. This patch moves the data2host to the header file and converts the necessary fields. Signed-off-by: Steven Rostedt <srostedt@redhat.com>
* Added copyright headersSteven Rostedt2009-07-17
| | | | | | For the C files missing the copyright headers, this patch adds them. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* Initial addition of trace-cmd files.Steven Rostedt2009-07-17
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>