From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A8576C433E7 for ; Wed, 14 Oct 2020 16:15:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3291A2222A for ; Wed, 14 Oct 2020 16:15:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602692126; bh=Fn9uX5O2omnup/84D5aJ+WYmXcwdljJnj7f8uVPl5o8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=QTuS3oJPHWeBzJWiGcBkTmY1lJ5bSWzuQ0JqXAFPaN5HPFx67PdeXRorkt6/EPi7r MIdVjc6qLynjsdNcikWwpWY8vMAUs3tHPtU32os39uo9QLK+vHRyQEO+7lxfvBy6/1 OG8/0oJR2akvPxbmQ9DIeLCa22pjJwSkB9LV07hA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387834AbgJNQPZ (ORCPT ); Wed, 14 Oct 2020 12:15:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:53804 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726105AbgJNQPY (ORCPT ); Wed, 14 Oct 2020 12:15:24 -0400 Received: from quaco.ghostprotocols.net (unknown [179.97.37.151]) (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 525F4214D8; Wed, 14 Oct 2020 16:15:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602692124; bh=Fn9uX5O2omnup/84D5aJ+WYmXcwdljJnj7f8uVPl5o8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=lEPAxRe3UZkCD7LhX/u9Be2a6BTGt0enhY3I5FmpaBbqI8q2g7RyOO2nvCGbnXCrZ cuHUI9RctbgnCfSMpHeZBbihNk09SFpAk97fUekRctlyh0JHmXUIUQLwPbUOdAW5NY OIlisQU6iznnsLqCW1yebgPtA46XX0WfyvNUxXXA= Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 0FC634047F; Wed, 14 Oct 2020 13:15:22 -0300 (-03) Date: Wed, 14 Oct 2020 13:15:21 -0300 From: Arnaldo Carvalho de Melo To: Andi Kleen Cc: linux-kernel@vger.kernel.org, jolsa@kernel.org, adrian.hunter@intel.com, Andi Kleen Subject: Re: [PATCH] perf: Improve PT documentation slightly Message-ID: <20201014161521.GL3100363@kernel.org> References: <20201014035346.4772-1-andi@firstfloor.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201014035346.4772-1-andi@firstfloor.org> X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Tue, Oct 13, 2020 at 08:53:46PM -0700, Andi Kleen escreveu: > Document the higher level --insn-trace etc. perf script options. > > Include the howto how to build xed into the manpage Thanks, applied. > Cc: adrian.hunter@intel.com > Signed-off-by: Andi Kleen > --- > tools/perf/Documentation/perf-intel-pt.txt | 30 ++++++++++++++++++++++ > 1 file changed, 30 insertions(+) > > diff --git a/tools/perf/Documentation/perf-intel-pt.txt b/tools/perf/Documentation/perf-intel-pt.txt > index d5a266d7f15b..cc2a8b2be31a 100644 > --- a/tools/perf/Documentation/perf-intel-pt.txt > +++ b/tools/perf/Documentation/perf-intel-pt.txt > @@ -112,6 +112,32 @@ The flags are "bcrosyiABEx" which stand for branch, call, return, conditional, > system, asynchronous, interrupt, transaction abort, trace begin, trace end, and > in transaction, respectively. > > +perf script also supports higher level ways to dump instruction traces: > + > + perf script --insn-trace --xed > + > +Dump all instructions. This requires installing the xed tool (see XED below) > +Dumping all instructions in a long trace can be fairly slow. It is usually better > +to start with higher level decoding, like > + > + perf script --call-trace > + > +or > + > + perf script --call-ret-trace > + > +and then select a time range of interest. The time range can then be examined > +in detail with > + > + perf script --time starttime,stoptime --insn-trace --xed > + > +While examining the trace it's also useful to filter on specific CPUs using > +the -C option > + > + perf script --time starttime,stoptime --insn-trace --xed -C 1 > + > +Dump all instructions in time range on CPU 1. > + > Another interesting field that is not printed by default is 'ipc' which can be > displayed as follows: > > @@ -1093,6 +1119,10 @@ To display PEBS events from the Intel PT trace, use the itrace 'o' option e.g. > > perf script --itrace=oe > > +XED > +--- > + > +include::build-xed.txt[] > > SEE ALSO > -------- > -- > 2.28.0 > -- - Arnaldo