Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp4453327pxb; Tue, 5 Oct 2021 03:30:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5icr+xgxb3U4jti8QCgRIUCQWmoh9cTNL45wOzWsYF9asMoUzHFKDfUbS5fawhxDPqlqi X-Received: by 2002:a17:906:c014:: with SMTP id e20mr24139703ejz.166.1633429851946; Tue, 05 Oct 2021 03:30:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633429851; cv=none; d=google.com; s=arc-20160816; b=Xlk2hzIBRkc774wNn3ugzx+VOlOMsZ/50k7P2T05MkUnYmjytApvDklk4xW3syX0zi jtICFaiBEuc6sS7T6xd631wlC5uvOxCyJKcKCmo4eRh63OEH/LoIKYQz4bSk+pHKeXBR XVlkW02Xvnygsohl5glNPOF9kHQGA2boWDkI70PWoR8iDblgoR50blxUoXMW9ETZzkNP ekKdg5fQ4HSE3SFJ//YN0VFubVJTMNVluPwETT8R+f40AzaD7ir0crPC9/QbNLGi4TKU 5npVQ42w/nM00qlwitk+TbkLZ/gy8/tVG8V0pNVnXFlIBlx2+yI0lfLB+kCRROsVcVxp mk4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=tsB41+4EgyUunOq7BujrSPsWONdd9LWQqqjySDGDk54=; b=KMM8zeNPD782gFTVy5soakwJ8mGq6JyaiDQiDRFl9a6BzkWu4mbo6zgCJrVajOz0Vp BpU5BsWndbY46gp4NuWege3H9+crRcpq3FG5T4+DnRL+wgR5esVdcZCw4szCgu10sJmu uLg1/Yy9iJaGwleAgNKRDwKlSyePCtEJDHdeKyRUsurULRUZ35MbBcHh5v1wUfhLsEUx rrWME1YiyO+YV9mhwFO8pvEwAH/COYT/TPMCxbKhoJftg6HhNTVC84zdsabIxDg9hbX1 6THnDWt5qr27tDufNUQxRjRDldGAgRa/FxvTLntnMtwxYm0sRvAgc8zztnmq54JqPALj b/uQ== 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 nd15si30062511ejc.463.2021.10.05.03.30.26; Tue, 05 Oct 2021 03:30:51 -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 S233290AbhJEK26 (ORCPT + 99 others); Tue, 5 Oct 2021 06:28:58 -0400 Received: from mga09.intel.com ([134.134.136.24]:46740 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232723AbhJEK25 (ORCPT ); Tue, 5 Oct 2021 06:28:57 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10127"; a="225603001" X-IronPort-AV: E=Sophos;i="5.85,348,1624345200"; d="scan'208";a="225603001" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Oct 2021 03:27:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,348,1624345200"; d="scan'208";a="714164452" Received: from nntpat99-84.inn.intel.com ([10.125.99.84]) by fmsmga005.fm.intel.com with ESMTP; 05 Oct 2021 03:27:03 -0700 From: Alexey Bayduraev 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 Subject: [PATCH v2 0/5] perf session: Extend reader object to allow multiple readers Date: Tue, 5 Oct 2021 13:26:57 +0300 Message-Id: X-Mailer: git-send-email 2.19.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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] Patch set adds state info and decompressor object into reader object that made possible to split reader__process_events function into three logical parts: init/exit, 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 patch set was separated from [3] and already was rewieved by Namhyung Kim and Riccardo Mancini. The difference from [3] is that this patch set keeps reader object allocation on the stack. 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 (5): perf session: Introduce reader_state in reader object perf session: Introduce decompressor in reader object perf session: Move init/exit code to separate functions perf session: Move map/unmap to separate function perf session: Load single file for analysis tools/perf/util/session.c | 215 +++++++++++++++++++++++++------------- tools/perf/util/session.h | 10 +- 2 files changed, 151 insertions(+), 74 deletions(-) -- 2.19.0