aboutsummaryrefslogtreecommitdiff
path: root/trace_ops.h
AgeCommit message (Collapse)Author
2015-01-22Simplify event counting while loading a traceTuukka Tikkanen
load_text_data_line() has been split out of the original trace file loading loop. The original code incremented event count at the points of code that had successfully completed importing a single event. As the new function additionally now returns a return code indicating success, this incrementation can be done at the call site. This removes the need to pass a pointer to the count variable and allows further cleanup of the code. Signed-off-by: Tuukka Tikkanen <tuukka.tikkanen@linaro.org>
2015-01-05Idlestat: Update copyright boilerplates and bump version to 0.5Tuukka Tikkanen
Many of the source files were missing copyright headers. Headers have been added to all .c and .h files and existing headers were updates with contributor information. The version number was bumped up to 0.5 due to having many new features since last version number update. Signed-off-by: Tuukka Tikkanen <tuukka.tikkanen@linaro.org>
2015-01-02Idlestat: Add importing 'trace-cmd report' formatKoan-Sin Tan
trace-cmd(1) related tools are convenient for getting and processing traces using Ftrace Linux kernel internal tracer. Usually, trace-cmd-report(1) is used to convert files from trace-cmd's trace-cmd.dat(5) binary format to human readable text files. Signed-off-by: Koan-Sin Tan <freedom.tan@linaro.org> Reviewed-by: Tuukka Tikkanen <tuukka.tikkanen@linaro.org>
2014-12-12idlestat: Separate loading of different trace file formatsTuukka Tikkanen
This patch separates loading of different trace file formats to independent functions. In order to call the correct function for each trace file processed, each load function comes with a match function. Pointers to these functions are stored in a new struct trace_ops. In order to avoid static lists of trace file formats (e.g. implemented as static arrays or a number of registration function calls in main), pointers to all trace_ops structures are collected by the linker into a private segment. This creates an implicit array of the pointers, which may then be enumerated starting right after a globally linked element trace_ops_head. A sentinel NULL pointer trails the array. A helper macro EXPORT_TRACE_OPS is added for creating the special pointers. Signed-off-by: Tuukka Tikkanen <tuukka.tikkanen@linaro.org> Reviewed-by: Koan-Sin Tan <freedom.tan@linaro.org>