linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexey Budankov <alexey.budankov@linux.intel.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>, Andi Kleen <ak@linux.intel.com>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH v10 11/12] perf inject: enable COMPRESSED records decompression
Date: Mon, 18 Mar 2019 20:45:44 +0300	[thread overview]
Message-ID: <c27d7500-ecdd-3569-cab5-8f70bbed5ea4@linux.intel.com> (raw)
In-Reply-To: <12cce142-6238-475b-b9aa-236531c12c2b@linux.intel.com>


Initialized decompression part of Zstd based API so COMPRESSED records
would be decompressed into the resulting output data file.

Signed-off-by: Alexey Budankov <alexey.budankov@linux.intel.com>
---
 tools/perf/builtin-inject.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c
index 24086b7f1b14..8e0e06d3edfc 100644
--- a/tools/perf/builtin-inject.c
+++ b/tools/perf/builtin-inject.c
@@ -837,6 +837,9 @@ int cmd_inject(int argc, const char **argv)
 	if (inject.session == NULL)
 		return -1;
 
+	if (zstd_init(&(inject.session->zstd_data), 0) < 0)
+		pr_warning("Decompression initialization failed.\n");
+
 	if (inject.build_ids) {
 		/*
 		 * to make sure the mmap records are ordered correctly
@@ -867,6 +870,7 @@ int cmd_inject(int argc, const char **argv)
 	ret = __cmd_inject(&inject);
 
 out_delete:
+	zstd_fini(&(inject.session->zstd_data));
 	perf_session__delete(inject.session);
 	return ret;
 }
-- 
2.20.1


  parent reply	other threads:[~2019-03-18 17:45 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-18 17:36 [PATCH v10 00/12] perf: enable compression of record mode trace to save storage space Alexey Budankov
2019-03-18 17:39 ` [PATCH v10 01/12] feature: implement libzstd check, LIBZSTD_DIR and NO_LIBZSTD defines Alexey Budankov
2019-04-05 11:51   ` [tip:perf/core] tools build: Implement libzstd feature " tip-bot for Alexey Budankov
2019-03-18 17:40 ` [PATCH v10 02/12] perf record: implement --mmap-flush=<number> option Alexey Budankov
2019-03-29 19:02   ` Arnaldo Carvalho de Melo
2019-04-01  7:58     ` Alexey Budankov
2019-04-05 11:52   ` [tip:perf/core] perf record: Implement " tip-bot for Alexey Budankov
2019-03-18 17:41 ` [PATCH v10 03/12] perf session: define bytes_transferred and bytes_compressed metrics Alexey Budankov
2019-05-18  9:19   ` [tip:perf/core] perf session: Define 'bytes_transferred' and 'bytes_compressed' metrics tip-bot for Alexey Budankov
2019-03-18 17:41 ` [PATCH v10 04/12] perf record: implement COMPRESSED event record and its attributes Alexey Budankov
2019-05-18  9:20   ` [tip:perf/core] perf record: Implement " tip-bot for Alexey Budankov
2019-03-18 17:42 ` [PATCH v10 05/12] perf mmap: implement dedicated memory buffer for data compression Alexey Budankov
2019-05-18  9:21   ` [tip:perf/core] perf mmap: Implement " tip-bot for Alexey Budankov
2019-03-18 17:42 ` [PATCH v10 06/12] perf util: introduce Zstd streaming based compression API Alexey Budankov
2019-05-18  9:21   ` [tip:perf/core] perf tools: Introduce " tip-bot for Alexey Budankov
2019-03-18 17:43 ` [PATCH v10 07/12] perf record: implement compression for serial trace streaming Alexey Budankov
2019-05-18  9:22   ` [tip:perf/core] perf record: Implement " tip-bot for Alexey Budankov
2019-03-18 17:44 ` [PATCH v10 08/12] perf record: implement compression for AIO " Alexey Budankov
2019-05-18  9:23   ` [tip:perf/core] perf record: Implement " tip-bot for Alexey Budankov
2019-03-18 17:44 ` [PATCH v10 09/12] perf record: implement -z,--compression_level[=<n>] option Alexey Budankov
2019-05-14 20:04   ` Arnaldo Carvalho de Melo
2019-05-15  5:46     ` Alexey Budankov
2019-05-14 20:20   ` Arnaldo Carvalho de Melo
2019-05-14 21:46     ` Arnaldo Carvalho de Melo
2019-05-15  8:43       ` Alexey Budankov
2019-05-18  9:24   ` [tip:perf/core] perf record: Implement " tip-bot for Alexey Budankov
2019-03-18 17:45 ` [PATCH v10 10/12] perf report: implement record trace decompression Alexey Budankov
2019-05-18  9:23   ` [tip:perf/core] perf report: Add stub processing of compressed events for -D tip-bot for Alexey Budankov
2019-05-18  9:25   ` [tip:perf/core] perf report: Implement perf.data record decompression tip-bot for Alexey Budankov
2019-03-18 17:45 ` Alexey Budankov [this message]
2019-05-18  9:25   ` [tip:perf/core] perf inject: Enable COMPRESSED " tip-bot for Alexey Budankov
2019-03-18 17:46 ` [PATCH v10 12/12] perf tests: implement Zstd comp/decomp integration test Alexey Budankov
2019-05-18  9:26   ` [tip:perf/core] perf tests: Implement " tip-bot for Alexey Budankov
2019-03-28  9:28 ` [PATCH v10 00/12] perf: enable compression of record mode trace to save storage space Alexey Budankov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c27d7500-ecdd-3569-cab5-8f70bbed5ea4@linux.intel.com \
    --to=alexey.budankov@linux.intel.com \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).