public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: acme@kernel.org, jolsa@kernel.org, namhyung@kernel.org,
	adrian.hunter@intel.com, alexander.shishkin@intel.com,
	linux-kernel@vger.kernel.org, Andi Kleen <ak@linux.intel.com>
Subject: Re: [PATCH 2/2] perf, tools, script: Add support for printing assembler
Date: Mon, 29 Feb 2016 11:27:12 +0100	[thread overview]
Message-ID: <20160229102712.GA16241@krava.redhat.com> (raw)
In-Reply-To: <1456533128-28381-2-git-send-email-andi@firstfloor.org>

On Fri, Feb 26, 2016 at 04:32:08PM -0800, Andi Kleen wrote:
> From: Andi Kleen <ak@linux.intel.com>
> 
> When dumping PT traces with perf script it is very useful to see the
> assembler for each sample, so that it is easily possible to follow
> the control flow.
> 
> As using objdump is difficult and inefficient from perf script this
> patch uses the udis86 library to implement assembler output.
> The library can be downloaded from http://udis86.sourceforge.net/
> 
> The library is probed as an external dependency in the usual way. Then perf
> script calls into it when needed, and handles callbacks to resolve
> symbols.
> 
> % perf record -e intel_pt//u true
> % perf script -F sym,symoff,ip,asm --itrace=i0ns | head
>      7fc7188b4190 _start+0x0	mov %rsp, %rdi
>      7fc7188b4193 _start+0x3	call _dl_start
>      7fc7188b7710 _dl_start+0x0	push %rbp
>      7fc7188b7711 _dl_start+0x1	mov %rsp, %rbp
>      7fc7188b7714 _dl_start+0x4	push %r15
>      7fc7188b7716 _dl_start+0x6	push %r14
>      7fc7188b7718 _dl_start+0x8	push %r13
>      7fc7188b771a _dl_start+0xa	push %r12
>      7fc7188b771c _dl_start+0xc	mov %rdi, %r12
>      7fc7188b771f _dl_start+0xf	push %rbx
> 
> Current issues:
> - Some jump references do not get resolved to symbols.
> - udis86 release does not support STAC/CLAC, which are used in the kernel,
> but there is a pending patch for it.
> 
> Cc: adrian.hunter@intel.com
> Signed-off-by: Andi Kleen <ak@linux.intel.com>
> ---
>  tools/build/Makefile.feature             |   6 +-
>  tools/build/feature/Makefile             |   8 ++-
>  tools/build/feature/test-all.c           |   5 ++
>  tools/build/feature/test-udis86.c        |   8 +++

hi,
could you please split the udis86 detection from the rest?

thanks,
jirka

>  tools/perf/Documentation/perf-script.txt |   4 +-
>  tools/perf/builtin-script.c              | 108 +++++++++++++++++++++++++++++--
>  tools/perf/config/Makefile               |   5 ++
>  7 files changed, 134 insertions(+), 10 deletions(-)
>  create mode 100644 tools/build/feature/test-udis86.c

SNIP

  reply	other threads:[~2016-02-29 10:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-27  0:32 [PATCH 1/2] perf, tools: Add support for skipping itrace instructions Andi Kleen
2016-02-27  0:32 ` [PATCH 2/2] perf, tools, script: Add support for printing assembler Andi Kleen
2016-02-29 10:27   ` Jiri Olsa [this message]
2016-02-29 14:56   ` Arnaldo Carvalho de Melo
2016-02-29 17:35     ` Andi Kleen
2016-02-29 19:25       ` Arnaldo Carvalho de Melo
2016-03-01 15:35         ` Intel PT not work on 4.5-rc6 as well after suspend/resume assembler Arnaldo Carvalho de Melo
2016-03-01 23:49           ` Andi Kleen
2016-03-02 12:02             ` Arnaldo Carvalho de Melo

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=20160229102712.GA16241@krava.redhat.com \
    --to=jolsa@redhat.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@intel.com \
    --cc=andi@firstfloor.org \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namhyung@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