Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3260507pxb; Wed, 13 Oct 2021 02:18:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzr/O59oKOKMXqr5t7dYwM+n9Z7A+p6J7iIO1ENZSLDFwWTpfhf5OT6TXKb0MoTgur7j7EL X-Received: by 2002:a17:90b:193:: with SMTP id t19mr12046655pjs.95.1634116706203; Wed, 13 Oct 2021 02:18:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634116706; cv=none; d=google.com; s=arc-20160816; b=KU9/hBOjLYeC9nhhrrUekgqURPq5Ts3Z1Wp17Sc8NbcveIlCah8NiiYr34dmGtWRic l/P0VF5HD7dy9ONbHxPWmMG94dUiL1HmYsKBXGnjfBGsBuFPLK/R/qm2PcTZcAPJ5lM3 yda7xoq9F+xBbqZWvAjlM1R7yWYz+3vm4RaqemAwVZkeSTj5LmLzFES/HB5yAGfaSVZq bGElfi28mTUDo8t/clYFFP++ZWE4nXpmJeaHGcUs1BNQPqELE1iAapQo63xI5/aHfDfb mmAamOVyKcbCzuFtSm+bnITqhDdfXKMO+GUKuN12AfDM0iTHdHRIGhIS7DGQ1dtx8To3 DVTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :references:cc:to:from:subject; bh=RXwzAe73YMQpbCI1Wrs4hYhoRsk4e/6xzPNgJiEZZTY=; b=p6Xf0l3s9EqpQpvzaZ8nV82wGCq3h/NXUUv3lBjXEmxWFqIeZgRXN75jBoaj1DbMKf FsjIDxyvumF2S9jG07092cqxrtqKAdj4lEc7W+bFOGsH0Uk12I/ypuNR7PhYCbE2lDxA WQYQVsOrybhuj9hmu8c4hYvNJEYTH+VJXh6yB/SOWvN3SUeY2PgeYKsnuFY8sJctwCZn bVWZ0s4HyvH7p4xRkuUbbrGJs8vFk09ysnKvoroCBtVggp5tW1W9/iPW+ZBq0RLlGAkC ZphZF/82se/Spp+1dHP37J89pZNjRpl6WoU95THQr0nTkhE5DtRQkJjh5v0Rs1wtPgJh GI+Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id u11si14013802plf.425.2021.10.13.02.18.13; Wed, 13 Oct 2021 02:18:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S238942AbhJMJTR (ORCPT + 99 others); Wed, 13 Oct 2021 05:19:17 -0400 Received: from mga07.intel.com ([134.134.136.100]:48932 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230045AbhJMJTP (ORCPT ); Wed, 13 Oct 2021 05:19:15 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10135"; a="290878653" X-IronPort-AV: E=Sophos;i="5.85,370,1624345200"; d="scan'208";a="290878653" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Oct 2021 02:17:13 -0700 X-IronPort-AV: E=Sophos;i="5.85,370,1624345200"; d="scan'208";a="480721077" Received: from abaydur-mobl1.ccr.corp.intel.com (HELO [10.249.230.131]) ([10.249.230.131]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Oct 2021 02:17:08 -0700 Subject: Re: [PATCH v3 0/8] perf session: Extend reader object to allow multiple readers From: "Bayduraev, Alexey V" To: Arnaldo Carvalho de Melo Cc: Jiri Olsa , Namhyung Kim , Alexander Shishkin , Peter Zijlstra , Ingo Molnar , linux-kernel , Andi Kleen , Adrian Hunter , Alexander Antonov , Alexei Budankov , Riccardo Mancini References: Organization: Intel Corporation Message-ID: <9365d01b-20a7-2ad2-2a50-b3661a47da9f@linux.intel.com> Date: Wed, 13 Oct 2021 12:17:05 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 13.10.2021 12:06, Alexey Bayduraev wrote:> Changes in v4:> - set/unset active_decomp within reader__process_events Sorry, The subject should of course be [PATCH v4 0/8] ... Regards, Alexey > > Changes in v3: > - removed struct reader_state in [PATCH v3 1/8] > - fixed repeating code in [PATCH v3 2/8] > - split [PATCH v2 4/5] to [PATCH v3 4/8], [PATCH v3 5/8] > - split [PATCH v2 5/5] to [PATCH v3 6/8] - [PATCH v3 8/8] > > Changes in v2: > - introduced struct decomp_data suggested by Jiri Olsa > - removed unnecessary [PATCH v1 1/6] > - removed unnecessary extra line in [PATCH v2 4/5] > - removed unnecessary reader_state.eof flag in [PATCH v2 5/5] > > Patchset moves state info and decompressor object into reader object > that made possible to split reader__process_events function into three > logical parts: init, map/unmap and single event reader which are used > in events reader loop. This approach allows reading multiple trace > files at the same time. > > The design and implementation are based on the prototype [1], [2]. > The patchset was separated from [3]. > > Tested: > > tools/perf/perf record -o prof.data -- matrix.gcc.g.O3 > tools/perf/perf record -o prof.data -z -- matrix.gcc.g.O3 > tools/perf/perf report -i prof.data > tools/perf/perf report -i prof.data --call-graph=callee > tools/perf/perf report -i prof.data --stdio --header > tools/perf/perf report -i prof.data -D --header > > [1] git clone https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git -b perf/record_threads > [2] https://lore.kernel.org/lkml/20180913125450.21342-1-jolsa@kernel.org/ > [3] https://lore.kernel.org/lkml/cover.1629186429.git.alexey.v.bayduraev@linux.intel.com/ > > Alexey Bayduraev (8): > perf session: Move all state items to reader object > perf session: Introduce decompressor in reader object > perf session: Move init/release code to separate functions > perf session: Move map code to separate function > perf session: Move unmap code to reader__mmap > perf session: Move event read code to separate function > perf session: Introduce reader return codes > perf session: Introduce reader EOF function > > tools/perf/util/session.c | 193 ++++++++++++++++++++++++++------------ > tools/perf/util/session.h | 10 +- > 2 files changed, 141 insertions(+), 62 deletions(-) >