Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4239964pxu; Mon, 12 Oct 2020 13:21:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxXPwmK27DPBwqCClB977x3rH6NbhfaEOQU9uyon3nt2/gssLJJa+SL2LNlwYhl9HNso0Ad X-Received: by 2002:a17:906:f988:: with SMTP id li8mr17126548ejb.93.1602534087098; Mon, 12 Oct 2020 13:21:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602534087; cv=none; d=google.com; s=arc-20160816; b=X8Hjaz2LVJD3iB3bHqI8n69IqZTinOlgt4tUNJtlbBQJTLbzWUSWq/H/KU2H+PLrRY Ks7JQQ/COVkmhKbu9/wJfJdWhm3fvsITJOAAo7uAETzYkjO8d5e+nbMtB2gyQ6TpGHgl aTa2EnchqnNGC3UXluThz1InuoEn4kKKRcah8B6jAFbcVW7lkk9WUVqt4MvQLKCpuu1B f4OU/X2EwOe8xEjTu34qgRwDWoX3nZwKJB/U8suAumZcH8FwNRbjaNrkvJqDDSmOD7dn 8cojD4ffSWpfiVMl7QzF534XSyNpTZuG37zEH2z/OKuC6ccGLBSr2sAd/ElIrV5/i1kK vvXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject:ironport-sdr:ironport-sdr; bh=qI936MBaQt5qIzTUIby0Wx/ehkQEzphmFrT0e1C1b8w=; b=TMhnxxL8ugOp8Krohagu9ug6rv2JBWdIAryjGW4vQ1gqIN8W91wHXMR17yFLMO/eQ6 8KT6KK2ShY0j34+wexrgpRPGzzREsJV7Tr9/nD9y0n+KRwgA0XvDt34mkJa3vEdHcHey Waugy+vkGStacHA6g9id2Xz5d/BJGkMIKHQwupeiWbuKhSauMRNeMfPdnZ4hXVI+uWtK 3ihNiJdTL/BiihPyLwhiUNfmcq/XKlEEpXSJgju34MuX8b/brRXMxWugk4jmzT8zsmPU 5ez0uesyAkENJS54Wssvnr+qtFDCK4RwQG+ARaTb9AbnQx73zXRzOzqv9LuywKvCsJvC NC8g== 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 b5si13223944ejq.317.2020.10.12.13.21.03; Mon, 12 Oct 2020 13:21:27 -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 S1727149AbgJLIx0 (ORCPT + 99 others); Mon, 12 Oct 2020 04:53:26 -0400 Received: from mga12.intel.com ([192.55.52.136]:34140 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726104AbgJLIx0 (ORCPT ); Mon, 12 Oct 2020 04:53:26 -0400 IronPort-SDR: H200fJXw9BeGD8m8AW4xRift0O3Mn6iUpNTcZH+8c+3pSgNb951KKfYk5fRYOJobOS7ycg4NZj 0iFp//WmCTuw== X-IronPort-AV: E=McAfee;i="6000,8403,9771"; a="145029885" X-IronPort-AV: E=Sophos;i="5.77,366,1596524400"; d="scan'208";a="145029885" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Oct 2020 01:53:24 -0700 IronPort-SDR: 6joNwhrGB5IsVqcd47Vmf3n39Wq6zCyRLGBMY6EcnoEZ5pMqdh4nRrkq4T+qpNFLb+R3yIMvyP HS/Qw81ke2Dw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,366,1596524400"; d="scan'208";a="519546146" Received: from linux.intel.com ([10.54.29.200]) by fmsmga006.fm.intel.com with ESMTP; 12 Oct 2020 01:53:24 -0700 Received: from [10.249.225.186] (abudanko-mobl.ccr.corp.intel.com [10.249.225.186]) by linux.intel.com (Postfix) with ESMTP id C4EC2580814; Mon, 12 Oct 2020 01:53:21 -0700 (PDT) Subject: [PATCH v1 01/15] perf session: introduce trace file path to be shown in raw trace dump To: Arnaldo Carvalho de Melo , Jiri Olsa Cc: Namhyung Kim , Alexander Shishkin , Andi Kleen , Adrian Hunter , Peter Zijlstra , Ingo Molnar , linux-kernel References: <810f3a69-0004-9dff-a911-b7ff97220ae0@linux.intel.com> From: Alexey Budankov Organization: Intel Corp. Message-ID: <3dbd03a9-5a0e-83ab-6c4a-13a71415d1f3@linux.intel.com> Date: Mon, 12 Oct 2020 11:53:20 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: <810f3a69-0004-9dff-a911-b7ff97220ae0@linux.intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Extend reader, ordered_event and decomp objects to contain path of a trace file being displayed. Signed-off-by: Alexey Budankov --- tools/perf/util/ordered-events.h | 1 + tools/perf/util/session.c | 2 ++ tools/perf/util/session.h | 1 + 3 files changed, 4 insertions(+) diff --git a/tools/perf/util/ordered-events.h b/tools/perf/util/ordered-events.h index 75345946c4b9..42c9764c6b5b 100644 --- a/tools/perf/util/ordered-events.h +++ b/tools/perf/util/ordered-events.h @@ -9,6 +9,7 @@ struct perf_sample; struct ordered_event { u64 timestamp; u64 file_offset; + const char *file_path; union perf_event *event; struct list_head list; }; diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index 7a5f03764702..4478ddae485b 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c @@ -2119,6 +2119,7 @@ typedef s64 (*reader_cb_t)(struct perf_session *session, struct reader { int fd; + const char *path; u64 data_size; u64 data_offset; reader_cb_t process; @@ -2241,6 +2242,7 @@ static int __perf_session__process_events(struct perf_session *session) .data_size = session->header.data_size, .data_offset = session->header.data_offset, .process = process_simple, + .path = session->data->file.path, }; struct ordered_events *oe = &session->ordered_events; struct perf_tool *tool = session->tool; diff --git a/tools/perf/util/session.h b/tools/perf/util/session.h index f76480166d38..378ffc3e2809 100644 --- a/tools/perf/util/session.h +++ b/tools/perf/util/session.h @@ -46,6 +46,7 @@ struct perf_session { struct decomp { struct decomp *next; u64 file_pos; + const char *file_path; size_t mmap_len; u64 head; size_t size; -- 2.24.1