From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A40E1C43381 for ; Thu, 7 Mar 2019 08:26:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7ABBA20840 for ; Thu, 7 Mar 2019 08:26:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726375AbfCGI0b (ORCPT ); Thu, 7 Mar 2019 03:26:31 -0500 Received: from mga06.intel.com ([134.134.136.31]:18486 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726298AbfCGI0a (ORCPT ); Thu, 7 Mar 2019 03:26:30 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Mar 2019 00:26:29 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,451,1544515200"; d="scan'208";a="123397166" Received: from linux.intel.com ([10.54.29.200]) by orsmga008.jf.intel.com with ESMTP; 07 Mar 2019 00:26:29 -0800 Received: from [10.125.252.109] (abudanko-mobl.ccr.corp.intel.com [10.125.252.109]) by linux.intel.com (Postfix) with ESMTP id B955D580489; Thu, 7 Mar 2019 00:26:27 -0800 (PST) Subject: Re: [PATCH v5 07/10] perf record: implement -z,--compression_level=n option and compression To: Jiri Olsa Cc: Arnaldo Carvalho de Melo , Namhyung Kim , Alexander Shishkin , Peter Zijlstra , Ingo Molnar , Andi Kleen , linux-kernel References: <4d1b11a4-77ed-d9af-ed22-875fc17b6050@linux.intel.com> <87fa1906-2d6a-a00a-7ba5-b570d0cbf9cc@linux.intel.com> <20190305122631.GK16615@krava> From: Alexey Budankov Organization: Intel Corp. Message-ID: Date: Thu, 7 Mar 2019 11:26:26 +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: <20190305122631.GK16615@krava> 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 On 05.03.2019 15:26, Jiri Olsa wrote: > On Fri, Mar 01, 2019 at 06:58:32PM +0300, Alexey Budankov wrote: > > SNIP > >> >> +static size_t record__process_comp_header(void *record, size_t increment) >> +{ >> + struct compressed_event *event = record; >> + size_t size = sizeof(struct compressed_event); >> + >> + if (increment) { >> + event->header.size += increment; >> + return increment; >> + } else { >> + event->header.type = PERF_RECORD_COMPRESSED; >> + event->header.size = size; >> + return size; >> + } >> +} >> + >> +static size_t record__zstd_compress(void *data, void *dst, size_t dst_size, > > we use the __ to mark 'struct' related function, > which supposed to be the first argument.. IMO zstd_compress > will be fine in here in v7. ~Alexey > > jirka >