@@ -236,6 +236,8 @@ unsigned long long
tracecmd_get_cursor(struct tracecmd_input *handle, int cpu);
unsigned long tracecmd_get_file_version(struct tracecmd_input *handle);
+struct tracecmd_compress_proto *
+tracecmd_get_file_comperssion(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);
@@ -4192,6 +4192,17 @@ unsigned long tracecmd_get_file_version(struct tracecmd_input *handle)
return handle->file_version;
}
+/**
+ * tracecmd_get_file_comperssion - return a handler to compression protocol,
+ * used to compress the trace file
+ * @handle: input handle for the trace.dat file
+ */
+struct tracecmd_compress_proto *
+tracecmd_get_file_comperssion(struct tracecmd_input *handle)
+{
+ return handle->z_proto;
+}
+
/**
* tracecmd_get_use_trace_clock - return use_trace_clock
* @handle: input handle for the trace.dat file
The new API returns a handler to compression algorithm, used to compress the trace file asociated with given input file handler: tracecmd_get_file_comperssion() 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 | 11 +++++++++++ 2 files changed, 13 insertions(+)