Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp5332467pxu; Wed, 21 Oct 2020 22:12:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwIxYLoFkyqXfN3OIMfs8TvRxBOq4k0hqR1e5Rnx48sMzY4NrmIVrlyUn5gYi1lXnIr+MVz X-Received: by 2002:a17:906:7e43:: with SMTP id z3mr674755ejr.143.1603343565432; Wed, 21 Oct 2020 22:12:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603343565; cv=none; d=google.com; s=arc-20160816; b=Q5LDV7XGnyPQ6pmoDR/Yp5uyBK1Nkp32NlD4/3c0PC/Bq3n0TbI2L8o4ZPFF0iw8yM DNYysF8/hkaAl0D7WL+ukQSTDz7g6e+JDL4mjA3ph4pgxmwS0Ldk8zxyMYC9jBp8uCkY IrFaxGsa0EnylDthAZYHFEae0g3IbzYY7SMSYV4eMOsp8ANvJTZGJLiorRlBQxdWhOe2 Sh3I/mZtYc4FvtRUHiTlK0oQSII83rJSbTTV3ueAx7HbGN0+RuQhfDe6P5apyzmdJcRC JPvTspIDTOtKxzyUSS1yCk/0N/xCQxXK1DunhjQ4g4Eq9OzUZH01s6vQr5Bf3RJDhGUQ LJCw== 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 :references:cc:to:from:subject:ironport-sdr:ironport-sdr; bh=qI936MBaQt5qIzTUIby0Wx/ehkQEzphmFrT0e1C1b8w=; b=R4pf/09jZDa0TQ7oU+OpDnELAlHuN9gaC2NubRK++rlVzhtGg5+/C4v3gLqNX+ZrPl GUD05HAcNEhwzLrLgGwjNl/o1nMqlxTj/bXGpc4EMRp1DWLJ3sQuuIda1AipanEUqrH3 6UEXpQ/MVp9oZVtxUc98NdROZ/HP9o2IOsSge4G97EKVXPO5N6X+KP4hH1eu4zA/bPpZ TIfKrComxgNeWpSOaOLiPK4wD5v4OpKdc+5dkBLfkioeoLO48Lb+Hsl8yU63wu04LOdt KBLCZLepNnq0tb8jdV3dSHTN4i359u9UrtU3JdVj1ADb4WX1gSPDAq/1UWDv4GWhwTp9 Gisw== 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 w11si211192ejz.380.2020.10.21.22.12.23; Wed, 21 Oct 2020 22:12:45 -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 S2444239AbgJUP4r (ORCPT + 99 others); Wed, 21 Oct 2020 11:56:47 -0400 Received: from mga17.intel.com ([192.55.52.151]:50751 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2394589AbgJUP4r (ORCPT ); Wed, 21 Oct 2020 11:56:47 -0400 IronPort-SDR: iv+OuUIligen+mIezkzdpbnXKmRP2ZwslMvY86VC5lesdoAkH9rzp5rwpJ0fzicaIX3FVUPrJ5 ipZBK9/0YO/w== X-IronPort-AV: E=McAfee;i="6000,8403,9780"; a="147247476" X-IronPort-AV: E=Sophos;i="5.77,401,1596524400"; d="scan'208";a="147247476" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Oct 2020 08:56:30 -0700 IronPort-SDR: zYWuLHGqn2a8UF1KBhxglIOdg+1BVELJn5Q9ds1YC4lNOHHsIzT6MEsNZ/YNnfDCoCdXBl1ica 4KVdCu2P1/Aw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,401,1596524400"; d="scan'208";a="522788886" Received: from linux.intel.com ([10.54.29.200]) by fmsmga006.fm.intel.com with ESMTP; 21 Oct 2020 08:56:30 -0700 Received: from [10.249.231.46] (abudanko-mobl.ccr.corp.intel.com [10.249.231.46]) by linux.intel.com (Postfix) with ESMTP id D414A580720; Wed, 21 Oct 2020 08:56:27 -0700 (PDT) Subject: [PATCH v2 01/15] perf session: introduce trace file path to be shown in raw trace dump From: Alexey Budankov To: Arnaldo Carvalho de Melo , Jiri Olsa Cc: Namhyung Kim , Alexander Shishkin , Adrian Hunter , Andi Kleen , Peter Zijlstra , Ingo Molnar , linux-kernel References: <1ec29ed6-0047-d22f-630b-a7f5ccee96b4@linux.intel.com> Organization: Intel Corp. Message-ID: Date: Wed, 21 Oct 2020 18:56:26 +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: <1ec29ed6-0047-d22f-630b-a7f5ccee96b4@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