mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <andi@firstfloor.org>,
	acme@kernel.org, linux-kernel@vger.kernel.org,
	Andi Kleen <ak@linux.intel.com>
Subject: Re: [PATCH 1/2] perf intel-pt-decoder: Report instruction bytes and length in sample
Date: Mon, 3 Oct 2016 17:33:05 -0700	[thread overview]
Message-ID: <20161004003305.GM5871@two.firstfloor.org> (raw)
In-Reply-To: <52540e1e-1341-4c89-d683-050c30788335@intel.com>

On Fri, Sep 30, 2016 at 01:07:17PM +0300, Adrian Hunter wrote:
> On 30/09/16 06:49, Andi Kleen wrote:
> > From: Andi Kleen <ak@linux.intel.com>
> > 
> > Change the Intel PT decoder to pass up the length and the instruction
> > bytes of the decoded or sampled instruction in the perf sample.
> > 
> > The decoder already knows this information, we just need to pass it
> > up. Since it is only a couple of movs it is not very expensive.
> 
> The decoder doesn't always fill the instruction buffer because it caches the
> results from walking basic blocks.  That means the bytes from the last
> instruction in the basic block would need to be added to the cache.

I fixed this and posted a new version.
> 
> I wonder if we shouldn't look at something more sophisticated e.g. a python
> script that can do full disassembly.

I had an earlier version that used a disassembler library, but that
wasn't appreciated, so now switched to this simpler method.
Assembler output can be done with a sed + objdump hack now.

-Andi

  reply	other threads:[~2016-10-04  0:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-30  3:49 Andi Kleen
2016-09-30  3:49 ` [PATCH 2/2] perf tools: Support insn and insnlen in perf script Andi Kleen
2016-09-30 10:07 ` [PATCH 1/2] perf intel-pt-decoder: Report instruction bytes and length in sample Adrian Hunter
2016-10-04  0:33   ` Andi Kleen [this message]
2016-10-04  0:30 Andi Kleen
2016-10-05 11:36 ` Arnaldo Carvalho de Melo
2016-10-07 13:45   ` 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=20161004003305.GM5871@two.firstfloor.org \
    --to=andi@firstfloor.org \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=ak@linux.intel.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

Powered by JetHome