Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp2733459pxv; Mon, 12 Jul 2021 00:11:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJweZ+xcMSJtzrDPq897JMntAW81uE/5taFUSafzh+rxDhT1fBpilc6uulhf63CUBMmgWY6F X-Received: by 2002:a05:6638:3382:: with SMTP id h2mr17051110jav.131.1626073883706; Mon, 12 Jul 2021 00:11:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626073883; cv=none; d=google.com; s=arc-20160816; b=F8AY6jfQSED4lar0nZn7EIR82dfqS4Uhm1U82nRBALX5VnkiXkGVsvRfdzGtcSChtJ 3JCRLCmQ5PO5hF4NWreOqZKdcu56YwY1KHDVQrHZuHUYURU66s630r/lAjjnLJiD4DOF XsR11kLEsobc4MJpaLA1fvAGkgFpH1vhTQYrI2PNHGGurOLZPwPzSwkYlRbagzds1gI4 PYgs/v8EaeuSEi+tc8LjWuKPvQGbJ+UPPfthb8Bhvhf99FyVgORrMW1R1JvTNgc9ZUoy cTEPHCHNmaLFQIHZjFjIQNKR60BzhWtM74T5KJLmcGkEStSyRsfCuX2K8Skqa045Pw6X bUHg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=CbWKR0FFv9GfIby/EKEYLwNkLHRhSKysZf1566+DENw=; b=foLvs6X6gs62//UweLQ54rp7v5YECXr+0JMbhMGdcjnaJOjGNhklqSwKyDmUut0UQ8 bPe9t/0GVocH0ZiEDkvW1PhtrIFN3HF9f5kJBaklPWiewggBTmwChUoFUQZ1oFrQ9VxE DaqW0KI7IMHUuxFpNvctmOlodsxnqs7ft51AN50NTZnMNJmrr0l03iBN/quARuoyLuoU pZ3G/prHkaW7a8ZmaH+GSuEPgj2yqKCA+Wy0CZjoS0Hj9FqSY4/L6rE4WHGUc4xzRkrh I7pyi6VNYQcQxhyKCVorj2oq9jQNEbkBaMaNdMg4NzEPHB2HOMe4KPhK5z1l42K8PH9/ +6cg== 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 k23si16385541iom.85.2021.07.12.00.11.12; Mon, 12 Jul 2021 00:11:23 -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 S245372AbhGLHMO (ORCPT + 99 others); Mon, 12 Jul 2021 03:12:14 -0400 Received: from mga03.intel.com ([134.134.136.65]:25894 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239996AbhGLGub (ORCPT ); Mon, 12 Jul 2021 02:50:31 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10042"; a="209973415" X-IronPort-AV: E=Sophos;i="5.84,232,1620716400"; d="scan'208";a="209973415" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jul 2021 23:47:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,232,1620716400"; d="scan'208";a="491916299" Received: from nntpat99-84.inn.intel.com ([10.125.99.84]) by FMSMGA003.fm.intel.com with ESMTP; 11 Jul 2021 23:47:22 -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 v10 15/24] perf report: Output non-zero offset for decompressed records Date: Mon, 12 Jul 2021 09:46:15 +0300 Message-Id: <169ba9534c2de573713664fa8799c09414eba047.1626072009.git.alexey.v.bayduraev@linux.intel.com> X-Mailer: git-send-email 2.19.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Print offset of PERF_RECORD_COMPRESSED record instead of zero for decompressed records in raw trace dump (-D option of perf-report): 0x17cf08 [0x28]: event: 9 instead of: 0 [0x28]: event: 9 Acked-by: Namhyung Kim Acked-by: Andi Kleen Signed-off-by: Alexey Bayduraev --- tools/perf/util/session.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index e9c929a39973..d5c29d903274 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c @@ -2105,7 +2105,7 @@ fetch_decomp_event(u64 head, size_t mmap_size, char *buf, bool needs_swap) static int __perf_session__process_decomp_events(struct perf_session *session) { s64 skip; - u64 size, file_pos = 0; + u64 size; struct decomp *decomp = session->decomp_last; if (!decomp) @@ -2121,7 +2121,7 @@ static int __perf_session__process_decomp_events(struct perf_session *session) size = event->header.size; if (size < sizeof(struct perf_event_header) || - (skip = perf_session__process_event(session, event, file_pos)) < 0) { + (skip = perf_session__process_event(session, event, decomp->file_pos)) < 0) { pr_err("%#" PRIx64 " [%#x]: failed to process type: %d\n", decomp->file_pos + decomp->head, event->header.size, event->header.type); return -EINVAL; -- 2.19.0