Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp411466pxb; Wed, 29 Sep 2021 01:46:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzVBhxmaKb1TPEAIl/LriaCf8Ezhqd5n9cyrrPQOhFLAXYKTgmHQGH962hh6r3fFlmewNFM X-Received: by 2002:a50:fa89:: with SMTP id w9mr13693706edr.113.1632905160404; Wed, 29 Sep 2021 01:46:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632905160; cv=none; d=google.com; s=arc-20160816; b=qCt/H0ZYW+oTUIRFiRgPbJraBAwZGE+RzKqnmRSnGd4sAX5qrYwRGA6t0gSCdnyALS pdYvuml4E/33JwiEbglfuYrWLU72cSMUL8pM9hwC0/ViPZ2RIav3Dlaxii5Lziyap5Wb W71wLgInqI52tqCl36oEsbqHGpWyOfn4qLxt3I0bbI4OHYOM8WAgCna6Lq3p6EK4No+o u9O6NVNczwiR+AmWHXU1S5wEemqZGP/MesRNhG/WNuSkHpn5qQVl/NE1jeepJW+Fh3/V wdhjrlEqg1eXpY8dduB9krrrMRAIpHRynsr0G4xmY+H6abIhTsn8I//gCOOl9ADjYi+s 9Kzw== 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=6OHSuTG/a2RKOI5o3OsCyZbwASx8LWqI8T0XRbCaors=; b=ZqMHagEfR2bCNYcbmd/ZCXnMG0VPGmDbLWGUiTS7lUhXDVY9c/k5VGCi0ktWpNwqZf FvrbmjDovpkfXPXxgggpPvVqdRNXcmSdksi8kD5/9+Kt6MfTcWIkyOtLYz94q2myD8VI pvRgkv+nhjuYw4ltkv1gvH2uhCexNgF0EZD5/KYSRrteJgdBzJhpNJRrWgSI2eKCNri7 /twoewv07JqyuNp9G+WvL20KvSvcpcWPyJLq4znQ92rynbn1zNbB8cohLyJbYOFgqOKz e88e3vvk3WYr5Vy2fBgrv5Aj+DlA5zsxkLyWdoMYur0ItwAMx686936u5bXF88dGhiX1 LTMA== 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 r3si2101249edi.605.2021.09.29.01.45.36; Wed, 29 Sep 2021 01:46:00 -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 S244809AbhI2Ink (ORCPT + 99 others); Wed, 29 Sep 2021 04:43:40 -0400 Received: from mga07.intel.com ([134.134.136.100]:13702 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244582AbhI2Inj (ORCPT ); Wed, 29 Sep 2021 04:43:39 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10121"; a="288550361" X-IronPort-AV: E=Sophos;i="5.85,331,1624345200"; d="scan'208";a="288550361" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Sep 2021 01:41:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,331,1624345200"; d="scan'208";a="520757290" Received: from nntpat99-84.inn.intel.com ([10.125.99.84]) by orsmga001.jf.intel.com with ESMTP; 29 Sep 2021 01:41:55 -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 0/6] perf session: Extend reader object to allow multiple readers Date: Wed, 29 Sep 2021 11:41:48 +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 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 (6): perf session: Move reader structure to the top perf session: Introduce reader_state in reader object perf session: Introduce decompressor into reader object perf session: Move init/exit into reader__init/reader__exit functions perf session: Move map/unmap into reader__mmap function perf session: Load single file for analysis tools/perf/util/session.c | 272 +++++++++++++++++++++++++------------- tools/perf/util/session.h | 2 + 2 files changed, 179 insertions(+), 95 deletions(-) -- 2.19.0