aboutsummaryrefslogtreecommitdiffstats
path: root/trace-ftrace.c
Commit message (Collapse)AuthorAge
* 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-cmd: Remove uses of tracecmd_refresh_record()Steven Rostedt2009-12-29
| | | | | | | | With the new page ref counts, there's no need for the tracecmd_refresh_record() call. We'll keep it around, but it is now labeled as obsolete. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-cmd: Have function graph keep record aroundSteven Rostedt2009-12-18
| | | | | | | | | | | | | | | | | | | The function graph tracer looks forward in the trace to determine if a function is a leaf or not. In doing so, it causes the mapping of records to change. This produces a nasty side effect where the caller can have the record stored, and it will suddenly invalidate the record's mapping. This refreshes the record passed in and does a trick by calling the tracecmd_peek_data function that will cache the location after the leaf function's return entry. This unfortunately causes a side effect too where if the last entry in the trace is a leaf function, we can't hide the exit entry and it will print regardless. But this side effect wont crash the application, but the previous side effect will. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-cmd/pevent: Remove passing of cpu to pevent prasing functionsSteven Rostedt2009-12-18
| | | | | | | Now that the struct record holds the cpu information, there's no need to pass the cpu number to the pevent parsing routines. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-cmd: Pass in record to pevent functionsSteven Rostedt2009-12-18
| | | | | | | | | | Instead of passing in the data, size and timestamp to the pevent parsing routines, pass in the record itself. This allows the pevent parsing routines to have a bit more control and facilitates the need of future work where we need to know more about the record in the parser. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* trace-cmd: Rename struct event to struct event_formatSteven Rostedt2009-12-17
| | | | | | | | Calling the event format parser "struct event" may lead to confusion about if the struct actually represents an instance of an event instead of what it really is: a format descriptor. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* Add override handler to handle kernel stack trace entrySteven Rostedt2009-12-10
| | | | Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* Rename tracecmd_handle to tracecmd_inputSteven Rostedt2009-12-04
| | | | | | | | | | | We will soon be adding write functionality to the tracecmd library. This will require a new and separate handle than what is used by the file reader. "handle" is too generic. Rename it to "input" so we can make the output handle called tracecmd_output. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* Add handler to pevent functionsSteven Rostedt2009-12-04
| | | | | | | | | Currently pevent uses global variables to store the event types. This will eventually bite us since we may someday want to be able to read multiple files with different formats. This patch adds a handle to pevent, to keep it encapsulated. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* Space out events more evenlySteven Rostedt2009-12-02
| | | | | | | The data for the events in the output looks better if most of them are lined up in a column. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* Remove trace_read_data() and trace_peek_data()Steven Rostedt2009-11-26
| | | | | | | | | | | | | | | | | | The trace_read_data and trace_peek_data() required a global file descriptor for reading. This was kept because the library libparsevent had the function graph tracer implementation and required a callback to read. This code has been moved out of parse_events.c and into a special override function. Now it still uses the global read, but since libtracecmd has a little more scope than libparsevent, we added a thread variable tracecmd_curr_thread_handle This is unique per thread, and is set right after data is read. Yes there are some races, but we can deal with it for now. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* Make function graph a special overrideSteven Rostedt2009-11-26
| | | | | | | | | | | The function graph tracer is a special case in libparsevent. It is also the reason for the work arounds in tracecmd with the callback to trace_read_data() and trace_peek_data(). This patch moves the function graph tracer as a override and out of the libparsevent. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* A callback plugin may need to know the timestamp it happened onSteven Rostedt2009-11-26
| | | | | | | | | Callbacks in plugins may need to know what the timestamp was when the trace was occurred. This patch gives the callback its timestamp in nanoseconds. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* A callback plugin may need to know what cpu it is onSteven Rostedt2009-11-26
| | | | | | | Callbacks in plugins may need to know what cpu the trace was recorded on. This patch gives the callback the cpu it is on. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* Create default event override for function tracerSteven Rostedt2009-11-25
The libparsevent currently does special cases for the function tracer. This patch replaces the special case with a event override. This is loaded by libtracecmd. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>