linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: "Hunter, Adrian" <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>, Andi Kleen <ak@linux.intel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH V2 17/19] perf scripts python: exported-sql-viewer.py: Add All branches report
Date: Tue, 23 Oct 2018 16:29:35 -0300	[thread overview]
Message-ID: <20181023192935.GD6114@kernel.org> (raw)
In-Reply-To: <363DA0ED52042842948283D2FC38E4649C2B8A4D@IRSMSX106.ger.corp.intel.com>

Em Tue, Oct 23, 2018 at 06:41:17PM +0000, Hunter, Adrian escreveu:
> > -----Original Message-----
> > From: Arnaldo Carvalho de Melo [mailto:acme@kernel.org]
> > Sent: Tuesday, October 23, 2018 9:12 PM
> > To: Hunter, Adrian <adrian.hunter@intel.com>
> > Cc: Jiri Olsa <jolsa@redhat.com>; Andi Kleen <ak@linux.intel.com>; linux-
> > kernel@vger.kernel.org
> > Subject: Re: [PATCH V2 17/19] perf scripts python: exported-sql-viewer.py:
> > Add All branches report
> > 
> > Em Tue, Oct 23, 2018 at 10:59:49AM +0300, Adrian Hunter escreveu:
> > > Add a report to display branches in a similar fashion to perf script.
> > > The main purpose of this report is to display disassembly, however,
> > > presently, the only supported disassembler is Intel XED, and
> > > additionally the object code must be present in perf build ID cache.
> > >
> > > To use Intel XED, libxed.so must be present. To build and install
> > > libxed.so:
> > > 	git clone https://github.com/intelxed/mbuild.git mbuild
> > > 	git clone https://github.com/intelxed/xed
> > > 	cd xed
> > > 	./mfile.py --share
> > > 	sudo ./mfile.py --prefix=/usr/local install
> > > 	sudo ldconfig
> > >
> > > Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
> > > ---
> > >
> > >
> > > Changes in V2:
> > >
> > > 	Fix branch report not appearing for kernel-only or user-only tracing:
> > > 	Find branch events named like "branches:k" or "branches:u" as well
> > as
> > > 	just plain "branches", by splitting the name at the colon. i.e.
> > > 	event = event.split(":")[0]
> > 
> > So, I followed the instructions then ended up with:
> > 
> > [acme@seventh perf]$ find /usr/local -name "*xed*" | head
> > /usr/local/lib/libxed.so /usr/local/lib/libxed.a /usr/local/lib/libxed-ild.so
> > /usr/local/lib/libxed-ild.a /usr/local/include/xed /usr/local/include/xed/xed-
> > syntax-enum.h
> > /usr/local/include/xed/xed-attributes.h
> > /usr/local/include/xed/xed-build-defines.h
> > /usr/local/include/xed/xed-cpuid-rec.h
> > /usr/local/include/xed/xed-flags.h
> > [acme@seventh perf]$
> > 
> > Ran ldconfig as root, etc:
> > 
> > [acme@seventh perf]$ ldconfig -v -N | grep xed
> > ldconfig: Can't stat /libx32: No such file or directory
> > ldconfig: Path `/usr/lib' given more than once
> > ldconfig: Path `/usr/lib64' given more than once
> > ldconfig: Can't stat /usr/libx32: No such file or directory [acme@seventh
> > perf]$
> > 
> > [acme@seventh perf]$ file /usr/local/lib/libxed.so
> > /usr/local/lib/libxed.so: ELF 64-bit LSB shared object, x86-64, version 1
> > (SYSV), dynamically linked,
> > BuildID[sha1]=09cf45310a731f727b4575582a638052b8f3e3bb, not stripped
> > [acme@seventh perf]$ file /usr/local/lib/libxed-ild.so
> > /usr/local/lib/libxed-ild.so: ELF 64-bit LSB shared object, x86-64, version 1
> > (SYSV), dynamically linked,
> > BuildID[sha1]=a5601603e305bb7b7f8edc7da0e78acbc9b63eba, not stripped
> > [acme@seventh perf]$
> > 
> > Tried with:
> > 
> > export LD_LIBRARY_PATH=/usr/local/lib/
> > 
> > But so far couldn't get it to show the disassembly.
> > 
> > The "All Branches" is there, wasn't in v1 of this patch.
> > 
> > Ideas?
> 
> The "All Branches" report is a 2-level tree, and the disassembly displays when the next level of the tree is opened
> i.e. click the arrow at the start of the line.

Right, I pressed on those arrows, nothing appeared, do you have any
hotkey to expand them all at once?
 
> Have you tried both kernel and user space?

[root@seventh perf]# perf evlist -v
intel_pt//u: type: 8, size: 112, config: 0x300e601, { sample_period, sample_freq }: 1, sample_type: IP|TID|TIME|CPU|IDENTIFIER, read_format: ID, disabled: 1, inherit: 1, exclude_kernel: 1, exclude_hv: 1, sample_id_all: 1
dummy:u: type: 1, size: 112, config: 0x9, { sample_period, sample_freq }: 1, sample_type: IP|TID|TIME|CPU|IDENTIFIER, read_format: ID, inherit: 1, exclude_kernel: 1, exclude_hv: 1, mmap: 1, comm: 1, task: 1, sample_id_all: 1, mmap2: 1, comm_exec: 1, context_switch: 1
[root@seventh perf]#

Good question, it was with that //u, so just userspace, trying removing
that part.
 
> The script looks for dsos in the build id cache.  The dsos can be viewed by selecting dsos_view from the Tables menu,
> so you could check if that information looks right.
> 
> Also the script has a variable "have_disassembler", so you could hack the script to print that to find out if XED is working.
> 

  reply	other threads:[~2018-10-23 19:29 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-01  6:28 [PATCH 00/19] perf scripts python: call-graph-from-sql.py / exported-sql-viewer.py disassembly Adrian Hunter
2018-10-01  6:28 ` [PATCH 01/19] perf scripts python: call-graph-from-sql.py: Use SPDX license identifier Adrian Hunter
2018-10-26  7:36   ` [tip:perf/urgent] " tip-bot for Adrian Hunter
2018-10-01  6:28 ` [PATCH 02/19] perf scripts python: call-graph-from-sql.py: Provide better default column sizes Adrian Hunter
2018-10-26  7:36   ` [tip:perf/urgent] " tip-bot for Adrian Hunter
2018-10-01  6:28 ` [PATCH 03/19] perf scripts python: call-graph-from-sql.py: Set a minimum window size Adrian Hunter
2018-10-26  7:37   ` [tip:perf/urgent] " tip-bot for Adrian Hunter
2018-10-01  6:28 ` [PATCH 04/19] perf scripts python: call-graph-from-sql.py: Change icon Adrian Hunter
2018-10-26  7:37   ` [tip:perf/urgent] " tip-bot for Adrian Hunter
2018-10-01  6:28 ` [PATCH 05/19] perf scripts python: call-graph-from-sql.py: Make a "Main" function Adrian Hunter
2018-10-26  7:38   ` [tip:perf/urgent] " tip-bot for Adrian Hunter
2018-10-01  6:28 ` [PATCH 06/19] perf scripts python: call-graph-from-sql.py: Separate the database details into a class Adrian Hunter
2018-10-26  7:38   ` [tip:perf/urgent] " tip-bot for Adrian Hunter
2018-10-01  6:28 ` [PATCH 07/19] perf scripts python: call-graph-from-sql.py: Add a class for global data Adrian Hunter
2018-10-26  7:39   ` [tip:perf/urgent] " tip-bot for Adrian Hunter
2018-10-01  6:28 ` [PATCH 08/19] perf scripts python: call-graph-from-sql.py: Remove use of setObjectName() Adrian Hunter
2018-10-26  7:39   ` [tip:perf/urgent] " tip-bot for Adrian Hunter
2018-10-01  6:28 ` [PATCH 09/19] perf scripts python: call-graph-from-sql.py: Factor out CallGraphModel from TreeModel Adrian Hunter
2018-10-26  7:40   ` [tip:perf/urgent] " tip-bot for Adrian Hunter
2018-10-01  6:28 ` [PATCH 10/19] perf scripts python: call-graph-from-sql.py: Add data helper functions Adrian Hunter
2018-10-26  7:41   ` [tip:perf/urgent] " tip-bot for Adrian Hunter
2018-10-01  6:28 ` [PATCH 11/19] perf scripts python: call-graph-from-sql.py: Refactor TreeItem class Adrian Hunter
2018-10-26  7:41   ` [tip:perf/urgent] " tip-bot for Adrian Hunter
2018-10-01  6:28 ` [PATCH 12/19] perf scripts python: call-graph-from-sql.py: Rename to exported-sql-viewer.py Adrian Hunter
2018-10-26  7:42   ` [tip:perf/urgent] " tip-bot for Adrian Hunter
2018-10-01  6:28 ` [PATCH 13/19] perf scripts python: exported-sql-viewer.py: Add support for multiple sub-windows Adrian Hunter
2018-10-26  7:42   ` [tip:perf/urgent] " tip-bot for Adrian Hunter
2018-10-01  6:28 ` [PATCH 14/19] perf scripts python: exported-sql-viewer.py: Add ability to find symbols in the call-graph Adrian Hunter
2018-10-26  7:43   ` [tip:perf/urgent] " tip-bot for Adrian Hunter
2018-10-01  6:28 ` [PATCH 15/19] perf scripts python: exported-sql-viewer.py: Add ability to shrink / enlarge font Adrian Hunter
2018-10-26  7:43   ` [tip:perf/urgent] " tip-bot for Adrian Hunter
2018-10-01  6:28 ` [PATCH 16/19] perf scripts python: exported-sql-viewer.py: Add ability to display all the database tables Adrian Hunter
2018-10-26  7:44   ` [tip:perf/urgent] " tip-bot for Adrian Hunter
2018-10-01  6:28 ` [PATCH 17/19] perf scripts python: exported-sql-viewer.py: Add All branches report Adrian Hunter
2018-10-22 18:50   ` Arnaldo Carvalho de Melo
2018-10-22 18:50     ` Arnaldo Carvalho de Melo
2018-10-23  8:20       ` Adrian Hunter
2018-10-23  7:59   ` [PATCH V2 " Adrian Hunter
2018-10-23 18:12     ` Arnaldo Carvalho de Melo
2018-10-23 18:41       ` Hunter, Adrian
2018-10-23 19:29         ` Arnaldo Carvalho de Melo [this message]
2018-10-23 19:57           ` Hunter, Adrian
2018-10-23 20:02             ` Arnaldo Carvalho de Melo
2018-10-23 20:31               ` Adrian Hunter
2018-10-24 13:56                 ` Adrian Hunter
2018-10-24 14:16                   ` Arnaldo Carvalho de Melo
2018-10-26  7:45     ` [tip:perf/urgent] " tip-bot for Adrian Hunter
2018-10-01  6:28 ` [PATCH 18/19] perf scripts python: exported-sql-viewer.py: Add Selected " Adrian Hunter
2018-10-01  6:28 ` [PATCH 19/19] perf scripts python: exported-sql-viewer.py: Add help window Adrian Hunter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181023192935.GD6114@kernel.org \
    --to=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=ak@linux.intel.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).