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

Zachary Turner zturner at google.com
Wed Feb 18 20:54:08 PST 2015


I agree that unwinding is probably a hard thing to write tests for.  But
right now it has basically 0 coverage, so I really hope we can improve
that.  I'll be the first to admit that I am *not* an expert in this area,
but just looking at the patch description "This is initial implementation
of assembly profiler which only scans prologue/epilogue assembly
instructions to create CFI instructions" I feel like this is something that
would be a great candidate for unit tests.  Since a unit test is written in
C++, it need not be written against the public API.  You could just feed
the profiler sequences of bytes that represent prologues / epilogues, and
verify that the CFI instructions are correct.  (I hope that even makes
sense, again I'm not an expert on this, just trying to make guesses based
on the patch description).

You wouldn't even need to have an input binary to make this work.  Just
encode some prologues and epilogues into the unit test, and verify that the
profiler does the right thing.


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D7696

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the lldb-commits mailing list