Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1506041pxv; Fri, 2 Jul 2021 05:35:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJydM8ne/ErdJ3TE8kmN4I+bKhVrLacVrjEHrcz4ejfEOA7kNZnqUMw/XDjl8D7UjT7hnOkq X-Received: by 2002:a50:afe2:: with SMTP id h89mr6590634edd.308.1625229343757; Fri, 02 Jul 2021 05:35:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625229343; cv=none; d=google.com; s=arc-20160816; b=VpyZoFe9uqOk58mgza3HwblTu1jwqm2OEiBcvmL4RfUQ33Y4GOOkH80vTFm2X8bUij YydQkIjs7ZIvBQJXPQzGxb5A2r81uGZJk73ppvs5XSIZPvLIfSHk/X+Efc+dpQCbA97g BwNqoEFR870odUX/ju4+yKH+L1k81V1xPQkDPWPXnIxv5zVdrFggWPCN2sk0vYb3q21l NBkox4A28HXJysX+RHaUEdIYp+sLc/woBUks7EbD3jrNAS4WoAt4grbh2wsJG3oXh/YJ two02HiZbMPPZRJczaw6rzwTzK9ST4yrYuHmq9gx613UPvI64T7wIU1lK3lYY5dan8I+ 3Skg== 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=pkQQXKiLyDlLJ+zDYcj3tCHkBGYvashXBkL/2q+VHdlDer+tp3M42ZZsDxbKKJ+ydO Wjn4DplVjgJnPv1JJbQ1A0aj94fGLoec279Qke2Ejr83cLgjZOI2ntao2g2ufevc6CgU ++DuocX7m52MXMGAWLHqC0nY0rtUvzocM0MJcBTjXd728CY3LzLhQb1Tcu3qWLnMR29I eg/rtsobEUlIj9DcLUkMvid3Cf7dQXTKd5mKj+d/LPRvyvV5q7DYAz7h/5uIATe3krF3 QrAOg6INc2RAky6YM19vVc3kjCmd+LrT41+QCC8CwhgyXVNMmJr6loldeCEruNuVn4L3 RRYQ== 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 s18si3579548eji.59.2021.07.02.05.35.21; Fri, 02 Jul 2021 05:35:43 -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 S232446AbhGBMfy (ORCPT + 99 others); Fri, 2 Jul 2021 08:35:54 -0400 Received: from mga17.intel.com ([192.55.52.151]:32637 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232460AbhGBMfy (ORCPT ); Fri, 2 Jul 2021 08:35:54 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10032"; a="189107302" X-IronPort-AV: E=Sophos;i="5.83,317,1616482800"; d="scan'208";a="189107302" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jul 2021 05:33:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,317,1616482800"; d="scan'208";a="642660300" Received: from nntpat99-84.inn.intel.com ([10.125.99.84]) by fmsmga006.fm.intel.com with ESMTP; 02 Jul 2021 05:33:19 -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 v9 15/24] perf report: Output non-zero offset for decompressed records Date: Fri, 2 Jul 2021 15:32:23 +0300 Message-Id: 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