mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Andi Kleen <andi@firstfloor.org>, acme@kernel.org
Cc: 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: Fri, 30 Sep 2016 13:07:17 +0300	[thread overview]
Message-ID: <52540e1e-1341-4c89-d683-050c30788335@intel.com> (raw)
In-Reply-To: <1475207387-27726-1-git-send-email-andi@firstfloor.org>

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 wonder if we shouldn't look at something more sophisticated e.g. a python
script that can do full disassembly.

  parent reply	other threads:[~2016-09-30 10:12 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 ` Adrian Hunter [this message]
2016-10-04  0:33   ` [PATCH 1/2] perf intel-pt-decoder: Report instruction bytes and length in sample Andi Kleen
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=52540e1e-1341-4c89-d683-050c30788335@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=andi@firstfloor.org \
    --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

all inboxes | Powered by JetHome®