[Lldb-commits] [PATCH] Initial Assembly profiler for mips64

Vince Harron vharron at google.com
Sat Feb 21 02:12:03 PST 2015

Regardless of this patch, is instruction emulation going to yield the best
results for all architectures?
 On Feb 21, 2015 2:03 AM, "Jason Molenda" <jmolenda at apple.com> wrote:

> I don't want to necessarily disagree with Greg but his suggestion about
> implementing an instruction emulation approach is a pretty big change to
> this patch.  There are two approaches to creating an unwind plan based on
> an instruction stream:  Hard-code knowledge about a small set of
> instructions that appear in function epilogues/prologues and use a
> disassembler to step over the unknown instructions, or have an instruction
> emulator that knows the behavior of them (well enough) so it can model the
> relevant instructions.
> For arm & arm64, lldb uses instruction emulation.  This was aided by the
> ARM instruction xml files which allow for much of the emulation code to be
> generated.
> The emulation approach allows for great flexibility, but it is (obviously)
> a lot more work.  The emulation approach can win when unusual function
> prologue instructions appear -- with the hard-coded instruction analyzer
> you need to know all of the different instructions that the compiler or
> hand-written assembly may use to manipulate the stack pointer, frame
> pointer, the caller's instruction and any saved registers.
> I don't think we should reject this patch in favor of writing this in the
> emulation style - that's likely to be a big ask.
>   rL LLVM
> http://reviews.llvm.org/D7696
>   http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150221/9459e11e/attachment.html>

More information about the lldb-commits mailing list