Commit 371a3378 authored by Alexey Budankov's avatar Alexey Budankov Committed by Arnaldo Carvalho de Melo

perf inject: Enable COMPRESSED record decompression

Initialized decompression part of Zstd based API so COMPRESSED records
would be decompressed into the resulting output data file.
Signed-off-by: default avatarAlexey Budankov <alexey.budankov@linux.intel.com>
Reviewed-by: default avatarJiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/c27d7500-ecdd-3569-cab5-8f70bbed5ea4@linux.intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent cb62c6f1
...@@ -837,6 +837,9 @@ int cmd_inject(int argc, const char **argv) ...@@ -837,6 +837,9 @@ int cmd_inject(int argc, const char **argv)
if (inject.session == NULL) if (inject.session == NULL)
return -1; return -1;
if (zstd_init(&(inject.session->zstd_data), 0) < 0)
pr_warning("Decompression initialization failed.\n");
if (inject.build_ids) { if (inject.build_ids) {
/* /*
* to make sure the mmap records are ordered correctly * to make sure the mmap records are ordered correctly
...@@ -867,6 +870,7 @@ int cmd_inject(int argc, const char **argv) ...@@ -867,6 +870,7 @@ int cmd_inject(int argc, const char **argv)
ret = __cmd_inject(&inject); ret = __cmd_inject(&inject);
out_delete: out_delete:
zstd_fini(&(inject.session->zstd_data));
perf_session__delete(inject.session); perf_session__delete(inject.session);
return ret; return ret;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment