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=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT 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 6AD62C282C4 for ; Tue, 12 Feb 2019 13:09:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 45660217D9 for ; Tue, 12 Feb 2019 13:09:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729761AbfBLNJg (ORCPT ); Tue, 12 Feb 2019 08:09:36 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53878 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729619AbfBLNJd (ORCPT ); Tue, 12 Feb 2019 08:09:33 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 37CA987632; Tue, 12 Feb 2019 13:09:33 +0000 (UTC) Received: from krava (unknown [10.43.17.136]) by smtp.corp.redhat.com (Postfix) with SMTP id 8D3CB6019F; Tue, 12 Feb 2019 13:09:31 +0000 (UTC) Date: Tue, 12 Feb 2019 14:09:30 +0100 From: Jiri Olsa To: Alexey Budankov Cc: Arnaldo Carvalho de Melo , Ingo Molnar , Peter Zijlstra , Namhyung Kim , Alexander Shishkin , Andi Kleen , linux-kernel Subject: Re: [PATCH v2 4/4] perf report: support record trace file decompression Message-ID: <20190212130930.GN775@krava> References: <044ee2be-2e1d-e90f-7317-40083b5e716c@linux.intel.com> <4f45c930-cf39-76b0-5c56-ee4fb0705fa3@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4f45c930-cf39-76b0-5c56-ee4fb0705fa3@linux.intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 12 Feb 2019 13:09:33 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 11, 2019 at 11:25:00PM +0300, Alexey Budankov wrote: SNIP > @@ -1932,6 +2059,38 @@ fetch_mmaped_event(struct perf_session *session, > return event; > } > > +static int __perf_session__process_decomp_events(struct perf_session *session) > +{ > + s64 skip; > + u64 size, file_pos = 0; > + union perf_event *event; > + struct decomp *decomp = session->decomp_last; > + > + if (!decomp) > + return 0; > + > + while (decomp->head < decomp->size && !session_done()) { so how this actualy works? does one PERF_RECORD_COMPRESSED event carry complete data to unpack? or you wait to receive more PERF_RECORD_COMPRESSED to give you data you can unpack? jirka