Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp5414754pxu; Thu, 22 Oct 2020 01:24:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWvZf6CfprS+hRV+dD7P9ibVSQ5iKfP6mVcS5fXSZbb9RkQE9dxfoW8pDbzPI/0wrLADd5 X-Received: by 2002:a05:6402:48d:: with SMTP id k13mr1216072edv.92.1603355047232; Thu, 22 Oct 2020 01:24:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603355047; cv=none; d=google.com; s=arc-20160816; b=p41JH34Ct9u7NkAysK7B2onr2WZGcrlIKXQ/yeFgkxmAnl6loCruil30P05C1FEBz0 WdEo58+QaTX2L8NgswQK3iWHh6b0Uyj/3wp3CiBoFEZ7PCFLi0lAHJehnRe2l1WpTOTZ rIFkGr4ndpFy6amKu+w0Kgbp8wz9EMSxd6QNHs1MKXbdvH1b6CRGglxN9jO7eprfnXkX s6viXLWhI4RUGsvdwWeMaVqBa2KuDPIkQP+XUVcdGIIkN1RYN+DDImdZb4tGfLvTCujl d29UoQPhZMwIZ3stJmHPdEmcFdu/39f5d7iE0NDOf5H90VGc0PUGqUSi1FNHsDfx+KUB jOZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=XePNdqdGUvR7uMsQ2+sIdYWLsR1M38GxB2KA6zWHEQk=; b=jn5z+MxvIKULdrmBPEcOMNws8UfIi2nSBggEx9z6AuSSHLv/pkns0DQDbvck/ywMIT tb6+acFrGt5oSVi3M5YKcw+M+Zv1FLCYH+s0eFs6jdof9K1Afc7Gvy9r2s9UIahI2l48 d9UFaOAhIq1B3iV96lCQRRrck+PDCpVPkzRD2rs/K/vvMXaDjwKJJ/cdZyynfYn55V0d 1jhVmGXrh5lbyrwELB7xW1lvNQL4IWKoWGb3XIpq4HM4PEY5B4XjFbNg+7/YhwgYyKnp dmudMbSXvK1FNy1MvOlShvF6Fa57jSg73em5IO4Ij4m3Q3xWcMgpW+WL60jOUl+CPtnX +E7Q== 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a3si528960edn.132.2020.10.22.01.23.45; Thu, 22 Oct 2020 01:24:07 -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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726286AbgJVE3I (ORCPT + 99 others); Thu, 22 Oct 2020 00:29:08 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:33386 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726275AbgJVE3I (ORCPT ); Thu, 22 Oct 2020 00:29:08 -0400 Received: by mail-wm1-f68.google.com with SMTP id f19so156600wmj.0 for ; Wed, 21 Oct 2020 21:29:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=XePNdqdGUvR7uMsQ2+sIdYWLsR1M38GxB2KA6zWHEQk=; b=k/izKDGFFdvLAZSJMJI3puywqKug05HZJxNB6T0Gbd9g1+PyKRc+k9sjO/Wv5C2/dA 5TkozrNMN/niiXb29lNbNzW5qa03TGAc1S4yw2GAUC1Qd5GyI+S5+u+CHtzXvzE/nREk iAsQMFsFiuBJnK6VBfZHORmO+caQHq2TGL4gBlvqpJmBZZ8LAVnX183hAQJwP6gjSDNZ gGHkr8QHg4P6zXubhMmF9Q/kr7+VUj5xdOdhQ6Ccmx1LrUHuL34jS5BdcRIioDQourll E464hCJRJInAzoZyfPvyxBltlpeOBMYsfuaoXUeRLVLUwVXG6fH1bm0kYXHiSTTwAt95 iucA== X-Gm-Message-State: AOAM530apc6WHN+gpaAHUwuoIx+NpRlosE4bu2YlnKze6SdnTC7A4nYv LmUtu0C4bs0AkCVSqXGM0uCTYBUduNmWqq6hJlE= X-Received: by 2002:a1c:3b8a:: with SMTP id i132mr609880wma.189.1603340945993; Wed, 21 Oct 2020 21:29:05 -0700 (PDT) MIME-Version: 1.0 References: <1ec29ed6-0047-d22f-630b-a7f5ccee96b4@linux.intel.com> In-Reply-To: From: Namhyung Kim Date: Thu, 22 Oct 2020 13:28:54 +0900 Message-ID: Subject: Re: [PATCH v2 01/15] perf session: introduce trace file path to be shown in raw trace dump To: Alexey Budankov Cc: Arnaldo Carvalho de Melo , Jiri Olsa , Alexander Shishkin , Adrian Hunter , Andi Kleen , Peter Zijlstra , Ingo Molnar , linux-kernel Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Thu, Oct 22, 2020 at 12:56 AM Alexey Budankov wrote: > > > Extend reader, ordered_event and decomp objects to contain path > of a trace file being displayed. > > Signed-off-by: Alexey Budankov Acked-by: Namhyung Kim Thanks Namhyung > --- > 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 > >