Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp809666imu; Fri, 11 Jan 2019 09:24:27 -0800 (PST) X-Google-Smtp-Source: ALg8bN6QXWgwFIpMDrC+LxezGc+orJJefTriw0euG5Zp4g/09uPj1w+h6KDYZMN+qwpkZO8q2ymu X-Received: by 2002:a63:77ce:: with SMTP id s197mr4032519pgc.89.1547227467527; Fri, 11 Jan 2019 09:24:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547227467; cv=none; d=google.com; s=arc-20160816; b=ixFKMqGOrRWu/WwhIzsOiuEr38XeBd3Pmr+KY+mBuTxwBkfP+eIknUUm4ABgIPtopW 48FOGhag0xTw0t8/cfmDidLTye7DmVgCx0IBt1GNQQnyatNiki5U9Cn+Jn11OHrPoveF kWyWNNL7TDhEkseuyJkQRZ1PbBikl1rIiX1g+wUwLa9TGCH23oPeWGWKms5MEG4gCxOD Yp+jfs4GzAip8l1/tI7gmer8k46DvYgV4kyCHpvHE+exldZTF/4jR+FsWq3FNQhARZW6 9xaJRoOu5Hnh4gqY1SF6AwiXmx3UePbkXe1YJKN7QqlqFeuco8oixvRhfg3fC92fqTUG BNog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=LZkyWy1BkQyj/p4yRi60GhXO9axHzfr6rC4dcREphdI=; b=r7Ri+cLIHhnQNlMWDdEgvsHbny0XnQPli6ZGvDZ5CRf50gi/a+D7MW0F+eTU+ULqWZ tKDZsINnm5i0xU695yBZ2N4lJDRAtx1hyMB2owTYTPjsBJAg/OfHesZXeh1Uq7wiaF2C NVM7WbLwJo9aaWMjKTog68AoSH1ZiAOvho287uH/6EE4w1fN/0ao2/qXUDeZ+2PkfdRr WLzJgTg1szWpKFSkMzhUbKHFR+jn75KEH4XmJ5iIFENmM8whHU6/48I6hwujJj1NVG9v iu7Hz4jS6szdT2iCbSwdfuHqJkPk857RFZu6MOFlDMADiCVAYwaIZlI5TY0P4Ye6K5wy yE4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=sL4HmWyv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id j10si2254133pgn.365.2019.01.11.09.24.11; Fri, 11 Jan 2019 09:24:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=sL4HmWyv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1732978AbfAKOBD (ORCPT + 99 others); Fri, 11 Jan 2019 09:01:03 -0500 Received: from mail.kernel.org ([198.145.29.99]:50754 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725803AbfAKOBC (ORCPT ); Fri, 11 Jan 2019 09:01:02 -0500 Received: from quaco.ghostprotocols.net (unknown [190.15.121.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A7B3F20872; Fri, 11 Jan 2019 14:01:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1547215261; bh=akPNRKJFG3urVkePStUWw7av6HEoDxtLgKCvdM9YJNk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=sL4HmWyvJEIEUgwv+KZ6iiNeuJm7FRfV6nrCtkl2QWFX83LapyTyAtw++sQcmJK1m y0gDY5/4+K43op7NAyZv/ChrrhTB6Qayw/UV7NEDS5l+yMA3164qFAp7tUlHtr74Rr v0GJkbr3LDYy+8W1cUR5ze5glufHogiWKL9J+ykY= Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 572AB41AB5; Fri, 11 Jan 2019 11:00:59 -0300 (-03) Date: Fri, 11 Jan 2019 11:00:59 -0300 From: Arnaldo Carvalho de Melo To: Thomas Richter Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, brueckner@linux.vnet.ibm.com, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com Subject: Re: [Patch 1/4] perf report: Add function for verbose dump of raw data Message-ID: <20190111140059.GV22483@kernel.org> References: <20190111115259.99438-1-tmricht@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190111115259.99438-1-tmricht@linux.ibm.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Fri, Jan 11, 2019 at 12:52:56PM +0100, Thomas Richter escreveu: > Add support to call an architecture dependend function to interpret > raw data verbatim when dumping the perf.data file with > option -D. Please add "per-arch" to the summary, so that just by looking at my inbox main page I can see what this is about. Also how this will deal with processing a perf.data file generated on a S/390 machine in another arch? I.e. on s/390: perf record -a sleep 10 on a x86_64: scp that file perf report -i perf.data.from.s390 ? report code should lookup a function for the architecture the perf.data was recorded on, using the perf.data file header, etc. const char *arch_name = perf_env__arch(session->header->env); Then lookup a table to find the right function, ok? See arch__find() for an example used in the annotation code. - Arnaldo > This allows to display the event's raw data more verbatim > than just plain hex data. > > Signed-off-by: Thomas Richter > --- > tools/perf/util/session.c | 7 +++++++ > tools/perf/util/session.h | 3 +++ > 2 files changed, 10 insertions(+) > > diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c > index 7d2c8ce6cfad..1c8d6d0ef300 100644 > --- a/tools/perf/util/session.c > +++ b/tools/perf/util/session.c > @@ -1050,6 +1050,12 @@ static void sample_read__printf(struct perf_sample *sample, u64 read_format) > sample->read.one.id, sample->read.one.value); > } > > +void __weak arch__trace_event(struct perf_evlist *evlist __maybe_unused, > + union perf_event *event __maybe_unused, > + struct perf_sample *sample __maybe_unused) > +{ > +} > + > static void dump_event(struct perf_evlist *evlist, union perf_event *event, > u64 file_offset, struct perf_sample *sample) > { > @@ -1060,6 +1066,7 @@ static void dump_event(struct perf_evlist *evlist, union perf_event *event, > file_offset, event->header.size, event->header.type); > > trace_event(event); > + arch__trace_event(evlist, event, sample); > > if (sample) > perf_evlist__print_tstamp(evlist, event, sample); > diff --git a/tools/perf/util/session.h b/tools/perf/util/session.h > index d96eccd7d27f..160d9cd6a3ae 100644 > --- a/tools/perf/util/session.h > +++ b/tools/perf/util/session.h > @@ -128,4 +128,7 @@ int perf_event__synthesize_id_index(struct perf_tool *tool, > struct perf_evlist *evlist, > struct machine *machine); > > +void arch__trace_event(struct perf_evlist *evlist __maybe_unused, > + union perf_event *event __maybe_unused, > + struct perf_sample *sample __maybe_unused); > #endif /* __PERF_SESSION_H */ > -- > 2.14.3 -- - Arnaldo