Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1220784pxb; Thu, 7 Oct 2021 03:27:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxeHxVkrjAmFkM4TZohEFqBtiI3Q7RgPJEoFBYp4pAQCjo5Ha4VgoNuLLg5gedRDBlYOE6P X-Received: by 2002:aa7:88cc:0:b0:431:c124:52ba with SMTP id k12-20020aa788cc000000b00431c12452bamr3186976pff.63.1633602438192; Thu, 07 Oct 2021 03:27:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633602438; cv=none; d=google.com; s=arc-20160816; b=ZxybzSUZgKXnU1rNrXddi+h7uosK9X18Xv4lLjcc8eBlV9BkbwrfEz/qENlEEmaTyS 8xHKxbF+pbBwMj4zmk3okJDsuUN2vsw6JHWFbEVnA3h4UwbHHtLKvtdt0G8A5FCQJU8U CyOrEWRgjPK3X3AhS0zBJfoV0A15pNopetvMqYkEqX0PV1hMFb3vEN3teIbpTcscgZvC eYH+OEAHZTctAm3HWSrhpwDtSdLpe85FZpHPZiLFyjMjBEy3+nsXpFEBzSDpDfG2B7X1 rCXizxWu+dE84EJqS+gcYvbxRcNFdAOrVuVWPxhDJ8Lhp8mTttX8bx2rGX/QHvnF17a7 ifBQ== 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=e4GwqVgsGbrkVYmG2Tm/UX4DrgYbbtMU3HNhJhGPl/M=; b=1AULNQtVKn//T+kJCiww/REBGdq+175ZpfXfiPNYPsyNHmcsF8MKvaLKhxUmwpAMP+ rfJeqJ288tyoafTEbNRfDY7bc8uU2KAHlSncRGyX4cmM2mtyFnnq9xgOBl/75vU67z9Y dHzjP/phk1ONjAsNDWrNwOdVQ0nrJ3+o1kPoMuQJkzM2bw7TrwmSYDaeV35sUuwcA+rS yBAjTEkg5YvD/DA+N45U4bM3TqnEdLw9nbl/JePCoW8x1h21Lqf2caX9PKl6lIz3Vimo rPIwf/SqbD5+7UsXP0Woy7XE5IgAD+xeIjMj+m7OO6VyQlQCx53YgLvI13xZ6obuwCe4 ydvg== 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 i2si10238416pjt.122.2021.10.07.03.27.04; Thu, 07 Oct 2021 03:27:18 -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 S240874AbhJGK1m (ORCPT + 99 others); Thu, 7 Oct 2021 06:27:42 -0400 Received: from mga01.intel.com ([192.55.52.88]:3730 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231825AbhJGK1l (ORCPT ); Thu, 7 Oct 2021 06:27:41 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10129"; a="249532625" X-IronPort-AV: E=Sophos;i="5.85,354,1624345200"; d="scan'208";a="249532625" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2021 03:25:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,354,1624345200"; d="scan'208";a="657335423" Received: from nntpat99-84.inn.intel.com ([10.125.99.84]) by orsmga005.jf.intel.com with ESMTP; 07 Oct 2021 03:25:45 -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 v3 0/5] perf session: Extend reader object to allow multiple readers Date: Thu, 7 Oct 2021 13:25:35 +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 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] Patch set 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 patch set 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 | 192 ++++++++++++++++++++++++++------------ tools/perf/util/session.h | 10 +- 2 files changed, 140 insertions(+), 62 deletions(-) -- 2.19.0