Re: [PATCH 2/2] perf, tools, script: Add support for printing assembler
From: Arnaldo Carvalho de Melo
Date: Mon Feb 29 2016 - 14:25:57 EST
Em Mon, Feb 29, 2016 at 06:35:28PM +0100, Andi Kleen escreveu:
> > What kernel have you used for testing this? 4.5-rc? I'm having trouble
> > with intel_pt with 4.5.0-rc4 :-\
>
> Works for me (on -rc5). What problem do you see?
Doesn't work for me on (4.5.0-rc4), but after your report of it working
my -rc4 .config and built -rc6+ with it, now it seems to work as
expected, will test your patch with it later.
> > And while this looks like a great feature to have, have you considered
> > using what is in tools/perf/util/intel-pt-decoder/ somehow, so that we
> > don't end up adding one more dependency on another external library?
>
> This needs a text disassembler.
>
> The PT decoder doesn't have a disassembler unfortunately. The kernel
> instruction decoder is also not a text disassembler. Changing it to do
> that would be a quite large project.
Pity, using this patch will not help with that and will add yet another
form of disassembly.
But then its a nice feature to have :-\ I'll test it.
> > It would be great if we could, if done that way, perhaps at some point
> > we could stop using objdump somehow :-\
>
> objdump does a lot of work to line up the source code correctly.
> Reproducing it would be a lot of work in perf too, and need
> large scales changes. Perhaps at some time, but not any time
> soon.
- Arnaldo