Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp636546img; Mon, 18 Mar 2019 10:46:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqypvQATx/YmGUNqPaIT1SluGYw4fDZadQcssLl5sM9bLHPIYF/LS1lPKOebpBCt9so8UrtD X-Received: by 2002:a65:62c5:: with SMTP id m5mr18517610pgv.77.1552931216150; Mon, 18 Mar 2019 10:46:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552931216; cv=none; d=google.com; s=arc-20160816; b=UZ9wLYJcz0Blko9/nWkI1xPGCKxgQTNwB/fRdbA/g9kWTOl8FeV3YRlJh4ljoZTLbh QUCNXEN57r+Uo9iiXmxk9iz5mcQQEl+8N/sPGqovaCOY27jo008tfOd+GLMc2qtvb9Fm 916yLNMLn1ZJFhR4E5Fy0a1Q+5jo215h7OsxHjH+wBFeimIUmi6t1x8k8pS/e81MXSnE qpECYxjQn706SLWh5yoMqMy+HUcEtprVFPmAu5n6fe/VOEJOwGpoiub5RZMOaE7Pq1e4 oQnQMGWsAJxjvineJj3GHRB0Fz9Drq2RVkkl9/PTiQrQ3vqzM1MYCfl0yBcmCv7IYf4j bALw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:references:cc:to:from:subject; bh=X1m24NXfp7YHuycvvhRZbxxA8N7D6GEgh9O1cnkVz94=; b=d/BeEslMj0YVcfdM0nrjyDUmwYvSKu8ZBSpiTWDvSfrK4z33tXYI0e10hsiPV2AMLz nCPVktWzjXE+sWLotKugnC7UecD0XOoc27eiY+J7e/BXZvmtHB4NGOl9Xro1TwTJpS47 QdmLNyQfJUFYeCph/EvcnS5qLK8djje62rff6C/CyKkIA6aTFs7Fkva01hZUN9EadHBU IGZh8Lfbv/wjH9Tfp/tBNUjRvMPRnzYJCUHAMhN5bpGi9uFdbqdS1SfAalYX3BLL7vGW lIRcBgbzRkV2ScDpKU4XSzLxcyeollWY9A5yOdWVhDTM20sLOhEC5njlCUYZ+wb+GAJ5 BC4A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i22si9374803pgj.178.2019.03.18.10.46.41; Mon, 18 Mar 2019 10:46:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727926AbfCRRpy (ORCPT + 99 others); Mon, 18 Mar 2019 13:45:54 -0400 Received: from mga04.intel.com ([192.55.52.120]:42008 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727298AbfCRRpt (ORCPT ); Mon, 18 Mar 2019 13:45:49 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Mar 2019 10:45:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,494,1544515200"; d="scan'208";a="308245987" Received: from linux.intel.com ([10.54.29.200]) by orsmga005.jf.intel.com with ESMTP; 18 Mar 2019 10:45:47 -0700 Received: from [10.251.91.19] (abudanko-mobl.ccr.corp.intel.com [10.251.91.19]) by linux.intel.com (Postfix) with ESMTP id B612358052E; Mon, 18 Mar 2019 10:45:45 -0700 (PDT) Subject: [PATCH v10 11/12] perf inject: enable COMPRESSED records decompression From: Alexey Budankov To: Arnaldo Carvalho de Melo Cc: Jiri Olsa , Namhyung Kim , Alexander Shishkin , Peter Zijlstra , Ingo Molnar , Andi Kleen , linux-kernel References: <12cce142-6238-475b-b9aa-236531c12c2b@linux.intel.com> Organization: Intel Corp. Message-ID: Date: Mon, 18 Mar 2019 20:45:44 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <12cce142-6238-475b-b9aa-236531c12c2b@linux.intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Initialized decompression part of Zstd based API so COMPRESSED records would be decompressed into the resulting output data file. Signed-off-by: Alexey Budankov --- 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