Em Fri, Jun 24, 2016 at 05:23:57PM +0530, Ravi Bangoria escreveu:
Change current data structures and function to enable cross arch annotate
and add support for x86 and arm instructions.
Current implementation does not contain logic of recording on one arch
and annotating on other. This remote annotate is partially possible with
current implementation for x86 (or may be arm as well) only. But, to make
remote annotation work properly, all architecture instruction tables need
to be included in the perf binary. And while annotating, look for
instruction table where perf.data was recorded.
+static struct arch_instructions {Why do we need arch specific find functions? Why not pass the
+ const char *arch;
+ int nmemb;
+ struct ins *instructions;
+ struct ins *(*ins__find)(const char *);
instructions pointer to it, just like you did with ins__sort().
Probably it is not needed to be global, you just pick the right
instructions table + its ARRAY_SIZE and pass it around, again, like you
did in ins__sort().
- Arnaldo