Re: [PATCH 0/3] perf: script: Intro capstone disasm engine to show instruction trace

From: Namhyung Kim
Date: Tue Jan 16 2024 - 22:48:55 EST


Hello,

On Tue, Jan 16, 2024 at 6:46 PM Changbin Du <changbin.du@xxxxxxxxxx> wrote:
>
> On Tue, Jan 16, 2024 at 05:53:40AM -0800, Andi Kleen wrote:
> > Changbin Du <changbin.du@xxxxxxxxxx> writes:
> >
> > > This series introduces capstone disassembler engine to print instructions of
> > > Intel PT trace, which was printed via the XED tool.
> >
> > FWIW at least on x86 in my experience capstone isn't that great an
> > disassembler. I used it in another project and ran into many decoding bugs.
> > They're mostly in obscure corners, but can be fairly annoying.
> >
> If so, I will preserve the old --xed option as an alternate.
>
> > My other concern with your patchkit is that you change the default
> > output formats. Since perf script is often used with scripts
> > (as the name implies) there is a certain expectation that the output
> > remains stable and parse-able. There are actually use cases where
> > the raw bytes "insn" output is needed.
> >
> > I would rather define new perf script output types for the new decoded output,
> > but keep the old alone.
> Agreed. What about these?
> - Add a new field 'insn_disam' to display decoded output.
> - Add params to '--insn-trace' option, that is '--insn-trace=[raw|disam]'.
> 'raw' is the default value.

Sounds good. FWIW capstone has been working fine in my
experience. :)

Thanks,
Namhyung