@@ -232,6 +232,8 @@ int tracecmd_set_cursor(struct tracecmd_input *handle,
unsigned long long
tracecmd_get_cursor(struct tracecmd_input *handle, int cpu);
+unsigned long tracecmd_get_in_file_version(struct tracecmd_input *handle);
+
int tracecmd_ftrace_overrides(struct tracecmd_input *handle, struct tracecmd_ftrace *finfo);
bool tracecmd_get_use_trace_clock(struct tracecmd_input *handle);
tracecmd_show_data_func
@@ -4046,6 +4046,15 @@ struct tep_handle *tracecmd_get_tep(struct tracecmd_input *handle)
return handle->pevent;
}
+/**
+ * tracecmd_get_in_file_version - return the trace.dat file version
+ * @handle: input handle for the trace.dat file
+ */
+unsigned long tracecmd_get_in_file_version(struct tracecmd_input *handle)
+{
+ return handle->file_version;
+}
+
/**
* tracecmd_get_use_trace_clock - return use_trace_clock
* @handle: input handle for the trace.dat file
Added an API to get the version of the trace file, associated with given input file handler. tracecmd_get_in_file_version() Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com> --- lib/trace-cmd/include/private/trace-cmd-private.h | 2 ++ lib/trace-cmd/trace-input.c | 9 +++++++++ 2 files changed, 11 insertions(+)